Changeset 4884


Ignore:
Timestamp:
07/29/10 12:49:25 (15 years ago)
Author:
seroussi
Message:

Validation test: Round Ice Sheet

Location:
issm/trunk/test/Validation/RoundIceSheet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/Validation/RoundIceSheet/Circ.par

    r3768 r4884  
    11%Ok, start defining model parameters here
     2md.np=3;
     3md.cluster='wilkes';
    24
    35disp('      creating thickness');
     
    3941disp('      boundary conditions for diagnostic model: ');
    4042%Build gridonicefront, array of boundary grids belonging to the icefront:
    41 gridonicefront=double(md.gridonboundary);
    42 
    43 md.gridondirichlet_diag=zeros(md.numberofgrids,1);
    44 pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1;
    45 md.dirichletvalues_diag=zeros(md.numberofgrids,2);
     43md=SetMarineIceSheetBC(md,'Front.exp');
    4644
    4745radius=sqrt((md.x).*md.x+(md.y).*md.y);
    48 pos=find(radius==min(radius));md.gridondirichlet_diag(pos)=1;
     46pos=find(radius==min(radius));
    4947md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
    5048
    51 pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
    52 md.segmentonneumann_diag=md.segments(pos,:);
    53 md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
    54 
    55 disp('      boundary conditions for thermal model: ');
    56 md.gridondirichlet_thermal=zeros(md.numberofgrids,1);
     49md.spcvelocity(pos,1:3)=1;
     50md.spcvelocity(pos,4:6)=0;
  • issm/trunk/test/Validation/RoundIceSheet/runme.m

    r899 r4884  
    33%This solution is valid for a circular contour
    44
    5 %You can adjust the parameters numberofpoints and density to refine the mesh and check the precision of your solution. You can change the number of layers of the domain with the parameter layernumber.
     5%You can adjust the parameters resolution(density) and the numberoflayers of the model to refine the mesh and check the precision of your solution. You can change the number of layers of the domain with the parameter layernumber.
     6numlayers=10;
     7resolution=40000;
    68
    79%To begin with the numerical model
    810md=model;
    911
    10 numberofgrids=20;
    11 density=190000;
    12 layernumber=4;
    13 
    14 %First we have to create the domain outline
    15 contour=CreateDomainOutline(numberofgrids,750000);
    16 
    17 expgen('DomainOutline.exp',contour,1);
    18 md=mesh(md,'DomainOutline.exp',density)
    19 
    20 %move the closest node to the center
    21 [mini pos]=min(md.x.^2+md.y.^2);
    22 md.x(pos)=0;
    23 md.y(pos)=0;
    24 
    25 %Then we have to create the geography and the parameters of the mesh
     12md=roundmesh(md,750000,resolution);
    2613md=geography(md,'',''); %We can not test iceshelves nor ice rises with this analytical solution
    2714
    2815%We now create a file Front.exp needed to parameterize but the analytical solution can't support an icefront so this file is empty
    29 front=CreateDomainOutline(numberofgrids,1000000);
    30 
     16front=CreateDomainOutline(40,1000000);
    3117expgen('Front.exp',front,1);
    32 
    3318md=parameterize(md,'Circ.par');
    3419
     
    4025
    4126%We extrude the model to have a 3d model
    42 md=extrude(md,layernumber,3);
     27md=extrude(md,numlayers,1);
    4328md=setelementstype(md,'Pattyn','all');
    4429
    4530%Spc the grids on the bed
    4631pos=find(md.gridonbed);
    47 md.gridondirichlet_diag(pos)=1;
     32md.spcvelocity(pos,1:3)=1;
    4833
     34md.verbose=10;
    4935%Now we can solve the problem
    50 md=solve(md,'analysis_type','diagnostic','package','ice');
     36md=solve(md,'analysis_type',DiagnosticSolutionEnum);
    5137
    5238%Calculate the depth averaged velocity field (2d):
    5339vel=zeros(md.numberofgrids2d,1);
    5440
     41vx=zeros(md.numberofgrids,1);
     42vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     43vy=zeros(md.numberofgrids,1);
     44vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     45
    5546grid_vel=0;
    5647for i=1:md.numberofgrids2d
    5748        for j=1:(md.numlayers-1)
    58                 grid_vel=grid_vel+1/(2*(md.numlayers-1))*(sqrt(md.results.diagnostic.vx(i+j*md.numberofgrids2d,1).^2+...
    59                         md.results.diagnostic.vy(i+j*md.numberofgrids2d,1).^2)+...
    60                         sqrt(md.results.diagnostic.vx(i+(j-1)*md.numberofgrids2d,1).^2+md.results.diagnostic.vy(i+(j-1)*md.numberofgrids2d,1).^2));
     49                grid_vel=grid_vel+1/(2*(md.numlayers-1))*(sqrt(vx(i+j*md.numberofgrids2d,1).^2+...
     50                        vy(i+j*md.numberofgrids2d,1).^2)+...
     51                        sqrt(vx(i+(j-1)*md.numberofgrids2d,1).^2+vy(i+(j-1)*md.numberofgrids2d,1).^2));
    6152        end
    6253        vel(i,1)=grid_vel;
Note: See TracChangeset for help on using the changeset viewer.