@@ -270,9 +270,9 @@ Integrator* Integrator::createIntegrator(const H5::CommonFG *parent, cxxTitanSim
270270 {
271271 integrator = new Integrator_SinglePhase_Coulomb (_titanSimulation );
272272 }
273- else if (integratorType == "Integrator_SinglePhase_Voellmy_Slam " )
273+ else if (integratorType == "Integrator_SinglePhase_Voellmy_Salm " )
274274 {
275- integrator = new Integrator_SinglePhase_Voellmy_Slam (_titanSimulation );
275+ integrator = new Integrator_SinglePhase_Voellmy_Salm (_titanSimulation );
276276 }
277277 else if (integratorType == "Integrator_SinglePhase_Pouliquen_Forterre" )
278278 {
@@ -800,7 +800,7 @@ void Integrator_SinglePhase_Coulomb::corrector()
800800 if (stopping_criteria == 1 )
801801 {
802802 inertial_x = fabs (Ustore [1 ] + dt * forcegrav );
803- drag_x = fabs (dt * (forcebedx - forceintx ) );
803+ drag_x = fabs (dt * (forcebedx + forceintx ) );
804804
805805 if (inertial_x <= drag_x )
806806 Ustore [1 ] = 0.0 ;
@@ -842,7 +842,7 @@ void Integrator_SinglePhase_Coulomb::corrector()
842842 if (stopping_criteria == 1 )
843843 {
844844 inertial_y = fabs (Ustore [2 ] + dt * forcegrav );
845- drag_x = fabs (dt * (forcebedy - forceinty ) );
845+ drag_y = fabs (dt * (forcebedy + forceinty ) );
846846
847847 if (inertial_y <= drag_y )
848848 Ustore [2 ] = 0.0 ;
@@ -939,7 +939,7 @@ void Integrator_SinglePhase_Coulomb::h5read(const H5::CommonFG *parent, const s
939939 H5 ::Group group (parent -> openGroup (group_name ));
940940}
941941///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
942- Integrator_SinglePhase_Voellmy_Slam :: Integrator_SinglePhase_Voellmy_Slam (cxxTitanSimulation * _titanSimulation ):
942+ Integrator_SinglePhase_Voellmy_Salm :: Integrator_SinglePhase_Voellmy_Salm (cxxTitanSimulation * _titanSimulation ):
943943 Integrator_SinglePhase (_titanSimulation )
944944{
945945 assert (elementType == ElementType ::SinglePhase );
@@ -948,7 +948,7 @@ Integrator_SinglePhase_Voellmy_Slam::Integrator_SinglePhase_Voellmy_Slam(cxxTita
948948 mu = 0.5 ;
949949 xi = 120.0 ;
950950}
951- bool Integrator_SinglePhase_Voellmy_Slam ::scale ()
951+ bool Integrator_SinglePhase_Voellmy_Salm ::scale ()
952952{
953953 if (Integrator_SinglePhase ::scale ())
954954 {
@@ -957,7 +957,7 @@ bool Integrator_SinglePhase_Voellmy_Slam::scale()
957957 }
958958 return false;
959959}
960- bool Integrator_SinglePhase_Voellmy_Slam ::unscale ()
960+ bool Integrator_SinglePhase_Voellmy_Salm ::unscale ()
961961{
962962 if (Integrator_SinglePhase ::unscale ())
963963 {
@@ -966,18 +966,18 @@ bool Integrator_SinglePhase_Voellmy_Slam::unscale()
966966 }
967967 return false;
968968}
969- void Integrator_SinglePhase_Voellmy_Slam ::print0 (int spaces )
969+ void Integrator_SinglePhase_Voellmy_Salm ::print0 (int spaces )
970970{
971- printf ("%*cIntegrator: single phase, Voellmy_Slam model, first order\n" , spaces ,' ' );
971+ printf ("%*cIntegrator: single phase, Voellmy_Salm model, first order\n" , spaces ,' ' );
972972 printf ("%*cmu:%.3f\n" , spaces + 4 ,' ' ,mu );
973973 printf ("%*cxi:%.3f\n" , spaces + 4 ,' ' ,scaled ?xi * scale_ .gravity :xi );
974974 Integrator_SinglePhase ::print0 (spaces + 4 );
975975}
976- void Integrator_SinglePhase_Voellmy_Slam ::predictor ()
976+ void Integrator_SinglePhase_Voellmy_Salm ::predictor ()
977977{
978978}
979979
980- void Integrator_SinglePhase_Voellmy_Slam ::corrector ()
980+ void Integrator_SinglePhase_Voellmy_Salm ::corrector ()
981981{
982982 //for comparison of magnitudes of forces in slumping piles
983983 double m_forceint = 0.0 ;
@@ -1077,7 +1077,7 @@ void Integrator_SinglePhase_Voellmy_Slam::corrector()
10771077
10781078 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
10791079 //corrector itself
1080- double speed ;
1080+ double speed , speed_squared ;
10811081 double forceintx , forceinty ;
10821082 double forcebedx , forcebedy ;
10831083 double forcegrav_x ,forcegrav_y ;
@@ -1117,12 +1117,13 @@ void Integrator_SinglePhase_Voellmy_Slam::corrector()
11171117 if (h [ndx ] > tiny )
11181118 {
11191119 // S terms
1120- // here speed is speed squared
1121- speed = VxVy [ 0 ] * VxVy [ 0 ] + VxVy [ 1 ] * VxVy [ 1 ];
1122- if (speed > 0.0 )
1120+ speed_squared = VxVy [ 0 ] * VxVy [ 0 ] + VxVy [ 1 ] * VxVy [ 1 ];
1121+
1122+ if (speed_squared > 0.0 )
11231123 {
1124- // here speed is speed
1125- speed = sqrt (speed );
1124+
1125+ speed = sqrt (speed_squared );
1126+
11261127 unitvx = VxVy [0 ] / speed ;
11271128 unitvy = VxVy [1 ] / speed ;
11281129 }
@@ -1131,8 +1132,6 @@ void Integrator_SinglePhase_Voellmy_Slam::corrector()
11311132 unitvx = 0.0 ;
11321133 unitvy = 0.0 ;
11331134 }
1134- // tanbed = tan(bedfrictang[ndx]);
1135- // h_inv = 1.0 / h[ndx];
11361135
11371136 //ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
11381137 // x direction source terms
@@ -1145,7 +1144,7 @@ void Integrator_SinglePhase_Voellmy_Slam::corrector()
11451144 force_CoulombFrict_x = unitvx * mu * g [2 ][ndx ] * h [ndx ];
11461145
11471146 //the Turbulent type force for fast moving flow in x direction
1148- force_Turbulence_x = unitvx * speed * speed * inv_xi ;
1147+ force_Turbulence_x = unitvx * speed_squared * inv_xi ;
11491148
11501149
11511150 Ustore [1 ] = Ustore [1 ] + dt * (forcegrav_x - force_CoulombFrict_x - force_Turbulence_x );
@@ -1157,11 +1156,11 @@ void Integrator_SinglePhase_Voellmy_Slam::corrector()
11571156 // the gravity force in the y direction
11581157 forcegrav_y = g [1 ][ndx ] * h [ndx ];
11591158
1160- // the Coulomb type friction force
1159+ // the Coulomb type friction force in y direction
11611160 force_CoulombFrict_y = unitvy * mu * g [2 ][ndx ] * h [ndx ];
11621161
1163- // the Turbulent type force for fast moving flow
1164- force_Turbulence_y = unitvy * ( speed * speed ) * inv_xi ;
1162+ // the Turbulent type force for fast moving flow in y direction
1163+ force_Turbulence_y = unitvy * speed_squared * inv_xi ;
11651164
11661165
11671166 Ustore [2 ] = Ustore [2 ] + dt * (forcegrav_y - force_CoulombFrict_y - force_Turbulence_y );
@@ -1214,15 +1213,15 @@ void Integrator_SinglePhase_Voellmy_Slam::corrector()
12141213 deposited = m_deposited ;
12151214 realvolume = m_realvolume ;
12161215}
1217- void Integrator_SinglePhase_Voellmy_Slam ::h5write (H5 ::CommonFG * parent , string group_name ) const
1216+ void Integrator_SinglePhase_Voellmy_Salm ::h5write (H5 ::CommonFG * parent , string group_name ) const
12181217{
12191218 Integrator_SinglePhase ::h5write (parent ,group_name );
12201219 H5 ::Group group (parent -> openGroup (group_name ));
1221- TiH5_writeStringAttribute__ (group ,"Integrator_SinglePhase_Voellmy_Slam " ,"Type" );
1220+ TiH5_writeStringAttribute__ (group ,"Integrator_SinglePhase_Voellmy_Salm " ,"Type" );
12221221 TiH5_writeDoubleAttribute (group , mu );
12231222 TiH5_writeDoubleAttribute (group , xi );
12241223}
1225- void Integrator_SinglePhase_Voellmy_Slam ::h5read (const H5 ::CommonFG * parent , const string group_name )
1224+ void Integrator_SinglePhase_Voellmy_Salm ::h5read (const H5 ::CommonFG * parent , const string group_name )
12261225{
12271226 Integrator_SinglePhase ::h5read (parent ,group_name );
12281227 H5 ::Group group (parent -> openGroup (group_name ));
@@ -1240,7 +1239,7 @@ Integrator_SinglePhase_Pouliquen_Forterre::Integrator_SinglePhase_Pouliquen_Fort
12401239 phi2 = 42.0 ;//in degrees, will convert to rad on scale (0.523598776 rad);
12411240 phi3 = 33.9 ;
12421241 Beta = 0.65 ;
1243- L_material = 1.0E-4 ;
1242+ L_material = 1.0E-3 ;
12441243}
12451244
12461245bool Integrator_SinglePhase_Pouliquen_Forterre ::scale ()
@@ -1503,7 +1502,7 @@ void Integrator_SinglePhase_Pouliquen_Forterre::corrector()
15031502 forcegravy = g [1 ][ndx ] * h [ndx ];
15041503
15051504 // the bed friction forces for fast moving flow in y direction
1506- forcebedy1 = h [ndx ] * unitvy * ( g [2 ][ndx ] + VxVy [1 ] * hVy [ndx ] * curvature_ [1 ][ndx ] );
1505+ forcebedy1 = h [ndx ] * unitvy * mu_bed * ( g [2 ][ndx ] + VxVy [1 ] * hVy [ndx ] * curvature_ [1 ][ndx ] );
15071506
15081507 forcebedy2 = h [ndx ] * g [2 ][ndx ] * kactxy [ndx ] * dh_dy [ndx ];
15091508
0 commit comments