rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
demo_rb_simtech.m
Go to the documentation of this file.
2 % demo starting a simtech LOGO in a fuelcell. Does not fully work yet...
3 % instead perhaps update the generating script simtech_fuelcall_gdl....
4 
5 % B. Haasdonk 11.1.2011
6 
7 model= lin_evol_model_default;
8 fn = fullfile(rbmatlabhome,'demos','datafiles','simtech_detailed.mat');
9 tmp = load(fn);
10 
11 extend = 0;
12 %extend = 1;
13 if extend
14  % file is very old... some conversions required
15  model = convdiff_model;
16  % now set different initial values by simtech image
17  model.init_values_ptr = @init_values_grey_image;
18  model.c_init_filename = 'simtech_binary.bmp';
19  model.c_init_xmin = 0;
20  model.c_init_xmax = 1.0000e-03;
21  model.c_init_ymin = 0;
22  model.c_init_ymax = 2.0000e-04;
23  model.c_init_xdivisions = 1e-3* (0.1:0.1:1);
24  model.clim = [0 1];
25 % tmpparams = tmp.params;
26 % % remove some strings, as now pointers in default model:
27 % tmpmodel = rmfield(tmpparams,...%
28 % {'detailed_simulation_algorithm',...%
29 % 'operators_algorithm',...%
30 % 'init_values_algorithm',...
31 % 'inner_product_matrix_algorithm',...
32 % 'error_algorithm'});
33 % model = structcpy (model,tmpmodel);
34 % model.init_values_algorithm = @fv_init_values;
35 % model.inner_product_matrix = @fv_inner_product_matrix;
36 % model.init_values_ptr = @init_values_grey_image;
37 % model.debug = 0;
38 % model.operators_diff_implicit = @fv_operators_diff_implicit_gradient;
39 % model.operators_conv_explicit = @fv_operators_conv_explicit_lax_friedrichs;
40 % model.operators_neumann_explicit = @fv_operators_neumann_explicit;
41 % model.operators_neumann_implicit = @fv_operators_zero;
42 % dirichlet_values_ptr: @dirichlet_values_weighted_boxes;
43 
44  % class rectgrid unknown, conversion to struct, generate class again:
45  detailed_data = tmp.detailed_data;
46  detailed_data.grid = construct_grid(model);
47  model_data = gen_model_data(model);
48  detailed_data.W = model_data.W;
49  plot_params = [];
50  plot_params.axis_tight = 1;
51  plot_params.axis_equal = 1;
52 % save(fn,'detailed_data','model','plot_params');
53 % keyboard;
54 else
55  model = tmp.model;
56  detailed_data = tmp.detailed_data;
57  plot_params = tmp.plot_params;
58 end;
59 demo_rb_gui(model,detailed_data,[],plot_params);
60 
function [ L_I_diff , bdir_I_diff ] = fv_operators_diff_implicit_gradient(model, model_data, U, NU_ind)
computes diffusion contributions to finite volume time evolution matrices, or their Frechet derivati...
function model = convdiff_model(dummy)
function creating a simple model for a linear convection diffusion problem
function [ L_E_neu , b_E_neu ] = fv_operators_neumann_explicit(model, model_data, U, NU_ind)
computes a neumann contribution matrix for finite volume time evolution operators, or their Frechet derivative
function demo_rb_gui(varargin)
reduced basis demo with sliders
Definition: demo_rb_gui.m:17
A cartesian rectangular grid in two dimensions with axis parallel elements.
Definition: rectgrid.m:17
function s1 = structcpy(s1, s2)
copies the fields of structure s2 into structure s1. If the field to be copied does not exist in s1 y...
Definition: structcpy.m:17
function demo_rb_simtech()
demo_rb_simtech demo starting a simtech LOGO in a fuelcell. Does not fully work yet... instead perhaps update the generating script simtech_fuelcall_gdl....
function [ L_E_conv , bdir_E_conv ] = fv_operators_conv_explicit_lax_friedrichs(model, model_data, U, NU_ind)
computes convection contribution to finite volume time evolution matrices, or their Frechet derivati...