Changeset 7408
- Timestamp:
- 02/09/11 16:54:26 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r7368 r7408 72 72 parameters->AddObject(new IntParam(StabilizeConstraintsEnum,iomodel->stabilize_constraints)); 73 73 parameters->AddObject(new DoubleParam(StokesReconditioningEnum,iomodel->stokesreconditioning)); 74 parameters->AddObject(new IntParam(ShelfDampeningEnum,iomodel->shelf_dampening)); 74 75 parameters->AddObject(new DoubleParam(ViscosityOvershootEnum,iomodel->viscosity_overshoot)); 75 76 parameters->AddObject(new BoolParam(WaitOnLockEnum,iomodel->waitonlock)); -
issm/trunk/src/c/objects/Elements/Penta.cpp
r7391 r7408 2625 2625 /*Intermediaries*/ 2626 2626 int i,j,ig; 2627 int approximation ;2627 int approximation,shelf_dampening; 2628 2628 double gravity,rho_water,bed,water_pressure; 2629 double damper,normal_vel,vx,vy,vz,dt; 2629 2630 double xyz_list_tria[NUMVERTICES2D][3]; 2630 2631 double xyz_list[NUMVERTICES][3]; 2631 2632 double bed_normal[3]; 2633 double dz[3]; 2632 2634 double l1l6[6]; //for the six nodes of the penta 2633 2635 double Jdet2d; … … 2637 2639 if(!IsOnBed() || !IsOnShelf()) return NULL; 2638 2640 inputs->GetParameterValue(&approximation,ApproximationEnum); 2641 this->parameters->FindParam(&shelf_dampening,ShelfDampeningEnum); 2639 2642 if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL; 2640 2643 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum); … … 2645 2648 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2646 2649 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); 2647 2653 2648 2654 for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j]; … … 2657 2663 GetNodalFunctionsP1(l1l6, gauss); 2658 2664 2665 BedNormal(&bed_normal[0],xyz_list_tria); 2659 2666 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); 2661 2678 water_pressure=gravity*rho_water*bed; 2662 2679 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]; 2664 2681 } 2665 2682 -
issm/trunk/src/c/objects/IoModel.cpp
r7368 r7408 191 191 IoModelFetchData(&this->prognostic_DG,iomodel_handle,"prognostic_DG"); 192 192 IoModelFetchData(&this->stokesreconditioning,iomodel_handle,"stokesreconditioning"); 193 IoModelFetchData(&this->shelf_dampening,iomodel_handle,"shelf_dampening"); 193 194 IoModelFetchData(&this->waitonlock,iomodel_handle,"waitonlock"); 194 195 IoModelFetchData(&this->kff,iomodel_handle,"kff"); … … 353 354 this->prognostic_DG=0; 354 355 this->stokesreconditioning=0; 356 this->shelf_dampening=0; 355 357 this->waitonlock=0; 356 358 -
issm/trunk/src/c/objects/IoModel.h
r7368 r7408 119 119 double viscosity_overshoot; 120 120 double stokesreconditioning; 121 int shelf_dampening; 121 122 double cm_noisedmp; 122 123 double* cm_min;
Note:
See TracChangeset
for help on using the changeset viewer.