mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: SRF non-inertial frame acceleration terms for particle motion.
This commit is contained in:
@ -185,4 +185,3 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -51,5 +51,3 @@ License
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ License
|
|||||||
#include "fvcGrad.H"
|
#include "fvcGrad.H"
|
||||||
#include "mathematicalConstants.H"
|
#include "mathematicalConstants.H"
|
||||||
#include "electromagneticConstants.H"
|
#include "electromagneticConstants.H"
|
||||||
|
#include "SRFModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -63,6 +64,7 @@ Foam::particleForces::particleForces(const fvMesh& mesh)
|
|||||||
pressureGradient_(false),
|
pressureGradient_(false),
|
||||||
paramagnetic_(false),
|
paramagnetic_(false),
|
||||||
magneticSusceptibility_(0.0),
|
magneticSusceptibility_(0.0),
|
||||||
|
refFrame_(rfInertial),
|
||||||
UName_("undefined_UName"),
|
UName_("undefined_UName"),
|
||||||
HdotGradHName_("undefined_HdotGradHName")
|
HdotGradHName_("undefined_HdotGradHName")
|
||||||
{}
|
{}
|
||||||
@ -86,6 +88,7 @@ Foam::particleForces::particleForces
|
|||||||
pressureGradient_(dict_.lookup("pressureGradient")),
|
pressureGradient_(dict_.lookup("pressureGradient")),
|
||||||
paramagnetic_(dict_.lookup("paramagnetic")),
|
paramagnetic_(dict_.lookup("paramagnetic")),
|
||||||
magneticSusceptibility_(0.0),
|
magneticSusceptibility_(0.0),
|
||||||
|
refFrame_(rfInertial),
|
||||||
UName_(dict_.lookupOrDefault<word>("UName", "U")),
|
UName_(dict_.lookupOrDefault<word>("UName", "U")),
|
||||||
HdotGradHName_(dict_.lookupOrDefault<word>("HdotGradHName", "HdotGradH"))
|
HdotGradHName_(dict_.lookupOrDefault<word>("HdotGradHName", "HdotGradH"))
|
||||||
{
|
{
|
||||||
@ -98,6 +101,30 @@ Foam::particleForces::particleForces
|
|||||||
{
|
{
|
||||||
dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_;
|
dict_.lookup("magneticSusceptibility") >> magneticSusceptibility_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dict_.found("referenceFrame"))
|
||||||
|
{
|
||||||
|
word rf(dict_.lookup("referenceFrame"));
|
||||||
|
|
||||||
|
if (rf == "SRF")
|
||||||
|
{
|
||||||
|
refFrame_ = rfSRF;
|
||||||
|
}
|
||||||
|
else if (rf != "inertial")
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"Foam::particleForces::particleForces"
|
||||||
|
"("
|
||||||
|
"const fvMesh& mesh,"
|
||||||
|
"const dictionary& dict,"
|
||||||
|
"const vector& g"
|
||||||
|
")"
|
||||||
|
)
|
||||||
|
<< "Unknown referenceFrame, options are inertial and SRF."
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -114,6 +141,7 @@ Foam::particleForces::particleForces(const particleForces& f)
|
|||||||
pressureGradient_(f.pressureGradient_),
|
pressureGradient_(f.pressureGradient_),
|
||||||
paramagnetic_(f.paramagnetic_),
|
paramagnetic_(f.paramagnetic_),
|
||||||
magneticSusceptibility_(f.magneticSusceptibility_),
|
magneticSusceptibility_(f.magneticSusceptibility_),
|
||||||
|
refFrame_(f.refFrame_),
|
||||||
UName_(f.UName_),
|
UName_(f.UName_),
|
||||||
HdotGradHName_(f.HdotGradHName_)
|
HdotGradHName_(f.HdotGradHName_)
|
||||||
{}
|
{}
|
||||||
@ -305,6 +333,20 @@ Foam::vector Foam::particleForces::calcNonCoupled
|
|||||||
// acceleration
|
// acceleration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (refFrame_ == rfSRF)
|
||||||
|
{
|
||||||
|
const SRF::SRFModel& srf =
|
||||||
|
mesh_.lookupObject<SRF::SRFModel>("SRFProperties");
|
||||||
|
|
||||||
|
const vector& omega = srf.omega().value();
|
||||||
|
const vector& axis = srf.axis();
|
||||||
|
|
||||||
|
vector r = position - axis*(axis & position);
|
||||||
|
|
||||||
|
// Coriolis and centrifugal acceleration terms
|
||||||
|
accelTot += 2*(U ^ omega) + (omega ^ (r ^ omega));
|
||||||
|
}
|
||||||
|
|
||||||
return accelTot;
|
return accelTot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,13 @@ class particleForces
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
//- Reference frame type
|
||||||
|
enum refFrame
|
||||||
|
{
|
||||||
|
rfInertial,
|
||||||
|
rfSRF
|
||||||
|
};
|
||||||
|
|
||||||
//- Reference to the mesh database
|
//- Reference to the mesh database
|
||||||
const fvMesh& mesh_;
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
@ -95,6 +102,9 @@ class particleForces
|
|||||||
//- Magnetic susceptibility of particle
|
//- Magnetic susceptibility of particle
|
||||||
scalar magneticSusceptibility_;
|
scalar magneticSusceptibility_;
|
||||||
|
|
||||||
|
//- Reference frame accelerations
|
||||||
|
refFrame refFrame_;
|
||||||
|
|
||||||
|
|
||||||
// Additional info
|
// Additional info
|
||||||
|
|
||||||
|
|||||||
@ -69,8 +69,9 @@ bool Foam::NoSurfaceFilm<CloudType>::active() const
|
|||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
bool Foam::NoSurfaceFilm<CloudType>::transferParcel
|
bool Foam::NoSurfaceFilm<CloudType>::transferParcel
|
||||||
(
|
(
|
||||||
const parcelType&,
|
parcelType&,
|
||||||
const label
|
const polyPatch&,
|
||||||
|
bool&
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -98,8 +98,9 @@ public:
|
|||||||
// Returns true if parcel is to be transferred
|
// Returns true if parcel is to be transferred
|
||||||
virtual bool transferParcel
|
virtual bool transferParcel
|
||||||
(
|
(
|
||||||
const parcelType& p,
|
parcelType& p,
|
||||||
const label patchI
|
const polyPatch& pp,
|
||||||
|
bool& keepParticle
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Set parcel properties
|
//- Set parcel properties
|
||||||
|
|||||||
Reference in New Issue
Block a user