[26740] | 1 | Index: ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp (revision 26289)
|
---|
| 4 | +++ ../trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp (revision 26290)
|
---|
| 5 | @@ -193,13 +193,11 @@
|
---|
| 6 | IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,1);
|
---|
| 7 | }
|
---|
| 8 | }
|
---|
| 9 | - else{//itapopo FIXME only base velocities are constrained here
|
---|
| 10 | + else{//MLHO itapopo FIXME base and shear velocities are constrained
|
---|
| 11 | IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvx",StressbalanceAnalysisEnum,finiteelement,0);
|
---|
| 12 | - //IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvx",StressbalanceAnalysisEnum,finiteelement,1);
|
---|
| 13 | - if(iomodel->domaintype!=Domain2DverticalEnum){
|
---|
| 14 | - IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,2);
|
---|
| 15 | - //IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,3);
|
---|
| 16 | - }
|
---|
| 17 | + IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvx",StressbalanceAnalysisEnum,finiteelement,1);
|
---|
| 18 | + IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,2);
|
---|
| 19 | + IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,3);
|
---|
| 20 | }
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | @@ -3065,7 +3063,7 @@
|
---|
| 24 | thickness_input->GetInputValue(&thickness,gauss);
|
---|
| 25 | surface_input->GetInputDerivativeValue(&slope[0],xyz_list,gauss);
|
---|
| 26 | n_input->GetInputValue(&n,gauss);
|
---|
| 27 | -
|
---|
| 28 | +
|
---|
| 29 | for(int i=0;i<numnodes;i++){// per node: vx (basal vx), vshx, vy (basal vy), vshy
|
---|
| 30 | pe->values[i*4+0]+=-rhog*thickness*slope[0]*Jdet*gauss->weight*basis[i]; //F1
|
---|
| 31 | pe->values[i*4+1]+=-rhog*thickness*slope[0]*Jdet*gauss->weight*basis[i]*(n+1)/(n+2); //F2
|
---|
| 32 | @@ -3090,8 +3088,7 @@
|
---|
| 33 |
|
---|
| 34 | /*Intermediaries*/
|
---|
| 35 | IssmDouble Jdet,thickness,base,sealevel,water_pressure,ice_pressure;
|
---|
| 36 | - IssmDouble water_pressure_sh,ice_pressure_sh,pressure_sh,n,s,b;
|
---|
| 37 | - IssmDouble surface_under_water,base_under_water,pressure;
|
---|
| 38 | + IssmDouble water_pressure_sh,ice_pressure_sh,pressure_sh,pressure,n,s,b;
|
---|
| 39 | IssmDouble *xyz_list = NULL;
|
---|
| 40 | IssmDouble *xyz_list_front = NULL;
|
---|
| 41 | IssmDouble normal[2];
|
---|
| 42 | @@ -3124,17 +3121,15 @@
|
---|
| 43 | sealevel_input->GetInputValue(&sealevel,gauss);
|
---|
| 44 | element->JacobianDeterminantSurface(&Jdet,xyz_list_front,gauss);
|
---|
| 45 | element->NodalFunctions(basis,gauss);
|
---|
| 46 | -
|
---|
| 47 | - surface_under_water = min(0.,thickness+base-sealevel); // 0 if the top of the glacier is above water level
|
---|
| 48 | - base_under_water = min(0.,base-sealevel); // 0 if the bottom of the glacier is above water level
|
---|
| 49 | +
|
---|
| 50 | + b = base-sealevel; // ice base shifted by the sea level
|
---|
| 51 | + s = thickness+b; // ice surface shifted by the sea level
|
---|
| 52 | /*Vertically integrated pressure - SSA type*/
|
---|
| 53 | - water_pressure = (1.0/2.0)*gravity*rho_water*(surface_under_water*surface_under_water - base_under_water*base_under_water);
|
---|
| 54 | - ice_pressure = (1.0/2.0)*gravity*rho_ice*thickness*thickness;
|
---|
| 55 | + water_pressure = -(1.0/2.0)*gravity*rho_water*(b*b);
|
---|
| 56 | + ice_pressure = (1.0/2.0)*gravity*rho_ice*thickness*thickness;
|
---|
| 57 | pressure = ice_pressure + water_pressure;
|
---|
| 58 | /*Vertically integrated pressure - HO type*/
|
---|
| 59 | - b=min(0.,base-sealevel); // 0 if the bottom of the glacier is above water level
|
---|
| 60 | - s=thickness+b; // ice surface regardless of whether the top of the glacier is above water level or not
|
---|
| 61 | - water_pressure_sh = gravity*rho_water*( -b*b/2 + (pow(-b,n+2)/pow(thickness,n+1))*(-s/(n+2)-b/(n+3)) );
|
---|
| 62 | + water_pressure_sh = gravity*rho_water*( -b*b/2 - (s*thickness/(n+2))*(1-pow(s/thickness,n+2)) + (thickness*thickness/(n+3))*(1-pow(s/thickness,n+3)) );
|
---|
| 63 | ice_pressure_sh = gravity*rho_ice*thickness*thickness*(n+1)/(2*(n+3));
|
---|
| 64 | pressure_sh = ice_pressure_sh + water_pressure_sh;
|
---|
| 65 |
|
---|