45 Foam::SRF::SRFModel::SRFModel
56 Urel.time().constant(),
67 SRFModelCoeffs_(optionalSubDict(
type +
"Coeffs")),
85 readEntry(
"origin", origin_);
88 readEntry(
"axis", axis_);
92 SRFModelCoeffs_ = optionalSubDict(
type() +
"Coeffs");
127 2.0*omega_ ^ Urel_.internalField()
141 omega_ ^ (omega_ ^ (mesh_.C().internalField() - origin_))
150 return Fcoriolis() + Fcentrifugal();
163 (positions - origin_.value())
164 - axis_*(axis_ & (positions - origin_.value()))
181 omega_ ^ (relPos() - axis_*(axis_ & relPos()))
200 auto& Uabs = tUabs.ref();
203 Uabs.primitiveFieldRef() += Urel_.primitiveField();
211 if (isA<SRFVelocityFvPatchVectorField>(bvf[i]))
216 refCast<const SRFVelocityFvPatchVectorField>(bvf[i]);
219 Uabsbf[i] += Urel_.boundaryField()[i];
224 Uabsbf[i] += Urel_.boundaryField()[i];
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
defineTypeNameAndDebug(rpm, 0)
static int localConsistency
Enable local consistency.
virtual bool read()
Read object.
bool relative() const
Is supplied inlet value relative to the SRF?
defineRunTimeSelectionTable(SRFModel, dictionary)
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
const dimensionSet dimless
Dimensionless.
const vector & axis() const
Return the axis of rotation.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define forAll(list, i)
Loop across all elements in list.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual bool read()
Read radiationProperties dictionary.
A class for handling words, derived from Foam::string.
const dimensionedVector & omega() const
Return the angular velocity field [rad/s].
const dimensionedVector & origin() const
Return the origin of rotation.
static tmp< GeometricField< vector, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< vector >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
tmp< volVectorField::Internal > Fcoriolis() const
Return the coriolis force.
tmp< volVectorField::Internal > Su() const
Source term component for momentum equation.
tmp< volVectorField > U() const
Return velocity of SRF for complete mesh.
tmp< volVectorField::Internal > Fcentrifugal() const
Return the centrifugal force.
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field Urel\"<< endl;volVectorField Urel(IOobject("Urel", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading/calculating face flux field phi\"<< endl;surfaceScalarField phi(IOobject("phi", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), linearInterpolate(Urel) &mesh.Sf());label pRefCell=0;scalar pRefValue=0.0;setRefCell(p, pimple.dict(), pRefCell, pRefValue);mesh.setFluxRequired(p.name());Info<< "Creating SRF model\"<< endl;autoPtr< SRF::SRFModel > SRF(SRF::SRFModel::New(Urel))
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
tmp< volVectorField > Uabs() const
Return absolute velocity for complete mesh.
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field...
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual ~SRFModel()
Destructor.
Field< vector > vectorField
Specialisation of Field<T> for vector.
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Do not request registration (bool: false)
vectorField velocity(const vectorField &positions) const
Return velocity vector from positions.
static constexpr const zero Zero
Global zero (0)
Velocity condition to be used in conjunction with the single rotating frame (SRF) model (see: SRFMode...