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();