Skip to content
Snippets Groups Projects
Commit e481e1a0 authored by Henry's avatar Henry Committed by Andrew Heather
Browse files

MRF: add operator() for consistency with fvOptions

parent 603b3e65
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
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
{
forAll(*this, i)
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -102,6 +102,19 @@ public:
//- Add the Coriolis force contribution to the momentum equation
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
void makeRelative(volVectorField& U) const;
......
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