GIT: Initial state after latest Foundation merge

This commit is contained in:
Andrew Heather
2016-09-20 14:49:08 +01:00
4571 changed files with 115696 additions and 74609 deletions

2
.gitignore vendored
View File

@ -6,8 +6,6 @@
.*~ .*~
*.bak *.bak
*.bak[0-9][0-9] *.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\# \#*\#
# File-browser settings - anywhere # File-browser settings - anywhere

View File

@ -1,9 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation without documentation by default # Parse arguments for library compilation
genDoc=0
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR" || { wmakeCheckPwd "$WM_PROJECT_DIR" || {
@ -36,11 +34,5 @@ src/Allwmake $targetType $*
# Compile OpenFOAM libraries and applications # Compile OpenFOAM libraries and applications
applications/Allwmake $targetType $* applications/Allwmake $targetType $*
# Optionally build OpenFOAM Doxygen documentation
if [ $genDoc -eq 1 ]
then
doc/Allwmake
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -2,7 +2,6 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
@ -20,8 +19,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
set -x set -x
wmake -all solvers $* wmake -all $targetType solvers
wmake -all utilities $* wmake -all $targetType utilities
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,3 +1,5 @@
#include "readTransportProperties.H"
Info<< "Reading field p\n" << endl; Info<< "Reading field p\n" << endl;
volScalarField p volScalarField p
( (
@ -29,3 +31,5 @@ volVectorField U
#include "createPhi.H" #include "createPhi.H"
mesh.setFluxRequired(p.name()); mesh.setFluxRequired(p.name());
#include "readTurbulenceProperties.H"

View File

@ -28,7 +28,7 @@ Group
grpDNSSolvers grpDNSSolvers
Description Description
Direct numerical simulation solver for boxes of isotropic turbulence Direct numerical simulation solver for boxes of isotropic turbulence.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -44,16 +44,13 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMeshNoClear.H" #include "createMeshNoClear.H"
#include "createControl.H"
pisoControl piso(mesh);
#include "readTransportProperties.H"
#include "createFields.H" #include "createFields.H"
#include "readTurbulenceProperties.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,7 +61,7 @@ int main(int argc, char *argv[])
{ {
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
force.internalField() = ReImSum force.primitiveFieldRef() = ReImSum
( (
fft::reverseTransform fft::reverseTransform
( (
@ -119,7 +116,7 @@ int main(int argc, char *argv[])
runTime.write(); runTime.write();
if (runTime.outputTime()) if (runTime.writeTime())
{ {
calcEk(U, K).write calcEk(U, K).write
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -52,6 +52,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "fvOptions.H"
#include "simpleControl.H" #include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,6 +67,7 @@ int main(int argc, char *argv[])
simpleControl simple(mesh); simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -77,10 +79,16 @@ int main(int argc, char *argv[])
while (simple.correctNonOrthogonal()) while (simple.correctNonOrthogonal())
{ {
solve fvScalarMatrix TEqn
( (
fvm::ddt(T) - fvm::laplacian(DT, T) fvm::ddt(T) - fvm::laplacian(DT, T)
==
fvOptions(T)
); );
fvOptions.constrain(TEqn);
TEqn.solve();
fvOptions.correct(T);
} }
#include "write.H" #include "write.H"

View File

@ -1,4 +1,4 @@
if (runTime.outputTime()) if (runTime.writeTime())
{ {
volVectorField gradT(fvc::grad(T)); volVectorField gradT(fvc::grad(T));

View File

@ -43,7 +43,7 @@ word pName("p");
// Update name of the pressure field from the command-line option // Update name of the pressure field from the command-line option
args.optionReadIfPresent("pName", pName); args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity BCs // Infer the pressure BCs from the velocity
wordList pBCTypes wordList pBCTypes
( (
U.boundaryField().size(), U.boundaryField().size(),
@ -78,62 +78,36 @@ volScalarField p
pBCTypes pBCTypes
); );
label pRefCell = 0; // Infer the velocity potential BCs from the pressure
scalar pRefValue = 0.0; wordList PhiBCTypes
if (args.optionFound("writep"))
{
setRefCell
(
p,
potentialFlow.dict(),
pRefCell,
pRefValue
);
}
Info<< "Constructing velocity potential field Phi\n" << endl;
autoPtr<volScalarField> PhiPtr;
IOobject io
( (
"Phi", p.boundaryField().size(),
runTime.timeName(), zeroGradientFvPatchScalarField::typeName
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
); );
if (io.typeHeaderOk<volScalarField>()) forAll(p.boundaryField(), patchi)
{ {
PhiPtr.reset(new volScalarField(io, mesh)); if (p.boundaryField()[patchi].fixesValue())
}
else
{
// Cannot just use p.boundaryField().types() since does not initialise
// complex boundary types. Instead re-clone them from p.
io.readOpt() = IOobject::NO_READ;
PhiPtr.reset
(
new volScalarField
(
io,
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
p.boundaryField().types()
)
);
const volScalarField::GeometricBoundaryField& bp = p.boundaryField();
volScalarField::GeometricBoundaryField& bPhi = PhiPtr().boundaryField();
forAll(bp, patchI)
{ {
bPhi.set(patchI, bp[patchI].clone(PhiPtr().dimensionedInternalField())); PhiBCTypes[patchi] = fixedValueFvPatchScalarField::typeName;
} }
} }
volScalarField& Phi = PhiPtr();
Info<< "Constructing velocity potential field Phi\n" << endl;
volScalarField Phi
(
IOobject
(
"Phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
PhiBCTypes
);
label PhiRefCell = 0; label PhiRefCell = 0;
scalar PhiRefValue = 0; scalar PhiRefValue = 0;

View File

@ -28,7 +28,9 @@ Group
grpBasicSolvers grpBasicSolvers
Description Description
Potential flow solver. Potential flow solver which solves for the velocity potential
from which the flux-field is obtained and velocity field by reconstructing
the flux.
\heading Solver details \heading Solver details
The potential flow solution is typically employed to generate initial fields The potential flow solution is typically employed to generate initial fields

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -87,17 +87,16 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H" #include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
@ -113,7 +112,7 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
#include "createTimeControls.H" #include "readTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
#include "createTimeControls.H" #include "readTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"
@ -131,11 +131,11 @@ int main(int argc, char *argv[])
protectedCell = 0; protectedCell = 0;
} }
forAll(betav, cellI) forAll(betav, celli)
{ {
if (betav[cellI] < 0.99) if (betav[celli] < 0.99)
{ {
protectedCell[cellI] = 1; protectedCell[celli] = 1;
} }
} }

View File

@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
mesh, mesh,
dimensionedScalar("zero", Nv.dimensions(), 0.0) dimensionedScalar("zero", Nv.dimensions(), 0.0)
); );
N.internalField() = Nv.internalField()*Cw; N.primitiveFieldRef() = Nv.primitiveField()*Cw;
volSymmTensorField ns volSymmTensorField ns
( (
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
Zero Zero
) )
); );
ns.internalField() = nsv.internalField()*Cw; ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4))); volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
volScalarField b((Uhat & B_ & Uhat)/sqrt(n)); volScalarField b((Uhat & B_ & Uhat)/sqrt(n));

View File

@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiGModels::basicSubGrid::G() const
volScalarField& Gtot = tGtot.ref(); volScalarField& Gtot = tGtot.ref();
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0); const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
scalarField N(Nv.internalField()*Cw); scalarField N(Nv.primitiveField()*Cw);
forAll(N, celli) forAll(N, celli)
{ {

View File

@ -130,7 +130,7 @@ void PDRkEpsilon::correct()
tgradU.clear(); tgradU.clear();
// Update espsilon and G at the wall // Update espsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryFieldRef().updateCoeffs();
// Add the blockage generation term so that it is included consistently // Add the blockage generation term so that it is included consistently
// in both the k and epsilon equations // in both the k and epsilon equations
@ -163,7 +163,7 @@ void PDRkEpsilon::correct()
epsEqn.ref().relax(); epsEqn.ref().relax();
epsEqn.ref().boundaryManipulate(epsilon_.boundaryField()); epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
solve(epsEqn); solve(epsEqn);
bound(epsilon_, epsilonMin_); bound(epsilon_, epsilonMin_);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,8 +36,8 @@ Description
{ {
scalarField sumPhi scalarField sumPhi
( (
fvc::surfaceSum(mag(phiSt))().internalField() fvc::surfaceSum(mag(phiSt))().primitiveField()
/ rho.internalField() / rho.primitiveField()
); );
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
if (subGridSchelkin_) if (subGridSchelkin_)
{ {
up.internalField() += calculateSchelkinEffect(uPrimeCoef_); up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
} }
volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon)))); volScalarField tauEta(sqrt(mag(thermo_.muu()/(thermo_.rhou()*epsilon))));

View File

@ -82,7 +82,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
volScalarField up(sqrt((2.0/3.0)*k)); volScalarField up(sqrt((2.0/3.0)*k));
if (subGridSchelkin_) if (subGridSchelkin_)
{ {
up.internalField() += calculateSchelkinEffect(uPrimeCoef_); up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
} }
volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon); volScalarField l(lCoef_*sqrt(3.0/2.0)*up*k/epsilon);
@ -119,9 +119,11 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
} }
} }
volScalarField::Boundary& xieqBf = xieq.boundaryFieldRef();
forAll(xieq.boundaryField(), patchi) forAll(xieq.boundaryField(), patchi)
{ {
scalarField& xieqp = xieq.boundaryField()[patchi]; scalarField& xieqp = xieqBf[patchi];
const scalarField& Kp = K.boundaryField()[patchi]; const scalarField& Kp = K.boundaryField()[patchi];
const scalarField& Map = Ma.boundaryField()[patchi]; const scalarField& Map = Ma.boundaryField()[patchi];
const scalarField& upBySup = upBySu.boundaryField()[patchi]; const scalarField& upBySup = upBySu.boundaryField()[patchi];

View File

@ -114,7 +114,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
) )
); );
volScalarField& N = tN.ref(); volScalarField& N = tN.ref();
N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0); N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
volSymmTensorField ns volSymmTensorField ns
( (
@ -134,7 +134,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
Zero Zero
) )
); );
ns.internalField() = nsv.internalField()*pow(mesh.V(), 2.0/3.0); ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);
const volVectorField Uhat const volVectorField Uhat
( (
@ -150,7 +150,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0)); const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
// Re use tN // Re use tN
N.internalField() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0); N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
return tN; return tN;
} }

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -23,7 +23,6 @@ volScalarField rho
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& b = composition.Y("b"); volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl; Info<< "min(b) = " << min(b).value() << endl;
@ -227,3 +226,5 @@ fields.add(b);
fields.add(thermo.he()); fields.add(thermo.he());
fields.add(thermo.heu()); fields.add(thermo.heu());
flameWrinkling->addXi(fields); flameWrinkling->addXi(fields);
#include "createMRF.H"

View File

@ -266,9 +266,11 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi); Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi);
} }
forAll(Su0.boundaryField(), patchi) volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
forAll(Su0Bf, patchi)
{ {
scalarField& Su0p = Su0.boundaryField()[patchi]; scalarField& Su0p = Su0Bf[patchi];
const scalarField& pp = p.boundaryField()[patchi]; const scalarField& pp = p.boundaryField()[patchi];
const scalarField& Tup = Tu.boundaryField()[patchi]; const scalarField& Tup = Tu.boundaryField()[patchi];
@ -313,9 +315,11 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli]); Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli]);
} }
forAll(Su0.boundaryField(), patchi) volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
forAll(Su0Bf, patchi)
{ {
scalarField& Su0p = Su0.boundaryField()[patchi]; scalarField& Su0p = Su0Bf[patchi];
const scalarField& pp = p.boundaryField()[patchi]; const scalarField& pp = p.boundaryField()[patchi];
const scalarField& Tup = Tu.boundaryField()[patchi]; const scalarField& Tup = Tu.boundaryField()[patchi];
const scalarField& phip = phi.boundaryField()[patchi]; const scalarField& phip = phi.boundaryField()[patchi];
@ -365,9 +369,11 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
ma[celli] = Ma(phi[celli]); ma[celli] = Ma(phi[celli]);
} }
forAll(ma.boundaryField(), patchi) volScalarField::Boundary& maBf = ma.boundaryFieldRef();
forAll(maBf, patchi)
{ {
scalarField& map = ma.boundaryField()[patchi]; scalarField& map = maBf[patchi];
const scalarField& phip = phi.boundaryField()[patchi]; const scalarField& phip = phi.boundaryField()[patchi];
forAll(map, facei) forAll(map, facei)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,16 +65,15 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H" #include "readCombustionProperties.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
@ -89,7 +88,7 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
#include "createTimeControls.H" #include "readTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -23,7 +23,6 @@ volScalarField rho
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& b = composition.Y("b"); volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl; Info<< "min(b) = " << min(b).value() << endl;
@ -139,3 +138,5 @@ if (composition.contains("ft"))
fields.add(b); fields.add(b);
fields.add(thermo.he()); fields.add(thermo.he());
fields.add(thermo.heu()); fields.add(thermo.heu());
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,12 +28,10 @@ Group
grpCombustionSolvers grpCombustionSolvers
Description Description
Solver for chemistry problems designed for use on single cell cases to Solver for chemistry problems, designed for use on single cell cases to
provide comparison against other chemistry solvers provide comparison against other chemistry solvers, that uses a single cell
mesh, and fields created from the initial conditions.
Note:
- single cell mesh created on-the-fly
- fields created on the fly from the initial conditions
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -52,10 +50,15 @@ int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
#define CREATE_MESH createSingleCellMesh.H
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createSingleCellMesh.H" #include "createSingleCellMesh.H"
#include "createFields.H" #include "createFields.H"
#include "createFieldRefs.H"
#include "readInitialConditions.H" #include "readInitialConditions.H"
#include "createControls.H" #include "createControls.H"

View File

@ -0,0 +1,4 @@
scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0];
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
volScalarField& p = thermo.p();

View File

@ -27,14 +27,10 @@
autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh)); autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh));
psiChemistryModel& chemistry = pChemistry(); psiChemistryModel& chemistry = pChemistry();
scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0];
psiReactionThermo& thermo = chemistry.thermo(); psiReactionThermo& thermo = chemistry.thermo();
thermo.validate(args.executable(), "h"); thermo.validate(args.executable(), "h");
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
volScalarField rho volScalarField rho
( (
IOobject IOobject
@ -48,8 +44,6 @@
thermo.rho() thermo.rho()
); );
volScalarField& p = thermo.p();
volScalarField Rspecific volScalarField Rspecific
( (
IOobject IOobject

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I. \
-I../engineFoam \ -I../engineFoam \
-I../XiFoam \ -I../XiFoam \
-I../../compressible/rhoPimpleFoam \ -I../../compressible/rhoPimpleFoam \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,15 +45,16 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #define CREATE_TIME createEngineTime.H
#define CREATE_MESH createEngineMesh.H
#include "postProcess.H"
#include "setRootCase.H"
#include "createEngineTime.H" #include "createEngineTime.H"
#include "createEngineMesh.H" #include "createEngineMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRhoUf.H" #include "createRhoUf.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -0,0 +1,2 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();

View File

@ -1,71 +1,70 @@
Info<< "Reading thermophysical properties\n" << endl; Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiThermo> pThermo autoPtr<psiThermo> pThermo
(
psiThermo::New(mesh)
);
psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField rho
(
IOobject
( (
psiThermo::New(mesh) "rho",
); runTime.timeName(),
psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh, mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) IOobject::NO_READ,
); IOobject::AUTO_WRITE
),
thermo.rho()
);
Info<< "Creating field kinetic energy K\n" << endl; volScalarField& p = thermo.p();
volScalarField K("K", 0.5*magSqr(U));
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating field dpdt\n" << endl;
volScalarField dpdt
(
IOobject
(
"dpdt",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,16 +68,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #define CREATE_TIME createEngineTime.H
#define CREATE_MESH createEngineMesh.H
#include "postProcess.H"
#include "setRootCase.H"
#include "createEngineTime.H" #include "createEngineTime.H"
#include "createEngineMesh.H" #include "createEngineMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readCombustionProperties.H" #include "readCombustionProperties.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRhoUf.H" #include "createRhoUf.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -21,7 +21,6 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \ -I$(LIB_SRC)/regionModels/pyrolysisModels/lnInclude \
@ -29,7 +28,6 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude -I$(LIB_SRC)/ODE/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lfvOptions \ -lfvOptions \

View File

@ -12,12 +12,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
radiation->correct(); radiation->correct();
combustion->correct(); combustion->correct();
dQ = combustion->dQ(); dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]); volScalarField Yt(0.0*Y[0]);
forAll(Y, i) forAll(Y, i)
{ {
if (Y[i].name() != inertSpecie) if (i != inertIndex && composition.active(i))
{ {
volScalarField& Yi = Y[i]; volScalarField& Yi = Y[i];
@ -44,10 +43,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Yi.max(0.0); Yi.max(0.0);
Yt += Yi; Yt += Yi;
} }
else
{
inertIndex = i;
}
} }
Y[inertIndex] = scalar(1) - Yt; Y[inertIndex] = scalar(1) - Yt;

View File

@ -0,0 +1,4 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
filmModelType& surfaceFilm = tsurfaceFilm();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -19,6 +19,13 @@ basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
Info<< "Creating field rho\n" << endl; Info<< "Creating field rho\n" << endl;
volScalarField rho volScalarField rho
@ -35,8 +42,6 @@ volScalarField rho
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
Info<< "\nReading field U\n" << endl; Info<< "\nReading field U\n" << endl;
volVectorField U volVectorField U
@ -54,6 +59,9 @@ volVectorField U
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
#include "createMRF.H"
Info<< "Creating turbulence model\n" << endl; Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence autoPtr<compressible::turbulenceModel> turbulence
( (
@ -69,6 +77,60 @@ autoPtr<compressible::turbulenceModel> turbulence
// Set the turbulence into the combustion model // Set the turbulence into the combustion model
combustion->setTurbulence(turbulence()); combustion->setTurbulence(turbulence());
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
#include "readpRef.H"
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
mesh.setFluxRequired(p_rgh.name());
#include "phrghEqn.H"
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Switch solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
);
Switch solvePyrolysisRegion
(
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
);
volScalarField dQ volScalarField dQ
( (
IOobject IOobject
@ -100,51 +162,7 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));
#include "createClouds.H"
#include "readGravitationalAcceleration.H" #include "createSurfaceFilmModel.H"
#include "readhRef.H" #include "createPyrolysisModel.H"
#include "gh.H" #include "createRadiationModel.H"
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
// Force p_rgh to be consistent with p
p_rgh = p - rho*gh;
mesh.setFluxRequired(p_rgh.name());
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Switch solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
);

View File

@ -3,4 +3,3 @@ Info<< "\nConstructing surface film model" << endl;
typedef regionModels::surfaceFilmModels::surfaceFilmModel filmModelType; typedef regionModels::surfaceFilmModels::surfaceFilmModel filmModelType;
autoPtr<filmModelType> tsurfaceFilm(filmModelType::New(mesh, g)); autoPtr<filmModelType> tsurfaceFilm(filmModelType::New(mesh, g));
filmModelType& surfaceFilm = tsurfaceFilm();

View File

@ -28,8 +28,8 @@ Group
grpCombustionSolvers grpCombustionSolvers
Description Description
Transient PIMPLE solver for fires and turbulent diffusion flames with Transient solver for fires and turbulent diffusion flames with reacting
reacting Lagrangian parcels, surface film and pyrolysis modelling. particle clouds, surface film and pyrolysis modelling.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -49,20 +49,15 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createPyrolysisModel.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
@ -77,7 +72,7 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
#include "createTimeControls.H" #include "readTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "solidRegionDiffusionNo.H" #include "solidRegionDiffusionNo.H"
#include "setMultiRegionDeltaT.H" #include "setMultiRegionDeltaT.H"
@ -91,7 +86,10 @@ int main(int argc, char *argv[])
surfaceFilm.evolve(); surfaceFilm.evolve();
pyrolysis.evolve(); if(solvePyrolysisRegion)
{
pyrolysis.evolve();
}
if (solvePrimaryRegion) if (solvePrimaryRegion)
{ {

View File

@ -4,7 +4,7 @@ volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); surfaceScalarField phig("phig", -rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
surfaceScalarField phiHbyA surfaceScalarField phiHbyA
( (
@ -25,9 +25,10 @@ while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvc::ddt(psi, rho)*gh fvm::ddt(psi, p_rgh)
+ fvc::ddt(psi, rho)*gh
+ fvc::ddt(psi)*pRef
+ fvc::div(phiHbyA) + fvc::div(phiHbyA)
+ fvm::ddt(psi, p_rgh)
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
== ==
parcels.Srho() parcels.Srho()
@ -46,7 +47,7 @@ while (pimple.correctNonOrthogonal())
} }
} }
p = p_rgh + rho*gh; p = p_rgh + rho*gh + pRef;
#include "rhoEqn.H" #include "rhoEqn.H"
#include "compressibleContinuityErrs.H" #include "compressibleContinuityErrs.H"

View File

@ -0,0 +1,62 @@
if (pimple.dict().lookupOrDefault<bool>("hydrostaticInitialization", false))
{
volScalarField& ph_rgh = regIOobject::store
(
new volScalarField
(
IOobject
(
"ph_rgh",
"0",
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
)
);
if (equal(runTime.value(), 0))
{
p = ph_rgh + rho*gh + pRef;
thermo.correct();
rho = thermo.rho();
label nCorr
(
pimple.dict().lookupOrDefault<label>("nHydrostaticCorrectors", 5)
);
for (label i=0; i<nCorr; i++)
{
surfaceScalarField rhof("rhof", fvc::interpolate(rho));
surfaceScalarField phig
(
"phig",
-rhof*ghf*fvc::snGrad(rho)*mesh.magSf()
);
// Update the pressure BCs to ensure flux consistency
constrainPressure(ph_rgh, rho, U, phig, rhof);
fvScalarMatrix ph_rghEqn
(
fvm::laplacian(rhof, ph_rgh) == fvc::div(phig)
);
ph_rghEqn.solve();
p = ph_rgh + rho*gh + pRef;
thermo.correct();
rho = thermo.rho();
Info<< "Hydrostatic pressure variation "
<< (max(ph_rgh) - min(ph_rgh)).value() << endl;
}
ph_rgh.write();
p_rgh = ph_rgh;
}
}

View File

@ -12,12 +12,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
{ {
reaction->correct(); reaction->correct();
dQ = reaction->dQ(); dQ = reaction->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]); volScalarField Yt(0.0*Y[0]);
forAll(Y, i) forAll(Y, i)
{ {
if (Y[i].name() != inertSpecie) if (i != inertIndex && composition.active(i))
{ {
volScalarField& Yi = Y[i]; volScalarField& Yi = Y[i];
@ -42,10 +41,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Yi.max(0.0); Yi.max(0.0);
Yt += Yi; Yt += Yi;
} }
else
{
inertIndex = i;
}
} }
Y[inertIndex] = scalar(1) - Yt; Y[inertIndex] = scalar(1) - Yt;

View File

@ -0,0 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -11,7 +11,14 @@ thermo.validate(args.executable(), "h", "e");
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
volScalarField rho volScalarField rho
( (
@ -40,8 +47,6 @@ volVectorField U
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
@ -123,3 +128,5 @@ volScalarField dQ
mesh, mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
); );
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,17 +45,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H" #include "createTimeControls.H"
#include "createRDeltaT.H" #include "createRDeltaT.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
turbulence->validate(); turbulence->validate();

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I. \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -0,0 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -11,7 +11,14 @@ thermo.validate(args.executable(), "h", "e");
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
volScalarField rho volScalarField rho
( (
@ -40,8 +47,6 @@ volVectorField U
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
@ -123,3 +128,5 @@ volScalarField dQ
mesh, mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
); );
#include "createMRF.H"

View File

@ -28,8 +28,8 @@ Group
grpCombustionSolvers grpCombustionSolvers
Description Description
Solver for combustion with chemical reactions using density based Solver for combustion with chemical reactions using a density based
thermodynamics package, using enahanced buoyancy treatment. thermodynamics package with enhanced buoyancy treatment.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -46,17 +46,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H" #include "createTimeControls.H"
#include "createRDeltaT.H" #include "createRDeltaT.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
turbulence->validate(); turbulence->validate();

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I. \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \ -I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -0,0 +1,3 @@
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
const label inertIndex(composition.species()[inertSpecie]);

View File

@ -11,7 +11,14 @@ thermo.validate(args.executable(), "h", "e");
basicMultiComponentMixture& composition = thermo.composition(); basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie")); const word inertSpecie(thermo.lookup("inertSpecie"));
if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species()
<< exit(FatalIOError);
}
volScalarField rho volScalarField rho
( (
@ -40,8 +47,6 @@ volVectorField U
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H" #include "compressibleCreatePhi.H"
@ -102,3 +107,5 @@ volScalarField dQ
mesh, mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
); );
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,17 +46,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H" #include "createTimeControls.H"
#include "createRDeltaT.H" #include "createRDeltaT.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
turbulence->validate(); turbulence->validate();

View File

@ -58,24 +58,24 @@ License
// Flow time scale // Flow time scale
{ {
rDeltaT.dimensionedInternalField() = rDeltaT.ref() =
( (
fvc::surfaceSum(mag(phi))().dimensionedInternalField() fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) /((2*maxCo)*mesh.V()*rho())
); );
// Limit the largest time scale // Limit the largest time scale
rDeltaT.max(1/maxDeltaT); rDeltaT.max(1/maxDeltaT);
Info<< " Flow = " Info<< " Flow = "
<< gMin(1/rDeltaT.internalField()) << ", " << gMin(1/rDeltaT.primitiveField()) << ", "
<< gMax(1/rDeltaT.internalField()) << endl; << gMax(1/rDeltaT.primitiveField()) << endl;
} }
// Reaction source time scale // Reaction source time scale
if (alphaTemp < 1.0) if (alphaTemp < 1.0)
{ {
volScalarField::DimensionedInternalField rDeltaTT volScalarField::Internal rDeltaTT
( (
mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T) mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T)
); );
@ -84,9 +84,9 @@ License
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", " << gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl; << gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
rDeltaT.dimensionedInternalField() = max rDeltaT.ref() = max
( (
rDeltaT.dimensionedInternalField(), rDeltaT(),
rDeltaTT rDeltaTT
); );
} }
@ -120,8 +120,8 @@ License
rDeltaT.correctBoundaryConditions(); rDeltaT.correctBoundaryConditions();
Info<< " Overall = " Info<< " Overall = "
<< gMin(1/rDeltaT.internalField()) << gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl; << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
} }

View File

@ -2,10 +2,9 @@
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
(wmake $targetType BCs && wmake && wmake rhoCentralDyMFoam) (wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -44,17 +44,16 @@ Description
\endvartable \endvartable
\heading Patch usage Usage
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
pName | Pressure field name | no | p p | Pressure field name | no | p
psiName | Compressibility field name | no | thermo:psi psi | Compressibility field name | no | thermo:psi
\endtable \endtable
Example of the boundary condition specification: Example of the boundary condition specification:
\verbatim \verbatim
myPatch <patchName>
{ {
type fixedRho; type fixedRho;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ Description
if (mesh.nInternalFaces()) if (mesh.nInternalFaces())
{ {
scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().internalField()); scalarField sumAmaxSf(fvc::surfaceSum(amaxSf)().primitiveField());
CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue(); CoNum = 0.5*gMax(sumAmaxSf/mesh.V().field())*runTime.deltaTValue();

View File

@ -0,0 +1,10 @@
volScalarField& p = thermo.p();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const volScalarField& mu = thermo.mu();
bool inviscid(true);
if (max(mu.primitiveField()) > 0.0)
{
inviscid = false;
}

View File

@ -6,17 +6,7 @@ autoPtr<psiThermo> pThermo
); );
psiThermo& thermo = pThermo(); psiThermo& thermo = pThermo();
volScalarField& p = thermo.p();
volScalarField& e = thermo.he(); volScalarField& e = thermo.he();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
const volScalarField& mu = thermo.mu();
bool inviscid(true);
if (max(mu.internalField()) > 0.0)
{
inviscid = false;
}
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
volVectorField U volVectorField U

View File

@ -29,7 +29,7 @@ Group
Description Description
Density-based compressible flow solver based on central-upwind schemes of Density-based compressible flow solver based on central-upwind schemes of
Kurganov and Tadmor with support for mesh-motion and topology changes Kurganov and Tadmor with support for mesh-motion and topology changes.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -45,10 +45,14 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createDynamicFvMesh.H" #include "createDynamicFvMesh.H"
#include "createFields.H" #include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
turbulence->validate(); turbulence->validate();
@ -188,11 +192,11 @@ int main(int argc, char *argv[])
// --- Solve momentum // --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp)); solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.dimensionedInternalField() = U.ref() =
rhoU.dimensionedInternalField() rhoU()
/rho.dimensionedInternalField(); /rho();
U.correctBoundaryConditions(); U.correctBoundaryConditions();
rhoU.boundaryField() == rho.boundaryField()*U.boundaryField(); rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
if (!inviscid) if (!inviscid)
{ {
@ -226,7 +230,7 @@ int main(int argc, char *argv[])
e = rhoE/rho - 0.5*magSqr(U); e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions(); e.correctBoundaryConditions();
thermo.correct(); thermo.correct();
rhoE.boundaryField() == rhoE.boundaryFieldRef() ==
rho.boundaryField()* rho.boundaryField()*
( (
e.boundaryField() + 0.5*magSqr(U.boundaryField()) e.boundaryField() + 0.5*magSqr(U.boundaryField())
@ -243,11 +247,11 @@ int main(int argc, char *argv[])
rhoE = rho*(e + 0.5*magSqr(U)); rhoE = rho*(e + 0.5*magSqr(U));
} }
p.dimensionedInternalField() = p.ref() =
rho.dimensionedInternalField() rho()
/psi.dimensionedInternalField(); /psi();
p.correctBoundaryConditions(); p.correctBoundaryConditions();
rho.boundaryField() == psi.boundaryField()*p.boundaryField(); rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
turbulence->correct(); turbulence->correct();

View File

@ -29,7 +29,7 @@ Group
Description Description
Density-based compressible flow solver based on central-upwind schemes of Density-based compressible flow solver based on central-upwind schemes of
Kurganov and Tadmor Kurganov and Tadmor.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -45,11 +45,14 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createFields.H" #include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "createRDeltaT.H" #include "createRDeltaT.H"
@ -181,11 +184,11 @@ int main(int argc, char *argv[])
// --- Solve momentum // --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp)); solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.dimensionedInternalField() = U.ref() =
rhoU.dimensionedInternalField() rhoU()
/rho.dimensionedInternalField(); /rho();
U.correctBoundaryConditions(); U.correctBoundaryConditions();
rhoU.boundaryField() == rho.boundaryField()*U.boundaryField(); rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
if (!inviscid) if (!inviscid)
{ {
@ -219,7 +222,7 @@ int main(int argc, char *argv[])
e = rhoE/rho - 0.5*magSqr(U); e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions(); e.correctBoundaryConditions();
thermo.correct(); thermo.correct();
rhoE.boundaryField() == rhoE.boundaryFieldRef() ==
rho.boundaryField()* rho.boundaryField()*
( (
e.boundaryField() + 0.5*magSqr(U.boundaryField()) e.boundaryField() + 0.5*magSqr(U.boundaryField())
@ -236,11 +239,11 @@ int main(int argc, char *argv[])
rhoE = rho*(e + 0.5*magSqr(U)); rhoE = rho*(e + 0.5*magSqr(U));
} }
p.dimensionedInternalField() = p.ref() =
rho.dimensionedInternalField() rho()
/psi.dimensionedInternalField(); /psi();
p.correctBoundaryConditions(); p.correctBoundaryConditions();
rho.boundaryField() == psi.boundaryField()*p.boundaryField(); rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
turbulence->correct(); turbulence->correct();

View File

@ -11,10 +11,10 @@
); );
// Set the reciprocal time-step from the local Courant number // Set the reciprocal time-step from the local Courant number
rDeltaT.dimensionedInternalField() = max rDeltaT.ref() = max
( (
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
fvc::surfaceSum(amaxSf)().dimensionedInternalField() fvc::surfaceSum(amaxSf)()()
/((2*maxCo)*mesh.V()) /((2*maxCo)*mesh.V())
); );
@ -24,6 +24,6 @@
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
Info<< "Flow time scale min/max = " Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.internalField()) << gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl; << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
} }

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -8,7 +8,6 @@ psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e"); thermo.validate(args.executable(), "h", "e");
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField rho volScalarField rho
( (
@ -90,3 +89,5 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H"

View File

@ -9,8 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
EXE_LIBS = \ EXE_LIBS = \
-lcompressibleTransportModels \ -lcompressibleTransportModels \
@ -24,5 +23,4 @@ EXE_LIBS = \
-lfvOptions \ -lfvOptions \
-ldynamicFvMesh \ -ldynamicFvMesh \
-ltopoChangerFvMesh \ -ltopoChangerFvMesh \
-ldynamicMesh \ -ldynamicMesh
-lmeshTools

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers grpMovingMeshSolvers grpCompressibleSolvers grpMovingMeshSolvers
Description Description
Transient solver for laminar or turbulent flow of compressible fluids Transient solver for turbulent flow of compressible fluids for HVAC and
for HVAC and similar applications. similar applications, with optional mesh motion and mesh topology changes.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations. pseudo-transient simulations.
@ -51,16 +51,16 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createDynamicFvMesh.H" #include "createDynamicFvMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createRDeltaT.H" #include "createRDeltaT.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRhoUf.H" #include "createRhoUf.H"
#include "createControls.H" #include "createControls.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers grpCompressibleSolvers
Description Description
Transient solver for laminar or turbulent flow of compressible fluids Transient solver for turbulent flow of compressible fluids for HVAC and
for HVAC and similar applications. similar applications.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient simulations. pseudo-transient simulations.
@ -49,17 +49,17 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createTimeControls.H" #include "createTimeControls.H"
#include "createRDeltaT.H" #include "createRDeltaT.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
turbulence->validate(); turbulence->validate();

View File

@ -26,11 +26,11 @@
volScalarField rDeltaT0("rDeltaT0", rDeltaT); volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Set the reciprocal time-step from the local Courant number // Set the reciprocal time-step from the local Courant number
rDeltaT.dimensionedInternalField() = max rDeltaT.ref() = max
( (
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT), 1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
fvc::surfaceSum(mag(phi))().dimensionedInternalField() fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField()) /((2*maxCo)*mesh.V()*rho())
); );
if (pimple.transonic()) if (pimple.transonic())
@ -41,11 +41,11 @@
fvc::interpolate(psi)*fvc::flux(U) fvc::interpolate(psi)*fvc::flux(U)
); );
rDeltaT.dimensionedInternalField() = max rDeltaT.ref() = max
( (
rDeltaT.dimensionedInternalField(), rDeltaT(),
fvc::surfaceSum(mag(phid))().dimensionedInternalField() fvc::surfaceSum(mag(phid))()()
/((2*maxCo)*mesh.V()*psi.dimensionedInternalField()) /((2*maxCo)*mesh.V()*psi())
); );
} }
@ -53,8 +53,8 @@
rDeltaT.correctBoundaryConditions(); rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = " Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.internalField()) << gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl; << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
if (rDeltaTSmoothingCoeff < 1.0) if (rDeltaTSmoothingCoeff < 1.0)
{ {
@ -62,8 +62,8 @@
} }
Info<< "Smoothed flow time scale min/max = " Info<< "Smoothed flow time scale min/max = "
<< gMin(1/rDeltaT.internalField()) << gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl; << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
// Limit rate of change of time scale // Limit rate of change of time scale
// - reduce as much as required // - reduce as much as required
@ -79,7 +79,7 @@
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff); *max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
Info<< "Damped flow time scale min/max = " Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.internalField()) << gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl; << ", " << gMax(1/rDeltaT.primitiveField()) << endl;
} }
} }

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -21,7 +21,6 @@ volScalarField rho
); );
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
volVectorField U volVectorField U
@ -81,3 +80,5 @@ autoPtr<compressible::turbulenceModel> turbulence
); );
dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar initialMass = fvc::domainIntegrate(rho);
#include "createMRF.H"

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I. \
-I.. \ -I.. \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

View File

@ -80,3 +80,5 @@ autoPtr<compressible::turbulenceModel> turbulence
); );
dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar initialMass = fvc::domainIntegrate(rho);
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,9 +28,8 @@ Group
grpCompressibleSolvers grpCompressibleSolvers
Description Description
Steady-state solver for turbulent flow of compressible fluids with Steady-state solver for turbulent flow of compressible fluids, with
RANS turbulence modelling, implicit or explicit porosity treatment implicit or explicit porosity treatment and optional sources.
and run-time selectable finite volume sources.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -45,14 +44,13 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createZones.H" #include "createZones.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,7 @@ Group
grpCompressibleSolvers grpCompressibleSolvers
Description Description
Steady-state SIMPLE solver for laminar or turbulent RANS flow of Steady-state solver for turbulent flow of compressible fluids.
compressible fluids.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -43,14 +42,14 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -1,5 +1,4 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -0,0 +1,2 @@
volScalarField& e = thermo.he();
const volScalarField& psi = thermo.psi();

View File

@ -8,8 +8,6 @@ psiThermo& thermo = pThermo();
thermo.validate(args.executable(), "e"); thermo.validate(args.executable(), "e");
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
volScalarField& e = thermo.he();
const volScalarField& psi = thermo.psi();
volScalarField rho volScalarField rho
( (
@ -54,3 +52,5 @@ autoPtr<compressible::turbulenceModel> turbulence
Info<< "Creating field kinetic energy K\n" << endl; Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U)); volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H"

View File

@ -2,7 +2,6 @@ EXE_INC = \
-I.. \ -I.. \
-I../../rhoPimpleFoam/rhoPimpleDyMFoam \ -I../../rhoPimpleFoam/rhoPimpleDyMFoam \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers grpMovingMeshSolvers grpCompressibleSolvers grpMovingMeshSolvers
Description Description
Transient solver for trans-sonic/supersonic, laminar or turbulent flow Transient solver for trans-sonic/supersonic, turbulent flow of a
of a compressible gas with mesh motion.. compressible gas, with optional mesh motion and mesh topology changes.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -45,20 +45,20 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createDynamicFvMesh.H" #include "createDynamicFvMesh.H"
#include "initContinuityErrs.H" #include "createControl.H"
pimpleControl pimple(mesh);
#include "createControls.H" #include "createControls.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRhoUf.H" #include "createRhoUf.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence->validate(); turbulence->validate();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,8 @@ Group
grpCompressibleSolvers grpCompressibleSolvers
Description Description
Transient solver for trans-sonic/supersonic, laminar or turbulent flow Transient solver for trans-sonic/supersonic, turbulent flow of a
of a compressible gas. compressible gas.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -43,14 +43,14 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -1,3 +1,6 @@
#include "readThermodynamicProperties.H"
#include "readTransportProperties.H"
Info<< "Reading field p\n" << endl; Info<< "Reading field p\n" << endl;
volScalarField p volScalarField p
( (

View File

@ -40,14 +40,12 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "readThermodynamicProperties.H"
#include "readTransportProperties.H"
#include "createFields.H" #include "createFields.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -0,0 +1,2 @@
Info<< nl << "Constructing dsmcCloud " << endl;
dsmcCloud dsmc("dsmc", mesh);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,8 +28,8 @@ Group
grpDiscreteMethodsSolvers grpDiscreteMethodsSolvers
Description Description
Direct simulation Monte Carlo (DSMC) solver for 3D, transient, multi- Direct simulation Monte Carlo (DSMC) solver for, transient, multi-species
species flows flows.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -40,16 +40,16 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< nl << "Constructing dsmcCloud " << endl;
dsmcCloud dsmc("dsmc", mesh);
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while (runTime.loop()) while (runTime.loop())

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,7 +28,7 @@ Group
grpDiscreteMethodsSolvers grpDiscreteMethodsSolvers
Description Description
Equilibrates and/or preconditions molecular dynamics systems Solver to equilibrate and/or precondition molecular dynamics systems.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
runTime.write(); runTime.write();
if (runTime.outputTime()) if (runTime.writeTime())
{ {
nAveragingSteps = 0; nAveragingSteps = 0;
} }

View File

@ -1,55 +1,17 @@
Info<< "\nReading field U\n" << endl; Info<< "\nReading field U\n" << endl;
volVectorField U volVectorField U
( (
IOobject IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
word polyatomicCloudName("polyatomicCloud");
potential polyPot
( (
"U",
runTime.timeName(),
mesh, mesh,
IOdictionary IOobject::MUST_READ,
( IOobject::AUTO_WRITE
IOobject ),
( mesh
polyatomicCloudName + "Properties", );
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
)
);
polyatomicCloud polyatomics(polyatomicCloudName, mesh, polyPot); potential pot(mesh);
word monoatomicCloudName("monoatomicCloud"); moleculeCloud molecules(mesh, pot);
potential monoPot
(
mesh,
IOdictionary
(
IOobject
(
monoatomicCloudName + "Properties",
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,
false
)
)
);
monoatomicCloud monoatomics(monoatomicCloudName, mesh, monoPot);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,41 +28,28 @@ Group
grpDiscreteMethodsSolvers grpDiscreteMethodsSolvers
Description Description
Molecular dynamics solver for fluid dynamics Molecular dynamics solver for fluid dynamics.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "md.H" #include "md.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createFields.H"
#include "temperatureAndPressureVariables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
potential pot(mesh);
moleculeCloud molecules(mesh, pot);
#include "temperatureAndPressureVariables.H"
label nAveragingSteps = 0; label nAveragingSteps = 0;
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
@ -76,12 +63,11 @@ int main(int argc, char *argv[])
molecules.evolve(); molecules.evolve();
#include "meanMomentumEnergyAndNMols.H" #include "meanMomentumEnergyAndNMols.H"
#include "temperatureAndPressure.H" #include "temperatureAndPressure.H"
runTime.write(); runTime.write();
if (runTime.outputTime()) if (runTime.writeTime())
{ {
nAveragingSteps = 0; nAveragingSteps = 0;
} }

View File

@ -0,0 +1,2 @@
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");

View File

@ -1,47 +1,49 @@
IOobject phiBHeader IOobject phiBHeader
( (
"phiB", "phiB",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::NO_READ IOobject::NO_READ
); );
surfaceScalarField* phiBPtr; surfaceScalarField* phiBPtr = nullptr;
if (phiBHeader.typeHeaderOk<surfaceScalarField>(true)) if (phiBHeader.typeHeaderOk<surfaceScalarField>(true))
{ {
Info<< "Reading field phiB\n" << endl; Info<< "Reading face flux ";
phiBPtr = new surfaceScalarField phiBPtr = new surfaceScalarField
(
IOobject
( (
IOobject "phiB",
( runTime.timeName(),
"phiB", mesh,
runTime.timeName(), IOobject::MUST_READ,
mesh, IOobject::AUTO_WRITE
IOobject::MUST_READ, ),
IOobject::AUTO_WRITE mesh
), );
mesh }
); else
} {
else Info<< "Calculating face flux ";
{
Info<< "Calculating face flux\n" << endl;
phiBPtr = new surfaceScalarField phiBPtr = new surfaceScalarField
(
IOobject
( (
IOobject "phiB",
( runTime.timeName(),
"phiB", mesh,
runTime.timeName(), IOobject::NO_READ,
mesh, IOobject::AUTO_WRITE
IOobject::NO_READ, ),
IOobject::AUTO_WRITE fvc::flux(B)
), );
fvc::flux(B) }
);
}
surfaceScalarField& phiB = *phiBPtr; surfaceScalarField& phiB = *phiBPtr;
Info<< phiB.name() << nl << endl;

View File

@ -58,14 +58,12 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");
#include "createFields.H" #include "createFields.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -40,8 +40,10 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "setRootCase.H" #define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createFields.H" #include "createFields.H"
@ -72,7 +74,7 @@ int main(int argc, char *argv[])
runTime.write(); runTime.write();
if (runTime.outputTime()) if (runTime.writeTime())
{ {
writeCellGraph(V, runTime.graphFormat()); writeCellGraph(V, runTime.graphFormat());
writeCellGraph(delta, runTime.graphFormat()); writeCellGraph(delta, runTime.graphFormat());

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-I. \
-I../buoyantBoussinesqSimpleFoam \ -I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \

View File

@ -28,7 +28,7 @@ Group
grpHeatTransferSolvers grpHeatTransferSolvers
Description Description
Transient solver for buoyant, turbulent flow of incompressible fluids Transient solver for buoyant, turbulent flow of incompressible fluids.
Uses the Boussinesq approximation: Uses the Boussinesq approximation:
\f[ \f[
@ -59,20 +59,18 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "createMRF.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence->validate(); turbulence->validate();
@ -80,14 +78,16 @@ int main(int argc, char *argv[])
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while (runTime.loop()) while (runTime.run())
{ {
Info<< "Time = " << runTime.timeName() << nl << endl; #include "readTimeControls.H"
#include "createTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop()) while (pimple.loop())
{ {

View File

@ -120,3 +120,6 @@ if (p_rgh.needReference())
} }
mesh.setFluxRequired(p_rgh.name()); mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createIncompressibleRadiationModel.H"

View File

@ -28,7 +28,7 @@ Group
grpHeatTransferSolvers grpHeatTransferSolvers
Description Description
Steady-state solver for buoyant, turbulent flow of incompressible fluids Steady-state solver for buoyant, turbulent flow of incompressible fluids.
Uses the Boussinesq approximation: Uses the Boussinesq approximation:
\f[ \f[
@ -59,15 +59,13 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "createMRF.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"

View File

@ -120,3 +120,6 @@ if (p_rgh.needReference())
} }
mesh.setFluxRequired(p_rgh.name()); mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createIncompressibleRadiationModel.H"

View File

@ -47,16 +47,15 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
@ -70,7 +69,7 @@ int main(int argc, char *argv[])
while (runTime.run()) while (runTime.run())
{ {
#include "createTimeControls.H" #include "readTimeControls.H"
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setDeltaT.H" #include "setDeltaT.H"

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

View File

@ -114,3 +114,6 @@ if (p_rgh.needReference())
} }
dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho)); dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho));
#include "createMRF.H"
#include "createRadiationModel.H"

View File

@ -44,16 +44,15 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
#include "createControl.H"
simpleControl simple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
turbulence->validate(); turbulence->validate();

View File

@ -0,0 +1 @@
const volScalarField& psi = thermo.psi();

Some files were not shown because too many files have changed in this diff Show More