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

Last change on this file since 5955 was 5955, checked in by Eric.Larour, 14 years ago

Converted to new way of setting cluster

File size: 2.0 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.numberofgrids,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.numberofgrids,1);
29md.vy=zeros(md.numberofgrids,1);
30md.vz=zeros(md.numberofgrids,1);
31md.pressure=zeros(md.numberofgrids,1);
32
33%Materials
34md.observed_temperature=(273-20)*ones(md.numberofgrids,1);
35md.rheology_B=paterson(md.observed_temperature);
36md.rheology_n=3*ones(md.numberofelements,1);
37md.temperature=md.observed_temperature;
38
39%Boundary conditions:
40md.spcvelocity=zeros(md.numberofgrids,6);
41
42%constrain flanks to 0 normal velocity
43pos=find(md.x==xmin | md.x==xmax);
44md.spcvelocity(pos,1)=1;
45md.spcvelocity(pos,3)=0;
46
47%constrain grounding line to 0 velocity
48pos=find(md.y==ymin);
49md.spcvelocity(pos,1:2)=1;
50md.spcvelocity(pos,3:4)=0;
51
52%icefront
53gridonicefront=zeros(md.numberofgrids,1);
54pos=find(md.y==ymax); gridonicefront(pos)=1;
55pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); pressureload=md.segments(pos,:);
56pressureload=[pressureload WaterEnum*md.elementoniceshelf(pressureload(:,end))];
57md.pressureload=pressureload;
58
59md=solve(md,'analysis_type',DiagnosticSolutionEnum);
60
61%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
62%ey_c=(md.rho_ice*md.g*(1-di)*md.thickness./(4*md.rheology_B)).^3;
63%vy_c=ey_c.*md.y*md.yts;
64
65%Fields and tolerances to track changes
66field_names ={'Vy'};
67field_tolerances={1e-13};
68field_values={PatchToVec(md.results.DiagnosticSolution.Vy)};
Note: See TracBrowser for help on using the repository browser.