yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12975
[Branch ~yade-pkg/yade/git-trunk] Rev 3993: HydroForceEngine: add an optional input parameter to account for convective acceleration
------------------------------------------------------------
revno: 3993
committer: raphm1 <raph_maurin@xxxxxxxxxxx>
timestamp: Mon 2017-01-23 17:38:29 +0100
message:
HydroForceEngine: add an optional input parameter to account for convective acceleration
The input convective acceleration term take the form of a depth dependent vector
modified:
pkg/common/ForceEngine.cpp
pkg/common/ForceEngine.hpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'pkg/common/ForceEngine.cpp'
--- pkg/common/ForceEngine.cpp 2016-07-08 22:16:22 +0000
+++ pkg/common/ForceEngine.cpp 2017-01-23 16:38:29 +0000
@@ -97,6 +97,7 @@
if ((p<nCell)&&(p>=0)) {
Vector3r liftForce = Vector3r::Zero();
Vector3r dragForce = Vector3r::Zero();
+ Vector3r convAccForce = Vector3r::Zero();
Vector3r vRel = Vector3r(vxFluid[p]+vFluctX[id],vFluctY[id],vFluctZ[id]) - b->state->vel;//fluid-particle relative velocity
//Drag force calculation
if (vRel.norm()!=0.0) {
@@ -111,8 +112,9 @@
}
//buoyant weight force calculation
Vector3r buoyantForce = -4.0/3.0*Mathr::PI*pow(sphere->radius,3.0)*densFluid*gravity;
+ if (convAccOption==true){convAccForce[0] = - convAcc[p];}
//add the hydro forces to the particle
- scene->forces.addForce(id,dragForce+liftForce+buoyantForce);
+ scene->forces.addForce(id,dragForce+liftForce+buoyantForce+convAccForce);
}
}
}
=== modified file 'pkg/common/ForceEngine.hpp'
--- pkg/common/ForceEngine.hpp 2016-07-08 22:16:22 +0000
+++ pkg/common/ForceEngine.hpp 2017-01-23 16:38:29 +0000
@@ -116,6 +116,8 @@
((vector<Real>,simplifiedReynoldStresses,,,"Vector of size equal to :yref:`nCell<HydroForceEngine.nCell>` containing the Reynolds stresses divided by the fluid density in function of the depth. simplifiedReynoldStresses(z) $= <u_x'u_z'>(z)^2$"))
((Real,bedElevation,,,"Elevation of the bed above which the fluid flow is turbulent and the particles undergo turbulent velocity fluctuation."))
((vector<Real>,fluctTime,,,"Vector containing the time of life of the fluctuations associated to each particles."))
+ ((vector<Real>,convAcc,0,,"Convective acceleration, depth dependent"))
+ ((Real,convAccOption,false,,"To activate the convective acceleration"))
((Real,dtFluct,,,"Execution time step of the turbulent fluctuation model."))
,/*ctor*/