Changeset 7408


Ignore:
Timestamp:
02/09/11 16:54:26 (14 years ago)
Author:
seroussi
Message:

added shelf_dampening in penta

Location:
issm/trunk/src/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r7368 r7408  
    7272        parameters->AddObject(new IntParam(StabilizeConstraintsEnum,iomodel->stabilize_constraints));
    7373        parameters->AddObject(new DoubleParam(StokesReconditioningEnum,iomodel->stokesreconditioning));
     74        parameters->AddObject(new IntParam(ShelfDampeningEnum,iomodel->shelf_dampening));
    7475        parameters->AddObject(new DoubleParam(ViscosityOvershootEnum,iomodel->viscosity_overshoot));
    7576        parameters->AddObject(new BoolParam(WaitOnLockEnum,iomodel->waitonlock));
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r7391 r7408  
    26252625        /*Intermediaries*/
    26262626        int         i,j,ig;
    2627         int         approximation;
     2627        int         approximation,shelf_dampening;
    26282628        double      gravity,rho_water,bed,water_pressure;
     2629        double      damper,normal_vel,vx,vy,vz,dt;
    26292630        double          xyz_list_tria[NUMVERTICES2D][3];
    26302631        double      xyz_list[NUMVERTICES][3];
    26312632        double          bed_normal[3];
     2633        double      dz[3];
    26322634        double      l1l6[6]; //for the six nodes of the penta
    26332635        double      Jdet2d;
     
    26372639        if(!IsOnBed() || !IsOnShelf()) return NULL;
    26382640        inputs->GetParameterValue(&approximation,ApproximationEnum);
     2641        this->parameters->FindParam(&shelf_dampening,ShelfDampeningEnum);
    26392642        if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    26402643        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     
    26452648        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    26462649        Input* bed_input=inputs->GetInput(BedEnum); _assert_(bed_input);
     2650        Input* vx_input=inputs->GetInput(VxEnum);   _assert_(vx_input);
     2651        Input* vy_input=inputs->GetInput(VyEnum);   _assert_(vy_input);
     2652        Input* vz_input=inputs->GetInput(VzEnum);   _assert_(vz_input);
    26472653
    26482654        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
     
    26572663                GetNodalFunctionsP1(l1l6, gauss);
    26582664
     2665                BedNormal(&bed_normal[0],xyz_list_tria);
    26592666                bed_input->GetParameterValue(&bed, gauss);
    2660                 BedNormal(&bed_normal[0],xyz_list_tria);
     2667                if(shelf_dampening){ //add dampening to avoid too high vertical velocities when not in hydrostatic equilibrium
     2668                        bed_input->GetParameterDerivativeValue(&dz[0],&xyz_list[0][0],gauss);
     2669                        vx_input->GetParameterValue(&vx, gauss);
     2670                        vy_input->GetParameterValue(&vy, gauss);
     2671                        vz_input->GetParameterValue(&vz, gauss);
     2672                        dt=0;
     2673                        normal_vel=bed_normal[0]*vx+bed_normal[1]*vy+bed_normal[2]*vz;
     2674                        damper=gravity*rho_water*pow(1+pow(dz[0],2)+pow(dz[1],2),0.5)*normal_vel*dt;
     2675                }
     2676                else damper=0;
     2677                vz_input->GetParameterValue(&vz, gauss);
    26612678                water_pressure=gravity*rho_water*bed;
    26622679
    2663                 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) pe->values[i*NDOF4+j]+=water_pressure*gauss->weight*Jdet2d*l1l6[i]*bed_normal[j];
     2680                for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) pe->values[i*NDOF4+j]+=(water_pressure+damper)*gauss->weight*Jdet2d*l1l6[i]*bed_normal[j];
    26642681        }
    26652682
  • issm/trunk/src/c/objects/IoModel.cpp

    r7368 r7408  
    191191        IoModelFetchData(&this->prognostic_DG,iomodel_handle,"prognostic_DG");
    192192        IoModelFetchData(&this->stokesreconditioning,iomodel_handle,"stokesreconditioning");
     193        IoModelFetchData(&this->shelf_dampening,iomodel_handle,"shelf_dampening");
    193194        IoModelFetchData(&this->waitonlock,iomodel_handle,"waitonlock");
    194195        IoModelFetchData(&this->kff,iomodel_handle,"kff");
     
    353354        this->prognostic_DG=0;
    354355        this->stokesreconditioning=0;
     356        this->shelf_dampening=0;
    355357        this->waitonlock=0;
    356358
  • issm/trunk/src/c/objects/IoModel.h

    r7368 r7408  
    119119                double  viscosity_overshoot;
    120120                double  stokesreconditioning;
     121                int     shelf_dampening;
    121122                double  cm_noisedmp;
    122123                double* cm_min;
Note: See TracChangeset for help on using the changeset viewer.