Changeset 9255
- Timestamp:
- 08/10/11 15:19:39 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r9218 r9255 2659 2659 } 2660 2660 /*}}}*/ 2661 /*FUNCTION Tria::GetHydrologyWaterVelocity {{{1*/ 2662 void Tria::GetHydrologyWaterVelocity(double* v,GaussTria* gauss){ 2663 /*material parameters: */ 2664 double mu_water=0.001787; //unit= [N s/m2] 2665 double w; 2666 double rho_ice, rho_water, g; 2667 double dsdx,dsdy,dbdx,dbdy; 2668 2669 /*Retrieve all inputs and parameters*/ 2670 rho_ice=matpar->GetRhoIce(); 2671 rho_water=matpar->GetRhoWater(); 2672 g=matpar->GetG(); 2673 Input* surfaceslopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(surfaceslopex_input); 2674 Input* surfaceslopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(surfaceslopey_input); 2675 Input* bedslopex_input=inputs->GetInput(BedSlopeXEnum); _assert_(bedslopex_input); 2676 Input* bedslopey_input=inputs->GetInput(BedSlopeYEnum); _assert_(bedslopey_input); 2677 Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input); 2678 2679 /*recover slopes: */ 2680 surfaceslopex_input->GetParameterValue(&dsdx,gauss); 2681 surfaceslopey_input->GetParameterValue(&dsdy,gauss); 2682 bedslopex_input->GetParameterValue(&dbdx,gauss); 2683 bedslopey_input->GetParameterValue(&dbdy,gauss); 2684 2685 /*recover water column: */ 2686 watercolumn_input->GetParameterValue(&w,gauss); 2687 2688 /* Water velocity x and y components */ 2689 v[0]=pow(w,2)/(12 * mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx); 2690 v[1]=pow(w,2)/(12 * mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy); 2691 } 2692 /*}}}*/ 2661 2693 /*FUNCTION Tria::Gradj {{{1*/ 2662 2694 void Tria::Gradj(Vec gradient,int control_type){
Note:
See TracChangeset
for help on using the changeset viewer.