1 | md=setmesh(model,'../Exp/Square.exp',150000);
|
---|
2 | md=setmask(md,'all','');
|
---|
3 | md=parameterize(md,'../Par/SquareShelf.par');
|
---|
4 | md=setflowequation(md,'macayeal','all');
|
---|
5 | md.cluster=none;
|
---|
6 |
|
---|
7 | md.timestepping.time_step=1;
|
---|
8 | md.settings.output_frequency=1;
|
---|
9 | md.timestepping.final_time=4;
|
---|
10 |
|
---|
11 | %Set up transient
|
---|
12 | smb = ones(md.mesh.numberofvertices,1)*3.6;
|
---|
13 | smb=[ smb smb*2 ];
|
---|
14 |
|
---|
15 | md.surfaceforcings.mass_balance= smb;
|
---|
16 | md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
|
---|
17 | md.transient.isthermal=0;
|
---|
18 |
|
---|
19 | md=solve(md,TransientSolutionEnum);
|
---|
20 |
|
---|
21 | %Fields and tolerances to track changes
|
---|
22 | field_names={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SurfaceforcingsMassBalance1', ...
|
---|
23 | 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SurfaceforcingsMassBalance2', ...
|
---|
24 | 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SurfaceforcingsMassBalance3', ...
|
---|
25 | 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SurfaceforcingsMassBalance4'};
|
---|
26 | field_tolerances={1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
|
---|
27 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
|
---|
28 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
|
---|
29 | 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
|
---|
30 |
|
---|
31 | field_values={...
|
---|
32 | PatchToVec(md.results.TransientSolution(1).Vx),...
|
---|
33 | PatchToVec(md.results.TransientSolution(1).Vy),...
|
---|
34 | PatchToVec(md.results.TransientSolution(1).Vel),...
|
---|
35 | PatchToVec(md.results.TransientSolution(1).Pressure),...
|
---|
36 | PatchToVec(md.results.TransientSolution(1).Bed),...
|
---|
37 | PatchToVec(md.results.TransientSolution(1).Surface),...
|
---|
38 | PatchToVec(md.results.TransientSolution(1).Thickness),...
|
---|
39 | PatchToVec(md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
|
---|
40 | PatchToVec(md.results.TransientSolution(2).Vx),...
|
---|
41 | PatchToVec(md.results.TransientSolution(2).Vy),...
|
---|
42 | PatchToVec(md.results.TransientSolution(2).Vel),...
|
---|
43 | PatchToVec(md.results.TransientSolution(2).Pressure),...
|
---|
44 | PatchToVec(md.results.TransientSolution(2).Bed),...
|
---|
45 | PatchToVec(md.results.TransientSolution(2).Surface),...
|
---|
46 | PatchToVec(md.results.TransientSolution(2).Thickness),...
|
---|
47 | PatchToVec(md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
|
---|
48 | PatchToVec(md.results.TransientSolution(3).Vx),...
|
---|
49 | PatchToVec(md.results.TransientSolution(3).Vy),...
|
---|
50 | PatchToVec(md.results.TransientSolution(3).Vel),...
|
---|
51 | PatchToVec(md.results.TransientSolution(3).Pressure),...
|
---|
52 | PatchToVec(md.results.TransientSolution(3).Bed),...
|
---|
53 | PatchToVec(md.results.TransientSolution(3).Surface),...
|
---|
54 | PatchToVec(md.results.TransientSolution(3).Thickness),...
|
---|
55 | PatchToVec(md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
|
---|
56 | PatchToVec(md.results.TransientSolution(4).Vx),...
|
---|
57 | PatchToVec(md.results.TransientSolution(4).Vy),...
|
---|
58 | PatchToVec(md.results.TransientSolution(4).Vel),...
|
---|
59 | PatchToVec(md.results.TransientSolution(4).Pressure),...
|
---|
60 | PatchToVec(md.results.TransientSolution(4).Bed),...
|
---|
61 | PatchToVec(md.results.TransientSolution(4).Surface),...
|
---|
62 | PatchToVec(md.results.TransientSolution(4).Thickness),...
|
---|
63 | PatchToVec(md.results.TransientSolution(4).SurfaceforcingsMassBalance),...
|
---|
64 | };
|
---|