Changeset 515
- Timestamp:
- 05/20/09 08:34:42 (16 years ago)
- Location:
- issm/trunk/test/Validation/ThermalTests/Simplegeothermalflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/Validation/ThermalTests/Simplegeothermalflux/Square.par
r16 r515 1 2 1 %Ok, start defining model parameters here 3 2 4 %material parameters5 md.g=9.8;6 md.rho_ice=917;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/mK12 md.beta=9.8*10^-8;13 14 %Solution parameters15 3 %parallelization 16 4 md.cluster='none'; 17 md.np=2;18 md.time=1;19 md.exclusive=0;20 21 %statics22 md.eps_rel=0.01;23 md.eps_abs=10;24 %md.penalty_horiz=10^25; %penalty parameters for rifts25 %md.penalty_vert=10^15; %penalty parameters for rifts26 md.lowmem=1;27 if md.numberofgrids<1000000,28 md.sparsity=.001;29 else30 md.sparsity=.0001;31 end32 33 %dynamics34 md.dt=1*md.yts; %1 year35 md.ndt=md.dt*10;36 md.artificial_diffusivity=1;37 38 %control39 md.control_type={'drag'}; %'drag', 'B'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/year46 md.epsvel=eps;47 48 5 49 6 disp(' creating thickness'); 50 h max=1000;51 md.thickness=h max*ones(md.numberofgrids,1)7 h=1000; 8 md.thickness=h*ones(md.numberofgrids,1); 52 9 md.firn_layer=10*ones(md.numberofgrids,1); 53 md.surface=zeros(md.numberofgrids,1); 54 md.bed=-md.thickness; 55 56 % hmin=700; 57 % hmax=1000; 58 % ymin=min(md.y); 59 % ymax=max(md.y); 60 % md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin); 61 % md.firn_layer=10*ones(md.numberofgrids,1); 62 % md.surface=zeros(md.numberofgrids,1); 63 % md.bed=-md.thickness; 10 md.bed=zeros(md.numberofgrids,1); 11 md.surface=md.thickness; 64 12 65 13 disp(' creating velocities'); … … 83 31 md.B=paterson(md.observed_temperature); 84 32 md.n=3*ones(md.numberofelements,1); 85 33 86 34 disp(' creating accumulation rates'); 87 35 md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a … … 90 38 %Deal with boundary conditions: 91 39 92 disp(' boundary conditions for diagnostic model: '); 93 %Build gridonicefront, array of boundary grids belonging to the icefront: 94 gridinsideicefront=ArgusContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2); 95 gridonicefront=double(md.gridonboundary & gridinsideicefront); 96 97 md.gridondirichlet_diag=zeros(md.numberofgrids,1); 98 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1; 99 md.dirichletvalues_diag=zeros(md.numberofgrids,2); 100 101 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 102 md.segmentonneumann_diag=md.segments(pos,:); 103 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure) 104 105 disp(' boundary conditions for prognostic model'); 106 md.gridondirichlet_prog=zeros(md.numberofgrids,1); 107 md.dirichletvalues_prog=zeros(md.numberofgrids,1); 108 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 109 md.segmentonneumann_prog=md.segments(pos,:); 110 md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1); 111 md.neumannvalues_prog(:)=NaN; %free radiation 112 113 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2))); 114 md.segmentonneumann_prog2=md.segments(pos,:); 115 md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1); 116 md.neumannvalues_prog2(:)=NaN; %free radiation 40 disp(' boundary conditions for diagnostic model'); 41 md=SetIceShelfBC(md,'Front.exp'); 117 42 118 43 disp(' boundary conditions for thermal model'); … … 120 45 md.dirichletvalues_thermal=md.observed_temperature; 121 46 md.geothermalflux=zeros(md.numberofgrids,1); 122 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=0.1; %1 mW/m^2 123 124 125 126 127 % Some Cielo code, ignore. 128 if strcmp(md.cluster,'yes') 129 ServerDisconnect; 130 end 47 pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=0.1; %100 mW/m^2 -
issm/trunk/test/Validation/ThermalTests/Simplegeothermalflux/runme.m
r16 r515 19 19 %the result is linear with depth and is equal to 0 on the upper surface (See BC) 20 20 %d2T/dz2=0 -k*dT/dz(bed)=G T(surface)=0 => T=-G/k*(z-surface) 21 md.observed_temperature=-0.1/md.thermalconductivity* md.z; %G=0.1 W/m221 md.observed_temperature=-0.1/md.thermalconductivity*(md.z-md.surface); %G=0.1 W/m2 22 22 23 23 %modeled results 24 md=solve(md,' thermalsteady');24 md=solve(md,'analysis_type','thermal','sub_analysis_type','steady','package','cielo'); 25 25 26 26 %plot results
Note:
See TracChangeset
for help on using the changeset viewer.