mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MRF: new function to add Coriolis contribution to the given field
This commit is contained in:
@ -292,6 +292,31 @@ Foam::MRFZone::MRFZone(const fvMesh& mesh, Istream& is)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::MRFZone::addCoriolis
|
||||
(
|
||||
const volVectorField& U,
|
||||
volVectorField& ddtU
|
||||
) const
|
||||
{
|
||||
if (cellZoneID_ == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const labelList& cells = mesh_.cellZones()[cellZoneID_];
|
||||
const scalarField& V = mesh_.V();
|
||||
vectorField& ddtUc = ddtU.internalField();
|
||||
const vectorField& Uc = U.internalField();
|
||||
const vector& Omega = Omega_.value();
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
ddtUc[celli] += V[celli]*(Omega ^ Uc[celli]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) const
|
||||
{
|
||||
if (cellZoneID_ == -1)
|
||||
|
||||
@ -166,6 +166,9 @@ public:
|
||||
setMRFFaces();
|
||||
}
|
||||
|
||||
//- Add the Coriolis force contribution to the acceleration field
|
||||
void addCoriolis(const volVectorField& U, volVectorField& ddtU) const;
|
||||
|
||||
//- Add the Coriolis force contribution to the momentum equation
|
||||
void addCoriolis(fvVectorMatrix& UEqn) const;
|
||||
|
||||
|
||||
@ -55,6 +55,19 @@ Foam::MRFZones::MRFZones(const fvMesh& mesh)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::MRFZones::addCoriolis
|
||||
(
|
||||
const volVectorField& U,
|
||||
volVectorField& ddtU
|
||||
) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
operator[](i).addCoriolis(U, ddtU);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::MRFZones::addCoriolis(fvVectorMatrix& UEqn) const
|
||||
{
|
||||
forAll(*this, i)
|
||||
|
||||
@ -72,6 +72,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Add the Coriolis force contribution to the acceleration field
|
||||
void addCoriolis(const volVectorField& U, volVectorField& ddtU) const;
|
||||
|
||||
//- Add the Coriolis force contribution to the momentum equation
|
||||
void addCoriolis(fvVectorMatrix& UEqn) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user