mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: solver and tutorial using baffles
This commit is contained in:
@ -0,0 +1,3 @@
|
|||||||
|
buoyantBaffleSimpleFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/buoyantBaffleSimpleFoam
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels \
|
||||||
|
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/thermoBaffleModels/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lmeshTools \
|
||||||
|
-lbasicThermophysicalModels \
|
||||||
|
-lspecie \
|
||||||
|
-lcompressibleTurbulenceModel \
|
||||||
|
-lcompressibleRASModels \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lmeshTools \
|
||||||
|
-lthermoBaffleModels
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
// Solve the Momentum equation
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> UEqn
|
||||||
|
(
|
||||||
|
fvm::div(phi, U)
|
||||||
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
);
|
||||||
|
|
||||||
|
UEqn().relax();
|
||||||
|
|
||||||
|
if (simple.momentumPredictor())
|
||||||
|
{
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
UEqn()
|
||||||
|
==
|
||||||
|
fvc::reconstruct
|
||||||
|
(
|
||||||
|
(
|
||||||
|
- ghf*fvc::snGrad(rho)
|
||||||
|
- fvc::snGrad(p_rgh)
|
||||||
|
)*mesh.magSf()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||||
|
\\/ 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
|
||||||
|
buoyantBaffleSimpleFoam
|
||||||
|
|
||||||
|
Description
|
||||||
|
Steady-state solver for buoyant, turbulent flow of compressible fluids
|
||||||
|
using thermal baffles
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "basicPsiThermo.H"
|
||||||
|
#include "RASModel.H"
|
||||||
|
#include "fixedGradientFvPatchFields.H"
|
||||||
|
#include "simpleControl.H"
|
||||||
|
#include "thermoBaffleModel.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createMesh.H"
|
||||||
|
#include "readGravitationalAcceleration.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
|
simpleControl simple(mesh);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
while (simple.loop())
|
||||||
|
{
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
p_rgh.storePrevIter();
|
||||||
|
rho.storePrevIter();
|
||||||
|
|
||||||
|
// Pressure-velocity SIMPLE corrector
|
||||||
|
{
|
||||||
|
#include "UEqn.H"
|
||||||
|
#include "hEqn.H"
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
turbulence->correct();
|
||||||
|
|
||||||
|
runTime.write();
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
|
autoPtr<basicPsiThermo> pThermo
|
||||||
|
(
|
||||||
|
basicPsiThermo::New(mesh)
|
||||||
|
);
|
||||||
|
basicPsiThermo& thermo = pThermo();
|
||||||
|
|
||||||
|
volScalarField rho
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"rho",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
thermo.rho()
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField& p = thermo.p();
|
||||||
|
volScalarField& h = thermo.h();
|
||||||
|
const volScalarField& psi = thermo.psi();
|
||||||
|
|
||||||
|
Info<< "Reading 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::RASModel> turbulence
|
||||||
|
(
|
||||||
|
compressible::RASModel::New
|
||||||
|
(
|
||||||
|
rho,
|
||||||
|
U,
|
||||||
|
phi,
|
||||||
|
thermo
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Info<< "Calculating field g.h\n" << endl;
|
||||||
|
volScalarField gh("gh", g & mesh.C());
|
||||||
|
surfaceScalarField ghf("ghf", g & mesh.Cf());
|
||||||
|
|
||||||
|
Info<< "Reading field p_rgh\n" << endl;
|
||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
label pRefCell = 0;
|
||||||
|
scalar pRefValue = 0.0;
|
||||||
|
setRefCell
|
||||||
|
(
|
||||||
|
p,
|
||||||
|
p_rgh,
|
||||||
|
mesh.solutionDict().subDict("SIMPLE"),
|
||||||
|
pRefCell,
|
||||||
|
pRefValue
|
||||||
|
);
|
||||||
|
|
||||||
|
autoPtr<regionModels::thermoBaffleModels::thermoBaffleModel> baffles
|
||||||
|
(
|
||||||
|
regionModels::thermoBaffleModels::thermoBaffleModel::New(mesh)
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||||
|
dimensionedScalar totalVolume = sum(mesh.V());
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
fvScalarMatrix hEqn
|
||||||
|
(
|
||||||
|
fvm::div(phi, h)
|
||||||
|
- fvm::Sp(fvc::div(phi), h)
|
||||||
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||||
|
==
|
||||||
|
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
|
||||||
|
- p*fvc::div(phi/fvc::interpolate(rho))
|
||||||
|
);
|
||||||
|
|
||||||
|
hEqn.relax();
|
||||||
|
hEqn.solve();
|
||||||
|
|
||||||
|
baffles->evolve();
|
||||||
|
thermo.correct();
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
rho = thermo.rho();
|
||||||
|
rho.relax();
|
||||||
|
|
||||||
|
volScalarField rAU(1.0/UEqn().A());
|
||||||
|
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
|
||||||
|
|
||||||
|
U = rAU*UEqn().H();
|
||||||
|
UEqn.clear();
|
||||||
|
|
||||||
|
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
|
||||||
|
bool closedVolume = adjustPhi(phi, U, p_rgh);
|
||||||
|
|
||||||
|
surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
|
||||||
|
phi -= buoyancyPhi;
|
||||||
|
|
||||||
|
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||||
|
{
|
||||||
|
fvScalarMatrix p_rghEqn
|
||||||
|
(
|
||||||
|
fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phi)
|
||||||
|
);
|
||||||
|
|
||||||
|
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
|
||||||
|
p_rghEqn.solve();
|
||||||
|
|
||||||
|
if (nonOrth == simple.nNonOrthCorr())
|
||||||
|
{
|
||||||
|
// Calculate the conservative fluxes
|
||||||
|
phi -= 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 -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf);
|
||||||
|
U.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "continuityErrs.H"
|
||||||
|
|
||||||
|
p = p_rgh + rho*gh;
|
||||||
|
|
||||||
|
// For closed-volume cases adjust the pressure level
|
||||||
|
// to obey overall mass continuity
|
||||||
|
if (closedVolume)
|
||||||
|
{
|
||||||
|
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||||
|
/fvc::domainIntegrate(psi);
|
||||||
|
p_rgh = p - rho*gh;
|
||||||
|
}
|
||||||
|
|
||||||
|
rho = thermo.rho();
|
||||||
|
rho.relax();
|
||||||
|
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 300;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform 300;
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volVectorField;
|
||||||
|
location "0";
|
||||||
|
object U;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 1 -1 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform ( 0.1 0 0 );
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform ( 0.1 0 0 );
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type inletOutlet;
|
||||||
|
inletValue uniform ( 0 0 0 );
|
||||||
|
value uniform ( 0 0 0 );
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object alphat;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -1 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object epsilon;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0.01;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object k;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0.1;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0.1;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object mut;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -1 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type mutkWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type mutkWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object p;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 101325;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 101325;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 101325;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 101325;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 101325;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class volScalarField;
|
||||||
|
location "0";
|
||||||
|
object p_rgh;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
gradient uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
gradient uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
gradient uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
gradient uniform 0;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
10
tutorials/heatTransfer/buoyantBaffleSimpleFoam/circuitBoardCooling/Allclean
Executable file
10
tutorials/heatTransfer/buoyantBaffleSimpleFoam/circuitBoardCooling/Allclean
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf sets 0
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
27
tutorials/heatTransfer/buoyantBaffleSimpleFoam/circuitBoardCooling/Allrun
Executable file
27
tutorials/heatTransfer/buoyantBaffleSimpleFoam/circuitBoardCooling/Allrun
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||||
|
|
||||||
|
# Get application name
|
||||||
|
application=`getApplication`
|
||||||
|
|
||||||
|
cp -r 0.org 0
|
||||||
|
runApplication blockMesh
|
||||||
|
|
||||||
|
runApplication setSet -batch baffle.setSet
|
||||||
|
|
||||||
|
unset FOAM_SETNAN
|
||||||
|
unset FOAM_SIGFPE
|
||||||
|
|
||||||
|
# Add the patches for the baffles
|
||||||
|
runApplication changeDictionary -literalRE
|
||||||
|
rm log.changeDictionary
|
||||||
|
|
||||||
|
# Create first baffle
|
||||||
|
createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite > log.createBaffles 2>&1
|
||||||
|
# Create second baffle
|
||||||
|
createBaffles baffleFaces2 '(baffle2Wall_0 baffle2Wall_1)' -overwrite > log.createBaffles 2>&1
|
||||||
|
|
||||||
|
# Reset proper values at the baffles
|
||||||
|
runApplication changeDictionary
|
||||||
|
|
||||||
|
runApplication $application
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
# Create face set
|
||||||
|
faceSet baffleFaces new boxToFace (0.29 0 0) (0.31 0.18 2)
|
||||||
|
faceZoneSet baffleFaces new setToFaceZone baffleFaces
|
||||||
|
|
||||||
|
faceSet baffleFaces2 new boxToFace (0.59 0.0 0.0)(0.61 0.18 2.0)
|
||||||
|
faceZoneSet baffleFaces2 new setToFaceZone baffleFaces2
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object RASProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
RASModel kEpsilon;
|
||||||
|
|
||||||
|
turbulence on;
|
||||||
|
|
||||||
|
printCoeffs on;
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class uniformDimensionedVectorField;
|
||||||
|
location "constant";
|
||||||
|
object g;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 1 -2 0 0 0 0];
|
||||||
|
value ( 0 -9.81 0 );
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
convertToMeters 0.1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(0 0 0)
|
||||||
|
(10 0 0)
|
||||||
|
(10 5 0)
|
||||||
|
(0 5 0)
|
||||||
|
(0 0 10)
|
||||||
|
(10 0 10)
|
||||||
|
(10 5 10)
|
||||||
|
(0 5 10)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (40 20 1) simpleGrading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
edges
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 4 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(2 6 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 4 7 3)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(1 5 6 2)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
faces
|
||||||
|
(
|
||||||
|
(0 3 2 1)
|
||||||
|
(4 5 6 7)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
baffle1Wall_0
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle1Wall_1;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
faces ();
|
||||||
|
}
|
||||||
|
|
||||||
|
baffle1Wall_1
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle1Wall_0;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
faces ();
|
||||||
|
}
|
||||||
|
|
||||||
|
baffle2Wall_0
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle2Wall_1;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
faces ();
|
||||||
|
}
|
||||||
|
|
||||||
|
baffle2Wall_1
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle2Wall_0;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
faces ();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
mergePatchPairs
|
||||||
|
(
|
||||||
|
);
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class polyBoundaryMesh;
|
||||||
|
location "constant/polyMesh";
|
||||||
|
object boundary;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
9
|
||||||
|
(
|
||||||
|
floor
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 40;
|
||||||
|
startFace 1526;
|
||||||
|
}
|
||||||
|
ceiling
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
nFaces 40;
|
||||||
|
startFace 1566;
|
||||||
|
}
|
||||||
|
inlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 20;
|
||||||
|
startFace 1606;
|
||||||
|
}
|
||||||
|
outlet
|
||||||
|
{
|
||||||
|
type patch;
|
||||||
|
nFaces 20;
|
||||||
|
startFace 1626;
|
||||||
|
}
|
||||||
|
fixedWalls
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
nFaces 1600;
|
||||||
|
startFace 1646;
|
||||||
|
}
|
||||||
|
baffle1Wall_0
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
nFaces 7;
|
||||||
|
startFace 3246;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle1Wall_1;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
baffle1Wall_1
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
nFaces 7;
|
||||||
|
startFace 3253;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle1Wall_0;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
baffle2Wall_0
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
nFaces 7;
|
||||||
|
startFace 3260;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle2Wall_1;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
baffle2Wall_1
|
||||||
|
{
|
||||||
|
type directMappedWall;
|
||||||
|
nFaces 7;
|
||||||
|
startFace 3267;
|
||||||
|
sampleMode nearestPatchFace;
|
||||||
|
sampleRegion region0;
|
||||||
|
samplePatch baffle2Wall_0;
|
||||||
|
offsetMode uniform;
|
||||||
|
offset (0 0 0);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object thermoBaffleProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoBaffleModel none;
|
||||||
|
|
||||||
|
active no;
|
||||||
|
|
||||||
|
regionName none;
|
||||||
|
|
||||||
|
thermoBaffle2DCoeffs
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
noThermoCoeffs
|
||||||
|
{
|
||||||
|
}
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "constant";
|
||||||
|
object thermophysicalProperties;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||||
|
|
||||||
|
mixture
|
||||||
|
{
|
||||||
|
specie
|
||||||
|
{
|
||||||
|
nMoles 1;
|
||||||
|
molWeight 28.96;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Cp 1004.4;
|
||||||
|
Hf 0;
|
||||||
|
}
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
mu 1.831e-05;
|
||||||
|
Pr 0.705;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,131 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object changeDictionaryDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dictionaryReplacement
|
||||||
|
{
|
||||||
|
alphat
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type alphatWallFunction;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
epsilon
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type compressible::epsilonWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
k
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type compressible::kqRWallFunction;
|
||||||
|
value uniform 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mut
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type mutkWallFunction;
|
||||||
|
value uniform 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type calculated;
|
||||||
|
value uniform 101325;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type buoyantPressure;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
T
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type compressible::temperatureThermoBaffle1D<constSolidThermoPhysics>;
|
||||||
|
baffleActivated yes;
|
||||||
|
thickness uniform 0.005; // thickness [m]
|
||||||
|
Qs uniform 100; // heat flux [W/m2]
|
||||||
|
transport
|
||||||
|
{
|
||||||
|
K 1.0;
|
||||||
|
}
|
||||||
|
radiation
|
||||||
|
{
|
||||||
|
sigmaS 0;
|
||||||
|
kappa 0;
|
||||||
|
emissivity 0;
|
||||||
|
}
|
||||||
|
thermodynamics
|
||||||
|
{
|
||||||
|
Hf 0;
|
||||||
|
Cp 0;
|
||||||
|
}
|
||||||
|
density
|
||||||
|
{
|
||||||
|
rho 0;
|
||||||
|
}
|
||||||
|
value uniform 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
U
|
||||||
|
{
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
"baffle.*"
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform (0 0 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
application buoyantBaffleSimpleFoam;
|
||||||
|
|
||||||
|
startFrom latestTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 2500;
|
||||||
|
|
||||||
|
deltaT 1;
|
||||||
|
|
||||||
|
writeControl timeStep;
|
||||||
|
|
||||||
|
writeInterval 50;
|
||||||
|
|
||||||
|
purgeWrite 3;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default steadyState;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
div(phi,U) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,h) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,k) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,epsilon) Gauss limitedLinear 0.2;
|
||||||
|
div(phi,omega) Gauss limitedLinear 0.2;
|
||||||
|
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
laplacian(muEff,U) Gauss linear uncorrected;
|
||||||
|
laplacian((rho*(1|A(U))),p_rgh) Gauss linear uncorrected;
|
||||||
|
laplacian(alphaEff,h) Gauss linear uncorrected;
|
||||||
|
laplacian(DkEff,k) Gauss linear uncorrected;
|
||||||
|
laplacian(DepsilonEff,epsilon) Gauss linear uncorrected;
|
||||||
|
laplacian(DomegaEff,omega) Gauss linear uncorrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default uncorrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
fluxRequired
|
||||||
|
{
|
||||||
|
default no;
|
||||||
|
p_rgh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
p_rgh
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-7;
|
||||||
|
relTol 0.01;
|
||||||
|
|
||||||
|
smoother DICGaussSeidel;
|
||||||
|
|
||||||
|
cacheAgglomeration true;
|
||||||
|
nCellsInCoarsestLevel 10;
|
||||||
|
agglomerator faceAreaPair;
|
||||||
|
mergeLevels 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
"(U|h|k|epsilon|omega)"
|
||||||
|
{
|
||||||
|
solver PBiCG;
|
||||||
|
preconditioner DILU;
|
||||||
|
tolerance 1e-8;
|
||||||
|
relTol 0.1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE
|
||||||
|
{
|
||||||
|
momentumPredictor yes;
|
||||||
|
nNonOrthogonalCorrectors 0;
|
||||||
|
pRefCell 0;
|
||||||
|
pRefValue 0;
|
||||||
|
|
||||||
|
residualControl
|
||||||
|
{
|
||||||
|
p_rgh 1e-2;
|
||||||
|
U 1e-3;
|
||||||
|
h 1e-3;
|
||||||
|
|
||||||
|
// possibly check turbulence fields
|
||||||
|
"(k|epsilon|omega)" 1e-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
relaxationFactors
|
||||||
|
{
|
||||||
|
rho 1.0;
|
||||||
|
p_rgh 0.7;
|
||||||
|
U 0.3;
|
||||||
|
h 0.3;
|
||||||
|
"(k|epsilon|omega)" 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user