buoyantBoussinesq[SP]impleFoam: replaced by the more general buoyant[SP]impleFoam solvers

With the selection of the Boussinesq equation of state the general buoyancy
solvers buoyantSimpleFoam and buoyantPimpleFoam can be used instead of the
specialised Boussinesq solvers avoiding the need for special implementation of
thermal and pressure boundary conditions and providing support for radiation and
fvOptions which would not have been feasible or practical in the Boussinesq
solvers.

Other incompressible equations of state are also supported; for most gaseous
problems the incompressiblePerfectGas equation of state is likely to be more
accurate than the Boussinesq equation of state.

The buoyantBoussinesq[SP]impleFoam tutorials have been updated and moved to the
corresponding buoyant[SP]impleFoam directories.
This commit is contained in:
Henry Weller
2019-03-26 21:42:14 +00:00
parent 12c4abe3ba
commit 9bf34679bd
107 changed files with 458 additions and 1083 deletions

View File

@ -1,3 +0,0 @@
buoyantBoussinesqPimpleFoam.C
EXE = $(FOAM_APPBIN)/buoyantBoussinesqPimpleFoam

View File

@ -1,21 +0,0 @@
EXE_INC = \
-I. \
-I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lradiationModels \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools

View File

@ -1,28 +0,0 @@
{
alphat = turbulence->nut()/Prt;
alphat.correctBoundaryConditions();
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr + alphat);
fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
==
radiation->ST(rhoCpRef, T)
+ fvOptions(T)
);
TEqn.relax();
fvOptions.constrain(TEqn);
TEqn.solve();
radiation->correct();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef);
}

View File

@ -1,34 +0,0 @@
// Solve the momentum equation
MRF.correctBoundaryVelocity(U);
fvVectorMatrix UEqn
(
fvm::ddt(U) + fvm::div(phi, U)
+ MRF.DDt(U)
+ turbulence->divDevReff(U)
==
fvOptions(U)
);
UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
- ghf*fvc::snGrad(rhok)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
);
fvOptions.correct(U);
}

View File

@ -1,119 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
buoyantBoussinesqPimpleFoam
Description
Transient solver for buoyant, turbulent flow of incompressible fluids.
Uses the Boussinesq approximation:
\f[
rho_{k} = 1 - beta(T - T_{ref})
\f]
where:
\f$ rho_{k} \f$ = the effective (driving) kinematic density
beta = thermal expansion coefficient [1/K]
T = temperature [K]
\f$ T_{ref} \f$ = reference temperature [K]
Valid when:
\f[
\frac{beta(T - T_{ref})}{rho_{ref}} << 1
\f]
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "noRadiation.H"
#include "fvOptions.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "createTimeControls.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UEqn.H"
#include "TEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,126 +0,0 @@
Info<< "Reading thermophysical properties\n" << endl;
Info<< "Reading field T\n" << endl;
volScalarField T
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
#include "readTransportProperties.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
// Kinematic density for buoyancy force
volScalarField rhok
(
IOobject
(
"rhok",
runTime.timeName(),
mesh
),
1.0 - beta*(T - TRef)
);
// kinematic turbulent thermal thermal conductivity m2/s
Info<< "Reading field alphat\n" << endl;
volScalarField alphat
(
IOobject
(
"alphat",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rhok*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
pimple.dict(),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createIncompressibleRadiationModel.H"
#include "createFvOptions.H"

View File

@ -1,62 +0,0 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(HbyA)
+ MRF.zeroFilter(rAUf*fvc::ddtCorr(U, phi))
+ phig
);
MRF.makeRelative(phiHbyA);
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
);
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve();
if (pimple.finalNonOrthogonalIter())
{
// Calculate the conservative fluxes
phi = phiHbyA - p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector
p_rgh.relax();
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}
#include "continuityErrs.H"
p = p_rgh + rhok*gh;
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rhok*gh;
}
}

View File

@ -1,3 +0,0 @@
buoyantBoussinesqSimpleFoam.C
EXE = $(FOAM_APPBIN)/buoyantBoussinesqSimpleFoam

View File

@ -1,19 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/radiationModels/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lradiationModels \
-lfiniteVolume \
-lsampling \
-lmeshTools \
-lfvOptions

View File

@ -1,27 +0,0 @@
{
alphat = turbulence->nut()/Prt;
alphat.correctBoundaryConditions();
volScalarField alphaEff("alphaEff", turbulence->nu()/Pr + alphat);
fvScalarMatrix TEqn
(
fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
==
radiation->ST(rhoCpRef, T)
+ fvOptions(T)
);
TEqn.relax();
fvOptions.constrain(TEqn);
TEqn.solve();
radiation->correct();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef);
}

View File

@ -1,35 +0,0 @@
// Solve the momentum equation
MRF.correctBoundaryVelocity(U);
tmp<fvVectorMatrix> tUEqn
(
fvm::div(phi, U)
+ MRF.DDt(U)
+ turbulence->divDevReff(U)
==
fvOptions(U)
);
fvVectorMatrix& UEqn = tUEqn.ref();
UEqn.relax();
fvOptions.constrain(UEqn);
if (simple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
- ghf*fvc::snGrad(rhok)
- fvc::snGrad(p_rgh)
)*mesh.magSf()
)
);
fvOptions.correct(U);
}

View File

@ -1,101 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
buoyantBoussinesqSimpleFoam
Description
Steady-state solver for buoyant, turbulent flow of incompressible fluids.
Uses the Boussinesq approximation:
\f[
rho_{k} = 1 - beta(T - T_{ref})
\f]
where:
\f$ rho_{k} \f$ = the effective (driving) density
beta = thermal expansion coefficient [1/K]
T = temperature [K]
\f$ T_{ref} \f$ = reference temperature [K]
Valid when:
\f[
\frac{beta(T - T_{ref})}{rho_{ref}} << 1
\f]
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "noRadiation.H"
#include "fvOptions.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCaseLists.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (simple.loop(runTime))
{
Info<< "Time = " << runTime.timeName() << nl << endl;
// Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"
#include "TEqn.H"
#include "pEqn.H"
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,126 +0,0 @@
Info<< "Reading thermophysical properties\n" << endl;
Info<< "Reading field T\n" << endl;
volScalarField T
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "createPhi.H"
#include "readTransportProperties.H"
Info<< "Creating turbulence model\n" << endl;
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
// Kinematic density for buoyancy force
volScalarField rhok
(
IOobject
(
"rhok",
runTime.timeName(),
mesh
),
1.0 - beta*(T - TRef)
);
// kinematic turbulent thermal thermal conductivity m2/s
Info<< "Reading field alphat\n" << endl;
volScalarField alphat
(
IOobject
(
"alphat",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rhok*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
simple.dict(),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
mesh.setFluxRequired(p_rgh.name());
#include "createMRF.H"
#include "createIncompressibleRadiationModel.H"
#include "createFvOptions.H"

View File

@ -1,66 +0,0 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUf("rAUf", fvc::interpolate(rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
tUEqn.clear();
surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(HbyA)
);
MRF.makeRelative(phiHbyA);
adjustPhi(phiHbyA, U, p_rgh);
phiHbyA += phig;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
while (simple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
fvm::laplacian(rAUf, p_rgh) == fvc::div(phiHbyA)
);
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve();
if (simple.finalNonOrthogonalIter())
{
// Calculate the conservative fluxes
phi = phiHbyA - p_rghEqn.flux();
// Explicitly relax pressure for momentum corrector
p_rgh.relax();
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}
#include "continuityErrs.H"
p = p_rgh + rhok*gh;
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rhok*gh;
}
}

View File

@ -1,18 +0,0 @@
singlePhaseTransportModel laminarTransport(U, phi);
// Thermal expansion coefficient [1/K]
dimensionedScalar beta
(
"beta",
dimless/dimTemperature,
laminarTransport
);
// Reference temperature [K]
dimensionedScalar TRef("TRef", dimTemperature, laminarTransport);
// Laminar Prandtl number
dimensionedScalar Pr("Pr", dimless, laminarTransport);
// Turbulent Prandtl number
dimensionedScalar Prt("Prt", dimless, laminarTransport);

39
bin/buoyantBoussinesqPimpleFoam Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# buoyantBoussinesqPimpleFoam
#
# Description
# Script to inform the user that the buoyantBoussinesqPimpleFoam solver
# has been replaced by the more general buoyantPimpleFoam which can be used
# with the Boussinesq equation of state.
#
#------------------------------------------------------------------------------
echo "The buoyantBoussinesqPimpleFoam solver has been replaced"
echo "by the more general buoyantPimpleFoam solver"
echo "which can be used with the Boussinesq equation of state."
#------------------------------------------------------------------------------

39
bin/buoyantBoussinesqSimpleFoam Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# buoyantBoussinesqSimpleFoam
#
# Description
# Script to inform the user that the buoyantBoussinesqSimpleFoam solver
# has been replaced by the more general buoyantSimpleFoam which can be used
# with the Boussinesq equation of state.
#
#------------------------------------------------------------------------------
echo "The buoyantBoussinesqSimpleFoam solver has been replaced"
echo "by the more general buoyantSimpleFoam solver"
echo "which can used be with the Boussinesq equation of state."
#------------------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org # \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -23,10 +23,11 @@
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
# #
# Script # Script
# supersededByPostProcess # mergedDyM
# #
# Description # Description
# Script to suggest using the new "postProcess" utility. # Script to inform the user that the "DyM" solvers have been merged into
# the corresponding standard solvers.
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
DyMsolver=${0##*/} DyMsolver=${0##*/}

View File

@ -2,7 +2,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org # \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# License # License
@ -272,56 +272,6 @@ _boxTurb_ ()
} }
complete -o filenames -o nospace -F _boxTurb_ boxTurb complete -o filenames -o nospace -F _boxTurb_ boxTurb
_buoyantBoussinesqPimpleFoam_ ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local line=${COMP_LINE}
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
opts="-case -doc -fileHandler -help -hostRoots -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
for o in $used ; do opts="${opts/$o/}" ; done
extra=""
[ "$COMP_CWORD" = 1 ] || \
case "$prev" in
-case)
opts="" ; extra="-d" ;;
-fileHandler)
opts="uncollated collated masterUncollated" ; extra="" ;;
-hostRoots|-roots)
opts="" ; extra="" ;;
*) ;;
esac
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
}
complete -o filenames -o nospace -F _buoyantBoussinesqPimpleFoam_ buoyantBoussinesqPimpleFoam
_buoyantBoussinesqSimpleFoam_ ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local line=${COMP_LINE}
local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ")
opts="-case -doc -fileHandler -help -hostRoots -listFunctionObjects -listFvOptions -listRegisteredSwitches -listScalarBCs -listSwitches -listTurbulenceModels -listUnsetSwitches -listVectorBCs -noFunctionObjects -parallel -postProcess -roots -srcDoc"
for o in $used ; do opts="${opts/$o/}" ; done
extra=""
[ "$COMP_CWORD" = 1 ] || \
case "$prev" in
-case)
opts="" ; extra="-d" ;;
-fileHandler)
opts="uncollated collated masterUncollated" ; extra="" ;;
-hostRoots|-roots)
opts="" ; extra="" ;;
*) ;;
esac
COMPREPLY=( $(compgen -W "${opts}" $extra -- ${cur}) )
}
complete -o filenames -o nospace -F _buoyantBoussinesqSimpleFoam_ buoyantBoussinesqSimpleFoam
_buoyantPimpleFoam_ () _buoyantPimpleFoam_ ()
{ {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -22,7 +22,7 @@ boundaryField
{ {
wall wall
{ {
type alphatJayatillekeWallFunction; type compressible::alphatJayatillekeWallFunction;
Prt 0.85; Prt 0.85;
value $internalField; value $internalField;
} }

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;

View File

@ -1,7 +1,7 @@
Overview Overview
======= =======
+ This is a template case for a closed volume + This is a template case for a closed volume
+ Setup to run buoyantBoussinesqSimpleFoam + Setup to run buoyantSimpleFoam
+ The case is designed to be meshed with snappyHexMesh + The case is designed to be meshed with snappyHexMesh
+ snappyHexMesh is setup to use a single trisurface file named CAD.obj + snappyHexMesh is setup to use a single trisurface file named CAD.obj
+ Copy the CAD.obj file to the constant/triSurface directory + Copy the CAD.obj file to the constant/triSurface directory

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo eConst;
equationOfState Boussinesq;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 28.9;
}
equationOfState
{
rho0 1;
T0 300;
beta 3e-03;
}
thermodynamics
{
Cv 712;
Hf 0;
}
transport
{
mu 1e-05;
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
// Laminar viscosity
nu [0 2 -1 0 0 0 0] 1e-05;
// Thermal expansion coefficient
beta [0 0 0 -1 0 0 0] 3e-03;
// Reference temperature
TRef [0 0 0 1 0 0 0] 300;
// Laminar Prandtl number
Pr [0 0 0 0 0 0 0] 0.9;
// Turbulent Prandtl number
Prt [0 0 0 0 0 0 0] 0.7;
// ************************************************************************* //

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application buoyantBoussinesqSimpleFoam; application buoyantSimpleFoam;
startFrom latestTime; startFrom latestTime;

View File

@ -43,7 +43,9 @@ divSchemes
div(phi,omega) $turbulence; div(phi,omega) $turbulence;
div(phi,epsilon) $turbulence; div(phi,epsilon) $turbulence;
div(phi,T) $turbulence; div(phi,e) $turbulence;
div(phi,Ekp) bounded Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear; div((nuEff*dev2(T(grad(U))))) Gauss linear;
} }

View File

@ -24,7 +24,7 @@ solvers
relTol 0.1; relTol 0.1;
} }
"(U|T|k|omega|epsilon)" "(U|e|k|omega|epsilon)"
{ {
solver smoothSolver; solver smoothSolver;
smoother symGaussSeidel; smoother symGaussSeidel;
@ -38,7 +38,7 @@ solvers
relTol 0; relTol 0;
} }
"(U|k|omega|epsilon)Final" "(U|e|k|omega|epsilon)Final"
{ {
$U; $U;
relTol 0; relTol 0;
@ -60,7 +60,7 @@ SIMPLE
{ {
p 1e-4; p 1e-4;
U 1e-4; U 1e-4;
T 1e-4; e 1e-4;
"(k|omega|epsilon)" 1e-4; "(k|omega|epsilon)" 1e-4;
} }
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
@ -83,7 +83,7 @@ relaxationFactors
equations equations
{ {
U 0.3; U 0.3;
T 0.5; e 0.5;
"(k|omega|epsilon)" 0.7; "(k|omega|epsilon)" 0.7;
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -410,6 +410,18 @@ makeThermos
specie specie
); );
makeThermos
(
rhoThermo,
heRhoThermo,
pureMixture,
constTransport,
sensibleInternalEnergy,
eConstThermo,
Boussinesq,
specie
);
makeThermos makeThermos
( (
rhoThermo, rhoThermo,

View File

@ -1,35 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
// Laminar viscosity
nu [0 2 -1 0 0 0 0] 1e-05;
// Thermal expansion coefficient
beta [0 0 0 -1 0 0 0] 3e-03;
// Reference temperature
TRef [0 0 0 1 0 0 0] 300;
// Laminar Prandtl number
Pr [0 0 0 0 0 0 0] 0.7;
// Turbulent Prandtl number
Prt [0 0 0 0 0 0 0] 0.85;
// ************************************************************************* //

View File

@ -1,9 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
#------------------------------------------------------------------------------

View File

@ -1,35 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
// Laminar viscosity
nu [0 2 -1 0 0 0 0] 1e-05;
// Thermal expansion coefficient
beta [0 0 0 -1 0 0 0] 3e-03;
// Reference temperature
TRef [0 0 0 1 0 0 0] 300;
// Laminar Prandtl number
Pr [0 0 0 0 0 0 0] 0.7;
// Turbulent Prandtl number
Prt [0 0 0 0 0 0 0] 0.85;
// ************************************************************************* //

View File

@ -1,35 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
// Laminar viscosity
nu [0 2 -1 0 0 0 0] 1e-05;
// Thermal expansion coefficient
beta [0 0 0 -1 0 0 0] 3e-03;
// Reference temperature
TRef [0 0 0 1 0 0 0] 300;
// Laminar Prandtl number
Pr [0 0 0 0 0 0 0] 0.7;
// Turbulent Prandtl number
Prt [0 0 0 0 0 0 0] 0.85;
// ************************************************************************* //

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -22,7 +22,7 @@ boundaryField
{ {
wall wall
{ {
type alphatJayatillekeWallFunction; type compressible::alphatJayatillekeWallFunction;
Prt 0.85; Prt 0.85;
value $internalField; value $internalField;
} }

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -23,7 +23,6 @@ boundaryField
wall wall
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value $internalField; value $internalField;
} }

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo eConst;
equationOfState Boussinesq;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 18;
}
equationOfState
{
rho0 1;
T0 300;
beta 1e-03;
}
thermodynamics
{
Cv 712;
Hf 0;
}
transport
{
mu 1e-03;
Pr 1;
}
}
// ************************************************************************* //

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application buoyantBoussinesqPimpleFoam; application buoyantPimpleFoam;
startFrom latestTime; startFrom latestTime;

View File

@ -30,13 +30,16 @@ divSchemes
default none; default none;
div(phi,U) Gauss linearUpwind grad(U); div(phi,U) Gauss linearUpwind grad(U);
div(phi,T) Gauss limitedLinear 1; div(phi,e) Gauss limitedLinear 1;
turbulence Gauss limitedLinear 1; turbulence Gauss limitedLinear 1;
div(phi,k) $turbulence; div(phi,k) $turbulence;
div(phi,epsilon) $turbulence; div(phi,epsilon) $turbulence;
div((nuEff*dev2(T(grad(U))))) Gauss linear; div(phiv,p) Gauss linear;
div(phi,K) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
} }
laplacianSchemes laplacianSchemes

View File

@ -17,6 +17,11 @@ FoamFile
solvers solvers
{ {
"rho.*"
{
solver diagonal;
}
p_rgh p_rgh
{ {
solver GAMG; solver GAMG;
@ -31,7 +36,7 @@ solvers
relTol 0; relTol 0;
} }
"(U|T|k|epsilon)" "(U|e|k|epsilon)"
{ {
solver PBiCGStab; solver PBiCGStab;
preconditioner DILU; preconditioner DILU;
@ -39,9 +44,9 @@ solvers
relTol 0.01; relTol 0.01;
} }
"(U|T|k|epsilon)Final" "(U|e|k|epsilon)Final"
{ {
$T; $U;
relTol 0; relTol 0;
} }
@ -52,6 +57,7 @@ PIMPLE
momentumPredictor no; momentumPredictor no;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
nCorrectors 2; nCorrectors 2;
pRefCell 0; pRefCell 0;
pRefValue 0; pRefValue 0;
} }

View File

@ -1,9 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
#------------------------------------------------------------------------------

View File

@ -25,11 +25,13 @@ boundaryField
type fixedValue; type fixedValue;
value uniform 300; value uniform 300;
} }
ceiling ceiling
{ {
type fixedValue; type fixedValue;
value uniform 300; value uniform 300;
} }
fixedWalls fixedWalls
{ {
type zeroGradient; type zeroGradient;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -23,20 +23,17 @@ boundaryField
{ {
floor floor
{ {
type alphatJayatillekeWallFunction; type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0; value uniform 0;
} }
ceiling ceiling
{ {
type alphatJayatillekeWallFunction; type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0; value uniform 0;
} }
fixedWalls fixedWalls
{ {
type alphatJayatillekeWallFunction; type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0; value uniform 0;
} }
} }

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -23,21 +23,18 @@ boundaryField
floor floor
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
ceiling ceiling
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
fixedWalls fixedWalls
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
} }

View File

@ -4,6 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=$(getApplication) application=$(getApplication)
runApplication blockMesh runApplication blockMesh

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo eConst;
equationOfState Boussinesq;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 28.9;
}
equationOfState
{
rho0 1;
T0 300;
beta 3e-03;
}
thermodynamics
{
Cv 712;
Hf 0;
}
transport
{
mu 1e-05;
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS; simulationType RAS;
RAS RAS
{ {

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application buoyantBoussinesqPimpleFoam; application buoyantPimpleFoam;
startFrom startTime; startFrom startTime;
@ -29,7 +29,7 @@ deltaT 2;
writeControl timeStep; writeControl timeStep;
writeInterval 200; writeInterval 100;
purgeWrite 0; purgeWrite 0;

View File

@ -30,17 +30,20 @@ divSchemes
default none; default none;
div(phi,U) Gauss upwind; div(phi,U) Gauss upwind;
div(phi,T) Gauss upwind; div(phi,e) Gauss upwind;
div(phi,k) Gauss upwind; div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind; div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear; div(phiv,p) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear; div(phi,K) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
} }
laplacianSchemes laplacianSchemes
{ {
default Gauss linear uncorrected; default Gauss linear corrected;
} }
interpolationSchemes interpolationSchemes
@ -50,7 +53,7 @@ interpolationSchemes
snGradSchemes snGradSchemes
{ {
default uncorrected; default corrected;
} }

View File

@ -17,6 +17,11 @@ FoamFile
solvers solvers
{ {
"rho.*"
{
solver diagonal;
}
p_rgh p_rgh
{ {
solver PCG; solver PCG;
@ -31,7 +36,7 @@ solvers
relTol 0; relTol 0;
} }
"(U|T|k|epsilon|R)" "(U|e|k|epsilon)"
{ {
solver PBiCGStab; solver PBiCGStab;
preconditioner DILU; preconditioner DILU;
@ -39,7 +44,7 @@ solvers
relTol 0.1; relTol 0.1;
} }
"(U|T|k|epsilon|R)Final" "(U|e|k|epsilon)Final"
{ {
$U; $U;
relTol 0; relTol 0;
@ -48,21 +53,14 @@ solvers
PIMPLE PIMPLE
{ {
momentumPredictor no; momentumPredictor yes;
nOuterCorrectors 1; nOuterCorrectors 1;
nCorrectors 2; nCorrectors 2;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
pRefCell 0; pRefCell 0;
pRefValue 0; pRefValue 0;
} }
relaxationFactors
{
equations
{
"(U|T|k|epsilon|R)" 1;
"(U|T|k|epsilon|R)Final" 1;
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -23,19 +23,19 @@ boundaryField
{ {
floor floor
{ {
type alphatJayatillekeWallFunction; type compressible::alphatJayatillekeWallFunction;
Prt 0.85; Prt 0.85;
value uniform 0; value uniform 0;
} }
ceiling ceiling
{ {
type alphatJayatillekeWallFunction; type compressible::alphatJayatillekeWallFunction;
Prt 0.85; Prt 0.85;
value uniform 0; value uniform 0;
} }
fixedWalls fixedWalls
{ {
type alphatJayatillekeWallFunction; type compressible::alphatJayatillekeWallFunction;
Prt 0.85; Prt 0.85;
value uniform 0; value uniform 0;
} }

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -23,21 +23,18 @@ boundaryField
floor floor
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
ceiling ceiling
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
fixedWalls fixedWalls
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
} }

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo eConst;
equationOfState Boussinesq;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 28.9;
}
equationOfState
{
rho0 1;
T0 300;
beta 3e-03;
}
thermodynamics
{
Cv 712;
Hf 0;
}
transport
{
mu 1e-05;
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -15,9 +15,9 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application buoyantBoussinesqSimpleFoam; application buoyantSimpleFoam;
startFrom latestTime; startFrom startTime;
startTime 0; startTime 0;

View File

@ -30,10 +30,13 @@ divSchemes
default none; default none;
div(phi,U) bounded Gauss upwind; div(phi,U) bounded Gauss upwind;
div(phi,T) bounded Gauss upwind; div(phi,e) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind; div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
div(phi,Ekp) bounded Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
} }
laplacianSchemes laplacianSchemes

View File

@ -25,7 +25,7 @@ solvers
relTol 0.01; relTol 0.01;
} }
"(U|T|k|epsilon|R)" "(U|e|k|epsilon)"
{ {
solver PBiCGStab; solver PBiCGStab;
preconditioner DILU; preconditioner DILU;
@ -37,6 +37,7 @@ solvers
SIMPLE SIMPLE
{ {
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
pRefCell 0; pRefCell 0;
pRefValue 0; pRefValue 0;
@ -44,7 +45,7 @@ SIMPLE
{ {
p_rgh 1e-2; p_rgh 1e-2;
U 1e-4; U 1e-4;
T 1e-2; e 1e-2;
// possibly check turbulence fields // possibly check turbulence fields
"(k|epsilon|omega)" 1e-3; "(k|epsilon|omega)" 1e-3;
@ -60,7 +61,7 @@ relaxationFactors
equations equations
{ {
U 0.3; U 0.3;
T 0.5; e 0.5;
"(k|epsilon|R)" 0.7; "(k|epsilon|R)" 0.7;
} }
} }

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -26,7 +26,7 @@ boundaryField
wall wall
{ {
type alphatJayatillekeWallFunction; type compressible::alphatJayatillekeWallFunction;
Prt 0.85; Prt 0.85;
value uniform 0; value uniform 0;
} }

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;

View File

@ -14,7 +14,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0]; dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0; internalField uniform 0;
@ -26,7 +26,6 @@ boundaryField
wall wall
{ {
type fixedFluxPressure; type fixedFluxPressure;
rho rhok;
value uniform 0; value uniform 0;
} }
} }

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo eConst;
equationOfState Boussinesq;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 28.9;
}
equationOfState
{
rho0 1;
T0 300;
beta 3e-03;
}
thermodynamics
{
Cv 712;
Hf 0;
}
transport
{
mu 1e-05;
Pr 0.7;
}
}
// ************************************************************************* //

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