source: issm/trunk/test/NightlyRun/test233.m@ 9463

Last change on this file since 9463 was 9463, checked in by Mathieu Morlighem, 14 years ago

removed all enums in pressureload

File size: 1.9 KB
Line 
1md=mesh(model,'../Exp/Square.exp',150000);
2md=geography(md,'all','');
3md=parameterize(md,'../Par/SquareShelf.par');
4md=setelementstype(md,'macayeal','all');
5md.cluster=none;
6
7%redo the parameter file for this special shelf.
8%constant thickness, constrained (vy=0) flow into an icefront,
9%from 0 m/yr at the grounding line.
10
11%tighten
12md.eps_res=10^-4;
13
14%needed later
15ymin=min(md.y);
16ymax=max(md.y);
17xmin=min(md.x);
18xmax=max(md.x);
19
20di=md.rho_ice/md.rho_water;
21
22h=1000;
23md.thickness=h*ones(md.numberofnodes,1);
24md.bed=-md.rho_ice/md.rho_water*md.thickness;
25md.surface=md.bed+md.thickness;
26
27%Initial velocity and pressure
28md.vx=zeros(md.numberofnodes,1);
29md.vy=zeros(md.numberofnodes,1);
30md.vz=zeros(md.numberofnodes,1);
31md.pressure=zeros(md.numberofnodes,1);
32
33%Materials
34md.temperature=(273-20)*ones(md.numberofnodes,1);
35md.rheology_B=paterson(md.temperature);
36md.rheology_n=3*ones(md.numberofelements,1);
37
38%Boundary conditions:
39md.spcvx=NaN*ones(md.numberofnodes,1);
40md.spcvy=NaN*ones(md.numberofnodes,1);
41md.spcvz=NaN*ones(md.numberofnodes,1);
42
43%constrain flanks to 0 normal velocity
44pos=find(md.x==xmin | md.x==xmax);
45md.spcvx(pos)=0;
46md.spcvz(pos)=NaN;
47
48%constrain grounding line to 0 velocity
49pos=find(md.y==ymin);
50md.spcvx(pos)=0;
51md.spcvy(pos)=0;
52
53%icefront
54nodeonicefront=zeros(md.numberofnodes,1);
55pos=find(md.y==ymax); nodeonicefront(pos)=1;
56pos=find(nodeonicefront(md.segments(:,1)) | nodeonicefront(md.segments(:,2))); pressureload=md.segments(pos,:);
57pressureload=[pressureload 1*md.elementoniceshelf(pressureload(:,end))];
58md.pressureload=pressureload;
59
60md=solve(md,DiagnosticSolutionEnum);
61
62%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
63%ey_c=(md.rho_ice*md.g*(1-di)*md.thickness./(4*md.rheology_B)).^3;
64%vy_c=ey_c.*md.y*md.yts;
65
66%Fields and tolerances to track changes
67field_names ={'Vy'};
68field_tolerances={1e-13};
69field_values={PatchToVec(md.results.DiagnosticSolution.Vy)};
Note: See TracBrowser for help on using the repository browser.