Changeset 22372
- Timestamp:
- 01/27/18 14:46:58 (7 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/examples/shakti/runme.m
r22370 r22372 3 3 if any(steps==1) 4 4 disp(' Step 1: Mesh'); 5 6 7 8 9 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 10 10 end 11 11 if any(steps==2) 12 12 disp(' Step 2: Parameterization'); 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 pos=find(md.mesh.vertexonboundary & md.mesh.x==max(md.mesh.x));47 48 49 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; 50 50 end 51 51 if any(steps==3); 52 52 disp(' Step 3: Solve!'); 53 53 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 computer59 % 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 hr63 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=50067 [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 (except74 % 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');79 54 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 81 82 end -
issm/trunk-jpl/src/c/Makefile.am
r22005 r22372 287 287 ./cores/hydrology_core.cpp\ 288 288 ./solutionsequences/solutionsequence_hydro_nonlinear.cpp\ 289 ./solutionsequences/solutionsequence_shakti_nonlinear.cpp\ 289 290 ./cores/stressbalance_core.cpp\ 290 291 ./solutionsequences/solutionsequence_stokescoupling_nonlinear.cpp\ -
issm/trunk-jpl/src/c/cores/hydrology_core.cpp
r22285 r22372 113 113 femmodel->SetCurrentConfiguration(HydrologySommersAnalysisEnum); 114 114 InputDuplicatex(femmodel,HydrologyHeadEnum,HydrologyHeadOldEnum); 115 solutionsequence_ nonlinear(femmodel,modify_loads);115 solutionsequence_shakti_nonlinear(femmodel); 116 116 if(VerboseSolution()) _printf0_(" updating gap height\n"); 117 117 HydrologySommersAnalysis* analysis = new HydrologySommersAnalysis(); -
issm/trunk-jpl/src/c/solutionsequences/solutionsequences.h
r18619 r22372 14 14 void solutionsequence_thermal_nonlinear(FemModel* femmodel); 15 15 void solutionsequence_hydro_nonlinear(FemModel* femmodel); 16 void solutionsequence_shakti_nonlinear(FemModel* femmodel); 16 17 void solutionsequence_nonlinear(FemModel* femmodel,bool conserve_loads); 17 18 void solutionsequence_newton(FemModel* femmodel);
Note:
See TracChangeset
for help on using the changeset viewer.