Changeset 544


Ignore:
Timestamp:
05/20/09 13:47:46 (16 years ago)
Author:
Mathieu Morlighem
Message:

fixed melting test

Location:
issm/trunk/test/Validation/ThermalTests/Melting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/Validation/ThermalTests/Melting/Square.par

    r16 r544  
    1 
    21%Ok, start defining model parameters here
    32
    4 %material parameters
    5         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/mK
    12         md.beta=9.8*10^-8;
    13 
    14 %Solution parameters
    153        %parallelization
    164        md.cluster='none';
    17         md.np=2;
    18         md.time=1;
    19         md.exclusive=0;
    20 
    21         %statics
    22         md.eps_rel=0.01;
    23         md.eps_abs=10;
    24         md.penalty_offset=5;
    25         md.lowmem=1;
    26         if md.numberofgrids<1000000,
    27         md.sparsity=.001;
    28         else
    29         md.sparsity=.0001;
    30         end
    31 
    32         %dynamics
    33         md.dt=1*md.yts; %1 year
    34         md.ndt=md.dt*10;
    35         md.artificial_diffusivity=1;
    36 
    37         %control
    38         md.control_type={'drag'}; %'drag', 'B'
    39         md.nsteps=5;
    40         md.tolx=10^-4;
    41         md.maxiter=20;
    42         md.optscal=10;
    43         md.fit='logarithmic'; %'absolute','relative','logarithmic'
    44         md.meanvel=1000/md.yts; %1000 meters/year
    45         md.epsvel=eps;
    46 
    475
    486        disp('      creating thickness');
    49         hmax=1000;
    50         md.thickness=hmax*ones(md.numberofgrids,1)
     7        h=1000;
     8        md.thickness=h*ones(md.numberofgrids,1);
    519        md.firn_layer=10*ones(md.numberofgrids,1);
    52         md.surface=zeros(md.numberofgrids,1);
    53         md.bed=-md.thickness;
    54 
    55 %       hmin=700;
    56 %       hmax=1000;
    57 %       ymin=min(md.y);
    58 %       ymax=max(md.y);
    59 %       md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    60 %       md.firn_layer=10*ones(md.numberofgrids,1);
    61 %       md.surface=zeros(md.numberofgrids,1);
    62 %       md.bed=-md.thickness;
     10        md.bed=-1000*ones(md.numberofgrids,1);
     11        md.surface=md.bed+md.thickness;
    6312
    6413        disp('      creating velocities');
     
    7726
    7827        disp('      creating temperatures');
    79         md.observed_temperature=(273.15)*ones(md.numberofgrids,1);
     28        md.observed_temperature=273.15*ones(md.numberofgrids,1);
    8029
    8130        disp('      creating flow law paramter');
    8231        md.B=paterson(md.observed_temperature);
    8332        md.n=3*ones(md.numberofelements,1);
    84 
     33       
    8534        disp('      creating accumulation rates');
    8635        md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a
     
    8938        %Deal with boundary conditions:
    9039       
    91         disp('      boundary conditions for diagnostic model: ');
    92         %Build gridonicefront, array of boundary grids belonging to the icefront:
    93         gridinsideicefront=ArgusContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2);
    94         gridonicefront=double(md.gridonboundary & gridinsideicefront);
    95 
    96         md.gridondirichlet_diag=zeros(md.numberofgrids,1);
    97         pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1;
    98         md.dirichletvalues_diag=zeros(md.numberofgrids,2);
    99 
    100         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    101         md.segmentonneumann_diag=md.segments(pos,:);
    102         md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
    103 
    104         disp('      boundary conditions for prognostic model');
    105         md.gridondirichlet_prog=zeros(md.numberofgrids,1);
    106         md.dirichletvalues_prog=zeros(md.numberofgrids,1);
    107         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    108         md.segmentonneumann_prog=md.segments(pos,:);
    109         md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1);
    110         md.neumannvalues_prog(:)=NaN; %free radiation
    111        
    112         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    113         md.segmentonneumann_prog2=md.segments(pos,:);
    114         md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1);
    115         md.neumannvalues_prog2(:)=NaN; %free radiation
     40        disp('      boundary conditions for diagnostic model');
     41        md=SetIceShelfBC(md,'Front.exp');
    11642       
    11743        disp('      boundary conditions for thermal model');
     
    12046        md.geothermalflux=zeros(md.numberofgrids,1);
    12147        pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=1*10^-3; %1 mW/m^2
    122 
    123 
    124        
    125 
    126 % Some Cielo code, ignore.
    127 if strcmp(md.cluster,'yes')
    128         ServerDisconnect;
    129 end   
  • issm/trunk/test/Validation/ThermalTests/Melting/runme.m

    r16 r544  
    99
    1010md=model;
    11 md=mesh(md,'DomainOutline.exp',100000);
     11md=mesh(md,'DomainOutline.exp',200000);
    1212md=geography(md,'','');
    1313md=parameterize(md,'Square.par');
    14 md=extrude(md,2,1);
     14md=extrude(md,3,2);
    1515md=setelementstype(md,'Pattyn','all');
    1616thermalboundarycondition;
     
    2222
    2323%modeled  results
    24 md=solve(md,'thermalsteady');
     24%md=solve(md,'analysis_type','thermal','sub_analysis_type','steady','package','ice');
     25md=solve(md,'analysis_type','thermal','sub_analysis_type','steady','package','cielo');
    2526
    2627%plot results
Note: See TracChangeset for help on using the changeset viewer.