mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Removed whitespace
This commit is contained in:
@ -16,9 +16,13 @@
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), hea)
|
||||
+ sources(rho, hea)
|
||||
);
|
||||
|
||||
EaEqn.relax();
|
||||
|
||||
sources.constrain(EaEqn);
|
||||
|
||||
EaEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
@ -1,14 +1,20 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude\
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfieldSources \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lengine \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
@ -16,6 +22,4 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels \
|
||||
-lmeshTools \
|
||||
-lfiniteVolume
|
||||
-llaminarFlameSpeedModels
|
||||
|
||||
@ -5,10 +5,13 @@
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
rho*g
|
||||
+ sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
sources.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
@ -56,6 +56,7 @@ Description
|
||||
#include "ignition.H"
|
||||
#include "Switch.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ if (ign.ignited())
|
||||
|
||||
// Calculate turbulent flame speed flux
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
surfaceScalarField phiSt(fvc::interpolate(rhou*StCorr*Su*Xi)*nf);
|
||||
surfaceScalarField phiSt("phiSt", fvc::interpolate(rhou*StCorr*Su*Xi)*nf);
|
||||
|
||||
scalar StCoNum = max
|
||||
(
|
||||
@ -50,9 +50,11 @@ if (ign.ignited())
|
||||
(
|
||||
fvm::ddt(rho, b)
|
||||
+ mvConvection->fvmDiv(phi, b)
|
||||
+ fvm::div(phiSt, b, "div(phiSt,b)")
|
||||
+ fvm::div(phiSt, b)
|
||||
- fvm::Sp(fvc::div(phiSt), b)
|
||||
- fvm::laplacian(turbulence->alphaEff(), b)
|
||||
==
|
||||
sources(rho, b)
|
||||
);
|
||||
|
||||
|
||||
@ -64,6 +66,9 @@ if (ign.ignited())
|
||||
// Solve for b
|
||||
// ~~~~~~~~~~~
|
||||
bEqn.relax();
|
||||
|
||||
sources.constrain(bEqn);
|
||||
|
||||
bEqn.solve();
|
||||
|
||||
Info<< "min(b) = " << min(b).value() << endl;
|
||||
@ -153,9 +158,13 @@ if (ign.ignited())
|
||||
==
|
||||
- fvm::SuSp(-rho*Rc*Su0/Su, Su)
|
||||
- fvm::SuSp(rho*(sigmas + Rc), Su)
|
||||
+ sources(rho, Su)
|
||||
);
|
||||
|
||||
SuEqn.relax();
|
||||
|
||||
sources.constrain(SuEqn);
|
||||
|
||||
SuEqn.solve();
|
||||
|
||||
// Limit the maximum Su
|
||||
@ -234,9 +243,13 @@ if (ign.ignited())
|
||||
),
|
||||
Xi
|
||||
)
|
||||
+ sources(rho, Xi)
|
||||
);
|
||||
|
||||
XiEqn.relax();
|
||||
|
||||
sources.constrain(XiEqn);
|
||||
|
||||
XiEqn.solve();
|
||||
|
||||
// Correct boundedness of Xi
|
||||
|
||||
@ -138,3 +138,5 @@
|
||||
fields.add(b);
|
||||
fields.add(thermo.he());
|
||||
fields.add(thermo.heu());
|
||||
|
||||
IObasicSourceList sources(mesh);
|
||||
|
||||
@ -13,10 +13,16 @@ if (composition.contains("ft"))
|
||||
{
|
||||
volScalarField& ft = composition.Y("ft");
|
||||
|
||||
solve
|
||||
fvScalarMatrix ftEqn
|
||||
(
|
||||
fvm::ddt(rho, ft)
|
||||
+ mvConvection->fvmDiv(phi, ft)
|
||||
- fvm::laplacian(turbulence->alphaEff(), ft)
|
||||
==
|
||||
sources(rho, ft)
|
||||
);
|
||||
|
||||
sources.constrain(ftEqn);
|
||||
|
||||
ftEqn.solve();
|
||||
}
|
||||
|
||||
@ -16,6 +16,8 @@ if (pimple.transonic())
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -23,8 +25,12 @@ if (pimple.transonic())
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -45,6 +51,8 @@ else
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(phiHbyA);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -52,8 +60,12 @@ else
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -68,6 +80,7 @@ else
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -1,14 +1,21 @@
|
||||
EXE_INC = \
|
||||
-I../XiFoam \
|
||||
-I$(FOAM_SOLVERS)/combustion/XiFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfieldSources \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lengine \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
@ -16,5 +23,4 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lspecie \
|
||||
-llaminarFlameSpeedModels \
|
||||
-lfiniteVolume
|
||||
-llaminarFlameSpeedModels
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
|
||||
@ -59,6 +59,7 @@ Description
|
||||
#include "OFstream.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -13,6 +13,8 @@ if (pimple.transonic())
|
||||
*((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -20,8 +22,12 @@ if (pimple.transonic())
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -39,6 +45,8 @@ else
|
||||
*((fvc::interpolate(HbyA) & mesh.Sf()) - fvc::meshPhi(rho, U))
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -46,8 +54,12 @@ else
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -62,6 +74,7 @@ else
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I${LIB_SRC}/meshTools/lnInclude \
|
||||
-I${LIB_SRC}/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
@ -29,7 +31,9 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfieldSources \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lspecie \
|
||||
|
||||
@ -5,10 +5,13 @@
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
parcels.SU(U)
|
||||
+ sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
sources.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
|
||||
@ -30,9 +30,13 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
parcels.SYi(i, Yi)
|
||||
+ surfaceFilm.Srho(i)
|
||||
+ combustion->R(Yi)
|
||||
+ sources(rho, Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
|
||||
sources.constrain(YiEqn);
|
||||
|
||||
YiEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
Yi.max(0.0);
|
||||
@ -69,9 +73,13 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
+ radiation->Sh(thermo)
|
||||
+ parcels.Sh(he)
|
||||
+ surfaceFilm.Sh()
|
||||
+ sources(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
sources.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
@ -146,3 +146,5 @@
|
||||
(
|
||||
additionalControlsDict.lookup("solvePrimaryRegion")
|
||||
);
|
||||
|
||||
IObasicSourceList sources(mesh);
|
||||
|
||||
@ -40,6 +40,7 @@ Description
|
||||
#include "solidChemistryModel.H"
|
||||
#include "psiCombustionModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ surfaceScalarField phiHbyA
|
||||
+ phig
|
||||
);
|
||||
|
||||
sources.relativeFlux(phiHbyA);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
@ -33,8 +34,11 @@ while (pimple.correctNonOrthogonal())
|
||||
==
|
||||
parcels.Srho()
|
||||
+ surfaceFilm.Srho()
|
||||
+ sources(psi, p_rgh, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(p_rghEqn);
|
||||
|
||||
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -42,6 +46,7 @@ while (pimple.correctNonOrthogonal())
|
||||
phi = phiHbyA + p_rghEqn.flux();
|
||||
U = HbyA + rAU*fvc::reconstruct((p_rghEqn.flux() + phig)/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,14 +30,19 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
solve
|
||||
fvScalarMatrix rhoEqn
|
||||
(
|
||||
fvm::ddt(rho)
|
||||
+ fvc::div(phi)
|
||||
==
|
||||
parcels.Srho(rho)
|
||||
+ surfaceFilm.Srho()
|
||||
+ sources(rho)
|
||||
);
|
||||
|
||||
sources.constrain(rhoEqn);
|
||||
|
||||
rhoEqn.solve();
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -19,9 +19,13 @@
|
||||
// - fvm::laplacian(turbulence->muEff(), he) // unit lewis no.
|
||||
==
|
||||
reaction->Sh()
|
||||
+ sources(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
sources.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
@ -1,14 +1,21 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfieldSources \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
@ -17,5 +24,4 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lfiniteVolume \
|
||||
-lcombustionModels
|
||||
|
||||
@ -5,10 +5,13 @@
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
rho*g
|
||||
+ sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
sources.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
@ -28,9 +28,13 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
||||
- fvm::laplacian(turbulence->muEff(), Yi)
|
||||
==
|
||||
reaction->R(Yi)
|
||||
+ sources(rho, Yi)
|
||||
);
|
||||
|
||||
YiEqn.relax();
|
||||
|
||||
sources.constrain(YiEqn);
|
||||
|
||||
YiEqn.solve(mesh.solver("Yi"));
|
||||
|
||||
Yi.max(0.0);
|
||||
|
||||
@ -99,3 +99,5 @@ volScalarField dQ
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
IObasicSourceList sources(mesh);
|
||||
|
||||
@ -16,6 +16,8 @@ if (pimple.transonic())
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -23,8 +25,12 @@ if (pimple.transonic())
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -45,6 +51,8 @@ else
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -52,8 +60,12 @@ else
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -68,6 +80,7 @@ else
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -34,6 +34,7 @@ Description
|
||||
#include "psiCombustionModel.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -1,17 +1,23 @@
|
||||
EXE_INC = \
|
||||
-I../reactingFoam \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfieldSources \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
@ -20,5 +26,4 @@ EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lfiniteVolume \
|
||||
-lcombustionModels
|
||||
|
||||
@ -101,3 +101,5 @@ volScalarField dQ
|
||||
mesh,
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
);
|
||||
|
||||
IObasicSourceList sources(mesh);
|
||||
|
||||
@ -18,6 +18,8 @@
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
);
|
||||
|
||||
sources.relativeFlux(phiHbyA);
|
||||
|
||||
surfaceScalarField phid("phid", fvc::interpolate(thermo.psi())*phiHbyA);
|
||||
|
||||
phiHbyA *= fvc::interpolate(rho);
|
||||
@ -34,8 +36,12 @@
|
||||
(
|
||||
pDDtEqn
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -56,10 +62,14 @@
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
fvScalarMatrix pDDtEqn
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
|
||||
+ fvc::div(phiHbyA)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
@ -70,6 +80,8 @@
|
||||
- fvm::laplacian(rho*rAU, p)
|
||||
);
|
||||
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
@ -87,6 +99,7 @@
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -35,6 +35,7 @@ Description
|
||||
#include "turbulenceModel.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,6 +38,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
rhoName_("rho"),
|
||||
psiName_("thermo:psi"),
|
||||
muName_("thermo:mu"),
|
||||
accommodationCoeff_(1.0),
|
||||
Twall_(p.size(), 0.0),
|
||||
gamma_(1.4)
|
||||
@ -57,6 +61,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
rhoName_(ptf.rhoName_),
|
||||
psiName_(ptf.psiName_),
|
||||
muName_(ptf.muName_),
|
||||
accommodationCoeff_(ptf.accommodationCoeff_),
|
||||
Twall_(ptf.Twall_),
|
||||
gamma_(ptf.gamma_)
|
||||
@ -71,6 +79,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
)
|
||||
:
|
||||
mixedFvPatchScalarField(p, iF),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
||||
Twall_("Twall", dict, p.size()),
|
||||
gamma_(dict.lookupOrDefault<scalar>("gamma", 1.4))
|
||||
@ -93,7 +105,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
dict
|
||||
) << "unphysical accommodationCoeff specified"
|
||||
<< "(0 < accommodationCoeff <= 1)" << endl
|
||||
<< exit(FatalError);
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (dict.found("value"))
|
||||
@ -159,13 +171,13 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
const fvPatchScalarField& pmu =
|
||||
patch().lookupPatchField<volScalarField, scalar>("mu");
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
const fvPatchScalarField& prho =
|
||||
patch().lookupPatchField<volScalarField, scalar>("rho");
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
const fvPatchField<scalar>& ppsi =
|
||||
patch().lookupPatchField<volScalarField, scalar>("psi");
|
||||
patch().lookupPatchField<volScalarField, scalar>(psiName_);
|
||||
const fvPatchVectorField& pU =
|
||||
patch().lookupPatchField<volVectorField, vector>("U");
|
||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||
|
||||
// Prandtl number reading consistent with rhoCentralFoam
|
||||
const dictionary& thermophysicalProperties =
|
||||
@ -204,6 +216,12 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
|
||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
|
||||
|
||||
os.writeKeyword("accommodationCoeff")
|
||||
<< accommodationCoeff_ << token::END_STATEMENT << nl;
|
||||
Twall_.writeEntry("Twall", os);
|
||||
|
||||
@ -53,13 +53,25 @@ class smoluchowskiJumpTFvPatchScalarField
|
||||
|
||||
// Private data
|
||||
|
||||
// Accommodation coefficient
|
||||
//- Velocity field name, default = "U"
|
||||
word UName_;
|
||||
|
||||
//- Density field name, default = "rho"
|
||||
word rhoName_;
|
||||
|
||||
//- Compressibility field name, default = "thermo:psi"
|
||||
word psiName_;
|
||||
|
||||
//- Dynamic viscosity field name, default = "thermo:mu"
|
||||
word muName_;
|
||||
|
||||
//- Accommodation coefficient
|
||||
scalar accommodationCoeff_;
|
||||
|
||||
// Wall surface temperature
|
||||
//- Wall surface temperature
|
||||
scalarField Twall_;
|
||||
|
||||
// Heat capacity ratio (default 1.4)
|
||||
//- Heat capacity ratio (default 1.4)
|
||||
scalar gamma_;
|
||||
|
||||
public:
|
||||
|
||||
@ -30,20 +30,20 @@ License
|
||||
#include "volFields.H"
|
||||
#include "fvcGrad.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFixedValueSlipFvPatchVectorField(p, iF),
|
||||
TName_("T"),
|
||||
rhoName_("rho"),
|
||||
psiName_("thermo:psi"),
|
||||
muName_("thermo:mu"),
|
||||
tauMCName_("tauMC"),
|
||||
accommodationCoeff_(1.0),
|
||||
Uwall_(p.size(), vector(0.0, 0.0, 0.0)),
|
||||
thermalCreep_(true),
|
||||
@ -51,23 +51,28 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
{}
|
||||
|
||||
|
||||
maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
(
|
||||
const maxwellSlipUFvPatchVectorField& tdpvf,
|
||||
const maxwellSlipUFvPatchVectorField& mspvf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFixedValueSlipFvPatchVectorField(tdpvf, p, iF, mapper),
|
||||
accommodationCoeff_(tdpvf.accommodationCoeff_),
|
||||
Uwall_(tdpvf.Uwall_),
|
||||
thermalCreep_(tdpvf.thermalCreep_),
|
||||
curvature_(tdpvf.curvature_)
|
||||
mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
|
||||
TName_(mspvf.TName_),
|
||||
rhoName_(mspvf.rhoName_),
|
||||
psiName_(mspvf.psiName_),
|
||||
muName_(mspvf.muName_),
|
||||
tauMCName_(mspvf.tauMCName_),
|
||||
accommodationCoeff_(mspvf.accommodationCoeff_),
|
||||
Uwall_(mspvf.Uwall_),
|
||||
thermalCreep_(mspvf.thermalCreep_),
|
||||
curvature_(mspvf.curvature_)
|
||||
{}
|
||||
|
||||
|
||||
maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<vector, volMesh>& iF,
|
||||
@ -75,6 +80,11 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
)
|
||||
:
|
||||
mixedFixedValueSlipFvPatchVectorField(p, iF),
|
||||
TName_(dict.lookupOrDefault<word>("T", "T")),
|
||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi")),
|
||||
muName_(dict.lookupOrDefault<word>("mu", "thermo:mu")),
|
||||
tauMCName_(dict.lookupOrDefault<word>("tauMC", "tauMC")),
|
||||
accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))),
|
||||
Uwall_("Uwall", dict, p.size()),
|
||||
thermalCreep_(dict.lookupOrDefault("thermalCreep", true)),
|
||||
@ -88,13 +98,16 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"maxwellSlipUFvPatchScalarField::"
|
||||
"maxwellSlipUFvPatchScalarField"
|
||||
"(const fvPatch&, const scalarField&, const dictionary&)",
|
||||
"maxwellSlipUFvPatchScalarField::maxwellSlipUFvPatchScalarField"
|
||||
"("
|
||||
"const fvPatch&, "
|
||||
"const DimensionedField<vector, volMesh>&, "
|
||||
"const dictionary&"
|
||||
")",
|
||||
dict
|
||||
) << "unphysical accommodationCoeff_ specified"
|
||||
<< "(0 < accommodationCoeff_ <= 1)" << endl
|
||||
<< exit(FatalError);
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
if (dict.found("value"))
|
||||
@ -119,23 +132,28 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
}
|
||||
|
||||
|
||||
maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|
||||
(
|
||||
const maxwellSlipUFvPatchVectorField& tdpvf,
|
||||
const maxwellSlipUFvPatchVectorField& mspvf,
|
||||
const DimensionedField<vector, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFixedValueSlipFvPatchVectorField(tdpvf, iF),
|
||||
accommodationCoeff_(tdpvf.accommodationCoeff_),
|
||||
Uwall_(tdpvf.Uwall_),
|
||||
thermalCreep_(tdpvf.thermalCreep_),
|
||||
curvature_(tdpvf.curvature_)
|
||||
mixedFixedValueSlipFvPatchVectorField(mspvf, iF),
|
||||
TName_(mspvf.TName_),
|
||||
rhoName_(mspvf.rhoName_),
|
||||
psiName_(mspvf.psiName_),
|
||||
muName_(mspvf.muName_),
|
||||
tauMCName_(mspvf.tauMCName_),
|
||||
accommodationCoeff_(mspvf.accommodationCoeff_),
|
||||
Uwall_(mspvf.Uwall_),
|
||||
thermalCreep_(mspvf.thermalCreep_),
|
||||
curvature_(mspvf.curvature_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
@ -143,11 +161,11 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
}
|
||||
|
||||
const fvPatchScalarField& pmu =
|
||||
patch().lookupPatchField<volScalarField, scalar>("mu");
|
||||
patch().lookupPatchField<volScalarField, scalar>(muName_);
|
||||
const fvPatchScalarField& prho =
|
||||
patch().lookupPatchField<volScalarField, scalar>("rho");
|
||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||
const fvPatchField<scalar>& ppsi =
|
||||
patch().lookupPatchField<volScalarField, scalar>("psi");
|
||||
patch().lookupPatchField<volScalarField, scalar>(psiName_);
|
||||
|
||||
Field<scalar> C1
|
||||
(
|
||||
@ -163,7 +181,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
if (thermalCreep_)
|
||||
{
|
||||
const volScalarField& vsfT =
|
||||
this->db().objectRegistry::lookupObject<volScalarField>("T");
|
||||
this->db().objectRegistry::lookupObject<volScalarField>(TName_);
|
||||
label patchi = this->patch().index();
|
||||
const fvPatchScalarField& pT = vsfT.boundaryField()[patchi];
|
||||
Field<vector> gradpT(fvc::grad(vsfT)().boundaryField()[patchi]);
|
||||
@ -175,7 +193,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
if (curvature_)
|
||||
{
|
||||
const fvPatchTensorField& ptauMC =
|
||||
patch().lookupPatchField<volTensorField, tensor>("tauMC");
|
||||
patch().lookupPatchField<volTensorField, tensor>(tauMCName_);
|
||||
vectorField n(patch().nf());
|
||||
|
||||
refValue() -= C1/prho*transform(I - n*n, (n & ptauMC));
|
||||
@ -185,9 +203,15 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
}
|
||||
|
||||
|
||||
void maxwellSlipUFvPatchVectorField::write(Ostream& os) const
|
||||
void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchVectorField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
||||
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
|
||||
writeEntryIfDifferent<word>(os, "tauMC", "tauMC", tauMCName_);
|
||||
|
||||
os.writeKeyword("accommodationCoeff")
|
||||
<< accommodationCoeff_ << token::END_STATEMENT << nl;
|
||||
Uwall_.writeEntry("Uwall", os);
|
||||
@ -204,14 +228,13 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchVectorField,
|
||||
maxwellSlipUFvPatchVectorField
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchVectorField,
|
||||
maxwellSlipUFvPatchVectorField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -54,6 +54,21 @@ class maxwellSlipUFvPatchVectorField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Temperature field name, default = "T"
|
||||
word TName_;
|
||||
|
||||
//- Density field name, default = "rho"
|
||||
word rhoName_;
|
||||
|
||||
//- Compressibility field name, default = "thermo:psi"
|
||||
word psiName_;
|
||||
|
||||
//- Dynamic viscosity field name, default = "thermo:mu"
|
||||
word muName_;
|
||||
|
||||
//- tauMC field name, default = "tauMC"
|
||||
word tauMCName_;
|
||||
|
||||
// Accommodation coefficient
|
||||
scalar accommodationCoeff_;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -98,6 +98,7 @@ mixedFixedValueSlipFvPatchField<Type>::mixedFixedValueSlipFvPatchField
|
||||
valueFraction_(ptf.valueFraction_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Map from self
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,27 +27,22 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "fvCFD.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF)
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
pName_("p"),
|
||||
psiName_("thermo:psi")
|
||||
{}
|
||||
|
||||
|
||||
fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
(
|
||||
const fixedRhoFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
@ -55,43 +50,51 @@ fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper)
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
pName_(ptf.pName_),
|
||||
psiName_(ptf.psiName_)
|
||||
{}
|
||||
|
||||
|
||||
fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF, dict)
|
||||
fixedValueFvPatchScalarField(p, iF, dict),
|
||||
pName_(dict.lookupOrDefault<word>("p", "p")),
|
||||
psiName_(dict.lookupOrDefault<word>("psi", "thermo:psi"))
|
||||
{}
|
||||
|
||||
|
||||
fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
(
|
||||
const fixedRhoFvPatchScalarField& tppsf
|
||||
const fixedRhoFvPatchScalarField& frpsf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(tppsf)
|
||||
fixedValueFvPatchScalarField(frpsf),
|
||||
pName_(frpsf.pName_),
|
||||
psiName_(frpsf.psiName_)
|
||||
{}
|
||||
|
||||
|
||||
fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
|
||||
(
|
||||
const fixedRhoFvPatchScalarField& tppsf,
|
||||
const fixedRhoFvPatchScalarField& frpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(tppsf, iF)
|
||||
fixedValueFvPatchScalarField(frpsf, iF),
|
||||
pName_(frpsf.pName_),
|
||||
psiName_(frpsf.psiName_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void fixedRhoFvPatchScalarField::updateCoeffs()
|
||||
void Foam::fixedRhoFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
@ -99,10 +102,10 @@ void fixedRhoFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
const fvPatchField<scalar>& psip =
|
||||
patch().lookupPatchField<volScalarField, scalar>("psi");
|
||||
patch().lookupPatchField<volScalarField, scalar>(psiName_);
|
||||
|
||||
const fvPatchField<scalar>& pp =
|
||||
patch().lookupPatchField<volScalarField, scalar>("p");
|
||||
patch().lookupPatchField<volScalarField, scalar>(pName_);
|
||||
|
||||
operator==(psip*pp);
|
||||
|
||||
@ -110,16 +113,24 @@ void fixedRhoFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
fixedRhoFvPatchScalarField
|
||||
);
|
||||
writeEntryIfDifferent<word>(os, "p", "p", this->pName_);
|
||||
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
fixedRhoFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,9 +24,42 @@ License
|
||||
Class
|
||||
Foam::fixedRhoFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpInletBoundaryConditions
|
||||
|
||||
Description
|
||||
Foam::fixedRhoFvPatchScalarField
|
||||
|
||||
This boundary condition provides a fixed density inlet condition for
|
||||
compressible solvers, where the density of calculated using:
|
||||
|
||||
\f{
|
||||
\rho = \psi p
|
||||
\f]
|
||||
|
||||
where
|
||||
\vartable
|
||||
p | pressure [Pa]
|
||||
\rho | density [kg/m3]
|
||||
\endvartable
|
||||
|
||||
|
||||
\heading Patch usage
|
||||
|
||||
\table
|
||||
Property | Description | Required | Default value
|
||||
pName | Pressure field name | no | p
|
||||
psiName | Compressibility field name | no | thermo:psi
|
||||
\endtable
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
myPatch
|
||||
{
|
||||
type fixedRho;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
fixedRhoFvPatchScalarField.C
|
||||
|
||||
@ -43,7 +76,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class fixedRhoFvPatchScalarField Declaration
|
||||
Class fixedRhoFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class fixedRhoFvPatchScalarField
|
||||
@ -51,6 +84,17 @@ class fixedRhoFvPatchScalarField
|
||||
public fixedValueFvPatchScalarField
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Pressure field name, default = "p"
|
||||
word pName_;
|
||||
|
||||
//- Compressibility field name, default = "thermo:psi"
|
||||
word psiName_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -125,6 +169,10 @@ public:
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ set -x
|
||||
|
||||
wmake
|
||||
wmake rhoPimplecFoam
|
||||
wmake rhoPorousMRFPimpleFoam
|
||||
wmake rhoPorousMRFLTSPimpleFoam
|
||||
wmake rhoLTSPimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -5,6 +5,8 @@ tmp<fvVectorMatrix> UEqn
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
@ -13,6 +15,6 @@ sources.constrain(UEqn());
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p) + sources(rho, U));
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
@ -24,6 +24,8 @@ if (pimple.transonic())
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
@ -37,7 +39,7 @@ if (pimple.transonic())
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
@ -59,6 +61,8 @@ else
|
||||
)
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
@ -73,7 +77,7 @@ else
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
rhoLTSPimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoLTSPimpleFoam
|
||||
@ -26,7 +26,7 @@ Application
|
||||
|
||||
Description
|
||||
Transient solver for laminar or turbulent flow of compressible fluids
|
||||
with support for porous media and MRF for HVAC and similar applications.
|
||||
with support for run-time selectable sources, e.g. MRF, explicit porosity.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations with support for local time-stepping for
|
||||
@ -37,8 +37,6 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "fvcSmooth.H"
|
||||
#include "pimpleControl.H"
|
||||
@ -56,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setInitialrDeltaT.H"
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -51,7 +51,7 @@ if (pimple.transonic())
|
||||
// Relax the pressure equation to maintain diagonal dominance
|
||||
pEqn.relax();
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
@ -89,7 +89,7 @@ else
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
rhoPorousMRFLTSPimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFLTSPimpleFoam
|
||||
@ -1,4 +0,0 @@
|
||||
rhoPorousMRFPimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFPimpleFoam
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lfieldSources
|
||||
@ -1,22 +0,0 @@
|
||||
// Solve the Momentum equation
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
//pZones.ddt(rho, U)
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
mrfZones.addCoriolis(rho, UEqn());
|
||||
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
sources.constrain(UEqn());
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p) + sources(rho, U));
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
IOporosityModelList pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
@ -1,111 +0,0 @@
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
UEqn.clear();
|
||||
}
|
||||
|
||||
if (pimple.transonic())
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvm::div(phid, p)
|
||||
- fvm::laplacian(Dp, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi == pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)
|
||||
*(
|
||||
(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
volScalarField Dp("Dp", rho*rAU);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
+ fvc::div(phiHbyA)
|
||||
- fvm::laplacian(Dp, p)
|
||||
==
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value()
|
||||
<< " " << min(rho).value() << endl;
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p);
|
||||
}
|
||||
@ -1,109 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
rhoPorousMRFPimpleFoam
|
||||
|
||||
Description
|
||||
Transient solver for laminar or turbulent flow of compressible fluids
|
||||
with support for porous media and MRF for HVAC and similar applications.
|
||||
|
||||
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
|
||||
pseudo-transient simulations.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "bound.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
if (pimple.nCorrPIMPLE() <= 1)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,6 +4,8 @@
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
volScalarField rAU(1.0/UEqn().A());
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(rho, U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
fvc::interpolate(psi)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
@ -33,7 +35,7 @@
|
||||
// Relax the pressure equation to ensure diagonal-dominance
|
||||
pEqn.relax();
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
@ -53,6 +55,8 @@
|
||||
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
@ -67,7 +71,7 @@
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
rhoPorousMRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFSimpleFoam
|
||||
@ -0,0 +1,3 @@
|
||||
rhoPorousSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousSimpleFoam
|
||||
@ -45,7 +45,7 @@ if (simple.transonic())
|
||||
// Relax the pressure equation to maintain diagonal dominance
|
||||
pEqn.relax();
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
@ -82,7 +82,7 @@ else
|
||||
sources(psi, p, rho.name())
|
||||
);
|
||||
|
||||
sources.constrain(pEqn, rho.name());
|
||||
sources.constrain(pEqn);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
|
||||
28
applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H
Normal file
28
applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
volScalarField& he = thermo.he();
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
fvm::ddt(rho, he) + fvm::div(phi, he)
|
||||
+ fvc::ddt(rho, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
sources(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
sources.constrain(EEqn);
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
}
|
||||
@ -1,21 +1,21 @@
|
||||
EXE_INC = \
|
||||
-I../../compressible/rhoPimpleFoam \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmeshTools \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels \
|
||||
-lfiniteVolume \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lfieldSources
|
||||
-lfieldSources \
|
||||
-lfluidThermophysicalModels \
|
||||
-lradiationModels \
|
||||
-lspecie \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lcompressibleLESModels
|
||||
|
||||
|
||||
@ -5,10 +5,14 @@
|
||||
fvm::ddt(rho, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
sources.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
@ -22,7 +26,6 @@
|
||||
- fvc::snGrad(p_rgh)
|
||||
)*mesh.magSf()
|
||||
)
|
||||
+ sources(rho, U)
|
||||
);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "rhoThermo.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "radiationModel.H"
|
||||
#include "IObasicSourceList.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
@ -49,6 +49,7 @@ int main(int argc, char *argv[])
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<rhoThermo> pThermo
|
||||
(
|
||||
rhoThermo::New(mesh)
|
||||
);
|
||||
autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh));
|
||||
rhoThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
surfaceScalarField rhorAUf("Dp", fvc::interpolate(rho*rAU));
|
||||
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn == sources(rho, U))().H();
|
||||
HbyA = rAU*UEqn.H();
|
||||
|
||||
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
+ phig
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
fvScalarMatrix p_rghDDtEqn
|
||||
(
|
||||
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
|
||||
@ -40,7 +42,7 @@
|
||||
- fvm::laplacian(rhorAUf, p_rgh)
|
||||
);
|
||||
|
||||
sources.constrain(p_rghEqn, rho.name());
|
||||
sources.constrain(p_rghEqn);
|
||||
|
||||
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
|
||||
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake
|
||||
wmake buoyantSimpleRadiationFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -10,10 +10,17 @@
|
||||
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
radiation->Sh(thermo)
|
||||
+ sources(rho, he)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
sources.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
radiation->correct();
|
||||
}
|
||||
|
||||
@ -1,14 +1,22 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfieldSources \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume
|
||||
-lmeshTools
|
||||
|
||||
@ -4,11 +4,13 @@
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
mrfZones.addCoriolis(rho, UEqn());
|
||||
sources.constrain(UEqn());
|
||||
|
||||
if (simple.momentumPredictor())
|
||||
{
|
||||
|
||||
@ -22,19 +22,20 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
buoyantSimpleFoam
|
||||
buoyantSimpleRadiationFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for buoyant, turbulent flow of compressible fluids
|
||||
Steady-state solver for buoyant, turbulent flow of compressible fluids,
|
||||
including radiation, for ventilation and heat-transfer.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "radiationModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -45,7 +46,7 @@ int main(int argc, char *argv[])
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
{
|
||||
volScalarField& he = thermo.he();
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
fvm::div(phi, he)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
|
||||
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
|
||||
)
|
||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||
==
|
||||
radiation->Sh(thermo)
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
radiation->correct();
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
buoyantSimpleRadiationFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/buoyantSimpleRadiationFoam
|
||||
@ -1,18 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels/RAS \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lradiationModels \
|
||||
-lcompressibleTurbulenceModel \
|
||||
-lcompressibleRASModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
@ -1,86 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
buoyantSimpleRadiationFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for buoyant, turbulent flow of compressible fluids,
|
||||
including radiation, for ventilation and heat-transfer.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "fixedGradientFvPatchFields.H"
|
||||
#include "radiationModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "createRadiationModel.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -87,3 +87,5 @@
|
||||
|
||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||
dimensionedScalar totalVolume = sum(mesh.V());
|
||||
|
||||
IObasicSourceList sources(mesh);
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
fvc::interpolate(rho)*(fvc::interpolate(HbyA) & mesh.Sf())
|
||||
);
|
||||
|
||||
mrfZones.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
// calculated from the relaxed pressure
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ Description
|
||||
#include "regionProperties.H"
|
||||
#include "solidThermo.H"
|
||||
#include "radiationModel.H"
|
||||
#include "IOporosityModelList.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -16,6 +16,9 @@
|
||||
);
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
sources.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
thermo.correct();
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turb.divDevRhoReff(U)
|
||||
+ sources(rho, U)
|
||||
==
|
||||
sources(rho, U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
// Add porous resistance
|
||||
pZones.addResistance(UEqn());
|
||||
sources.constrain(UEqn());
|
||||
|
||||
solve
|
||||
(
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
PtrList<dimensionedScalar> rhoMin(fluidRegions.size());
|
||||
|
||||
PtrList<IObasicSourceList> heatSources(fluidRegions.size());
|
||||
PtrList<IOporosityModelList> porousZonesFluid(fluidRegions.size());
|
||||
|
||||
// Populate fluid field pointer lists
|
||||
forAll(fluidRegions, i)
|
||||
@ -200,13 +199,6 @@
|
||||
i,
|
||||
new IObasicSourceList(fluidRegions[i])
|
||||
);
|
||||
|
||||
Info<< " Adding porous zones\n" << endl;
|
||||
porousZonesFluid.set
|
||||
(
|
||||
i,
|
||||
new IOporosityModelList(fluidRegions[i])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -23,6 +23,8 @@
|
||||
|
||||
phiHbyA += phig;
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
|
||||
bool compressible = (compressibility.value() > SMALL);
|
||||
|
||||
@ -54,6 +56,7 @@
|
||||
// calculated from the relaxed pressure
|
||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,6 @@
|
||||
|
||||
IObasicSourceList& sources = heatSources[i];
|
||||
|
||||
const IOporosityModelList& pZones = porousZonesFluid[i];
|
||||
|
||||
const dimensionedScalar initialMass
|
||||
(
|
||||
"initialMass",
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
+ phig
|
||||
);
|
||||
|
||||
sources.relativeFlux(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
{
|
||||
fvScalarMatrix p_rghDDtEqn
|
||||
(
|
||||
@ -64,6 +66,7 @@
|
||||
U = HbyA
|
||||
+ rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf);
|
||||
U.correctBoundaryConditions();
|
||||
sources.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,9 +10,14 @@ if (finalIter)
|
||||
(
|
||||
fvm::ddt(betav*rho, h)
|
||||
- fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)")
|
||||
+ sources(rho, h)
|
||||
==
|
||||
sources(rho, h)
|
||||
);
|
||||
|
||||
hEqn().relax();
|
||||
|
||||
sources.constrain(hEqn());
|
||||
|
||||
hEqn().solve(mesh.solver(h.select(finalIter)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,12 +5,10 @@ tmp<fvVectorMatrix> UEqn
|
||||
fvm::ddt(U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
sources(U)
|
||||
);
|
||||
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
pZones.addResistance(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
sources.constrain(UEqn());
|
||||
@ -19,5 +17,5 @@ volScalarField rAU(1.0/UEqn().A());
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn() == -fvc::grad(p) + sources(U));
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
IOporosityModelList pZones(mesh);
|
||||
@ -1,5 +1,5 @@
|
||||
volVectorField HbyA("HbyA", U);
|
||||
HbyA = rAU*(UEqn() == sources(U))().H();
|
||||
HbyA = rAU*UEqn().H();
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
@ -15,7 +15,7 @@ surfaceScalarField phiHbyA
|
||||
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
mrfZones.relativeFlux(phiHbyA);
|
||||
sources.relativeFlux(phiHbyA);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (pimple.correctNonOrthogonal())
|
||||
|
||||
@ -30,8 +30,7 @@ Description
|
||||
|
||||
Sub-models include:
|
||||
- turbulence modelling, i.e. laminar, RAS or LES
|
||||
- porosity (explicit treatment)
|
||||
- Multiple Reference Frame (MRF)
|
||||
- run-time selectable sources, e.g. MRF, explicit porosity
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -51,7 +50,6 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
@ -5,7 +5,6 @@ set -x
|
||||
wmake
|
||||
|
||||
wmake SRFSimpleFoam
|
||||
wmake MRFSimpleFoam
|
||||
wmake porousSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
MRFSimpleFoam
|
||||
|
||||
Description
|
||||
Steady-state solver for incompressible, turbulent flow of non-Newtonian
|
||||
fluids with MRF regions.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "IOMRFZoneList.H"
|
||||
#include "simpleControl.H"
|
||||
#include "IObasicSourceList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
IOMRFZoneList mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,3 +0,0 @@
|
||||
MRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/MRFSimpleFoam
|
||||
@ -1,19 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fieldSources/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfieldSources \
|
||||
-lsampling
|
||||
@ -1,17 +0,0 @@
|
||||
// Momentum predictor
|
||||
|
||||
tmp<fvVectorMatrix> UEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
sources(U)
|
||||
);
|
||||
|
||||
mrfZones.addCoriolis(UEqn());
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
sources.constrain(UEqn());
|
||||
|
||||
solve(UEqn() == -fvc::grad(p));
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user