[18198] | 1 | md=model();
|
---|
| 2 |
|
---|
| 3 | %Create mesh with roundmesh
|
---|
| 4 | md=roundmesh(md,750000,30000);
|
---|
| 5 |
|
---|
| 6 | %Set mask
|
---|
| 7 | md=setmask(md,'','');
|
---|
| 8 |
|
---|
| 9 | %Parameterize model
|
---|
| 10 | md=parameterize(md,'EISMINT.par');
|
---|
| 11 |
|
---|
| 12 | %We extrude the model to have a 3d model
|
---|
[20780] | 13 | md=extrude(md,10,1.);
|
---|
[18198] | 14 |
|
---|
| 15 | %Set ice flow approximation
|
---|
[20949] | 16 | md=setflowequation(md,'SIA','all');
|
---|
[18198] | 17 |
|
---|
| 18 | %Create boundary conditions: zero velocity on the bed
|
---|
| 19 | pos=find(md.mesh.vertexonbase);
|
---|
| 20 | md.stressbalance.spcvx(pos)=0;
|
---|
| 21 | md.stressbalance.spcvy(pos)=0;
|
---|
| 22 | md.stressbalance.spcvz(pos)=0;
|
---|
| 23 |
|
---|
| 24 | %Go Solve
|
---|
| 25 | md.cluster=generic('np',2);
|
---|
| 26 | md.verbose.convergence=1;
|
---|
[21057] | 27 | md=solve(md,'Stressbalance'());
|
---|
[18198] | 28 | vel=DepthAverage(md,sqrt(md.results.StressbalanceSolution.Vx.^2+md.results.StressbalanceSolution.Vy.^2));
|
---|
| 29 |
|
---|
| 30 | %Calculate analytical velocity
|
---|
| 31 | constant=0.3;
|
---|
| 32 | vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
|
---|
| 33 | vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
|
---|
| 34 | vel_obs=sqrt(vx_obs.^2+vy_obs.^2);
|
---|
| 35 | vel_obs=project2d(md,vel_obs,1);
|
---|
| 36 |
|
---|
| 37 | plotmodel(md,...
|
---|
| 38 | 'data',vel ,'view',2,'caxis',[0 200],'title','Modelled velocity',...
|
---|
| 39 | 'data',vel_obs,'view',2,'caxis',[0 200],'title','Analytical velocity',...
|
---|
| 40 | 'data',abs(vel-vel_obs)./(vel_obs+eps)*100,'caxis',[0 30],'view',2,'title','Relative misfit (%)');
|
---|
| 41 |
|
---|
| 42 | subplot(2,2,4)
|
---|
| 43 | hold on;
|
---|
| 44 | plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel,'r.');
|
---|
| 45 | plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
|
---|
| 46 | title('Analytical vs calculated velocity');
|
---|
[20779] | 47 | xlabel('distance to the center of the ice sheet (m)');
|
---|
[18198] | 48 | ylabel('velocity (m/yr)');
|
---|
| 49 | legend('calculated velocity','exact velocity');
|
---|
| 50 | axis([0 750000 0 200]);
|
---|
| 51 | hold off;
|
---|