ENH: Solver updates for fvOptions usage

This commit is contained in:
andy
2013-01-22 09:43:44 +00:00
parent 6562441220
commit 5ec46af785
10 changed files with 19 additions and 18 deletions

View File

@ -4,12 +4,12 @@
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
fvOptions(rho, U)
);
UEqn().relax();
mrfZones.addCoriolis(rho, UEqn());
// Include the porous media resistance and solve the momentum equation
// either implicit in the tensorial resistance or transport using by
// including the spherical part of the resistance in the momentum diagonal
@ -30,7 +30,7 @@
for (int UCorr=0; UCorr<nUCorr; UCorr++)
{
U = trTU() & ((UEqn() == fvOptions(rho, U))().H() - gradp);
U = trTU() & (UEqn().H() - gradp);
}
U.correctBoundaryConditions();
@ -42,7 +42,7 @@
fvOptions.constrain(UEqn());
solve(UEqn() == -fvc::grad(p) + fvOptions(rho, U));
solve(UEqn() == -fvc::grad(p));
fvOptions.correct(U);

View File

@ -1,6 +1,3 @@
IOMRFZoneList mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U);
IOporosityModelList pZones(mesh);
Switch pressureImplicitPorosity(false);

View File

@ -10,11 +10,11 @@
if (pressureImplicitPorosity)
{
HbyA = trTU() & (UEqn() == fvOptions(rho, U))().H();
HbyA = trTU() & UEqn().H();
}
else
{
HbyA = trAU()*(UEqn() == fvOptions(rho, U))().H();
HbyA = trAU()*UEqn().H();
}
UEqn.clear();
@ -27,7 +27,7 @@
fvc::interpolate(rho*HbyA) & mesh.Sf()
);
mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA);
fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
closedVolume = adjustPhi(phiHbyA, U, p);

View File

@ -27,14 +27,13 @@ Application
Description
Steady-state solver for turbulent flow of compressible fluids with
RANS turbulence modelling, implicit or explicit porosity treatment
and MRF for HVAC and similar applications.
and run-time selectable finite volume sources.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "rhoThermo.H"
#include "RASModel.H"
#include "IOMRFZoneList.H"
#include "fvIOoptionList.H"
#include "IOporosityModelList.H"
#include "simpleControl.H"

View File

@ -7,7 +7,7 @@ volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn() == fvOptions(rho, U))().H();
HbyA = rAU*UEqn().H();
UEqn.clear();

View File

@ -5,12 +5,14 @@
+ fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ SRF->Su()
==
fvOptions(Urel)
);
UrelEqn().relax();
fvOptions.constrain(UrelEqn());
solve(UrelEqn() == -fvc::grad(p) + fvOptions(Urel));
solve(UrelEqn() == -fvc::grad(p));
fvOptions.correct(Urel);

View File

@ -1,6 +1,6 @@
volScalarField rAUrel(1.0/UrelEqn().A());
volVectorField HbyA("HbyA", Urel);
HbyA = rAUrel*(UrelEqn() == fvOptions(Urel))().H();
HbyA = rAUrel*UrelEqn().H();
if (pimple.nCorrPISO() <= 1)
{

View File

@ -1,5 +1,5 @@
volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn() == fvOptions(U))().H();
HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1)
{

View File

@ -3,6 +3,8 @@ tmp<fvVectorMatrix> UEqn
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
fvOptions(U)
);
@ -12,7 +14,7 @@ fvOptions.constrain(UEqn());
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p_gh) + fvOptions(U));
solve(UEqn() == -fvc::grad(p_gh));
fvOptions.correct(U);
}

View File

@ -2,7 +2,7 @@ volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*(UEqn() == fvOptions(U))().H();
HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1)
{
@ -18,6 +18,7 @@ surfaceScalarField phiHbyA
adjustPhi(phiHbyA, U, p_gh);
fvOptions.relativeFlux(phiHbyA);
// Non-orthogonal pressure corrector loop
while (pimple.correctNonOrthogonal())