Changeset 26290


Ignore:
Timestamp:
05/24/21 17:36:36 (4 years ago)
Author:
tsantos
Message:

CHG: fixed ice-oean BC for MLHO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp

    r26206 r26290  
    194194                                }
    195195                        }
    196                         else{//itapopo FIXME only base velocities are constrained here
     196                        else{//MLHO itapopo FIXME base and shear velocities are constrained
    197197                                IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvx",StressbalanceAnalysisEnum,finiteelement,0);
    198                                 //IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvx",StressbalanceAnalysisEnum,finiteelement,1);
    199                                 if(iomodel->domaintype!=Domain2DverticalEnum){
    200                                         IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,2);
    201                                         //IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,3);
    202                                 }
     198                                IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvx",StressbalanceAnalysisEnum,finiteelement,1);
     199                                IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,2);
     200                                IoModelToConstraintsx(constraints,iomodel,"md.stressbalance.spcvy",StressbalanceAnalysisEnum,finiteelement,3);
    203201                        }
    204202                }
     
    30663064                surface_input->GetInputDerivativeValue(&slope[0],xyz_list,gauss);
    30673065                n_input->GetInputValue(&n,gauss);
    3068 
     3066               
    30693067                for(int i=0;i<numnodes;i++){// per node: vx (basal vx), vshx, vy (basal vy), vshy
    30703068                        pe->values[i*4+0]+=-rhog*thickness*slope[0]*Jdet*gauss->weight*basis[i]; //F1
     
    30913089        /*Intermediaries*/
    30923090        IssmDouble  Jdet,thickness,base,sealevel,water_pressure,ice_pressure;
    3093         IssmDouble  water_pressure_sh,ice_pressure_sh,pressure_sh,n,s,b;
    3094         IssmDouble  surface_under_water,base_under_water,pressure;
     3091        IssmDouble  water_pressure_sh,ice_pressure_sh,pressure_sh,pressure,n,s,b;
    30953092        IssmDouble *xyz_list = NULL;
    30963093        IssmDouble *xyz_list_front = NULL;
     
    31253122                element->JacobianDeterminantSurface(&Jdet,xyz_list_front,gauss);
    31263123                element->NodalFunctions(basis,gauss);
    3127 
    3128                 surface_under_water = min(0.,thickness+base-sealevel); // 0 if the top of the glacier is above water level
    3129                 base_under_water    = min(0.,base-sealevel);           // 0 if the bottom of the glacier is above water level
     3124               
     3125                b = base-sealevel; // ice base shifted by the sea level
     3126                s = thickness+b;   // ice surface shifted by the sea level
    31303127                /*Vertically integrated pressure - SSA type*/
    3131                 water_pressure = (1.0/2.0)*gravity*rho_water*(surface_under_water*surface_under_water - base_under_water*base_under_water);
    3132                 ice_pressure   = (1.0/2.0)*gravity*rho_ice*thickness*thickness;
     3128                water_pressure = -(1.0/2.0)*gravity*rho_water*(b*b);
     3129                ice_pressure   =  (1.0/2.0)*gravity*rho_ice*thickness*thickness;
    31333130                pressure = ice_pressure + water_pressure;
    31343131                /*Vertically integrated pressure - HO type*/
    3135                 b=min(0.,base-sealevel); // 0 if the bottom of the glacier is above water level
    3136                 s=thickness+b; // ice surface regardless of whether the top of the glacier is above water level or not
    3137                 water_pressure_sh = gravity*rho_water*( -b*b/2 + (pow(-b,n+2)/pow(thickness,n+1))*(-s/(n+2)-b/(n+3)) );
     3132                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)) );
    31383133                ice_pressure_sh   = gravity*rho_ice*thickness*thickness*(n+1)/(2*(n+3));
    31393134                pressure_sh = ice_pressure_sh + water_pressure_sh;
Note: See TracChangeset for help on using the changeset viewer.