Changeset 22372


Ignore:
Timestamp:
01/27/18 14:46:58 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: now have one solution sequence for shakti

Location:
issm/trunk-jpl
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/examples/shakti/runme.m

    r22370 r22372  
    33if any(steps==1)
    44        disp('  Step 1: Mesh');
    5    
    6     %Generate unstructured mesh on 1,000 m square with typical element edge length of 20 m
    7     md=triangle(model,'./outline.exp',20);
    8          
    9          save MoulinMesh md
     5
     6        %Generate unstructured mesh on 1,000 m square with typical element edge length of 20 m
     7        md=triangle(model,'./outline.exp',20);
     8
     9        save MoulinMesh md
    1010end
    1111if any(steps==2)
    1212        disp('  Step 2: Parameterization');
    13     md=loadmodel('MoulinMesh');
    14    
    15     md=setmask(md,'','');
    16    
    17     % Run parameterization script to set up geometry, velocity, material properties, etc.
    18     md=parameterize(md,'moulin.par');
    19    
    20     % HYDROLOGY SPECIFIC PARAMETERIZATION:
    21     % Change hydrology class to Sommers' SHaKTI model
    22     md.hydrology=hydrologysommers();
    23    
    24     % Define initial water head such that water pressure is 50% of ice overburden pressure
    25     md.hydrology.head = 0.5*md.materials.rho_ice/md.materials.rho_freshwater*md.geometry.thickness + md.geometry.base;
    26    
    27     % Initial subglacial gap height of 0.01m everywhere
    28     md.hydrology.gap_height = 0.01*ones(md.mesh.numberofelements,1);
    29    
    30     % Typical bed bump bump spacing (2m)
    31     md.hydrology.bump_spacing = 2*ones(md.mesh.numberofelements,1);
    32    
    33     % Typical bed bump height (0.1m)
    34     md.hydrology.bump_height = 0.1*ones(md.mesh.numberofelements,1);
    35    
    36     % Define distributed englacial input to the subglacial system (m/yr)
    37     % Change the value 0.0 to add distributed input
    38     md.hydrology.englacial_input = 0.0*ones(md.mesh.numberofvertices,1);
    39    
    40     % Initial Reynolds number (start at Re=1000 everywhere)
    41     md.hydrology.reynolds= 1000*ones(md.mesh.numberofelements,1);
    42    
    43     % Set up atmospheric pressure Type I boundary condition at left edge of
    44     % domain (outflow, i.e. h=zb at x=xmin)
    45     md.hydrology.spchead = NaN(md.mesh.numberofvertices,1);
    46     pos=find(md.mesh.vertexonboundary & md.mesh.x==max(md.mesh.x));
    47     md.hydrology.spchead(pos)=md.geometry.base(pos);
    48    
    49     save MoulinParam md;
     13        md=loadmodel('MoulinMesh');
     14
     15        md=setmask(md,'','');
     16
     17        % Run parameterization script to set up geometry, velocity, material properties, etc.
     18        md=parameterize(md,'moulin.par');
     19
     20        % HYDROLOGY SPECIFIC PARAMETERIZATION:
     21        % Change hydrology class to Sommers' SHaKTI model
     22        md.hydrology=hydrologysommers();
     23
     24        % Define initial water head such that water pressure is 50% of ice overburden pressure
     25        md.hydrology.head = 0.5*md.materials.rho_ice/md.materials.rho_freshwater*md.geometry.thickness + md.geometry.base;
     26
     27        % Initial subglacial gap height of 0.01m everywhere
     28        md.hydrology.gap_height = 0.01*ones(md.mesh.numberofelements,1);
     29
     30        % Typical bed bump bump spacing (2m)
     31        md.hydrology.bump_spacing = 2*ones(md.mesh.numberofelements,1);
     32
     33        % Typical bed bump height (0.1m)
     34        md.hydrology.bump_height = 0.1*ones(md.mesh.numberofelements,1);
     35
     36        % Define distributed englacial input to the subglacial system (m/yr)
     37        % Change the value 0.0 to add distributed input
     38        md.hydrology.englacial_input = 0.0*ones(md.mesh.numberofvertices,1);
     39
     40        % Initial Reynolds number (start at Re=1000 everywhere)
     41        md.hydrology.reynolds= 1000*ones(md.mesh.numberofelements,1);
     42
     43        % Set up atmospheric pressure Type I boundary condition at left edge of
     44        % domain (outflow, i.e. h=zb at x=xmin)
     45        md.hydrology.spchead = NaN(md.mesh.numberofvertices,1);
     46        pos=find(md.mesh.vertexonboundary & md.mesh.x==min(md.mesh.x));
     47        md.hydrology.spchead(pos)=md.geometry.base(pos);
     48
     49        save MoulinParam md;
    5050end
    5151if any(steps==3);
    5252        disp('  Step 3: Solve!');
    5353        md=loadmodel('MoulinParam');
    54    
    55     md.transient=deactivateall(md.transient);
    56     md.transient.ishydrology=1;
    57    
    58     % Specify that you want to run the model on your current computer
    59     % Change the number of processors according to your machine (here np=4)
    60     md.cluster=generic('np',2);
    61    
    62     % Define the time stepping scheme: run for 90 days with a time step of 1 hr
    63     md.timestepping.time_step=3600/md.constants.yts; % Time step (in years)
    64     md.timestepping.final_time=30/365;
    65    
    66     %Add one moulin with steady input at x=500, y=500
    67     [a,pos] = min(sqrt((md.mesh.x-500).^2+(md.mesh.y-500).^2));
    68     time=0:md.timestepping.time_step:md.timestepping.final_time;
    69     md.hydrology.moulin_input = zeros(md.mesh.numberofvertices+1,numel(time));
    70     md.hydrology.moulin_input(end,:)=time;
    71     md.hydrology.moulin_input(pos,:)=4;
    72    
    73     % Specify no-flux Type 2 boundary conditions on all edges (except
    74     % the Type 1 condition set at the outflow above)
    75     md.hydrology.neumannflux=zeros(md.mesh.numberofelements+1,numel(time));
    76     md.hydrology.neumannflux(end,:)=time;
    77    
    78     md=solve(md,'Transient');
    7954
    80          save MoulinTransient md
     55        md.transient=deactivateall(md.transient);
     56        md.transient.ishydrology=1;
     57
     58        % Specify that you want to run the model on your current computer
     59        % Change the number of processors according to your machine (here np=4)
     60        md.cluster=generic('np',2);
     61
     62        % Define the time stepping scheme: run for 90 days with a time step of 1 hr
     63        md.timestepping.time_step=3600/md.constants.yts; % Time step (in years)
     64        md.timestepping.final_time=30/365;
     65
     66        %Add one moulin with steady input at x=500, y=500
     67        [a,pos] = min(sqrt((md.mesh.x-500).^2+(md.mesh.y-500).^2));
     68        time=0:md.timestepping.time_step:md.timestepping.final_time;
     69        md.hydrology.moulin_input = zeros(md.mesh.numberofvertices+1,numel(time));
     70        md.hydrology.moulin_input(end,:)=time;
     71        md.hydrology.moulin_input(pos,:)=4;
     72
     73        % Specify no-flux Type 2 boundary conditions on all edges (except
     74        % the Type 1 condition set at the outflow above)
     75        md.hydrology.neumannflux=zeros(md.mesh.numberofelements+1,numel(time));
     76        md.hydrology.neumannflux(end,:)=time;
     77
     78        md.verbose.solution=1;
     79        md=solve(md,'Transient');
     80
     81        save MoulinTransient md
    8182end
  • issm/trunk-jpl/src/c/Makefile.am

    r22005 r22372  
    287287                                        ./cores/hydrology_core.cpp\
    288288                                        ./solutionsequences/solutionsequence_hydro_nonlinear.cpp\
     289                                        ./solutionsequences/solutionsequence_shakti_nonlinear.cpp\
    289290                                        ./cores/stressbalance_core.cpp\
    290291                                        ./solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp\
  • issm/trunk-jpl/src/c/cores/hydrology_core.cpp

    r22285 r22372  
    113113                femmodel->SetCurrentConfiguration(HydrologySommersAnalysisEnum);       
    114114      InputDuplicatex(femmodel,HydrologyHeadEnum,HydrologyHeadOldEnum);
    115                 solutionsequence_nonlinear(femmodel,modify_loads);
     115                solutionsequence_shakti_nonlinear(femmodel);
    116116                if(VerboseSolution()) _printf0_("   updating gap height\n");
    117117                HydrologySommersAnalysis* analysis = new HydrologySommersAnalysis();
  • issm/trunk-jpl/src/c/solutionsequences/solutionsequences.h

    r18619 r22372  
    1414void solutionsequence_thermal_nonlinear(FemModel* femmodel);
    1515void solutionsequence_hydro_nonlinear(FemModel* femmodel);
     16void solutionsequence_shakti_nonlinear(FemModel* femmodel);
    1617void solutionsequence_nonlinear(FemModel* femmodel,bool conserve_loads);
    1718void solutionsequence_newton(FemModel* femmodel);
Note: See TracChangeset for help on using the changeset viewer.