1 | %Start defining model parameters here
|
---|
2 | CO2_temp = 150; CO2_n = 7;
|
---|
3 | CO2_meltingPoint = 195; CO2_latentHeat = 199000;
|
---|
4 | CO2_rhoIce = 1562; CO2_heatCapacity = 700; CO2_thermalCond = 0.5;
|
---|
5 | CO2_dynViscosity = 13.72e-6; CO2_rhoLiquidZeroDeg = 929;
|
---|
6 | md.materials.rho_ice = CO2_rhoIce;
|
---|
7 | md.materials.rho_freshwater = CO2_rhoLiquidZeroDeg;
|
---|
8 | md.materials.thermalconductivity = CO2_thermalCond;
|
---|
9 | md.materials.heatcapacity = CO2_heatCapacity;
|
---|
10 | md.materials.meltingpoint = CO2_meltingPoint;
|
---|
11 | md.materials.latentheat = CO2_latentHeat;
|
---|
12 | md.materials.mu_water = CO2_dynViscosity;
|
---|
13 |
|
---|
14 | %Geometry
|
---|
15 | hmin=300;
|
---|
16 | hmax=1000;
|
---|
17 | ymin=min(md.mesh.y);
|
---|
18 | ymax=max(md.mesh.y);
|
---|
19 | xmin=min(md.mesh.x);
|
---|
20 | xmax=max(md.mesh.x);
|
---|
21 | md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin)+0.1*(hmin-hmax)*(md.mesh.x-xmin)/(xmax-xmin);
|
---|
22 | md.geometry.base=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+20.;
|
---|
23 | md.geometry.surface=md.geometry.base+md.geometry.thickness;
|
---|
24 |
|
---|
25 | %Initial velocity
|
---|
26 | x = archread('../Data/SquareSheetConstrained.arch','x');
|
---|
27 | y = archread('../Data/SquareSheetConstrained.arch','y');
|
---|
28 | vx = archread('../Data/SquareSheetConstrained.arch','vx');
|
---|
29 | vy = archread('../Data/SquareSheetConstrained.arch','vy');
|
---|
30 | index = archread('../Data/SquareSheetConstrained.arch','index');
|
---|
31 |
|
---|
32 | x = x{1};
|
---|
33 | y = y{1};
|
---|
34 | vx = vx{1};
|
---|
35 | vy = vy{1};
|
---|
36 | index = index{1};
|
---|
37 | md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
|
---|
38 | md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
|
---|
39 | clear vx vy x y index;
|
---|
40 | md.initialization.vz=zeros(md.mesh.numberofvertices,1);
|
---|
41 | md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
|
---|
42 |
|
---|
43 | %Materials
|
---|
44 | md.initialization.temperature=CO2_temp*ones(md.mesh.numberofvertices,1);
|
---|
45 | md.materials.rheology_B=nye(md.initialization.temperature,1);
|
---|
46 | md.materials.rheology_n=CO2_n*ones(md.mesh.numberofelements,1);
|
---|
47 |
|
---|
48 | %Surface mass balance and basal melting
|
---|
49 | md.smb.mass_balance=10*ones(md.mesh.numberofvertices,1);
|
---|
50 | md.basalforcings.floatingice_melting_rate=5*ones(md.mesh.numberofvertices,1);
|
---|
51 | md.basalforcings.groundedice_melting_rate=5*ones(md.mesh.numberofvertices,1);
|
---|
52 |
|
---|
53 | %Friction
|
---|
54 | md.friction.coefficient=20*ones(md.mesh.numberofvertices,1);
|
---|
55 | md.friction.coefficient(find(md.mask.groundedice_levelset<0.))=0.;
|
---|
56 | md.friction.p=ones(md.mesh.numberofelements,1);
|
---|
57 | md.friction.q=ones(md.mesh.numberofelements,1);
|
---|
58 |
|
---|
59 | %Numerical parameters
|
---|
60 | md.masstransport.stabilization=1;
|
---|
61 | md.thermal.stabilization=1;
|
---|
62 | md.verbose=verbose(0);
|
---|
63 | md.settings.waitonlock=30;
|
---|
64 | md.stressbalance.restol=0.05;
|
---|
65 | md.stressbalance.reltol=0.05;
|
---|
66 | md.steadystate.reltol=0.05;
|
---|
67 | md.stressbalance.abstol=NaN;
|
---|
68 | md.timestepping.time_step=1;
|
---|
69 | md.timestepping.final_time=3;
|
---|
70 | md.groundingline.migration='None';
|
---|
71 |
|
---|
72 | %Deal with boundary conditions:
|
---|
73 | md=SetIceSheetBC(md);
|
---|
74 |
|
---|
75 | %Change name so that no tests have the same name
|
---|
76 | A=dbstack;
|
---|
77 | if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
|
---|