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[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# File-browser settings - anywhere

View File

@ -1,9 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation without documentation by default
genDoc=0
targetType=libso
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR" || {
@ -36,11 +34,5 @@ src/Allwmake $targetType $*
# Compile OpenFOAM libraries and applications
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
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
@ -20,8 +19,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || {
set -x
wmake -all solvers $*
wmake -all utilities $*
wmake -all $targetType solvers
wmake -all $targetType utilities
#------------------------------------------------------------------------------

View File

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

View File

@ -28,7 +28,7 @@ Group
grpDNSSolvers
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[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMeshNoClear.H"
pisoControl piso(mesh);
#include "readTransportProperties.H"
#include "createControl.H"
#include "createFields.H"
#include "readTurbulenceProperties.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -64,7 +61,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
force.internalField() = ReImSum
force.primitiveFieldRef() = ReImSum
(
fft::reverseTransform
(
@ -119,7 +116,7 @@ int main(int argc, char *argv[])
runTime.write();
if (runTime.outputTime())
if (runTime.writeTime())
{
calcEk(U, K).write
(

View File

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

View File

@ -1,4 +1,4 @@
if (runTime.outputTime())
if (runTime.writeTime())
{
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
args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity BCs
// Infer the pressure BCs from the velocity
wordList pBCTypes
(
U.boundaryField().size(),
@ -78,62 +78,36 @@ volScalarField p
pBCTypes
);
label pRefCell = 0;
scalar pRefValue = 0.0;
if (args.optionFound("writep"))
{
setRefCell
(
p,
potentialFlow.dict(),
pRefCell,
pRefValue
);
}
Info<< "Constructing velocity potential field Phi\n" << endl;
autoPtr<volScalarField> PhiPtr;
IOobject io
// Infer the velocity potential BCs from the pressure
wordList PhiBCTypes
(
"Phi",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
p.boundaryField().size(),
zeroGradientFvPatchScalarField::typeName
);
if (io.typeHeaderOk<volScalarField>())
forAll(p.boundaryField(), patchi)
{
PhiPtr.reset(new volScalarField(io, mesh));
}
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)
if (p.boundaryField()[patchi].fixesValue())
{
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;
scalar PhiRefValue = 0;

View File

@ -28,7 +28,9 @@ Group
grpBasicSolvers
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
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
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,17 +87,16 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
pimpleControl pimple(mesh);
#include "createControl.H"
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
@ -113,7 +112,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "createTimeControls.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,7 +98,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "createTimeControls.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
@ -131,11 +131,11 @@ int main(int argc, char *argv[])
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,
dimensionedScalar("zero", Nv.dimensions(), 0.0)
);
N.internalField() = Nv.internalField()*Cw;
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
volSymmTensorField ns
(
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
Zero
)
);
ns.internalField() = nsv.internalField()*Cw;
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;
volScalarField n(max(N - (Uhat & ns & Uhat), scalar(1e-4)));
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();
const scalarField Cw = pow(Su_.mesh().V(), 2.0/3.0);
scalarField N(Nv.internalField()*Cw);
scalarField N(Nv.primitiveField()*Cw);
forAll(N, celli)
{

View File

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

View File

@ -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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,8 +36,8 @@ Description
{
scalarField sumPhi
(
fvc::surfaceSum(mag(phiSt))().internalField()
/ rho.internalField()
fvc::surfaceSum(mag(phiSt))().primitiveField()
/ rho.primitiveField()
);
StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
if (subGridSchelkin_)
{
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
}
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));
if (subGridSchelkin_)
{
up.internalField() += calculateSchelkinEffect(uPrimeCoef_);
up.primitiveFieldRef() += calculateSchelkinEffect(uPrimeCoef_);
}
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)
{
scalarField& xieqp = xieq.boundaryField()[patchi];
scalarField& xieqp = xieqBf[patchi];
const scalarField& Kp = K.boundaryField()[patchi];
const scalarField& Map = Ma.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();
N.internalField() = Nv.internalField()*pow(mesh.V(), 2.0/3.0);
N.primitiveFieldRef() = Nv.primitiveField()*pow(mesh.V(), 2.0/3.0);
volSymmTensorField ns
(
@ -134,7 +134,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
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
(
@ -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));
// 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;
}

View File

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

View File

@ -23,7 +23,6 @@ volScalarField rho
);
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
@ -227,3 +226,5 @@ fields.add(b);
fields.add(thermo.he());
fields.add(thermo.heu());
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);
}
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& 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]);
}
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& Tup = Tu.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]);
}
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];
forAll(map, facei)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,16 +65,15 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
pimpleControl pimple(mesh);
#include "createControl.H"
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
@ -89,7 +88,7 @@ int main(int argc, char *argv[])
while (runTime.run())
{
#include "createTimeControls.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.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();
const volScalarField& psi = thermo.psi();
volScalarField& b = composition.Y("b");
Info<< "min(b) = " << min(b).value() << endl;
@ -139,3 +138,5 @@ if (composition.contains("ft"))
fields.add(b);
fields.add(thermo.he());
fields.add(thermo.heu());
#include "createMRF.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,12 +28,10 @@ Group
grpCombustionSolvers
Description
Solver for chemistry problems designed for use on single cell cases to
provide comparison against other chemistry solvers
Solver for chemistry problems, designed for use on single cell cases to
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();
#define CREATE_MESH createSingleCellMesh.H
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createSingleCellMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "readInitialConditions.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));
psiChemistryModel& chemistry = pChemistry();
scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0];
psiReactionThermo& thermo = chemistry.thermo();
thermo.validate(args.executable(), "h");
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
volScalarField rho
(
IOobject
@ -48,8 +44,6 @@
thermo.rho()
);
volScalarField& p = thermo.p();
volScalarField Rspecific
(
IOobject

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,15 +45,16 @@ Description
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 "createEngineMesh.H"
pimpleControl pimple(mesh);
#include "createControl.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "createRhoUf.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)
);
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
),
"rho",
runTime.timeName(),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
volScalarField& p = thermo.p();
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
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,16 +68,17 @@ Description
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 "createEngineMesh.H"
pimpleControl pimple(mesh);
#include "createControl.H"
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"

View File

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

View File

@ -12,12 +12,11 @@ tmp<fv::convectionScheme<scalar>> mvConvection
radiation->correct();
combustion->correct();
dQ = combustion->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
if (i != inertIndex && composition.active(i))
{
volScalarField& Yi = Y[i];
@ -44,10 +43,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
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();
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;
volScalarField rho
@ -35,8 +42,6 @@ volScalarField rho
);
volScalarField& p = thermo.p();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
Info<< "\nReading field U\n" << endl;
volVectorField U
@ -54,6 +59,9 @@ volVectorField U
#include "compressibleCreatePhi.H"
#include "createMRF.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
@ -69,6 +77,60 @@ autoPtr<compressible::turbulenceModel> turbulence
// Set the turbulence into the combustion model
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
(
IOobject
@ -100,51 +162,7 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.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")
);
#include "createClouds.H"
#include "createSurfaceFilmModel.H"
#include "createPyrolysisModel.H"
#include "createRadiationModel.H"

View File

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

View File

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

View File

@ -4,7 +4,7 @@ volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
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
(
@ -25,9 +25,10 @@ while (pimple.correctNonOrthogonal())
{
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)
+ fvm::ddt(psi, p_rgh)
- fvm::laplacian(rhorAUf, p_rgh)
==
parcels.Srho()
@ -46,7 +47,7 @@ while (pimple.correctNonOrthogonal())
}
}
p = p_rgh + rho*gh;
p = p_rgh + rho*gh + pRef;
#include "rhoEqn.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();
dQ = reaction->dQ();
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
if (i != inertIndex && composition.active(i))
{
volScalarField& Yi = Y[i];
@ -42,10 +41,6 @@ tmp<fv::convectionScheme<scalar>> mvConvection
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
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();
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
(
@ -40,8 +47,6 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
@ -123,3 +128,5 @@ volScalarField dQ
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

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

View File

@ -1,4 +1,5 @@
EXE_INC = \
-I. \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/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();
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
(
@ -40,8 +47,6 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
@ -123,3 +128,5 @@ volScalarField dQ
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

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

View File

@ -1,4 +1,5 @@
EXE_INC = \
-I. \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/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();
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
(
@ -40,8 +47,6 @@ volVectorField U
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
@ -102,3 +107,5 @@ volScalarField dQ
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#include "createMRF.H"

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ Description
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();

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();
volScalarField& p = thermo.p();
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;
volVectorField U

View File

@ -29,7 +29,7 @@ Group
Description
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[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H"
turbulence->validate();
@ -188,11 +192,11 @@ int main(int argc, char *argv[])
// --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.dimensionedInternalField() =
rhoU.dimensionedInternalField()
/rho.dimensionedInternalField();
U.ref() =
rhoU()
/rho();
U.correctBoundaryConditions();
rhoU.boundaryField() == rho.boundaryField()*U.boundaryField();
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
if (!inviscid)
{
@ -226,7 +230,7 @@ int main(int argc, char *argv[])
e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions();
thermo.correct();
rhoE.boundaryField() ==
rhoE.boundaryFieldRef() ==
rho.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));
}
p.dimensionedInternalField() =
rho.dimensionedInternalField()
/psi.dimensionedInternalField();
p.ref() =
rho()
/psi();
p.correctBoundaryConditions();
rho.boundaryField() == psi.boundaryField()*p.boundaryField();
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
turbulence->correct();

View File

@ -29,7 +29,7 @@ Group
Description
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[])
{
#include "setRootCase.H"
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createTimeControls.H"
#include "createRDeltaT.H"
@ -181,11 +184,11 @@ int main(int argc, char *argv[])
// --- Solve momentum
solve(fvm::ddt(rhoU) + fvc::div(phiUp));
U.dimensionedInternalField() =
rhoU.dimensionedInternalField()
/rho.dimensionedInternalField();
U.ref() =
rhoU()
/rho();
U.correctBoundaryConditions();
rhoU.boundaryField() == rho.boundaryField()*U.boundaryField();
rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();
if (!inviscid)
{
@ -219,7 +222,7 @@ int main(int argc, char *argv[])
e = rhoE/rho - 0.5*magSqr(U);
e.correctBoundaryConditions();
thermo.correct();
rhoE.boundaryField() ==
rhoE.boundaryFieldRef() ==
rho.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));
}
p.dimensionedInternalField() =
rho.dimensionedInternalField()
/psi.dimensionedInternalField();
p.ref() =
rho()
/psi();
p.correctBoundaryConditions();
rho.boundaryField() == psi.boundaryField()*p.boundaryField();
rho.boundaryFieldRef() == psi.boundaryField()*p.boundaryField();
turbulence->correct();

View File

@ -11,10 +11,10 @@
);
// Set the reciprocal time-step from the local Courant number
rDeltaT.dimensionedInternalField() = max
rDeltaT.ref() = max
(
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
fvc::surfaceSum(amaxSf)().dimensionedInternalField()
fvc::surfaceSum(amaxSf)()()
/((2*maxCo)*mesh.V())
);
@ -24,6 +24,6 @@
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
<< gMin(1/rDeltaT.primitiveField())
<< ", " << 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");
volScalarField& p = thermo.p();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -90,3 +89,5 @@ volScalarField dpdt
Info<< "Creating field kinetic energy K\n" << endl;
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)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude
EXE_LIBS = \
-lcompressibleTransportModels \
@ -24,5 +23,4 @@ EXE_LIBS = \
-lfvOptions \
-ldynamicFvMesh \
-ltopoChangerFvMesh \
-ldynamicMesh \
-lmeshTools
-ldynamicMesh

View File

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

View File

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

View File

@ -26,11 +26,11 @@
volScalarField rDeltaT0("rDeltaT0", rDeltaT);
// Set the reciprocal time-step from the local Courant number
rDeltaT.dimensionedInternalField() = max
rDeltaT.ref() = max
(
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
fvc::surfaceSum(mag(phi))().dimensionedInternalField()
/((2*maxCo)*mesh.V()*rho.dimensionedInternalField())
fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho())
);
if (pimple.transonic())
@ -41,11 +41,11 @@
fvc::interpolate(psi)*fvc::flux(U)
);
rDeltaT.dimensionedInternalField() = max
rDeltaT.ref() = max
(
rDeltaT.dimensionedInternalField(),
fvc::surfaceSum(mag(phid))().dimensionedInternalField()
/((2*maxCo)*mesh.V()*psi.dimensionedInternalField())
rDeltaT(),
fvc::surfaceSum(mag(phid))()()
/((2*maxCo)*mesh.V()*psi())
);
}
@ -53,8 +53,8 @@
rDeltaT.correctBoundaryConditions();
Info<< "Flow time scale min/max = "
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
if (rDeltaTSmoothingCoeff < 1.0)
{
@ -62,8 +62,8 @@
}
Info<< "Smoothed flow time scale min/max = "
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
<< gMin(1/rDeltaT.primitiveField())
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
// Limit rate of change of time scale
// - reduce as much as required
@ -79,7 +79,7 @@
*max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff);
Info<< "Damped flow time scale min/max = "
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;
<< gMin(1/rDeltaT.primitiveField())
<< ", " << 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();
const volScalarField& psi = thermo.psi();
Info<< "Reading field U\n" << endl;
volVectorField U
@ -81,3 +80,5 @@ autoPtr<compressible::turbulenceModel> turbulence
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
#include "createMRF.H"

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,4 @@
EXE_INC = \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/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");
volScalarField& p = thermo.p();
volScalarField& e = thermo.he();
const volScalarField& psi = thermo.psi();
volScalarField rho
(
@ -54,3 +52,5 @@ autoPtr<compressible::turbulenceModel> turbulence
Info<< "Creating field kinetic energy K\n" << endl;
volScalarField K("K", 0.5*magSqr(U));
#include "createMRF.H"

View File

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

View File

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

View File

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

View File

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

View File

@ -40,14 +40,12 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
pimpleControl pimple(mesh);
#include "readThermodynamicProperties.H"
#include "readTransportProperties.H"
#include "createControl.H"
#include "createFields.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
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,8 +28,8 @@ Group
grpDiscreteMethodsSolvers
Description
Direct simulation Monte Carlo (DSMC) solver for 3D, transient, multi-
species flows
Direct simulation Monte Carlo (DSMC) solver for, transient, multi-species
flows.
\*---------------------------------------------------------------------------*/
@ -40,16 +40,16 @@ Description
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< nl << "Constructing dsmcCloud " << endl;
dsmcCloud dsmc("dsmc", mesh);
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())

View File

@ -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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ Group
grpDiscreteMethodsSolvers
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();
if (runTime.outputTime())
if (runTime.writeTime())
{
nAveragingSteps = 0;
}

View File

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

View File

@ -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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,41 +28,28 @@ Group
grpDiscreteMethodsSolvers
Description
Molecular dynamics solver for fluid dynamics
Molecular dynamics solver for fluid dynamics.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "md.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.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;
Info<< "\nStarting time loop\n" << endl;
@ -76,12 +63,11 @@ int main(int argc, char *argv[])
molecules.evolve();
#include "meanMomentumEnergyAndNMols.H"
#include "temperatureAndPressure.H"
runTime.write();
if (runTime.outputTime())
if (runTime.writeTime())
{
nAveragingSteps = 0;
}

View File

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

View File

@ -1,47 +1,49 @@
IOobject phiBHeader
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
IOobject phiBHeader
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ
);
surfaceScalarField* phiBPtr;
surfaceScalarField* phiBPtr = nullptr;
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(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux\n" << endl;
"phiB",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
}
else
{
Info<< "Calculating face flux ";
phiBPtr = new surfaceScalarField
phiBPtr = new surfaceScalarField
(
IOobject
(
IOobject
(
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
fvc::flux(B)
);
}
"phiB",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
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[])
{
#include "setRootCase.H"
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
pisoControl piso(mesh);
pisoControl bpiso(mesh, "BPISO");
#include "createControl.H"
#include "createFields.H"
#include "initContinuityErrs.H"

View File

@ -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-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,8 +40,10 @@ Description
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#define NO_CONTROL
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
@ -72,7 +74,7 @@ int main(int argc, char *argv[])
runTime.write();
if (runTime.outputTime())
if (runTime.writeTime())
{
writeCellGraph(V, runTime.graphFormat());
writeCellGraph(delta, runTime.graphFormat());

View File

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

View File

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

View File

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

View File

@ -28,7 +28,7 @@ Group
grpHeatTransferSolvers
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:
\f[
@ -59,15 +59,13 @@ Description
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
simpleControl simple(mesh);
#include "createControl.H"
#include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"

View File

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

View File

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

View File

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