Changeset 901 for issm/trunk/test/Validation/ISMIP/TestA/Square.par
- Timestamp:
- 06/11/09 13:28:29 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/Validation/ISMIP/TestA/Square.par
r899 r901 1 2 1 %Ok, start defining model parameters here 3 2 4 %material parameters 5 md.g=9.8; 6 md.rho_ice=910; 7 md.rho_water=1023; 8 di=md.rho_ice/md.rho_water; 9 md.yts=365*24*3600; 10 md.heatcapacity=2009; 11 md.thermalconductivity=2.2; %W/mK 12 md.beta=9.8*10^-8; 3 disp(' creating thickness'); 4 md.surface=-md.x*tan(0.5*pi/180); 5 md.bed=md.surface-1000+500*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x)); 6 md.thickness=md.surface-md.bed; 7 md.firn_layer=0*ones(md.numberofgrids,1); 13 8 14 %Solution parameters 15 %parallelization 16 md.cluster='none'; 17 md.np=2; 18 md.time=1; 19 md.exclusive=0; 9 disp(' creating drag'); 10 md.drag_type=2; %0 none 1 plastic 2 viscous 11 md.drag=200*ones(md.numberofgrids,1); %q=1. 12 %Take care of iceshelves: no basal drag 13 pos=find(md.elementoniceshelf); 14 md.drag(md.elements(pos,:))=0; 15 md.p=ones(md.numberofelements,1); 16 md.q=ones(md.numberofelements,1); 20 17 21 %statics 22 md.lowmem=1; 23 md.eps_abs=NaN; 24 md.eps_rel=0.01; 25 md.penalty_offset=3; 26 md.penalty_melting=10^7; 27 if md.numberofgrids<1000000, 28 md.sparsity=.001; 29 else 30 md.sparsity=.0001; 31 end 18 disp(' creating flow law paramter'); 19 md.B=6.8067*10^7*ones(md.numberofgrids,1); 20 md.n=3*ones(md.numberofelements,1); 32 21 33 %dynamics 34 md.dt=1*md.yts; %1 year 35 md.ndt=md.dt*10; 36 md.artificial_diffusivity=1; 37 md.viscosity_overshoot=0; 38 39 %control 40 md.nsteps=5; 41 md.tolx=10^-4; 42 md.maxiter=20; 43 md.optscal=10; 44 md.fit='logarithmic'; %'absolute','relative','logarithmic' 45 md.meanvel=1000/md.yts; %1000 meters/year 46 md.epsvel=eps; 47 48 49 disp(' creating thickness'); 50 md.surface=-md.x*tan(0.5*pi/180); 51 md.bed=md.surface-1000+500*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x)); 52 md.thickness=md.surface-md.bed; 53 md.firn_layer=0*ones(md.numberofgrids,1); 54 55 disp(' creating velocities'); 56 md.vx_obs=zeros(md.numberofgrids,1); 57 md.vy_obs=zeros(md.numberofgrids,1); 58 md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2); 59 60 disp(' creating drag'); 61 md.drag_type=2; %0 none 1 plastic 2 viscous 62 md.drag=200*ones(md.numberofgrids,1); %q=1. 63 %Take care of iceshelves: no basal drag 64 pos=find(md.elementoniceshelf); 65 md.drag(md.elements(pos,:))=0; 66 md.p=ones(md.numberofelements,1); 67 md.q=ones(md.numberofelements,1); 68 69 disp(' creating temperature'); 70 md.observed_temperature=(273-20)*ones(md.numberofgrids,1); 71 72 disp(' creating flow law paramter'); 73 md.B=6.8067*10^7*ones(md.numberofgrids,1); 74 md.n=3*ones(md.numberofelements,1); 75 76 disp(' creating accumulation rates'); 77 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a 78 md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a 79 80 %Deal with boundary conditions: 81 82 %Create grid on boundary fist (because wi can not use mesh) 83 md.gridonboundary=zeros(md.numberofgrids,1); 84 pos=find(md.x==0 | md.y==0 | md.x==max(md.x) | md.y==max(md.y)); 85 md.gridonboundary(pos)=1; 86 87 disp(' boundary conditions for diagnostic model: '); 88 %Build gridonicefront, array of boundary grids belonging to the icefront: 89 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 90 gridonicefront=double(md.gridonboundary & gridinsideicefront); 91 92 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 93 pos=find(md.gridonboundary);md.gridondirichlet_diag(pos)=1; 94 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 95 96 %pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 97 %md.segmentonneumann_diag=md.segments(pos,:); 98 md.segmentonneumann_diag=zeros(0,3); 99 %md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 100 101 disp(' boundary conditions for prognostic model: '); 102 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 103 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 104 %pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 105 %md.segmentonneumann_prog=md.segments(pos,:); 106 md.segmentonneumann_prog=zeros(0,3); 107 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 108 md.neumannvalues_prog(:)=NaN; %free radiation 109 110 %pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 111 %md.segmentonneumann_prog2=md.segments(pos,:); 112 md.segmentonneumann_prog2=zeros(0,3); 113 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 114 md.neumannvalues_prog2(:)=NaN; %free radiation 115 116 disp(' boundary conditions for thermal model: '); 117 md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature 118 md.dirichletvalues_thermal=md.observed_temperature; 119 md.geothermalflux=zeros(md.numberofgrids,1); 120 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2 121 122 123 124 125 % Some Cielo code, ignore. 126 if strcmp(md.cluster,'yes') 127 ServerDisconnect; 128 end 22 disp(' boundary conditions for diagnostic model'); 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);
Note:
See TracChangeset
for help on using the changeset viewer.