regionModels/thermalBaffle: Superseded by solvers::solid modular solver
which can be selected and executed in foamMultiRun for complex CHT cases. This is a much more general, flexible, extensible and maintainable structure than the now deprecated regionModels system and associated clutter.
This commit is contained in:
@ -1,5 +0,0 @@
|
||||
thermalBaffle/thermalBaffle.C
|
||||
|
||||
derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libthermalBaffle
|
||||
@ -1,26 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/radiationModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/solid/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/coupledThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/mesh/extrudeModel/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lregionModels \
|
||||
-lsolidThermo \
|
||||
-lmomentumTransportModels \
|
||||
-lsolidThermophysicalTransportModels \
|
||||
-lcoupledThermophysicalTransportModels \
|
||||
-lradiationModels \
|
||||
-ldynamicMesh \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
@ -1,410 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermalBaffleFvPatchScalarField.H"
|
||||
#include "mappedExtrudedWallPolyPatch.H"
|
||||
#include "symmetryPolyPatch.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * /
|
||||
|
||||
bool Foam::thermalBaffleFvPatchScalarField::primary() const
|
||||
{
|
||||
return patch().boundaryMesh().mesh().name() == polyMesh::defaultRegion;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::thermalBaffleFvPatchScalarField::owner() const
|
||||
{
|
||||
return
|
||||
primary()
|
||||
&& patch().index() < patch().boundaryMesh()[nbrPatch_].index();
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::checkPatches() const
|
||||
{
|
||||
if (!primary()) return;
|
||||
|
||||
const polyPatch& pp = patch().patch();
|
||||
const polyPatch& nbrPp = patch().patch().boundaryMesh()[nbrPatch_];
|
||||
|
||||
// The patches should be of mapped type
|
||||
auto checkPatchIsMapped = [&](const polyPatch& pp)
|
||||
{
|
||||
if (!isA<mappedPatchBase>(pp))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch field of type \"" << typeName
|
||||
<< "\" specified for patch \"" << pp.name() << "\" of field \""
|
||||
<< internalField().name() << "\", but this patch is not of "
|
||||
<< "type \"" << mappedPatchBase::typeName << "\""
|
||||
<< exit(FatalError);
|
||||
}
|
||||
};
|
||||
checkPatchIsMapped(pp);
|
||||
checkPatchIsMapped(nbrPp);
|
||||
|
||||
const mappedPatchBase& mpb = refCast<const mappedPatchBase>(pp);
|
||||
const mappedPatchBase& nbrMpb = refCast<const mappedPatchBase>(nbrPp);
|
||||
|
||||
// The patches should neighbour a different region
|
||||
auto checkPatchMapsDifferentRegion = [&](const mappedPatchBase& mpb)
|
||||
{
|
||||
if (mpb.sameRegion())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch field of type \"" << typeName
|
||||
<< "\" specified for patch \"" << pp.name() << "\" of field \""
|
||||
<< internalField().name() << "\", but this patch maps to "
|
||||
<< "another patch in the same region. It should map to a "
|
||||
<< "different region; i.e., that of the thermal baffle model."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
};
|
||||
checkPatchMapsDifferentRegion(mpb);
|
||||
checkPatchMapsDifferentRegion(nbrMpb);
|
||||
|
||||
// The neighbour region of this patch and it's neighbour should be the
|
||||
// same, i.e., that of the thermal baffle model
|
||||
if (mpb.nbrRegionName() != nbrMpb.nbrRegionName())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch fields of type \"" << typeName
|
||||
<< "\" specified for patches \"" << pp.name() << "\" and \""
|
||||
<< nbrPp.name() << "\" of field \"" << internalField().name()
|
||||
<< "\", but these patches map to different regions \""
|
||||
<< mpb.nbrRegionName() << "\" and \""
|
||||
<< nbrMpb.nbrRegionName() << ". They should map to the same "
|
||||
<< "region; i.e., that of the thermal baffle model."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// The neighbour patch of this patch and it's neighbour should be
|
||||
// different, i.e., they should map opposite ends of the thermal baffle
|
||||
// mesh
|
||||
if (mpb.nbrPatchName() == nbrMpb.nbrPatchName())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch fields of type \"" << typeName
|
||||
<< "\" specified for patches \"" << pp.name() << "\" and \""
|
||||
<< nbrPp.name() << "\" of field \"" << internalField().name()
|
||||
<< "\", but these patches map to the same patch; \""
|
||||
<< mpb.nbrPatchName() << "\" of region \""
|
||||
<< mpb.nbrRegionName() << ". They should map to different "
|
||||
<< "patches, as these will become the patches at opposite ends of "
|
||||
<< "the extruded baffle mesh." << exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::checkPatchFields() const
|
||||
{
|
||||
if (!primary()) return;
|
||||
|
||||
const fvPatch& fvp = patch();
|
||||
const fvPatch& nbrFvp = patch().boundaryMesh()[nbrPatch_];
|
||||
|
||||
const fvPatchScalarField& nbrTp =
|
||||
nbrFvp.lookupPatchField<volScalarField, scalar>(internalField().name());
|
||||
|
||||
// The neighbour patch field should be of the same type
|
||||
if (!isA<thermalBaffleFvPatchScalarField>(nbrTp))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch field of type \"" << typeName
|
||||
<< "\" specified for patch \"" << fvp.name() << "\" of field \""
|
||||
<< internalField().name() << "\" but the field on the "
|
||||
<< "neighbouring patch \"" << nbrFvp.name()
|
||||
<< "\" is of a different type. Both should be of type \""
|
||||
<< typeName << "\"."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// The neighbour patch field's neighbour should be this patch
|
||||
const thermalBaffleFvPatchScalarField& nbrTBp =
|
||||
refCast<const thermalBaffleFvPatchScalarField>(nbrTp);
|
||||
if (nbrTBp.nbrPatch_ != patch().name())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch field of type \"" << typeName
|
||||
<< "\" on patch \"" << fvp.name() << "\" of field \""
|
||||
<< internalField().name() << "\" is specified to neighbour "
|
||||
<< "patch \"" << nbrPatch_ << "\", but this patch does not "
|
||||
<< "reciprocally neighbour patch \"" << fvp.name() << "\""
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::extrudePatchMesh>
|
||||
Foam::thermalBaffleFvPatchScalarField::initBaffleMesh() const
|
||||
{
|
||||
if (!owner())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Baffle mesh is only available to the owner patch in the "
|
||||
<< "primary region" << exit(FatalError);
|
||||
}
|
||||
|
||||
checkPatches();
|
||||
|
||||
const fvMesh& mesh = patch().boundaryMesh().mesh();
|
||||
|
||||
const mappedPatchBase& mpb =
|
||||
refCast<const mappedPatchBase>(patch().patch());
|
||||
|
||||
const mappedPatchBase nbrMpb =
|
||||
refCast<const mappedPatchBase>
|
||||
(patch().patch().boundaryMesh()[nbrPatch_]);
|
||||
|
||||
const List<word> patchNames
|
||||
({
|
||||
mpb.nbrPatchName(),
|
||||
nbrMpb.nbrPatchName(),
|
||||
"sides"
|
||||
});
|
||||
|
||||
const List<word> patchTypes
|
||||
({
|
||||
mappedWallPolyPatch::typeName,
|
||||
mappedExtrudedWallPolyPatch::typeName,
|
||||
symmetryPolyPatch::typeName
|
||||
});
|
||||
|
||||
List<dictionary> patchDicts(3);
|
||||
forAll(patchDicts, patchi)
|
||||
{
|
||||
patchDicts[patchi].set("nFaces", 0);
|
||||
patchDicts[patchi].set("startFace", 0);
|
||||
}
|
||||
patchDicts[0].add("neighbourRegion", mesh.name());
|
||||
patchDicts[0].add("neighbourPatch", patch().name());
|
||||
patchDicts[1].add("neighbourRegion", mesh.name());
|
||||
patchDicts[1].add("neighbourPatch", nbrPatch_);
|
||||
patchDicts[1].add("bottomPatch", patchNames[0]);
|
||||
|
||||
List<polyPatch*> patchPtrs(3);
|
||||
forAll(patchPtrs, patchi)
|
||||
{
|
||||
patchPtrs[patchi] = polyPatch::New
|
||||
(
|
||||
patchTypes[patchi],
|
||||
patchNames[patchi],
|
||||
patchDicts[patchi],
|
||||
patchi,
|
||||
mesh.boundaryMesh()
|
||||
).ptr();
|
||||
}
|
||||
|
||||
dictionary dict(dict_);
|
||||
dict.add("columnCells", false);
|
||||
|
||||
return
|
||||
autoPtr<extrudePatchMesh>
|
||||
(
|
||||
new extrudePatchMesh
|
||||
(
|
||||
mesh,
|
||||
patch(),
|
||||
dict,
|
||||
mpb.nbrRegionName(),
|
||||
patchPtrs
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::regionModels::thermalBaffle>
|
||||
Foam::thermalBaffleFvPatchScalarField::initBaffle() const
|
||||
{
|
||||
if (!owner())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Baffle model is only available to the owner patch in the "
|
||||
<< "primary region" << exit(FatalError);
|
||||
}
|
||||
|
||||
checkPatches();
|
||||
|
||||
const fvMesh& mesh = patch().boundaryMesh().mesh();
|
||||
|
||||
const mappedPatchBase& mpb =
|
||||
refCast<const mappedPatchBase>(patch().patch());
|
||||
|
||||
dictionary dict(dict_);
|
||||
dict.add("regionName", mpb.nbrRegionName());
|
||||
|
||||
return autoPtr<regionModels::thermalBaffle>
|
||||
(
|
||||
new regionModels::thermalBaffle("thermalBaffle", mesh, dict)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
coupledTemperatureFvPatchScalarField(p, iF),
|
||||
dict_(dictionary::null),
|
||||
nbrPatch_(word::null),
|
||||
baffleMeshPtr_(),
|
||||
bafflePtr_()
|
||||
{}
|
||||
|
||||
|
||||
Foam::thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
coupledTemperatureFvPatchScalarField(p, iF, dict),
|
||||
dict_(dict),
|
||||
nbrPatch_(primary() ? dict.lookup<word>("neighbourPatch") : word::null),
|
||||
baffleMeshPtr_(owner() ? initBaffleMesh().ptr() : nullptr),
|
||||
bafflePtr_(owner() ? initBaffle().ptr() : nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermalBaffleFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
coupledTemperatureFvPatchScalarField
|
||||
(
|
||||
ptf,
|
||||
p,
|
||||
iF,
|
||||
mapper
|
||||
),
|
||||
dict_(ptf.dict_),
|
||||
baffleMeshPtr_(),
|
||||
bafflePtr_()
|
||||
{}
|
||||
|
||||
|
||||
Foam::thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermalBaffleFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
coupledTemperatureFvPatchScalarField(ptf, iF),
|
||||
dict_(ptf.dict_),
|
||||
baffleMeshPtr_(),
|
||||
bafflePtr_()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
coupledTemperatureFvPatchScalarField::autoMap(m);
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
coupledTemperatureFvPatchScalarField::rmap(ptf, addr);
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::reset
|
||||
(
|
||||
const fvPatchScalarField& ptf
|
||||
)
|
||||
{
|
||||
coupledTemperatureFvPatchScalarField::reset(ptf);
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
checkPatchFields();
|
||||
|
||||
if (owner())
|
||||
{
|
||||
bafflePtr_->evolve();
|
||||
}
|
||||
|
||||
coupledTemperatureFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::thermalBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
coupledTemperatureFvPatchScalarField::write(os);
|
||||
|
||||
if (owner())
|
||||
{
|
||||
forAllConstIter(dictionary, dict_, iter)
|
||||
{
|
||||
os << *iter;
|
||||
}
|
||||
}
|
||||
else if (primary())
|
||||
{
|
||||
writeEntry(os, "neighbourPatch", nbrPatch_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
thermalBaffleFvPatchScalarField
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,287 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 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/>.
|
||||
|
||||
Class
|
||||
Foam::compressible::thermalBaffleFvPatchScalarField
|
||||
|
||||
Description
|
||||
This boundary condition provides a coupled temperature condition between
|
||||
multiple mesh regions.
|
||||
|
||||
The regions are generally referred to as the:
|
||||
- primary region,
|
||||
- and baffle region.
|
||||
|
||||
The primary region creates the baffle region and evolves its energy
|
||||
equation either:
|
||||
- 1-D, normal to each patch face
|
||||
- 2-D, normal and tangential components
|
||||
|
||||
The thermodynamic properties of the baffle material are specified via
|
||||
dictionary entries on the master patch.
|
||||
|
||||
Usage
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
<masterPatchName>
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
|
||||
// Underlying coupled boundary condition
|
||||
Tnbr T;
|
||||
qrNbr qr;//or none.Name of qr field on neighbourregion
|
||||
qr none;// or none.Name of qr field on localregion
|
||||
value uniform 300;
|
||||
|
||||
// Baffle region name
|
||||
regionName baffleRegion;
|
||||
|
||||
// Solid thermo in solid region
|
||||
thermoType
|
||||
{
|
||||
type heSolidThermo;
|
||||
mixture pureMixture;
|
||||
transport constIso;
|
||||
thermo eConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 20;
|
||||
}
|
||||
transport
|
||||
{
|
||||
kappa 0.01;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Cv 15;
|
||||
}
|
||||
density
|
||||
{
|
||||
rho 80;
|
||||
}
|
||||
}
|
||||
|
||||
radiation
|
||||
{
|
||||
radiationModel opaqueSolid;
|
||||
absorptionEmissionModel none;
|
||||
scatterModel none;
|
||||
}
|
||||
|
||||
// Extrude model for new region
|
||||
|
||||
extrudeModel linearNormal;
|
||||
nLayers 50;
|
||||
expansionRatio 1;
|
||||
columnCells false; //3D or 1D
|
||||
linearNormalCoeffs
|
||||
{
|
||||
thickness 0.02;
|
||||
}
|
||||
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
Slave patch on primary region:
|
||||
\verbatim
|
||||
<slavePatchName>
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
value uniform 300;
|
||||
\endverbatim
|
||||
|
||||
Patches on baffle region:
|
||||
\verbatim
|
||||
bottom
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
value uniform 300;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
See also
|
||||
Foam::compressible::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
|
||||
Foam::regionModels::thermalBaffle
|
||||
|
||||
SourceFiles
|
||||
thermalBaffleFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermalBaffleFvPatchScalarField_H
|
||||
#define thermalBaffleFvPatchScalarField_H
|
||||
|
||||
#include "thermalBaffle.H"
|
||||
#include "extrudePatchMesh.H"
|
||||
#include "coupledTemperatureFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermalBaffleFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermalBaffleFvPatchScalarField
|
||||
:
|
||||
public coupledTemperatureFvPatchScalarField
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Dictionary
|
||||
dictionary dict_;
|
||||
|
||||
//- The neighbouring baffle patch name
|
||||
const word nbrPatch_;
|
||||
|
||||
//- Thermal baffle mesh extruded from this patch
|
||||
autoPtr<extrudePatchMesh> baffleMeshPtr_;
|
||||
|
||||
//- Thermal baffle model
|
||||
autoPtr<regionModels::thermalBaffle> bafflePtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Is this patch in the primary region?
|
||||
bool primary() const;
|
||||
|
||||
//- Is this patch the owner?
|
||||
bool owner() const;
|
||||
|
||||
//- Check consistency of the patch settings
|
||||
void checkPatches() const;
|
||||
|
||||
//- Check consistency of the patch field settings
|
||||
void checkPatchFields() const;
|
||||
|
||||
//- Construct and return the thermal baffle mesh
|
||||
autoPtr<extrudePatchMesh> initBaffleMesh() const;
|
||||
|
||||
//- Construct and return the thermal baffle model
|
||||
autoPtr<regionModels::thermalBaffle> initBaffle() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressible::thermalBaffle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// thermalBaffleFvPatchScalarField onto a new patch
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermalBaffleFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
thermalBaffleFvPatchScalarField
|
||||
(
|
||||
const thermalBaffleFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new thermalBaffleFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
// Used to update fields following mesh topology change
|
||||
virtual void autoMap(const fvPatchFieldMapper&);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
// Used to reconstruct fields
|
||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
||||
|
||||
//- Reset the fvPatchField to the given fvPatchField
|
||||
// Used for mesh to mesh mapping
|
||||
virtual void reset(const fvPatchScalarField&);
|
||||
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,318 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermalBaffle.H"
|
||||
#include "fvm.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "absorptionEmissionModel.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "wedgePolyPatch.H"
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "FaceCellWave.H"
|
||||
#include "LayerInfoData.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(thermalBaffle, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
tmp<volScalarField::Internal> thermalBaffle::calcThickness() const
|
||||
{
|
||||
if (intCoupledPatchIDs_.size() != 2)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Mesh \"" << regionMesh().name()
|
||||
<< "\" does not have exactly two coupled patches"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
// Initial faces from which to wave
|
||||
DynamicList<label> initialFaces;
|
||||
|
||||
// Initialise faces on the first coupled patch with their centres as data
|
||||
initialFaces.clear();
|
||||
DynamicList<LayerInfoData<point>> initialFaceInfoPoints;
|
||||
{
|
||||
const polyPatch& pp =
|
||||
regionMesh().boundaryMesh()[intCoupledPatchIDs_[0]];
|
||||
|
||||
initialFaces.setCapacity(initialFaces.size() + pp.size());
|
||||
initialFaceInfoPoints.setCapacity(initialFaces.size() + pp.size());
|
||||
|
||||
forAll(pp, ppFacei)
|
||||
{
|
||||
const point& c = pp.faceCentres()[ppFacei];
|
||||
|
||||
initialFaces.append(pp.start() + ppFacei);
|
||||
initialFaceInfoPoints.append(LayerInfoData<point>(0, -1, c));
|
||||
}
|
||||
}
|
||||
|
||||
// Wave across the mesh layers
|
||||
List<LayerInfoData<point>> faceInfoPoints(regionMesh().nFaces());
|
||||
List<LayerInfoData<point>> cellInfoPoints(regionMesh().nCells());
|
||||
FaceCellWave<LayerInfoData<point>>
|
||||
(
|
||||
regionMesh(),
|
||||
initialFaces,
|
||||
initialFaceInfoPoints,
|
||||
faceInfoPoints,
|
||||
cellInfoPoints,
|
||||
regionMesh().globalData().nTotalCells() + 1
|
||||
);
|
||||
|
||||
// Calculate the distances between the opposite patch and load into data to
|
||||
// wave back in the opposite direction
|
||||
initialFaces.clear();
|
||||
DynamicList<LayerInfoData<scalar>> initialFaceInfoDeltas;
|
||||
{
|
||||
const polyPatch& pp =
|
||||
regionMesh().boundaryMesh()[intCoupledPatchIDs_[1]];
|
||||
|
||||
forAll(pp, ppFacei)
|
||||
{
|
||||
const point& c = pp.faceCentres()[ppFacei];
|
||||
|
||||
static nil td;
|
||||
|
||||
if (faceInfoPoints[pp.start() + ppFacei].valid(td))
|
||||
{
|
||||
const scalar d =
|
||||
mag(c - faceInfoPoints[pp.start() + ppFacei].data());
|
||||
|
||||
initialFaces.append(pp.start() + ppFacei);
|
||||
initialFaceInfoDeltas.append(LayerInfoData<scalar>(0, -1, d));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Wave back across the layers
|
||||
List<LayerInfoData<scalar>> faceInfoDeltas(regionMesh().nFaces());
|
||||
List<LayerInfoData<scalar>> cellInfoDeltas(regionMesh().nCells());
|
||||
FaceCellWave<LayerInfoData<scalar>>
|
||||
(
|
||||
regionMesh(),
|
||||
initialFaces,
|
||||
initialFaceInfoDeltas,
|
||||
faceInfoDeltas,
|
||||
cellInfoDeltas,
|
||||
regionMesh().globalData().nTotalCells() + 1
|
||||
);
|
||||
|
||||
// Unpack distances into a dimensioned field and return
|
||||
tmp<volScalarField::Internal> tThickness
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thickness",
|
||||
regionMesh().pointsInstance(),
|
||||
regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
regionMesh(),
|
||||
dimLength
|
||||
)
|
||||
);
|
||||
volScalarField::Internal& thickness = tThickness.ref();
|
||||
|
||||
forAll(cellInfoDeltas, celli)
|
||||
{
|
||||
static nil td;
|
||||
|
||||
if (!cellInfoDeltas[celli].valid(td))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Mesh \"" << regionMesh().name()
|
||||
<< "\" is not layered between its coupled patches"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
thickness[celli] = cellInfoDeltas[celli].data();
|
||||
}
|
||||
|
||||
return tThickness;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool thermalBaffle::read()
|
||||
{
|
||||
solution().lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
||||
return regionModel::read();
|
||||
}
|
||||
|
||||
|
||||
bool thermalBaffle::read(const dictionary& dict)
|
||||
{
|
||||
solution().lookup("nNonOrthCorr") >> nNonOrthCorr_;
|
||||
return regionModel::read(dict);
|
||||
}
|
||||
|
||||
|
||||
void thermalBaffle::solveEnergy()
|
||||
{
|
||||
DebugInFunction << endl;
|
||||
|
||||
volScalarField& e = thermo_->he();
|
||||
const volScalarField& rho = thermo_->rho();
|
||||
|
||||
fvScalarMatrix hEqn
|
||||
(
|
||||
fvm::ddt(rho, e)
|
||||
+ thermophysicalTransport_->divq(e)
|
||||
==
|
||||
Q_ + Qs_/thickness_
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
hEqn.solve();
|
||||
|
||||
thermo_->correct();
|
||||
|
||||
Info<< "T min/max = " << min(thermo_->T()) << ", "
|
||||
<< max(thermo_->T()) << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
thermalBaffle::thermalBaffle
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
regionModel(mesh, "thermalBaffle", modelType, dict, true),
|
||||
thickness_(calcThickness()),
|
||||
nNonOrthCorr_(solution().lookup<label>("nNonOrthCorr")),
|
||||
thermo_(solidThermo::New(regionMesh())),
|
||||
thermophysicalTransport_(solidThermophysicalTransportModel::New(thermo())),
|
||||
Qs_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Qs",
|
||||
regionMesh().time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimArea/dimTime, Zero)
|
||||
),
|
||||
Q_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Q",
|
||||
regionMesh().time().timeName(),
|
||||
regionMesh(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
regionMesh(),
|
||||
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
|
||||
),
|
||||
radiation_
|
||||
(
|
||||
radiationModel::New
|
||||
(
|
||||
dict.subDict("radiation"),
|
||||
thermo_->T()
|
||||
)
|
||||
)
|
||||
{
|
||||
thermo_->correct();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
thermalBaffle::~thermalBaffle()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void thermalBaffle::preEvolveRegion()
|
||||
{}
|
||||
|
||||
|
||||
void thermalBaffle::evolveRegion()
|
||||
{
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++)
|
||||
{
|
||||
solveEnergy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const solidThermo& thermalBaffle::thermo() const
|
||||
{
|
||||
return thermo_;
|
||||
}
|
||||
|
||||
|
||||
void thermalBaffle::info()
|
||||
{
|
||||
const labelList& coupledPatches = intCoupledPatchIDs();
|
||||
|
||||
forAll(coupledPatches, i)
|
||||
{
|
||||
const label patchi = coupledPatches[i];
|
||||
|
||||
Info<< indent << "Q : " << regionMesh().boundary()[patchi].name()
|
||||
<< indent
|
||||
<< gSum
|
||||
(
|
||||
regionMesh().magSf().boundaryField()[patchi]
|
||||
*thermophysicalTransport_->q()().boundaryField()[patchi]
|
||||
)
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // end namespace regionModels
|
||||
} // end namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,188 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 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/>.
|
||||
|
||||
Class
|
||||
Foam::regionModels::thermalBaffle
|
||||
|
||||
Description
|
||||
Thermal baffle region model
|
||||
|
||||
SourceFiles
|
||||
thermalBaffle.C
|
||||
thermalBaffleI.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thermalBaffle_H
|
||||
#define thermalBaffle_H
|
||||
|
||||
#include "regionModel.H"
|
||||
#include "solidThermo.H"
|
||||
#include "solidThermophysicalTransportModel.H"
|
||||
#include "radiationModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thermalBaffle Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thermalBaffle
|
||||
:
|
||||
public regionModel
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Calculate the baffle mesh thickness
|
||||
tmp<volScalarField::Internal> calcThickness() const;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
// Geometric parameters
|
||||
|
||||
//- Baffle thickness
|
||||
volScalarField::Internal thickness_;
|
||||
|
||||
|
||||
// Solution parameters
|
||||
|
||||
//- Number of non orthogonal correctors
|
||||
label nNonOrthCorr_;
|
||||
|
||||
|
||||
// Thermo properties
|
||||
|
||||
//- Solid thermo
|
||||
autoPtr<solidThermo> thermo_;
|
||||
|
||||
|
||||
// Thermophysical transport
|
||||
|
||||
//- Pointer to the solid thermophysical transport model
|
||||
autoPtr<solidThermophysicalTransportModel> thermophysicalTransport_;
|
||||
|
||||
|
||||
// Source term fields
|
||||
|
||||
//- Surface energy source [J/m2/s]
|
||||
volScalarField Qs_;
|
||||
|
||||
//- Volumetric energy source [J/m3/s]
|
||||
volScalarField Q_;
|
||||
|
||||
|
||||
// Sub models
|
||||
|
||||
//- Pointer to radiation model
|
||||
autoPtr<radiationModel> radiation_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
// IO
|
||||
|
||||
//- Read control parameters IO dictionary
|
||||
virtual bool read();
|
||||
|
||||
//- Read control parameters from dictionary
|
||||
virtual bool read(const dictionary& dict);
|
||||
|
||||
|
||||
// Equations
|
||||
|
||||
//- Solve energy equation
|
||||
void solveEnergy();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("thermalBaffle");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components and dict
|
||||
thermalBaffle
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
//- Disallow default bitwise copy construction
|
||||
thermalBaffle(const thermalBaffle&) = delete;
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thermalBaffle();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Thermo properties
|
||||
|
||||
//- Return const reference to the solidThermo
|
||||
const solidThermo& thermo() const;
|
||||
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Pre-evolve thermal baffle
|
||||
virtual void preEvolveRegion();
|
||||
|
||||
//- Evolve the thermal baffle
|
||||
virtual void evolveRegion();
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Provide some feedback
|
||||
virtual void info();
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const thermalBaffle&) = delete;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
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;
|
||||
}
|
||||
processor
|
||||
{
|
||||
type processor;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,53 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
ceiling
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0.1 0 0);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
value uniform (0.1 0 0);
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
ceiling
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,31 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object Q;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 17000;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,33 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
".*"
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,58 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0.01;
|
||||
}
|
||||
ceiling
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0.01;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,53 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
ceiling
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,60 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
ceiling
|
||||
{
|
||||
type nutkWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,57 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
ceiling
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,57 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
//- Set patchGroups for constraint patches
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
floor
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
ceiling
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
fixedWalls
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 && rm -rf constant/baffle3DRegion/polyMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Mesh
|
||||
runApplication blockMesh
|
||||
|
||||
# Create 1D and 3D baffles
|
||||
runApplication createBaffles -overwrite
|
||||
|
||||
# Run
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,51 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
local "baffle3DRegion";
|
||||
object physicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heSolidThermo;
|
||||
mixture pureMixture;
|
||||
transport constIsoSolid;
|
||||
thermo eConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 20;
|
||||
}
|
||||
transport
|
||||
{
|
||||
kappa 0.01;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Cv 15;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 80;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,21 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,16 +0,0 @@
|
||||
solid ascii
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.3 0 0
|
||||
vertex 0.3 0 0.1
|
||||
vertex 0.3 0.2 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.3 0.2 0.1
|
||||
vertex 0.3 0.2 0
|
||||
vertex 0.3 0 0.1
|
||||
endloop
|
||||
endfacet
|
||||
endsolid
|
||||
@ -1,58 +0,0 @@
|
||||
solid ascii
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0 0
|
||||
vertex 0.59 0 0.05
|
||||
vertex 0.59 0.1 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0.1 0.05
|
||||
vertex 0.59 0.1 0
|
||||
vertex 0.59 0 0.05
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0 0.05
|
||||
vertex 0.59 0 0.1
|
||||
vertex 0.59 0.1 0.05
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0.1 0.1
|
||||
vertex 0.59 0.1 0.05
|
||||
vertex 0.59 0 0.1
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0.1 0
|
||||
vertex 0.59 0.1 0.05
|
||||
vertex 0.59 0.2 0
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0.2 0.05
|
||||
vertex 0.59 0.2 0
|
||||
vertex 0.59 0.1 0.05
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0.1 0.05
|
||||
vertex 0.59 0.1 0.1
|
||||
vertex 0.59 0.2 0.05
|
||||
endloop
|
||||
endfacet
|
||||
facet normal -1 0 0
|
||||
outer loop
|
||||
vertex 0.59 0.2 0.1
|
||||
vertex 0.59 0.2 0.05
|
||||
vertex 0.59 0.1 0.1
|
||||
endloop
|
||||
endfacet
|
||||
endsolid
|
||||
@ -1,28 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
{
|
||||
model kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,20 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class uniformDimensionedScalarField;
|
||||
location "constant";
|
||||
object pRef;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
value 1e5;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object physicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleEnthalpy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
molWeight 28.96;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1004.4;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.831e-05;
|
||||
Pr 0.705;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,50 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
alphat
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
nut
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
type calculated;
|
||||
value uniform 101325;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,38 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/baffleRegion";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,36 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system/baffleRegion";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
e
|
||||
{
|
||||
solver PCG;
|
||||
smoother GaussSeidel;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
nNonOrthCorr 0;
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
e 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,85 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(10 0 0)
|
||||
(10 5 0)
|
||||
(0 5 0)
|
||||
(0 0 1)
|
||||
(10 0 1)
|
||||
(10 5 1)
|
||||
(0 5 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (50 40 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
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)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,50 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application foamRun;
|
||||
|
||||
solver fluid;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 2500;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 500;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
libs ("libthermalBaffle.so");
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,156 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createBafflesDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
internalFacesOnly true;
|
||||
|
||||
fields true;
|
||||
|
||||
baffles
|
||||
{
|
||||
baffleFacesThermoBaffle1D
|
||||
{
|
||||
type searchableSurface;
|
||||
surface triSurfaceMesh;
|
||||
name baffle1D.stl;
|
||||
|
||||
owner
|
||||
{
|
||||
name baffle1D0;
|
||||
type mappedWall;
|
||||
neighbourPatch baffle1D1;
|
||||
|
||||
patchFields
|
||||
{
|
||||
#include "./include/wallBafflePatches"
|
||||
|
||||
T
|
||||
{
|
||||
type compressible::thermalBaffle1D<eConstSolidThermoPhysics>;
|
||||
value uniform 300;
|
||||
|
||||
// Baffle thickness [m]
|
||||
thickness uniform 0.005;
|
||||
|
||||
// Baffle source heat flux [W/m^2]
|
||||
qs uniform 100;
|
||||
|
||||
// Baffle physical properties
|
||||
specie
|
||||
{
|
||||
molWeight 20;
|
||||
}
|
||||
transport
|
||||
{
|
||||
kappa 1;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Cv 10;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
neighbour
|
||||
{
|
||||
name baffle1D1;
|
||||
type mappedWall;
|
||||
neighbourPatch baffle1D0;
|
||||
|
||||
patchFields
|
||||
{
|
||||
#include "./include/wallBafflePatches"
|
||||
|
||||
T
|
||||
{
|
||||
type compressible::thermalBaffle1D<eConstSolidThermoPhysics>;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
baffleFacesThermoBaffle3D
|
||||
{
|
||||
type searchableSurface;
|
||||
surface triSurfaceMesh;
|
||||
name baffle3D.stl;
|
||||
|
||||
owner
|
||||
{
|
||||
name baffle3D0;
|
||||
type mappedWall;
|
||||
neighbourRegion baffle3DRegion;
|
||||
neighbourPatch baffle3D0;
|
||||
|
||||
patchFields
|
||||
{
|
||||
#include "./include/wallBafflePatches"
|
||||
|
||||
T
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
neighbourPatch baffle3D1;
|
||||
value uniform 300;
|
||||
|
||||
// Baffle geometry and mesh properties
|
||||
extrudeModel linearNormal;
|
||||
nLayers 50;
|
||||
expansionRatio 1;
|
||||
linearNormalCoeffs
|
||||
{
|
||||
thickness 0.02;
|
||||
}
|
||||
|
||||
// Baffle radiation properties
|
||||
radiation
|
||||
{
|
||||
radiationModel opaqueSolid;
|
||||
absorptionEmissionModel none;
|
||||
scatterModel none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
neighbour
|
||||
{
|
||||
name baffle3D1;
|
||||
type mappedExtrudedWall;
|
||||
neighbourRegion baffle3DRegion;
|
||||
neighbourPatch baffle3D1;
|
||||
|
||||
patchFields
|
||||
{
|
||||
#include "./include/wallBafflePatches"
|
||||
|
||||
T
|
||||
{
|
||||
type compressible::thermalBaffle;
|
||||
neighbourPatch baffle3D0;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,54 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,K) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,h) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,k) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,epsilon) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,omega) bounded Gauss limitedLinear 0.2;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear uncorrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default uncorrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,66 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.01;
|
||||
|
||||
smoother DICGaussSeidel;
|
||||
|
||||
}
|
||||
|
||||
"(U|h|k|epsilon|omega)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-7;
|
||||
relTol 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
|
||||
residualControl
|
||||
{
|
||||
p_rgh 1e-3;
|
||||
U 1e-4;
|
||||
h 1e-4;
|
||||
|
||||
// possibly check turbulence fields
|
||||
"(k|epsilon|omega)" 5e-3;
|
||||
}
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
rho 1.0;
|
||||
p_rgh 0.7;
|
||||
U 0.3;
|
||||
h 0.7;
|
||||
"(k|epsilon|omega)" 0.3;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user