1 | %Test Name: PigTranFrontalforcingsrignot
|
---|
2 | md=triangle(model(),'../Exp/Pig.exp',10000.);
|
---|
3 | md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
|
---|
4 | md=parameterize(md,'../Par/Pig.par');
|
---|
5 | md=setflowequation(md,'SSA','all');
|
---|
6 | md.timestepping.time_step=2;
|
---|
7 | md.timestepping.final_time=50;
|
---|
8 |
|
---|
9 | %separate domain in 2 basins
|
---|
10 | idbasin = zeros(md.mesh.numberofelements,1);
|
---|
11 | iid1 = find(md.mesh.x<=-1.6e6);
|
---|
12 | for ii=1:md.mesh.numberofelements
|
---|
13 | for vertex=1:3
|
---|
14 | if any(iid1==md.mesh.elements(ii,vertex)) %one vertex in basin 1
|
---|
15 | idbasin(ii) = 1;
|
---|
16 | end
|
---|
17 | end
|
---|
18 | if idbasin(ii)==0 %no vertex was found in basin 1
|
---|
19 | idbasin(ii) = 2;
|
---|
20 | end
|
---|
21 | end
|
---|
22 |
|
---|
23 | %calving and frontalforcings parameters
|
---|
24 | md.mask.ice_levelset = 1e4*(md.mask.ice_levelset + 0.5);
|
---|
25 | md.calving=calvingvonmises();
|
---|
26 | md.frontalforcings=frontalforcingsrignot();
|
---|
27 | md.frontalforcings.num_basins = 2;
|
---|
28 | md.frontalforcings.basin_id = idbasin;
|
---|
29 | md.frontalforcings.subglacial_discharge = 0.1*ones(md.mesh.numberofvertices,1);
|
---|
30 | md.frontalforcings.thermalforcing = 0.5*ones(md.mesh.numberofvertices,1);
|
---|
31 | for elem=1:md.mesh.numberofelements
|
---|
32 | if idbasin(elem)==2
|
---|
33 | md.frontalforcings.thermalforcing(md.mesh.elements(elem,1:3)) = 1.5;
|
---|
34 | end
|
---|
35 | end
|
---|
36 | md.transient.ismovingfront = 1;
|
---|
37 | md.levelset.spclevelset = NaN(md.mesh.numberofvertices,1);
|
---|
38 | md.levelset.migration_max = 1e10;
|
---|
39 |
|
---|
40 | md.transient.requested_outputs = {'default','CalvingMeltingrate'};
|
---|
41 | md.cluster=generic('name',oshostname(),'np',2);
|
---|
42 | md=solve(md,'Transient');
|
---|
43 |
|
---|
44 | %Fields and tolerances to track changes
|
---|
45 | field_names ={...
|
---|
46 | 'Vx1' ,'Vy1' ,'Vel1' ,'Pressure1' ,'Bed1' ,'Surface1' ,'Thickness1' ,'MaskIceLevelset1', 'CalvingMeltingrate1',...
|
---|
47 | 'Vx2' ,'Vy2' ,'Vel2' ,'Pressure2' ,'Bed2' ,'Surface2' ,'Thickness2' ,'MaskIceLevelset2', 'CalvingMeltingrate2',...
|
---|
48 | 'Vx10','Vy10','Vel10','Pressure10','Bed10','Surface10','Thickness10','MaskIceLevelset10', 'CalvingMeltingrate10',...
|
---|
49 | };
|
---|
50 | field_tolerances={...
|
---|
51 | 1e-11,2e-11,2e-11,1e-12,2e-11,6e-12,9e-12,1e-12,1e-9,...
|
---|
52 | 2e-11,1e-11,1e-11,9e-12,2e-1,2e-11,2e-11,1e-11,1e-9,...
|
---|
53 | 2e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-9,1e-9,...
|
---|
54 | };
|
---|
55 | field_values={...
|
---|
56 | (md.results.TransientSolution(1).Vx),...
|
---|
57 | (md.results.TransientSolution(1).Vy),...
|
---|
58 | (md.results.TransientSolution(1).Vel),...
|
---|
59 | (md.results.TransientSolution(1).Pressure),...
|
---|
60 | (md.results.TransientSolution(1).Base),...
|
---|
61 | (md.results.TransientSolution(1).Surface),...
|
---|
62 | (md.results.TransientSolution(1).Thickness),...
|
---|
63 | (md.results.TransientSolution(1).CalvingMeltingrate),...
|
---|
64 | (md.results.TransientSolution(1).MaskIceLevelset),...
|
---|
65 | (md.results.TransientSolution(2).Vx),...
|
---|
66 | (md.results.TransientSolution(2).Vy),...
|
---|
67 | (md.results.TransientSolution(2).Vel),...
|
---|
68 | (md.results.TransientSolution(2).Pressure),...
|
---|
69 | (md.results.TransientSolution(2).Base),...
|
---|
70 | (md.results.TransientSolution(2).Surface),...
|
---|
71 | (md.results.TransientSolution(2).Thickness),...
|
---|
72 | (md.results.TransientSolution(2).MaskIceLevelset),...
|
---|
73 | (md.results.TransientSolution(2).CalvingMeltingrate),...
|
---|
74 | (md.results.TransientSolution(10).Vx),...
|
---|
75 | (md.results.TransientSolution(10).Vy),...
|
---|
76 | (md.results.TransientSolution(10).Vel),...
|
---|
77 | (md.results.TransientSolution(10).Pressure),...
|
---|
78 | (md.results.TransientSolution(10).Base),...
|
---|
79 | (md.results.TransientSolution(10).Surface),...
|
---|
80 | (md.results.TransientSolution(10).Thickness),...
|
---|
81 | (md.results.TransientSolution(10).MaskIceLevelset),...
|
---|
82 | (md.results.TransientSolution(10).CalvingMeltingrate),...
|
---|
83 | };
|
---|