1 | %Start defining model parameters here
|
---|
2 | x = md.mesh.x;
|
---|
3 | y = md.mesh.y;
|
---|
4 | xmin = min(x);
|
---|
5 | xmax = max(x);
|
---|
6 | ymin = min(y);
|
---|
7 | ymax = max(y);
|
---|
8 | Lx = (xmax-xmin);
|
---|
9 | Ly = (ymax-ymin);
|
---|
10 | xm = (xmin+xmax)/2.;
|
---|
11 | ym = (ymin+ymax)/2.;
|
---|
12 |
|
---|
13 | %Geometry: U-shaped valley in y direction
|
---|
14 | thk_center = 1000.;
|
---|
15 | thk_margin = 0.5*thk_center;
|
---|
16 | bmax = 0.;
|
---|
17 | bmin = -thk_center*md.materials.rho_ice/md.materials.rho_water;
|
---|
18 |
|
---|
19 | alpha = 2./3.;
|
---|
20 | slope = 0.9*(bmin-bmax)*(x-xmin)/(Lx*alpha) + 0.1*(bmin-bmax)*(y-ymin)/(Ly) + bmax;
|
---|
21 | md.geometry.surface = (thk_center+bmax) + slope ;
|
---|
22 | md.geometry.base = bmax + slope + 4./Ly^2*(thk_center-thk_margin)*(y-ym).^2;
|
---|
23 | md.geometry.thickness = md.geometry.surface - md.geometry.base;
|
---|
24 | md.geometry.bed = md.geometry.base;
|
---|
25 |
|
---|
26 | %Mask
|
---|
27 | md.mask.ice_levelset = x - alpha*Lx;
|
---|
28 | md.mask.groundedice_levelset = ones(md.mesh.numberofvertices,1);
|
---|
29 |
|
---|
30 | %Initial velocity
|
---|
31 | md.initialization.vx = zeros(md.mesh.numberofvertices,1);
|
---|
32 | md.initialization.vy = zeros(md.mesh.numberofvertices,1);
|
---|
33 | md.initialization.vz = zeros(md.mesh.numberofvertices,1);
|
---|
34 | md.initialization.pressure = zeros(md.mesh.numberofvertices,1);
|
---|
35 |
|
---|
36 | %Materials
|
---|
37 | md.initialization.temperature = (273.15-5.)*ones(md.mesh.numberofvertices,1);
|
---|
38 | md.initialization.waterfraction = zeros(md.mesh.numberofvertices,1);
|
---|
39 | md.initialization.watercolumn = zeros(md.mesh.numberofvertices,1);
|
---|
40 | md.materials.rheology_B = paterson(md.initialization.temperature);
|
---|
41 | md.materials.rheology_n = 3.*ones(md.mesh.numberofelements,1);
|
---|
42 |
|
---|
43 | %Thermal
|
---|
44 | md.thermal.isenthalpy = 0;
|
---|
45 | md.thermal.spctemperature = NaN(md.mesh.numberofvertices,1);
|
---|
46 |
|
---|
47 | %Groundingline
|
---|
48 | md.groundingline.migration = 'SubelementMigration';
|
---|
49 |
|
---|
50 | %Surface mass balance and basal melting
|
---|
51 | md.smb.mass_balance = 0.3*ones(md.mesh.numberofvertices,1);
|
---|
52 | md.basalforcings.floatingice_melting_rate = md.smb.mass_balance;
|
---|
53 | md.basalforcings.groundedice_melting_rate = md.smb.mass_balance;
|
---|
54 |
|
---|
55 | %Friction
|
---|
56 | md.friction.coefficient = 20.*ones(md.mesh.numberofvertices,1);
|
---|
57 | md.friction.coefficient(find(md.mask.groundedice_levelset<0.)) = 0.;
|
---|
58 | md.friction.p = ones(md.mesh.numberofelements,1);
|
---|
59 | md.friction.q = ones(md.mesh.numberofelements,1);
|
---|
60 |
|
---|
61 | %Transient
|
---|
62 | md.transient.isstressbalance = 1;
|
---|
63 | md.transient.ismovingfront = 1;
|
---|
64 | md.transient.ismasstransport = 0;
|
---|
65 | md.transient.isthermal = 0;
|
---|
66 | md.transient.isgroundingline = 1;
|
---|
67 | md.transient.isgia = 0;
|
---|
68 |
|
---|
69 | %Stressbalance
|
---|
70 | md.stressbalance.maxiter = 100;
|
---|
71 | md.stressbalance.restol = 0.05;
|
---|
72 | md.stressbalance.reltol = 0.05;
|
---|
73 | md.stressbalance.abstol = NaN;
|
---|
74 |
|
---|
75 | %Masstransport;
|
---|
76 | md.calving.calvingrate = 0.*ones(md.mesh.numberofvertices,1);
|
---|
77 | md.frontalforcings.meltingrate = 0.*ones(md.mesh.numberofvertices,1);
|
---|
78 | md.levelset.spclevelset=NaN(md.mesh.numberofvertices,1);
|
---|
79 | md.masstransport.stabilization = 1.;
|
---|
80 |
|
---|
81 | %Numerical parameters
|
---|
82 | md.thermal.stabilization = 1.;
|
---|
83 | md.settings.waitonlock = 30;
|
---|
84 | md.steadystate.reltol = 0.05;
|
---|
85 | md.timestepping.time_step = 1.;
|
---|
86 | md.timestepping.final_time = 3.;
|
---|
87 |
|
---|
88 | %Verbose
|
---|
89 | md.verbose = verbose(0);
|
---|
90 |
|
---|
91 | %Deal with boundary conditions:
|
---|
92 | md = SetIceShelfBC(md);
|
---|
93 |
|
---|
94 | %Change name so that no test have the same name;
|
---|
95 | A = dbstack;
|
---|
96 | if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
|
---|