Changeset 438


Ignore:
Timestamp:
05/15/09 08:22:55 (16 years ago)
Author:
Mathieu Morlighem
Message:

updated SquareIceshelf example

Location:
issm/trunk/examples/SquareIceShelf
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/examples/SquareIceShelf/Front.exp

    r1 r438  
    1 ## Name:
     1## Name:icefront
    22## Icon:0
    3 # Points Count  Value
    4 5       1.
    5 # X pos Y pos
    6 -1000 990000
    7 1001000  990000
    8 1001000  1001000
    9 -1000  1001000
    10 -1000 990000
     3# Points Count  Value
     45 1.
     5# X pos Y pos
     6-1000 900000
     7-1000 1100000
     81100000 1100000
     91100000 900000
     10-1000 900000
  • issm/trunk/examples/SquareIceShelf/README

    r1 r438  
    11md=model;
    22md=mesh(md,'DomainOutline.exp',50000);
    3 md=geography(md,'Shelf.exp','');
     3md=geography(md,'all','');
    44md=parameterize(md,'Square.par');
    5 md.acceleration=1;
     5md=setelementstype(md,'macayeal','all');
    66md=solve(md,'diagnostic','ice');
  • issm/trunk/examples/SquareIceShelf/Square.par

    r1 r438  
     1%Start defining model parameters here
    12
    2 %Ok, start defining model parameters here
     3%dynamics
     4md.dt=1*md.yts; %1 year
     5md.ndt=md.dt*10;
     6md.artificial_diffusivity=1;
    37
    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;
     8disp('      creating thickness');
     9hmin=300;
     10hmax=1000;
     11ymin=min(md.y);
     12ymax=max(md.y);
     13md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     14md.bed=-md.rho_ice/md.rho_water*md.thickness;
     15md.surface=md.bed+md.thickness;
    1316
    14 %Solution parameters
    15         %parallelization
    16         md.cluster='no';
    17         md.cluster_name='cosmos';
    18         md.np=2;
    19         md.time=1;
    20         md.exclusive=0;
     17disp('      creating drag');
     18md.drag_type=2; %0 none 1 plastic 2 viscous
     19md.drag=200*ones(md.numberofgrids,1); %q=1.
     20%Take care of iceshelves: no basal drag
     21pos=find(md.elementoniceshelf);
     22md.drag(md.elements(pos,:))=0;
     23md.p=ones(md.numberofelements,1);
     24md.q=ones(md.numberofelements,1);
     25md.viscosity_overshoot=0.3;
    2126
    22         %statics
    23         md.lowmem=1;
    24         md.eps_rel=0.01;
    25         md.eps_abs=10;
    26         md.penalty_offset=3;
    27         md.penalty_melting=10^7;
    28         if md.numberofgrids<1000000,
    29         md.sparsity=.001;
    30         else
    31         md.sparsity=.0001;
    32         end
     27disp('      creating temperature');
     28md.observed_temperature=(273-20)*ones(md.numberofgrids,1);
    3329
    34         %dynamics
    35         md.dt=1*md.yts; %1 year
    36         md.ndt=md.dt*10;
    37         md.artificial_diffusivity=1;
     30disp('      creating flow law paramter');
     31md.B=paterson(md.observed_temperature);
     32md.n=3*ones(md.numberofelements,1);
    3833
    39         %control
    40         md.control_type={'drag'}; %'drag', 'B'
    41         md.nsteps=5;
    42         md.tolx=10^-4;
    43         md.maxiter=20;
    44         md.optscal=10;
    45         md.fit='logarithmic'; %'absolute','relative','logarithmic'
    46         md.meanvel=1000/md.yts; %1000 meters/year
    47         md.epsvel=eps;
     34%Deal with boundary conditions:
     35md=SetIceShelfBC(md,'Front.exp');
    4836
    49 
    50         disp('      creating thickness');
    51         hmin=300;
    52         hmax=1000;
    53         ymin=min(md.y);
    54         ymax=max(md.y);
    55         md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    56         md.firn_layer=10*ones(md.numberofgrids,1);
    57         md.bed=-di*md.thickness;
    58         md.surface=md.bed+md.thickness;
    59 
    60         disp('      creating velocities');
    61         md.vx_obs=zeros(md.numberofgrids,1);
    62         md.vy_obs=zeros(md.numberofgrids,1);
    63         md.vel_obs=sqrt(md.vx_obs.^2+md.vy_obs.^2);
    64        
    65         disp('      creating drag');
    66         md.drag_type=2; %0 none 1 plastic 2 viscous
    67         md.drag=200*ones(md.numberofgrids,1); %q=1.
    68         %Take care of iceshelves: no basal drag
    69         pos=find(md.elementoniceshelf);
    70         md.drag(md.elements(pos,:))=0;
    71         md.p=ones(md.numberofelements,1);
    72         md.q=ones(md.numberofelements,1);
    73 
    74         disp('      creating temperature');
    75         md.observed_temperature=(273-20)*ones(md.numberofgrids,1);
    76 
    77         disp('      creating flow law paramter');
    78         md.B=paterson(md.observed_temperature);
    79         md.n=3*ones(md.numberofelements,1);
    80 
    81         disp('      creating accumulation rates');
    82         md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a
    83         md.melting=0*ones(md.numberofgrids,1)/md.yts; %1m/a
    84 
    85         %Deal with boundary conditions:
    86        
    87         disp('      boundary conditions for diagnostic model: ');
    88         %Build gridonicefront, array of boundary grids belonging to the icefront:
    89         gridinsideicefront=ArgusContourToMesh(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 & ~gridonicefront);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.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
    99 
    100         disp('      boundary conditions for prognostic model: ');
    101         md.gridondirichlet_prog=zeros(md.numberofgrids,1);
    102         md.dirichletvalues_prog=zeros(md.numberofgrids,1);
    103         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    104         md.segmentonneumann_prog=md.segments(pos,:);
    105         md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1);
    106         md.neumannvalues_prog(:)=NaN; %free radiation
    107        
    108         pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    109         md.segmentonneumann_prog2=md.segments(pos,:);
    110         md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1);
    111         md.neumannvalues_prog2(:)=NaN; %free radiation
    112        
    113         disp('      boundary conditions for thermal model: ');
    114         md.gridondirichlet_thermal=ones(md.numberofgrids,1); %surface temperature
    115         md.dirichletvalues_thermal=md.observed_temperature;
    116         md.geothermalflux=zeros(md.numberofgrids,1);
    117         pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=50*10^-3; %50 mW/m^2
    118 
    119 
    120        
    121 
    122 % Some Cielo code, ignore.
    123 if strcmp(md.cluster,'yes')
    124         ServerDisconnect;
    125 end   
     37%Parallel options
     38md.np=3;
     39md.time=50;
     40md.waitonlock=1;
Note: See TracChangeset for help on using the changeset viewer.