mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Solver updates for fvOptions usage
This commit is contained in:
@ -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);
|
||||
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
IOporosityModelList pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == fvOptions(U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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())
|
||||
|
||||
Reference in New Issue
Block a user