MRF: Separate MRF from fvOptions

fvOptions does not have the appropriate structure to support MRF as it
is based on option selection by user-specified fields whereas MRF MUST
be applied to all velocity fields in the particular solver.  A
consequence of the particular design choices in fvOptions made it
difficult to support MRF for multiphase and it is easier to support
frame-related and field related options separately.

Currently the MRF functionality provided supports only rotations but
the structure will be generalized to support other frame motions
including linear acceleration, SRF rotation and 6DoF which will be
run-time selectable.
This commit is contained in:
Henry
2015-05-29 23:35:43 +01:00
parent ec6ad11cbd
commit c3ee2348a6
146 changed files with 443 additions and 882 deletions

View File

@ -1,9 +1,11 @@
// Solve the Momentum equation
MRF.correctBoundaryVelocity(U);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
+ MRF.DDt(rho, U)
+ fvc::div(UdmModel.tauDm())
+ turbulence->divDevRhoReff(U)
==

View File

@ -58,6 +58,7 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"

View File

@ -11,7 +11,7 @@
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
);
fvOptions.makeRelative(phiHbyA);
MRF.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p_rgh);
surfaceScalarField phig
@ -29,7 +29,7 @@
p_rgh.boundaryField(),
(
phiHbyA.boundaryField()
- fvOptions.relative(mesh.Sf().boundaryField() & U.boundaryField())
- MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
);

View File

@ -63,6 +63,7 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "correctPhi.H"
#include "CourantNo.H"

View File

@ -1,7 +1,9 @@
MRF.correctBoundaryVelocity(U);
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
+ MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(rho, U)
==
fvOptions(rho, U)

View File

@ -58,6 +58,7 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "readTimeControls.H"

View File

@ -11,6 +11,7 @@
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
);
MRF.makeRelative(phiHbyA);
if (p_rgh.needReference())
{

View File

@ -62,6 +62,7 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "readTimeControls.H"
#include "correctPhi.H"

View File

@ -52,6 +52,7 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "readTimeControls.H"
#include "CourantNo.H"

View File

@ -11,7 +11,7 @@
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
);
fvOptions.makeRelative(phiHbyA);
MRF.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p_rgh);
surfaceScalarField phig
@ -30,7 +30,7 @@
p_rgh.boundaryField(),
(
phiHbyA.boundaryField()
- fvOptions.relative(mesh.Sf().boundaryField() & U.boundaryField())
- MRF.relative(mesh.Sf().boundaryField() & U.boundaryField())
)/(mesh.magSf().boundaryField()*rAUf.boundaryField())
);

View File

@ -53,6 +53,7 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "readTimeControls.H"

View File

@ -52,6 +52,7 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "readTimeControls.H"
#include "correctPhi.H"

View File

@ -1,13 +1,14 @@
MRF.correctBoundaryVelocity(U);
tmp<fvVectorMatrix> UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
fvm::ddt(U) + fvm::div(phi, U)
+ MRF.DDt(U)
+ turbulence->divDevReff(U)
==
fvOptions(U)
);
UEqn().relax();
fvOptions.constrain(UEqn());

View File

@ -16,7 +16,7 @@ surfaceScalarField phiHbyA
+ rAUf*fvc::ddtCorr(U, phi)
);
fvOptions.makeRelative(phiHbyA);
MRF.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p_gh);
// Update the fixedFluxPressure BCs to ensure flux consistency

View File

@ -17,6 +17,8 @@
+ rAUf*fvc::ddtCorr(U, Uf)
);
MRF.makeRelative(phiHbyA);
if (p_gh.needReference())
{
fvc::makeRelative(phiHbyA, U);

View File

@ -58,6 +58,7 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
volScalarField rAU

View File

@ -53,6 +53,7 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"

View File

@ -34,7 +34,6 @@ Description
#include "twoPhaseSystem.H"
#include "PhaseCompressibleTurbulenceModel.H"
#include "pimpleControl.H"
#include "IOMRFZoneList.H"
#include "fvIOoptionList.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "fixedValueFvsPatchFields.H"
@ -51,7 +50,7 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "createFields.H"
#include "createMRFZones.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"