Changeset 4883
- Timestamp:
- 07/29/10 12:42:22 (15 years ago)
- Location:
- issm/trunk/test/Validation/ISMIP
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/Validation/ISMIP/TestA/Square.par
r3768 r4883 22 22 disp(' boundary conditions for diagnostic model'); 23 23 %Create grid on boundary fist (because we cannot use mesh) 24 md.gridonboundary=zeros(md.numberofgrids,1); 25 pos=find(md.x==0 | md.y==0 | md.x==max(md.x) | md.y==max(md.y)); 26 md.gridonboundary(pos)=1; 27 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 28 pos=find(md.gridonboundary);md.gridondirichlet_diag(pos)=1; 29 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 30 md.segmentonneumann_diag=zeros(0,3); 31 md.gridondirichlet_thermal=zeros(md.numberofgrids,1); 24 md=SetIceSheetBC(md); 25 26 md.np=3; -
issm/trunk/test/Validation/ISMIP/TestA/runme.m
r899 r4883 12 12 md=extrude(md,10,1); 13 13 14 %Create dirichlet on the bed on top of the borders15 pos=find(md.gridonbed);16 md.gridondirichlet_diag(pos)=1;17 18 14 md=setelementstype(md,'pattyn','all'); 19 15 %md=setelementstype(md,'pattyn','all','stokes','all'); 20 16 21 17 %Create dirichlet on the bed only 22 md. gridondirichlet_diag=zeros(md.numberofgrids,1);18 md.spcvelocity=zeros(md.numberofgrids,6); 23 19 pos=find(md.gridonbed); 24 md. gridondirichlet_diag(pos)=1;20 md.spcvelocity(pos,1:2)=1; 25 21 26 22 %Create MPCs to have periodic boundary conditions 27 posx=find(md.x==0);28 posx2=find(md.x==max(md.x));29 30 posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times31 posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));32 33 md.penalties=[posx,posx2;posy,posy2];23 %posx=find(md.x==0); 24 %posx2=find(md.x==max(md.x)); 25 % 26 %posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times 27 %posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x)); 28 % 29 %md.penalties=[posx,posx2;posy,posy2]; 34 30 35 31 %Compute the diagnostic 36 md=solve(md,'analysis_type','diagnostic','package','ice'); 32 md=solve(md,'analysis_type',DiagnosticSolutionEnum); 33 vx=zeros(md.numberofgrids,1); 34 vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value; 35 vy=zeros(md.numberofgrids,1); 36 vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value; 37 vz=zeros(md.numberofgrids,1); 38 vz(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value; 37 39 38 plotmodel(md,'data', md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2})40 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2}) -
issm/trunk/test/Validation/ISMIP/TestB/Square.par
r3768 r4883 20 20 md.rheology_n=3*ones(md.numberofelements,1); 21 21 22 disp(' boundary conditions for diagnostic model: '); 23 %Create grid on boundary fist (because wi can not use mesh) 24 md.gridonboundary=zeros(md.numberofgrids,1); 25 pos=find(md.x==0 | md.y==0 | md.x==max(md.x) | md.y==max(md.y)); 26 md.gridonboundary(pos)=1; 27 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 28 pos=find(md.gridonboundary);md.gridondirichlet_diag(pos)=1; 29 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 30 md.segmentonneumann_diag=zeros(0,3); 31 md.gridondirichlet_thermal=zeros(md.numberofgrids,1); 22 disp(' boundary conditions for diagnostic model'); 23 %Create grid on boundary fist (because we cannot use mesh) 24 md=SetIceSheetBC(md); 25 26 md.np=3; -
issm/trunk/test/Validation/ISMIP/TestB/runme.m
r899 r4883 12 12 md=extrude(md,10,1); 13 13 14 %Create dirichlet on the bed on top of the boundary15 pos=find(md.gridonbed);16 md.gridondirichlet_diag(pos)=1;17 18 14 %md=setelementstype(md,'pattyn','all','stokes','all'); 19 15 md=setelementstype(md,'pattyn','all'); 20 16 21 17 %Create dirichlet on the bed only 22 md. gridondirichlet_diag=zeros(md.numberofgrids,1);18 md.spcvelocity=zeros(md.numberofgrids,6); 23 19 pos=find(md.gridonbed); 24 md. gridondirichlet_diag(pos)=1;20 md.spcvelocity(pos,1:2)=1; 25 21 26 % Create MPCs to have periodic boundary conditions27 posx=find(md.x==0);28 posx2=find(md.x==max(md.x));29 30 posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times31 posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));32 33 md.penalties=[posx,posx2;posy,posy2];22 %%Create MPCs to have periodic boundary conditions 23 %posx=find(md.x==0); 24 %posx2=find(md.x==max(md.x)); 25 % 26 %posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times 27 %posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x)); 28 % 29 %md.penalties=[posx,posx2;posy,posy2]; 34 30 35 31 %Compute the diagnostic 36 md=solve(md,'analysis_type','diagnostic','package','ice'); 32 md=solve(md,'analysis_type',DiagnosticSolutionEnum); 33 vx=zeros(md.numberofgrids,1); 34 vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value; 35 vy=zeros(md.numberofgrids,1); 36 vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value; 37 vz=zeros(md.numberofgrids,1); 38 vz(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value; 37 39 38 plotmodel(md,'data', md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers)40 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2}) -
issm/trunk/test/Validation/ISMIP/TestC/Square.par
r3768 r4883 22 22 disp(' boundary conditions for diagnostic model: '); 23 23 %Create grid on boundary fist (because wi can not use mesh) 24 md.gridonboundary=zeros(md.numberofgrids,1); 25 pos=find(md.x==0 | md.y==0 | md.x==max(md.x) | md.y==max(md.y)); 26 md.gridonboundary(pos)=1; 27 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 28 pos=find(md.gridonboundary);md.gridondirichlet_diag(pos)=1; 29 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 30 md.segmentonneumann_diag=zeros(0,3); 31 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 24 md=SetIceSheetBC(md); 25 md.np=3; -
issm/trunk/test/Validation/ISMIP/TestC/runme.m
r899 r4883 15 15 %md=setelementstype(md,'pattyn','all','stokes','all'); 16 16 17 %Add dirichlet values on the corners (we need dirichlet somewhere 18 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 19 pos=find((md.x==0 |md.x==L) & (md.y==0 | md.y==L)); 20 %pos=find((md.x==0 |md.x==L | md.y==0 | md.y==L)); %dirichlet on all the boundaries 21 md.gridondirichlet_diag(pos)=1; 22 23 %Create MPCs to have periodic boundary conditions 24 posx=find(md.x==0); 25 posx2=find(md.x==L); 26 27 posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same grids two times 28 posy2=find(md.y==L & md.x~=0 & md.x~=L); 29 30 md.penalties=[posx,posx2;posy,posy2]; 17 %%Create MPCs to have periodic boundary conditions 18 %posx=find(md.x==0); 19 %posx2=find(md.x==L); 20 % 21 %posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same grids two times 22 %posy2=find(md.y==L & md.x~=0 & md.x~=L); 23 % 24 %md.penalties=[posx,posx2;posy,posy2]; 31 25 32 26 %Compute the diagnostic 33 md=solve(md,'analysis_type','diagnostic','package','ice'); 27 md=solve(md,'analysis_type',DiagnosticSolutionEnum); 28 vx=zeros(md.numberofgrids,1); 29 vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value; 30 vy=zeros(md.numberofgrids,1); 31 vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value; 32 vz=zeros(md.numberofgrids,1); 33 vz(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value; 34 34 35 plotmodel(md,'data', md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers,'contourlevels',{10.878,16.317,21.756,43.51,59.829},'contourlevels',{-2.421,-1.614,-0.807,3.228},'contourlevels',{-2.48,-1.86,0,0.62,1.24,1.86,2.48})35 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers,'contourlevels',{10.878,16.317,21.756,43.51,59.829},'contourlevels',{-2.421,-1.614,-0.807,3.228},'contourlevels',{-2.48,-1.86,0,0.62,1.24,1.86,2.48}) -
issm/trunk/test/Validation/ISMIP/TestD/Square.par
r3768 r4883 22 22 disp(' boundary conditions for diagnostic model: '); 23 23 %Create grid on boundary fist (because wi can not use mesh) 24 md.gridonboundary=zeros(md.numberofgrids,1); 25 pos=find(md.x==0 | md.y==0 | md.x==max(md.x) | md.y==max(md.y)); 26 md.gridonboundary(pos)=1; 27 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 28 pos=find(md.gridonboundary);md.gridondirichlet_diag(pos)=1; 29 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 30 md.segmentonneumann_diag=zeros(0,3); 31 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 24 md=SetIceSheetBC(md); 25 26 md.np=3; -
issm/trunk/test/Validation/ISMIP/TestD/runme.m
r899 r4883 16 16 %md=setelementstype(md,'pattyn','all','stokes','all'); 17 17 18 %No dirichlet in this model, just periodic boundary conditions19 md.gridondirichlet_diag=zeros(md.numberofgrids,1);20 pos=find((md.x==0 |md.x==80000 ) & (md.y==0 | md.y==80000));21 md.gridondirichlet_diag(pos)=1;22 23 18 %We need one grd on dirichlet (in the middle) 24 19 %md.gridondirichlet_diag(33)=1; … … 35 30 36 31 %Compute the diagnostic 37 md=solve(md,'analysis_type','diagnostic','package','ice'); 32 md=solve(md,'analysis_type',DiagnosticSolutionEnum); 33 vx=zeros(md.numberofgrids,1); 34 vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value; 35 vy=zeros(md.numberofgrids,1); 36 vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value; 37 vz=zeros(md.numberofgrids,1); 38 vz(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value; 38 39 39 plotmodel(md,'data', md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers)40 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers) -
issm/trunk/test/Validation/ISMIP/TestE/Square.par
r3768 r4883 34 34 disp(' boundary conditions for diagnostic model: '); 35 35 %Create grid on boundary fist (because wi can not use mesh) 36 md.gridonboundary=zeros(md.numberofgrids,1); 37 pos=find(md.x==0 | md.y==0 | md.x==max(md.x) | md.y==max(md.y)); 38 md.gridonboundary(pos)=1; 39 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 40 pos=find(md.y==0 | md.y==max(md.y));md.gridondirichlet_diag(pos)=1; 41 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 42 md.segmentonneumann_diag=zeros(0,3); 43 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 36 md=SetIceSheetBC(md); 37 38 md.np=3; -
issm/trunk/test/Validation/ISMIP/TestE/runme.m
r899 r4883 13 13 md=extrude(md,10,1); 14 14 15 md .gridondirichlet_diag(find(md.gridonbed))=1; %case 1: no slip16 %md .gridondirichlet_diag(find(md.gridonbed & (md.y<2200 | md.y> 2500)))=1; %case 2: slip between 2200 and 2500m15 md=setelementstype(md,'pattyn','all'); 16 %md=setelementstype(md,'pattyn','all','stokes','all'); 17 17 18 %md=setelementstype(md,'pattyn','all'); 19 md=setelementstype(md,'pattyn','all','stokes','all'); 20 21 md.gridonstokes(find(md.x==0 | md.x==Lx))=0; 22 %Create MPCs to have periodic boundary conditions 23 posx=find(md.x==0); 24 posx2=find(md.x==max(md.x)); 25 26 md.penalties=[posx,posx2]; 18 %md.gridonstokes(find(md.x==0 | md.x==Lx))=0; 19 %%Create MPCs to have periodic boundary conditions 20 %posx=find(md.x==0); 21 %posx2=find(md.x==max(md.x)); 22 % 23 %md.penalties=[posx,posx2]; 27 24 28 25 %Compute the diagnostic 29 md=solve(md,'analysis_type','diagnostic','package','ice'); 26 md=solve(md,'analysis_type',DiagnosticSolutionEnum); 27 vx=zeros(md.numberofgrids,1); 28 vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value; 29 vy=zeros(md.numberofgrids,1); 30 vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value; 31 vz=zeros(md.numberofgrids,1); 32 vz(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value; 30 33 31 plotmodel(md,'data', md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers)34 plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers) -
issm/trunk/test/Validation/ISMIP/TestF/Square.par
r3768 r4883 37 37 md.connectivity=200; 38 38 md.np=8; 39 md.cluster=' astrid';39 md.cluster='wilkes'; 40 40 md.time=50; 41 41 -
issm/trunk/test/Validation/ISMIP/TestF/runme.m
r2527 r4883 8 8 md=model; 9 9 %md=squaremesh(md,L,L,nx,ny); 10 md=mesh(md,'DomainOutline.exp', 2500);10 md=mesh(md,'DomainOutline.exp',5500); 11 11 md=geography(md,'',''); %ice sheet test 12 12 md=parameterize(md,'Square.par'); 13 md=extrude(md, 10,1);13 md=extrude(md,5,1); 14 14 15 15 md=setelementstype(md,'pattyn','all'); … … 31 31 32 32 %Compute the diagnostic 33 md=solve(md,'analysis_type','transient'); 33 md=solve(md,'analysis_type',Transient3DSolutionEnum); 34 vx=zeros(md.numberofgrids,1); 35 vx(md.results.Transient2DSolution(end).Vx.index)=md.results.Transient3DSolution.Vx(end).value; 36 vy=zeros(md.numberofgrids,1); 37 vy(md.results.Transient3DSolution.Vy(end).index)=md.results.Transient3DSolution.Vy(end).value; 38 vz=zeros(md.numberofgrids,1); 39 vz(md.results.Transient3DSolution.Vz(end).index)=md.results.Transient3DSolution(end).Vz.value; 34 40 35 %plotmodel(md,'data', md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2})41 %plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2})
Note:
See TracChangeset
for help on using the changeset viewer.