[4701] | 1 | % set up a local reliability study, like might be done in Pig.par
|
---|
| 2 |
|
---|
| 3 | %% a variety of variables
|
---|
| 4 |
|
---|
| 5 | % seems to be a Matlab bug here (on Linux, not WinXP) -- unless
|
---|
| 6 | % the class has been called, "empty" method can not be found
|
---|
| 7 | normal_uncertain;
|
---|
| 8 | continuous_design;
|
---|
| 9 | continuous_state;
|
---|
| 10 | linear_inequality_constraint;
|
---|
| 11 | linear_equality_constraint;
|
---|
| 12 | response_function;
|
---|
| 13 | objective_function;
|
---|
| 14 | least_squares_term;
|
---|
| 15 | nonlinear_inequality_constraint;
|
---|
| 16 | nonlinear_equality_constraint;
|
---|
| 17 |
|
---|
[9650] | 18 | md.qmu.variables=struct();
|
---|
| 19 | md.qmu.variables.nuv=normal_uncertain.empty();
|
---|
| 20 | %md.qmu.variables.nuv(end+1)=normal_uncertain('RhoIce',917,45.85);
|
---|
| 21 | %md.qmu.variables.nuv(end+1)=normal_uncertain('RhoWater',1023,51.15);
|
---|
| 22 | %md.qmu.variables.nuv(end+1)=normal_uncertain('HeatCapacity',2009,100.45);
|
---|
| 23 | %md.qmu.variables.nuv(end+1)=normal_uncertain('ThermalConductivity',2.2,0.11);
|
---|
| 24 | %md.qmu.variables.nuv(end+1)=normal_uncertain('Gravity',9.8,0.49);
|
---|
| 25 | md.qmu.variables.nuv(end+1)=normal_uncertain('Thickness',1,0.05);
|
---|
| 26 | %md.qmu.variables.nuv(end+1)=normal_uncertain('Drag',1,0.05);
|
---|
[4701] | 27 |
|
---|
| 28 | %% a variety of responses
|
---|
| 29 |
|
---|
[9650] | 30 | md.qmu.responses=struct();
|
---|
| 31 | md.qmu.responses.rf =response_function.empty();
|
---|
| 32 | md.qmu.responses.rf (end+1)=response_function('min_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 33 | md.qmu.responses.rf (end+1)=response_function('max_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 34 | md.qmu.responses.rf (end+1)=response_function('max_abs_vx',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 35 | md.qmu.responses.rf (end+1)=response_function('min_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 36 | md.qmu.responses.rf (end+1)=response_function('max_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 37 | md.qmu.responses.rf (end+1)=response_function('max_abs_vy',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 38 | md.qmu.responses.rf (end+1)=response_function('min_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 39 | md.qmu.responses.rf (end+1)=response_function('max_vel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 40 | md.qmu.responses.rf (end+1)=response_function('mass_flux1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 41 | md.qmu.responses.rf (end+1)=response_function('mass_flux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 42 | md.qmu.responses.rf (end+1)=response_function('mass_flux(3)',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 43 | md.qmu.responses.rf (end+1)=response_function('mass_flux4 (repeat)',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 44 | md.qmu.responses.rf (end+1)=response_function('mass_flux-5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 45 | md.qmu.responses.rf (end+1)=response_function('mass_flux^6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
| 46 | md.qmu.responses.rf (end+1)=response_function('mass_flux[7]',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
|
---|
[4701] | 47 |
|
---|
| 48 | %% create mass flux profile
|
---|
| 49 |
|
---|
| 50 | %plotmodel(md,'data','mesh')
|
---|
| 51 | %expcreateprofile('mass_flux.exp')
|
---|
| 52 | %expdisp('mass_flux.exp')
|
---|
[9650] | 53 | %md.qmu.mass_flux_profile='mass_flux.exp';
|
---|
| 54 | %md.qmu.mass_flux_profile={'mass_flux.exp','mass_flux2.exp','mass_flux3.exp'};
|
---|
| 55 | md.qmu.mass_flux_profile={'mass_flux.exp','mass_flux2.exp','mass_flux3.exp','mass_flux.exp','mass_flux5.exp','mass_flux6.exp','mass_flux7.exp'};
|
---|
[4701] | 56 |
|
---|
| 57 | %% nond_local_reliability study
|
---|
| 58 |
|
---|
[9650] | 59 | md.qmu.method =dakota_method('nond_l');
|
---|
[4701] | 60 |
|
---|
| 61 | %% a variety of parameters
|
---|
| 62 |
|
---|
[9650] | 63 | %md.qmu.params.evaluation_concurrency=4;
|
---|
| 64 | md.qmu.params.evaluation_concurrency=1;
|
---|
| 65 | md.qmu.params.analysis_driver='';
|
---|
| 66 | md.qmu.params.analysis_components='';
|
---|
| 67 | md.qmu.params.interval_type='forward';
|
---|
| 68 | md.qmu.params.fd_gradient_step_size=0.01;
|
---|
[4701] | 69 |
|
---|
[9650] | 70 | md.qmu.isdakota=1;
|
---|
| 71 | md.qmu.numberofpartitions=10;
|
---|
| 72 | if isempty(md.qmu.adjacency)
|
---|
[4701] | 73 | md=adjacency(md);
|
---|
| 74 | end
|
---|
[9650] | 75 | if isempty(md.qmu.partition)
|
---|
| 76 | % md.qmu.partition=partitioner(md,'package','metis','npart',md.qmu.numberofpartitions);
|
---|
| 77 | md.qmu.partition=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
|
---|
[4701] | 78 | % SpawnCore.m assumes partition vector starting at zero
|
---|
[9650] | 79 | md.qmu.partition=md.qmu.partition-1;
|
---|
[4701] | 80 | end
|
---|
| 81 | md.eps_rel=1.e-5;
|
---|
[6309] | 82 | md.cluster=none;
|
---|
[4701] | 83 |
|
---|
| 84 | md.qmu
|
---|
| 85 |
|
---|
| 86 | %% sample analysis
|
---|
| 87 |
|
---|
[15771] | 88 | %md=solve(md,'analysis_type','stressbalance');
|
---|
[4701] | 89 |
|
---|
| 90 | %plotmodel(md,'data','mesh')
|
---|
[9650] | 91 | %plotmodel(md,'data',md.qmu.partition)
|
---|
[4701] | 92 | %plotmodel(md,'data','mesh','partitionedges','on','linewidth',2)
|
---|
[9650] | 93 | %part_hist(md.qmu.partition,md.vertex_weight)
|
---|
| 94 | %plotmodel(md,'data',log10(md.results.dakota.dresp_out(9).impfac(md.qmu.partition+1)))
|
---|