mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MRF: add operator() for consistency with fvOptions
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -160,6 +160,46 @@ void Foam::MRFZoneList::addCoriolis
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::operator()
|
||||||
|
(
|
||||||
|
const volVectorField& U
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<volVectorField> tacceleration
|
||||||
|
(
|
||||||
|
new volVectorField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"MRFZoneList:acceleration",
|
||||||
|
U.mesh().time().timeName(),
|
||||||
|
U.mesh()
|
||||||
|
),
|
||||||
|
U.mesh(),
|
||||||
|
dimensionedVector("0", U.dimensions()/dimTime, vector::zero)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
volVectorField& acceleration = tacceleration();
|
||||||
|
|
||||||
|
forAll(*this, i)
|
||||||
|
{
|
||||||
|
operator[](i).addCoriolis(U, acceleration);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tacceleration;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::operator()
|
||||||
|
(
|
||||||
|
const volScalarField& rho,
|
||||||
|
const volVectorField& U
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return rho*operator()(U);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::MRFZoneList::makeRelative(volVectorField& U) const
|
void Foam::MRFZoneList::makeRelative(volVectorField& U) const
|
||||||
{
|
{
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -102,6 +102,19 @@ public:
|
|||||||
//- Add the Coriolis force contribution to the momentum equation
|
//- Add the Coriolis force contribution to the momentum equation
|
||||||
void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const;
|
void addCoriolis(const volScalarField& rho, fvVectorMatrix& UEqn) const;
|
||||||
|
|
||||||
|
//- Return the frame acceleration
|
||||||
|
tmp<volVectorField> operator()
|
||||||
|
(
|
||||||
|
const volVectorField& U
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Return the frame acceleration force
|
||||||
|
tmp<volVectorField> operator()
|
||||||
|
(
|
||||||
|
const volScalarField& rho,
|
||||||
|
const volVectorField& U
|
||||||
|
);
|
||||||
|
|
||||||
//- Make the given absolute velocity relative within the MRF region
|
//- Make the given absolute velocity relative within the MRF region
|
||||||
void makeRelative(volVectorField& U) const;
|
void makeRelative(volVectorField& U) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user