Commit eddccf3e authored by graham's avatar graham
Browse files

ENH: SRF non-inertial frame acceleration terms for particle motion.

parent 7364bc2c
......@@ -185,4 +185,3 @@ public:
#endif
// ************************************************************************* //
......@@ -51,5 +51,3 @@ License
#endif
// ************************************************************************* //
......@@ -29,6 +29,7 @@ License
#include "fvcGrad.H"
#include "mathematicalConstants.H"
#include "electromagneticConstants.H"
#include "SRFModel.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
......@@ -63,6 +64,7 @@ Foam::particleForces::particleForces(const fvMesh& mesh)
pressureGradient_(false),
paramagnetic_(false),
magneticSusceptibility_(0.0),
refFrame_(rfInertial),
UName_("undefined_UName"),
HdotGradHName_("undefined_HdotGradHName")
{}
......@@ -86,6 +88,7 @@ Foam::particleForces::particleForces
pressureGradient_(dict_.lookup("pressureGradient")),
paramagnetic_(dict_.lookup("paramagnetic")),
magneticSusceptibility_(0.0),
refFrame_(rfInertial),
UName_(dict_.lookupOrDefault<word>("UName", "U")),
HdotGradHName_(dict_.lookupOrDefault<word>("HdotGradHName", "HdotGradH"))
{
......@@ -98,6 +101,30 @@ Foam::particleForces::particleForces
{
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_),
paramagnetic_(f.paramagnetic_),
magneticSusceptibility_(f.magneticSusceptibility_),
refFrame_(f.refFrame_),
UName_(f.UName_),
HdotGradHName_(f.HdotGradHName_)
{}
......@@ -305,6 +333,20 @@ Foam::vector Foam::particleForces::calcNonCoupled
// 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;
}
......
......@@ -59,6 +59,13 @@ class particleForces
{
// Private data
//- Reference frame type
enum refFrame
{
rfInertial,
rfSRF
};
//- Reference to the mesh database
const fvMesh& mesh_;
......@@ -95,6 +102,9 @@ class particleForces
//- Magnetic susceptibility of particle
scalar magneticSusceptibility_;
//- Reference frame accelerations
refFrame refFrame_;
// Additional info
......
......@@ -69,8 +69,9 @@ bool Foam::NoSurfaceFilm<CloudType>::active() const
template<class CloudType>
bool Foam::NoSurfaceFilm<CloudType>::transferParcel
(
const parcelType&,
const label
parcelType&,
const polyPatch&,
bool&
)
{
return false;
......
......@@ -98,8 +98,9 @@ public:
// Returns true if parcel is to be transferred
virtual bool transferParcel
(
const parcelType& p,
const label patchI
parcelType& p,
const polyPatch& pp,
bool& keepParticle
);
//- Set parcel properties
......
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