Commit 40df7e89 authored by jduriez's avatar jduriez
Browse files

Sign convention change for fCap, to be consistent with global framework. Plus...

Sign convention change for fCap, to be consistent with global framework. Plus other minor changes. As discussed in http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg10868.html and http://www.mail-archive.com/yade-dev@lists.launchpad.net/msg10877.html
parent 85616e85
...@@ -18,13 +18,13 @@ class CapillaryPhys : public FrictPhys ...@@ -18,13 +18,13 @@ class CapillaryPhys : public FrictPhys
virtual ~CapillaryPhys() {}; virtual ~CapillaryPhys() {};
YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(CapillaryPhys,FrictPhys,"Physics (of interaction) for :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`.", YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(CapillaryPhys,FrictPhys,"Physics (of interaction) for :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`.",
((bool,meniscus,false,,"Presence of a meniscus if true")) ((bool,meniscus,false,Attr::readonly,"True when a meniscus with a non-zero liquid volume (:yref:`vMeniscus<CapillaryPhys.vMeniscus>`) has been computed for this interaction"))
((bool,isBroken,false,,"If true, capillary force is zero and liquid bridge is inactive.")) ((bool,isBroken,false,,"Might be set to true by the user to make liquid bridge inactive (capillary force is zero)"))
((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`")) ((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`"))
((Real,vMeniscus,0.,,"Volume of the meniscus")) ((Real,vMeniscus,0.,,"Volume of the meniscus"))
((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)")) ((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)"))
((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)")) ((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)"))
((Vector3r,fCap,Vector3r::Zero(),,"Capillary force produced by the presence of the meniscus")) ((Vector3r,fCap,Vector3r::Zero(),,"Capillary force produced by the presence of the meniscus. This is the force acting on particle #2"))
((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one")) ((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one"))
,/*deprec*/ ,/*deprec*/
((Fcap,fCap,"naming convention")) ((Fcap,fCap,"naming convention"))
......
...@@ -22,7 +22,7 @@ class CapillaryStressRecorder : public Recorder ...@@ -22,7 +22,7 @@ class CapillaryStressRecorder : public Recorder
public : public :
virtual void action(); virtual void action();
YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryStressRecorder,Recorder,"Records information from capillary meniscii on samples submitted to triaxial compressions. -> New formalism needs to be tested!!!",,initRun=true;); YADE_CLASS_BASE_DOC_ATTRS_CTOR(CapillaryStressRecorder,Recorder,"Records information from capillary meniscii on samples submitted to triaxial compressions. Classical sign convention (tension positiv) is used for capillary stresses. -> New formalism needs to be tested!!!",,initRun=true;);
DECLARE_LOGGER; DECLARE_LOGGER;
}; };
......
...@@ -179,13 +179,13 @@ class MindlinCapillaryPhys : public MindlinPhys ...@@ -179,13 +179,13 @@ class MindlinCapillaryPhys : public MindlinPhys
virtual ~MindlinCapillaryPhys() {}; virtual ~MindlinCapillaryPhys() {};
YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(MindlinCapillaryPhys,MindlinPhys,"Adds capillary physics to Mindlin's interaction physics.", YADE_CLASS_BASE_DOC_ATTRS_DEPREC_INIT_CTOR_PY(MindlinCapillaryPhys,MindlinPhys,"Adds capillary physics to Mindlin's interaction physics.",
((bool,meniscus,false,,"Presence of a meniscus if true")) ((bool,meniscus,false,Attr::readonly,"True when a meniscus with a non-zero liquid volume (:yref:`vMeniscus<MindlinPhys.vMeniscus>`) has been computed for this interaction"))
((bool,isBroken,false,,"If true, capillary force is zero and liquid bridge is inactive.")) ((bool,isBroken,false,,"Might be set to true by the user to make liquid bridge inactive (capillary force is zero)"))
((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`")) ((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`"))
((Real,vMeniscus,0.,,"Volume of the meniscus")) ((Real,vMeniscus,0.,,"Volume of the meniscus"))
((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)")) ((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)"))
((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)")) ((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)"))
((Vector3r,fCap,Vector3r::Zero(),,"Capillary Force produces by the presence of the meniscus")) ((Vector3r,fCap,Vector3r::Zero(),,"Capillary Force produces by the presence of the meniscus. This is the force acting on particle #2"))
((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one")) ((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one"))
,/*deprec*/ ,/*deprec*/
((Fcap,fCap,"naming convention")) ((Fcap,fCap,"naming convention"))
......
...@@ -109,10 +109,10 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action() ...@@ -109,10 +109,10 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action()
R2=alpha*std::max(currentContactGeometry->radius2,currentContactGeometry->radius1) ; R2=alpha*std::max(currentContactGeometry->radius2,currentContactGeometry->radius1) ;
/// intergranular distance /// intergranular distance
Real D = alpha*((b2->state->pos-b1->state->pos).norm()-(currentContactGeometry->radius1+ currentContactGeometry->radius2)); // scGeom->penetrationDepth could probably be used here? Real D = - alpha * currentContactGeometry->penetrationDepth;
if ((currentContactGeometry->penetrationDepth>=0)|| D<=0 || createDistantMeniscii) { //||(scene->iter < 1) ) // a simplified way to define meniscii everywhere if ( D<0 || createDistantMeniscii) { //||(scene->iter < 1) ) // a simplified way to define meniscii everywhere
D=max(0.,D); // defines fCap when spheres interpenetrate. D<0 leads to wrong interpolation has D<0 has no solution in the interpolation : this is not physically interpretable!! even if, interpenetration << grain radius. D=max(0.,D); // defines fCap when spheres interpenetrate. D<0 leads to wrong interpolation as D<0 has no solution in the interpolation : this is not physically interpretable!! even if, interpenetration << grain radius.
if (!hertzOn) { if (!hertzOn) {
if (fusionDetection && !cundallContactPhysics->meniscus) bodiesMenisciiList.insert(interaction); if (fusionDetection && !cundallContactPhysics->meniscus) bodiesMenisciiList.insert(interaction);
cundallContactPhysics->meniscus=true; cundallContactPhysics->meniscus=true;
...@@ -138,7 +138,7 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action() ...@@ -138,7 +138,7 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action()
solution(Pinterpol? capillary->interpolate(R1,R2,Dinterpol, Pinterpol, currentIndexes) : MeniscusParameters()); solution(Pinterpol? capillary->interpolate(R1,R2,Dinterpol, Pinterpol, currentIndexes) : MeniscusParameters());
/// capillary adhesion force /// capillary adhesion force
Real Finterpol = solution.F; Real Finterpol = solution.F;
Vector3r fCap = Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->normal; Vector3r fCap = - Finterpol*(2*Mathr::PI*(R2/alpha)*liquidTension)*currentContactGeometry->normal;
if (!hertzOn) cundallContactPhysics->fCap = fCap; if (!hertzOn) cundallContactPhysics->fCap = fCap;
else mindlinContactPhysics->fCap = fCap; else mindlinContactPhysics->fCap = fCap;
/// meniscus volume /// meniscus volume
...@@ -155,7 +155,7 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action() ...@@ -155,7 +155,7 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action()
if (!Vinterpol) { if (!Vinterpol) {
if ((fusionDetection) || (hertzOn ? mindlinContactPhysics->isBroken : cundallContactPhysics->isBroken)) bodiesMenisciiList.remove(interaction); if ((fusionDetection) || (hertzOn ? mindlinContactPhysics->isBroken : cundallContactPhysics->isBroken)) bodiesMenisciiList.remove(interaction);
if (D>0) scene->interactions->requestErase(interaction); if (D>0) scene->interactions->requestErase(interaction);
else LOG_ERROR("No meniscus found at a contact. capillaryPressure may be to large wrt. to the loaded data files.") else LOG_ERROR("No meniscus found at a contact. capillaryPressure may be too large wrt. the loaded data files.")
} }
/// wetting angles /// wetting angles
if (!hertzOn) { if (!hertzOn) {
...@@ -197,8 +197,8 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action() ...@@ -197,8 +197,8 @@ void Law2_ScGeom_CapillaryPhys_Capillarity::action()
//LINEAR VERSION : capillary force is divided by (fusionNumber + 1) - NOTE : any decreasing function of fusionNumber can be considered in fact //LINEAR VERSION : capillary force is divided by (fusionNumber + 1) - NOTE : any decreasing function of fusionNumber can be considered in fact
else if (fusionNumber !=0) hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap /= (fusionNumber+1.); else if (fusionNumber !=0) hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap /= (fusionNumber+1.);
} }
scene->forces.addForce(interaction->getId1(), hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap); scene->forces.addForce(interaction->getId1(),-(hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap));
scene->forces.addForce(interaction->getId2(),-(hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap)); scene->forces.addForce(interaction->getId2(), hertzOn?mindlinContactPhysics->fCap:cundallContactPhysics->fCap );
} }
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment