mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
@ -19,7 +19,7 @@ if (transonic)
|
||||
fvc::interpolate(psi)
|
||||
*(
|
||||
(fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
//+ fvc::ddtPhiCorr(rAU, rho, U, phi)
|
||||
)
|
||||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
set -x
|
||||
|
||||
wmake
|
||||
wmake rhoPorousSimpleFoam
|
||||
wmake rhoPorousMRFSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
rhoPorousMRFSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousMRFSimpleFoam
|
||||
@ -8,6 +8,8 @@
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
mrfZones.addCoriolis(rho, UEqn());
|
||||
|
||||
// Include the porous media resistance and solve the momentum equation
|
||||
// either implicit in the tensorial resistance or transport using by
|
||||
// including the spherical part of the resistance in the momentum diagonal
|
||||
@ -1,3 +1,6 @@
|
||||
MRFZones mrfZones(mesh);
|
||||
mrfZones.correctBoundaryVelocity(U);
|
||||
|
||||
thermalPorousZones pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
@ -24,4 +27,3 @@
|
||||
Info<< "Using pressure explicit porosity" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,105 @@
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
U = trTU()&UEqn().H();
|
||||
}
|
||||
else
|
||||
{
|
||||
U = trAU()*UEqn().H();
|
||||
}
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
bool closedVolume = false;
|
||||
|
||||
if (transonic)
|
||||
{
|
||||
surfaceScalarField phid
|
||||
(
|
||||
"phid",
|
||||
fvc::interpolate(psi)*(fvc::interpolate(U) & mesh.Sf())
|
||||
);
|
||||
mrfZones.relativeFlux(fvc::interpolate(psi), phid);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
tpEqn = (fvc::div(phid, p) - fvm::laplacian(rho*trTU(), p));
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn = (fvc::div(phid, p) - fvm::laplacian(rho*trAU(), p));
|
||||
}
|
||||
|
||||
tpEqn().setReference(pRefCell, pRefValue);
|
||||
|
||||
tpEqn().solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi == tpEqn().flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
phi = fvc::interpolate(rho*U) & mesh.Sf();
|
||||
mrfZones.relativeFlux(fvc::interpolate(rho), phi);
|
||||
|
||||
closedVolume = adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phi));
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phi));
|
||||
}
|
||||
|
||||
tpEqn().setReference(pRefCell, pRefValue);
|
||||
|
||||
tpEqn().solve();
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= tpEqn().flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "incompressible/continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
U -= trTU()&fvc::grad(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
U -= trAU()*fvc::grad(p);
|
||||
}
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
if (closedVolume)
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||
@ -26,13 +26,15 @@ Application
|
||||
|
||||
Description
|
||||
Steady-state solver for turbulent flow of compressible fluids with
|
||||
RANS turbulence modelling, and implicit or explicit porosity treatment
|
||||
RANS turbulence modelling, implicit or explicit porosity treatment
|
||||
and MRF for HVAC and similar applications.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "basicPsiThermo.H"
|
||||
#include "RASModel.H"
|
||||
#include "MRFZones.H"
|
||||
#include "thermalPorousZones.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -43,7 +45,7 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "createPorousZones.H"
|
||||
#include "createZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -1,3 +0,0 @@
|
||||
rhoPorousSimpleFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/rhoPorousSimpleFoam
|
||||
@ -1,73 +0,0 @@
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
U = trTU()&UEqn().H();
|
||||
}
|
||||
else
|
||||
{
|
||||
U = trAU()*UEqn().H();
|
||||
}
|
||||
|
||||
UEqn.clear();
|
||||
|
||||
phi = fvc::interpolate(rho*U) & mesh.Sf();
|
||||
bool closedVolume = adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
tpEqn = (fvm::laplacian(rho*trTU(), p) == fvc::div(phi));
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn = (fvm::laplacian(rho*trAU(), p) == fvc::div(phi));
|
||||
}
|
||||
|
||||
tpEqn().setReference(pRefCell, pRefValue);
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
tpEqn().solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn().solve();
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phi -= tpEqn().flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "incompressible/continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
if (pressureImplicitPorosity)
|
||||
{
|
||||
U -= trTU()&fvc::grad(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
U -= trAU()*fvc::grad(p);
|
||||
}
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
// For closed-volume cases adjust the pressure and density levels
|
||||
// to obey overall mass continuity
|
||||
if (closedVolume)
|
||||
{
|
||||
p += (initialMass - fvc::domainIntegrate(psi*p))
|
||||
/fvc::domainIntegrate(psi);
|
||||
}
|
||||
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
||||
@ -1,70 +0,0 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
# include "createPhi.H"
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::RASModel> turbulence
|
||||
(
|
||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
|
||||
porousZones pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
// nUCorrectors used for pressureImplicitPorosity
|
||||
int nUCorr = 0;
|
||||
if (pZones.size())
|
||||
{
|
||||
// nUCorrectors for pressureImplicitPorosity
|
||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||
{
|
||||
nUCorr = readInt
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||
);
|
||||
}
|
||||
|
||||
if (nUCorr > 0)
|
||||
{
|
||||
pressureImplicitPorosity = true;
|
||||
Info<< "Using pressure implicit porosity" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Using pressure explicit porosity" << endl;
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
# include "continuityErrs.H"
|
||||
#include "continuityErrs.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I../simpleFoam \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
@ -43,6 +43,7 @@ int main(int argc, char *argv[])
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
#include "createPorousZones.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -26,7 +26,9 @@ FoamFile
|
||||
// - specify where the faces should come from
|
||||
// - specify the type of cyclic. If a rotational specify the rotationAxis
|
||||
// and centre to make matching easier
|
||||
// - pointSync true to guarantee points to line up.
|
||||
// - always create both halves in one invocation with correct 'neighbourPatch'
|
||||
// setting.
|
||||
// - optionally pointSync true to guarantee points to line up.
|
||||
|
||||
// 2. Correct incorrect cyclic:
|
||||
// This will usually fail upon loading:
|
||||
@ -45,24 +47,23 @@ matchTolerance 1E-3;
|
||||
// Do a synchronisation of coupled points after creation of any patches.
|
||||
// Note: this does not work with points that are on multiple coupled patches
|
||||
// with transformations.
|
||||
pointSync true;
|
||||
pointSync false;
|
||||
|
||||
// Patches to create.
|
||||
patches
|
||||
(
|
||||
{
|
||||
// Name of new patch
|
||||
name sidePatches;
|
||||
name cyc_half0;
|
||||
|
||||
// Type of new patch
|
||||
// Dictionary to construct new patch from
|
||||
patchInfo
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyc_half1;
|
||||
|
||||
// Optional: explicitly set transformation tensor.
|
||||
// Used when matching and synchronising points.
|
||||
//transform translational;
|
||||
//separationVector (-2289 0 0);
|
||||
transform rotational;
|
||||
rotationAxis (1 0 0);
|
||||
rotationCentre (0 0 0);
|
||||
@ -72,28 +73,37 @@ patches
|
||||
constructFrom patches;
|
||||
|
||||
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||
patches ("periodic.*");
|
||||
patches (periodic1);
|
||||
|
||||
// If constructFrom = set : name of faceSet
|
||||
set f0;
|
||||
}
|
||||
|
||||
{
|
||||
name bottom;
|
||||
// Name of new patch
|
||||
name cyc_half1;
|
||||
|
||||
// Type of new patch
|
||||
dictionary
|
||||
// Dictionary to construct new patch from
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
type cyclic;
|
||||
neighbourPatch cyc_half0;
|
||||
|
||||
// Optional: explicitly set transformation tensor.
|
||||
// Used when matching and synchronising points.
|
||||
transform rotational;
|
||||
rotationAxis ( 0 0 1 );
|
||||
rotationCentre ( 0.3 0 0 );
|
||||
}
|
||||
|
||||
constructFrom set;
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
constructFrom patches;
|
||||
|
||||
patches ();
|
||||
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||
patches (periodic2);
|
||||
|
||||
set bottomFaces;
|
||||
// If constructFrom = set : name of faceSet
|
||||
set f0;
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,7 +63,15 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
|
||||
volVectorField U(Uheader, mesh);
|
||||
|
||||
if (isFile(runTime.constantPath()/"thermophysicalProperties"))
|
||||
if
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thermophysicalProperties",
|
||||
runTime.constant(),
|
||||
mesh
|
||||
).headerOk()
|
||||
)
|
||||
{
|
||||
// thermophysical Mach
|
||||
autoPtr<basicPsiThermo> thermo
|
||||
|
||||
25
bin/tools/foamConfigurePaths
Normal file → Executable file
25
bin/tools/foamConfigurePaths
Normal file → Executable file
@ -37,6 +37,7 @@ usage() {
|
||||
usage: ${0##*/}
|
||||
--foamInstall dir specify installation directory (e.g. /opt)
|
||||
--projectName name specify project name (e.g. openfoam170)
|
||||
--projectVersion ver specify project version (e.g. 1.7.x)
|
||||
--archOption arch specify architecture option (only 32 or 64 applicable)
|
||||
--paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam380)
|
||||
|
||||
@ -76,7 +77,7 @@ _inlineSed()
|
||||
|
||||
[ -f etc/bashrc ] || usage "Please run from top-level directory of installation"
|
||||
|
||||
unset foamInstall projectName archOption paraviewInstall
|
||||
unset foamInstall projectName projectVersion archOption paraviewInstall
|
||||
|
||||
# parse options
|
||||
while [ "$#" -gt 0 ]
|
||||
@ -102,7 +103,17 @@ do
|
||||
_inlineSed \
|
||||
etc/bashrc \
|
||||
'/^[^#]/s@WM_PROJECT_DIR=.*@WM_PROJECT_DIR=$WM_PROJECT_INST_DIR/'"$projectName@" \
|
||||
"Replacing WM_PROJECT_DIR setting by '$projectName'"
|
||||
"Replacing WM_PROJECT_DIR setting by $projectName"
|
||||
shift 2
|
||||
;;
|
||||
--projectVersion)
|
||||
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
|
||||
projectVersion="$2"
|
||||
# replace WM_PROJECT_VERSION=...
|
||||
_inlineSed \
|
||||
etc/bashrc \
|
||||
'/^[^#]/s@WM_PROJECT_VERSION=.*@WM_PROJECT_VERSION='"$projectVersion@" \
|
||||
"Replacing WM_PROJECT_VERSION setting by $projectVersion"
|
||||
shift 2
|
||||
;;
|
||||
-archOption | --archOption)
|
||||
@ -142,10 +153,10 @@ _inlineSed \
|
||||
'/^[^#]/s@export WM_MPLIB=.*@export WM_MPLIB=SYSTEMOPENMPI@' \
|
||||
"Replacing WM_MPLIB setting by 'SYSTEMOPENMPI'"
|
||||
|
||||
# set foamCompiler=system always
|
||||
_inlineSed \
|
||||
etc/bashrc \
|
||||
'/^[^#]/s@foamCompiler=.*@foamCompiler=system@' \
|
||||
"Replacing foamCompiler setting by 'system'"
|
||||
## set foamCompiler=system always
|
||||
#_inlineSed \
|
||||
# etc/bashrc \
|
||||
# '/^[^#]/s@foamCompiler=.*@foamCompiler=system@' \
|
||||
# "Replacing foamCompiler setting by 'system'"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -254,7 +254,10 @@ public:
|
||||
}
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(pointField& l) const = 0;
|
||||
virtual void transformPosition(pointField&) const = 0;
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(point&, const label facei) const = 0;
|
||||
|
||||
//- Are the planes separated.
|
||||
virtual bool separated() const
|
||||
@ -297,12 +300,12 @@ public:
|
||||
virtual void calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
) = 0;
|
||||
|
||||
//- Initialize ordering for primitivePatch. Does not
|
||||
|
||||
@ -77,7 +77,6 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
||||
if (size())
|
||||
{
|
||||
// Half0
|
||||
|
||||
const cyclicPolyPatch& half0 = *this;
|
||||
vectorField half0Areas(half0.size());
|
||||
forAll(half0, facei)
|
||||
@ -108,10 +107,10 @@ void Foam::cyclicPolyPatch::calcTransforms()
|
||||
void Foam::cyclicPolyPatch::calcTransforms
|
||||
(
|
||||
const primitivePatch& half0,
|
||||
const UList<point>& half0Ctrs,
|
||||
const UList<point>& half0Areas,
|
||||
const UList<point>& half1Ctrs,
|
||||
const UList<point>& half1Areas
|
||||
const pointField& half0Ctrs,
|
||||
const vectorField& half0Areas,
|
||||
const pointField& half1Ctrs,
|
||||
const vectorField& half1Areas
|
||||
)
|
||||
{
|
||||
if (debug && owner())
|
||||
@ -165,23 +164,9 @@ void Foam::cyclicPolyPatch::calcTransforms
|
||||
|
||||
if (half0Ctrs.size() > 0)
|
||||
{
|
||||
scalarField half0Tols
|
||||
(
|
||||
calcFaceTol
|
||||
(
|
||||
half0,
|
||||
half0.points(),
|
||||
static_cast<const pointField&>(half0Ctrs)
|
||||
)
|
||||
);
|
||||
|
||||
vectorField half0Normals(half0Areas.size());
|
||||
vectorField half1Normals(half1Areas.size());
|
||||
|
||||
//- Additional warning about faces non-aligned with rotation axis
|
||||
//scalar maxCos = -GREAT;
|
||||
//label maxFacei = -1;
|
||||
|
||||
forAll(half0, facei)
|
||||
{
|
||||
scalar magSf = mag(half0Areas[facei]);
|
||||
@ -221,75 +206,74 @@ void Foam::cyclicPolyPatch::calcTransforms
|
||||
{
|
||||
half0Normals[facei] = half0Areas[facei] / magSf;
|
||||
half1Normals[facei] = half1Areas[facei] / nbrMagSf;
|
||||
|
||||
//if (transform_ == ROTATIONAL)
|
||||
//{
|
||||
// scalar cos = mag(half0Normals[facei] & rotationAxis_);
|
||||
// if (cos > maxCos)
|
||||
// {
|
||||
// maxCos = cos;
|
||||
// maxFacei = facei;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
//if (maxCos > sqrt(SMALL))
|
||||
//{
|
||||
// WarningIn
|
||||
// (
|
||||
// "cyclicPolyPatch::calcTransforms()"
|
||||
// ) << "on patch " << name()
|
||||
// << " face:" << maxFacei << " fc:" << half0Ctrs[maxFacei]
|
||||
// << " is not perpendicular to the rotationAxis." << endl
|
||||
// << "This will cause problems with topology changes." << endl
|
||||
// << "rotation axis : " << rotationAxis_ << endl
|
||||
// << "face normal : " << half0Normals[maxFacei] << endl
|
||||
// << "cosine of angle : " << maxCos << endl;
|
||||
//}
|
||||
|
||||
// Calculate transformation tensors
|
||||
calcTransformTensors
|
||||
(
|
||||
static_cast<const pointField&>(half0Ctrs),
|
||||
static_cast<const pointField&>(half1Ctrs),
|
||||
half0Normals,
|
||||
half1Normals,
|
||||
half0Tols,
|
||||
matchTol,
|
||||
transform_
|
||||
);
|
||||
|
||||
if (transform_ == ROTATIONAL && !parallel() && forwardT().size() > 1)
|
||||
if (transform_ == ROTATIONAL)
|
||||
{
|
||||
// Get index of maximum area face to minimise truncation errors.
|
||||
label max0I = findMaxArea(half0.points(), half0);
|
||||
// Calculate using the given rotation axis and centre. Do not
|
||||
// use calculated normals.
|
||||
label face0 = getConsistentRotationFace(half0Ctrs);
|
||||
label face1 = face0;
|
||||
|
||||
const tensor fwdT = forwardT()[max0I];
|
||||
const_cast<tensorField&>(forwardT()) = tensorField(1, fwdT);
|
||||
const tensor revT = reverseT()[max0I];
|
||||
const_cast<tensorField&>(reverseT()) = tensorField(1, revT);
|
||||
const bool coll = collocated()[max0I];
|
||||
const_cast<boolList&>(collocated()).setSize(1);
|
||||
const_cast<boolList&>(collocated())[0] = coll;
|
||||
vector n0 = ((half0Ctrs[face0] - rotationCentre_) ^ rotationAxis_);
|
||||
vector n1 = ((half1Ctrs[face1] - rotationCentre_) ^ -rotationAxis_);
|
||||
n0 /= mag(n0) + VSMALL;
|
||||
n1 /= mag(n1) + VSMALL;
|
||||
|
||||
WarningIn
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "cyclicPolyPatch::calcTransforms :"
|
||||
<< " Specified rotation :"
|
||||
<< " n0:" << n0 << " n1:" << n1 << endl;
|
||||
}
|
||||
|
||||
// Extended tensor from two local coordinate systems calculated
|
||||
// using normal and rotation axis
|
||||
const tensor E0
|
||||
(
|
||||
"cyclicPolyPatch::calcTransforms\n"
|
||||
" (\n"
|
||||
" const primitivePatch&,\n"
|
||||
" const UList<point>&,\n"
|
||||
" const UList<point>&,\n"
|
||||
" const UList<point>&,\n"
|
||||
" const UList<point>&\n"
|
||||
" )"
|
||||
) << "For patch " << name()
|
||||
<< " calculated non-uniform transform tensor even though"
|
||||
<< " the transform type is " << transformTypeNames[transform_]
|
||||
<< "." << nl
|
||||
<< " Setting the transformation tensor to be a uniform"
|
||||
<< " rotation calculated from face " << max0I
|
||||
<< endl;
|
||||
rotationAxis_,
|
||||
(n0 ^ rotationAxis_),
|
||||
n0
|
||||
);
|
||||
const tensor E1
|
||||
(
|
||||
rotationAxis_,
|
||||
(-n1 ^ rotationAxis_),
|
||||
-n1
|
||||
);
|
||||
const tensor revT(E1.T() & E0);
|
||||
|
||||
const_cast<tensorField&>(forwardT()) = tensorField(1, revT.T());
|
||||
const_cast<tensorField&>(reverseT()) = tensorField(1, revT);
|
||||
const_cast<vectorField&>(separation()).setSize(0);
|
||||
const_cast<boolList&>(collocated()) = boolList(1, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
scalarField half0Tols
|
||||
(
|
||||
calcFaceTol
|
||||
(
|
||||
half0,
|
||||
half0.points(),
|
||||
static_cast<const pointField&>(half0Ctrs)
|
||||
)
|
||||
);
|
||||
|
||||
calcTransformTensors
|
||||
(
|
||||
static_cast<const pointField&>(half0Ctrs),
|
||||
static_cast<const pointField&>(half1Ctrs),
|
||||
half0Normals,
|
||||
half1Normals,
|
||||
half0Tols,
|
||||
matchTol,
|
||||
transform_
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -333,14 +317,39 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
|
||||
<< " n0:" << n0 << " n1:" << n1 << endl;
|
||||
}
|
||||
|
||||
// Rotation (around origin)
|
||||
const tensor reverseT(rotationTensor(n0, -n1));
|
||||
// Extended tensor from two local coordinate systems calculated
|
||||
// using normal and rotation axis
|
||||
const tensor E0
|
||||
(
|
||||
rotationAxis_,
|
||||
(n0 ^ rotationAxis_),
|
||||
n0
|
||||
);
|
||||
const tensor E1
|
||||
(
|
||||
rotationAxis_,
|
||||
(-n1 ^ rotationAxis_),
|
||||
-n1
|
||||
);
|
||||
const tensor revT(E1.T() & E0);
|
||||
|
||||
// Rotation
|
||||
forAll(half0Ctrs, faceI)
|
||||
{
|
||||
half0Ctrs[faceI] = Foam::transform(reverseT, half0Ctrs[faceI]);
|
||||
anchors0[faceI] = Foam::transform(reverseT, anchors0[faceI]);
|
||||
half0Ctrs[faceI] =
|
||||
Foam::transform
|
||||
(
|
||||
revT,
|
||||
half0Ctrs[faceI] - rotationCentre_
|
||||
)
|
||||
+ rotationCentre_;
|
||||
anchors0[faceI] =
|
||||
Foam::transform
|
||||
(
|
||||
revT,
|
||||
anchors0[faceI] - rotationCentre_
|
||||
)
|
||||
+ rotationCentre_;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -387,19 +396,19 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
|
||||
}
|
||||
|
||||
// Rotation (around origin)
|
||||
const tensor reverseT(rotationTensor(n0, -n1));
|
||||
const tensor revT(rotationTensor(n0, -n1));
|
||||
|
||||
// Rotation
|
||||
forAll(half0Ctrs, faceI)
|
||||
{
|
||||
half0Ctrs[faceI] = Foam::transform
|
||||
(
|
||||
reverseT,
|
||||
revT,
|
||||
half0Ctrs[faceI]
|
||||
);
|
||||
anchors0[faceI] = Foam::transform
|
||||
(
|
||||
reverseT,
|
||||
revT,
|
||||
anchors0[faceI]
|
||||
);
|
||||
}
|
||||
@ -437,41 +446,20 @@ Foam::label Foam::cyclicPolyPatch::getConsistentRotationFace
|
||||
const pointField& faceCentres
|
||||
) const
|
||||
{
|
||||
const scalarField magRadSqr
|
||||
(
|
||||
magSqr((faceCentres - rotationCentre_) ^ rotationAxis_)
|
||||
);
|
||||
scalarField axisLen
|
||||
(
|
||||
(faceCentres - rotationCentre_) & rotationAxis_
|
||||
);
|
||||
axisLen -= min(axisLen);
|
||||
const scalarField magLenSqr
|
||||
(
|
||||
magRadSqr + axisLen*axisLen
|
||||
);
|
||||
// Determine a face furthest away from the axis
|
||||
|
||||
label rotFace = -1;
|
||||
scalar maxMagLenSqr = -GREAT;
|
||||
scalar maxMagRadSqr = -GREAT;
|
||||
forAll(faceCentres, i)
|
||||
{
|
||||
if (magLenSqr[i] >= maxMagLenSqr)
|
||||
{
|
||||
if (magRadSqr[i] > maxMagRadSqr)
|
||||
{
|
||||
rotFace = i;
|
||||
maxMagLenSqr = magLenSqr[i];
|
||||
maxMagRadSqr = magRadSqr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
const scalarField magRadSqr =
|
||||
magSqr((faceCentres - rotationCentre_) ^ rotationAxis_);
|
||||
|
||||
label rotFace = findMax(magRadSqr);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "getConsistentRotationFace(const pointField&)" << nl
|
||||
<< " rotFace = " << rotFace << nl
|
||||
<< " point = " << faceCentres[rotFace] << endl;
|
||||
Info<< "getConsistentRotationFace(const pointField&)" << nl
|
||||
<< " rotFace = " << rotFace << nl
|
||||
<< " point = " << faceCentres[rotFace] << nl
|
||||
<< " distance = " << Foam::sqrt(magRadSqr[rotFace])
|
||||
<< endl;
|
||||
}
|
||||
|
||||
return rotFace;
|
||||
@ -586,6 +574,17 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
||||
{
|
||||
dict.lookup("rotationAxis") >> rotationAxis_;
|
||||
dict.lookup("rotationCentre") >> rotationCentre_;
|
||||
|
||||
scalar magRot = mag(rotationAxis_);
|
||||
if (magRot < SMALL)
|
||||
{
|
||||
FatalIOErrorIn("cyclicPolyPatch::cyclicPolyPatch(..)", dict)
|
||||
<< "Illegal rotationAxis " << rotationAxis_ << endl
|
||||
<< "Please supply a non-zero vector."
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
rotationAxis_ /= magRot;
|
||||
|
||||
break;
|
||||
}
|
||||
case TRANSLATIONAL:
|
||||
@ -730,7 +729,16 @@ void Foam::cyclicPolyPatch::transformPosition(pointField& l) const
|
||||
{
|
||||
if (!parallel())
|
||||
{
|
||||
l = Foam::transform(forwardT(), l);
|
||||
if (transform_ == ROTATIONAL)
|
||||
{
|
||||
l =
|
||||
Foam::transform(forwardT(), l-rotationCentre_)
|
||||
+ rotationCentre_;
|
||||
}
|
||||
else
|
||||
{
|
||||
l = Foam::transform(forwardT(), l);
|
||||
}
|
||||
}
|
||||
else if (separated())
|
||||
{
|
||||
@ -750,6 +758,40 @@ void Foam::cyclicPolyPatch::transformPosition(pointField& l) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicPolyPatch::transformPosition(point& l, const label facei) const
|
||||
{
|
||||
if (!parallel())
|
||||
{
|
||||
const tensor& T =
|
||||
(
|
||||
forwardT().size() == 1
|
||||
? forwardT()[0]
|
||||
: forwardT()[facei]
|
||||
);
|
||||
|
||||
if (transform_ == ROTATIONAL)
|
||||
{
|
||||
l = Foam::transform(T, l-rotationCentre_) + rotationCentre_;
|
||||
}
|
||||
else
|
||||
{
|
||||
l = Foam::transform(T, l);
|
||||
}
|
||||
}
|
||||
else if (separated())
|
||||
{
|
||||
const vector& s =
|
||||
(
|
||||
separation().size() == 1
|
||||
? separation()[0]
|
||||
: separation()[facei]
|
||||
);
|
||||
|
||||
l -= s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
polyPatch::initGeometry(pBufs);
|
||||
@ -759,9 +801,9 @@ void Foam::cyclicPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
void Foam::cyclicPolyPatch::initGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
UList<point>& nbrCtrs,
|
||||
UList<point>& nbrAreas,
|
||||
UList<point>& nbrCc
|
||||
pointField& nbrCtrs,
|
||||
vectorField& nbrAreas,
|
||||
pointField& nbrCc
|
||||
)
|
||||
{}
|
||||
|
||||
@ -769,12 +811,12 @@ void Foam::cyclicPolyPatch::initGeometry
|
||||
void Foam::cyclicPolyPatch::calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
)
|
||||
{
|
||||
calcTransforms
|
||||
|
||||
@ -110,10 +110,10 @@ class cyclicPolyPatch
|
||||
void calcTransforms
|
||||
(
|
||||
const primitivePatch& half0,
|
||||
const UList<point>& half0Ctrs,
|
||||
const UList<point>& half0Areas,
|
||||
const UList<point>& half1Ctrs,
|
||||
const UList<point>& half1Areas
|
||||
const pointField& half0Ctrs,
|
||||
const vectorField& half0Areas,
|
||||
const pointField& half1Ctrs,
|
||||
const vectorField& half1Areas
|
||||
);
|
||||
|
||||
// Face ordering
|
||||
@ -149,9 +149,9 @@ protected:
|
||||
virtual void initGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
UList<point>& nbrCtrs,
|
||||
UList<point>& nbrAreas,
|
||||
UList<point>& nbrCc
|
||||
pointField& nbrCtrs,
|
||||
vectorField& nbrAreas,
|
||||
pointField& nbrCc
|
||||
);
|
||||
|
||||
//- Calculate the patch geometry
|
||||
@ -161,12 +161,12 @@ protected:
|
||||
virtual void calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
);
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
@ -342,6 +342,9 @@ public:
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(pointField& l) const;
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(point&, const label facei) const;
|
||||
|
||||
|
||||
// Transformation
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -711,12 +711,12 @@ void Foam::oldCyclicPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
void Foam::oldCyclicPolyPatch::calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -269,16 +269,22 @@ public:
|
||||
notImplemented("transformPosition(pointField&)");
|
||||
}
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(point&, const label facei) const
|
||||
{
|
||||
notImplemented("transformPosition(point&, const label)");
|
||||
}
|
||||
|
||||
//- Calculate the patch geometry
|
||||
virtual void calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
);
|
||||
|
||||
//- Initialize ordering for primitivePatch. Does not
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,12 +93,12 @@ protected:
|
||||
virtual void calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
)
|
||||
{
|
||||
notImplemented("processorPolyPatch::calcGeometry(..)");
|
||||
@ -300,6 +300,10 @@ public:
|
||||
virtual void transformPosition(pointField& l) const
|
||||
{}
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(point&, const label facei) const
|
||||
{}
|
||||
|
||||
//- Initialize ordering for primitivePatch. Does not
|
||||
// refer to *this (except for name() and type() etc.)
|
||||
virtual void initOrder(PstreamBuffers&, const primitivePatch&) const;
|
||||
|
||||
@ -81,12 +81,12 @@ protected:
|
||||
virtual void calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const UList<point>& thisCtrs,
|
||||
const UList<point>& thisAreas,
|
||||
const UList<point>& thisCc,
|
||||
const UList<point>& nbrCtrs,
|
||||
const UList<point>& nbrAreas,
|
||||
const UList<point>& nbrCc
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
)
|
||||
{
|
||||
notImplemented("processorCyclicPolyPatch::calcGeometry(..)");
|
||||
@ -279,6 +279,12 @@ public:
|
||||
referPatch().transformPosition(l);
|
||||
}
|
||||
|
||||
//- Transform a patch-based position from other side to this side
|
||||
virtual void transformPosition(point& l, const label facei) const
|
||||
{
|
||||
referPatch().transformPosition(l, facei);
|
||||
}
|
||||
|
||||
//- Are the planes separated.
|
||||
virtual bool separated() const
|
||||
{
|
||||
|
||||
@ -114,7 +114,8 @@ derivedFvPatchFields = $(fvPatchFields)/derived
|
||||
$(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
|
||||
$(derivedFvPatchFields)/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C
|
||||
$(derivedFvPatchFields)/advective/advectiveFvPatchFields.C
|
||||
$(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchScalarField.C
|
||||
/* $(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchScalarField.C */
|
||||
$(derivedFvPatchFields)/codedFixedValue/codedFixedValueFvPatchFields.C
|
||||
$(derivedFvPatchFields)/directMappedField/directMappedFieldFvPatchFields.C
|
||||
$(derivedFvPatchFields)/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C
|
||||
$(derivedFvPatchFields)/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C
|
||||
|
||||
@ -0,0 +1,532 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "codedFixedValueFvPatchField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "volFields.H"
|
||||
#include "dlLibraryTable.H"
|
||||
#include "IFstream.H"
|
||||
#include "OFstream.H"
|
||||
#include "SHA1Digest.H"
|
||||
#include "dynamicCode.H"
|
||||
#include "dynamicCodeContext.H"
|
||||
#include "stringOps.H"
|
||||
#include "IOdictionary.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
const Foam::word Foam::codedFixedValueFvPatchField<Type>::codeTemplateC
|
||||
= "fixedValueFvPatchFieldTemplate.C";
|
||||
|
||||
template<class Type>
|
||||
const Foam::word Foam::codedFixedValueFvPatchField<Type>::codeTemplateH
|
||||
= "fixedValueFvPatchFieldTemplate.H";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
void* Foam::codedFixedValueFvPatchField<Type>::loadLibrary
|
||||
(
|
||||
const fileName& libPath,
|
||||
const string& globalFuncName,
|
||||
const dictionary& contextDict
|
||||
)
|
||||
{
|
||||
void* lib = 0;
|
||||
|
||||
// avoid compilation by loading an existing library
|
||||
if (!libPath.empty() && dlLibraryTable::open(libPath, false))
|
||||
{
|
||||
lib = dlLibraryTable::findLibrary(libPath);
|
||||
|
||||
// verify the loaded version and unload if needed
|
||||
if (lib)
|
||||
{
|
||||
// provision for manual execution of code after loading
|
||||
if (dlSymFound(lib, globalFuncName))
|
||||
{
|
||||
loaderFunctionType function =
|
||||
reinterpret_cast<loaderFunctionType>
|
||||
(
|
||||
dlSym(lib, globalFuncName)
|
||||
);
|
||||
|
||||
if (function)
|
||||
{
|
||||
(*function)(true); // force load
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::updateLibrary()",
|
||||
contextDict
|
||||
) << "Failed looking up symbol " << globalFuncName << nl
|
||||
<< "from " << libPath << exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::loadLibrary()",
|
||||
contextDict
|
||||
) << "Failed looking up symbol " << globalFuncName << nl
|
||||
<< "from " << libPath << exit(FatalIOError);
|
||||
|
||||
lib = 0;
|
||||
if (!dlLibraryTable::close(libPath, false))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::loadLibrary()",
|
||||
contextDict
|
||||
) << "Failed unloading library "
|
||||
<< libPath
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return lib;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::unloadLibrary
|
||||
(
|
||||
const fileName& libPath,
|
||||
const string& globalFuncName,
|
||||
const dictionary& contextDict
|
||||
)
|
||||
{
|
||||
void* lib = 0;
|
||||
|
||||
if (!libPath.empty())
|
||||
{
|
||||
lib = dlLibraryTable::findLibrary(libPath);
|
||||
}
|
||||
|
||||
if (!lib)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// provision for manual execution of code before unloading
|
||||
if (dlSymFound(lib, globalFuncName))
|
||||
{
|
||||
loaderFunctionType function =
|
||||
reinterpret_cast<loaderFunctionType>
|
||||
(
|
||||
dlSym(lib, globalFuncName)
|
||||
);
|
||||
|
||||
if (function)
|
||||
{
|
||||
(*function)(false); // force unload
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::unloadLibrary()",
|
||||
contextDict
|
||||
) << "Failed looking up symbol " << globalFuncName << nl
|
||||
<< "from " << libPath << exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
if (!dlLibraryTable::close(libPath, false))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::"
|
||||
"updateLibrary()",
|
||||
contextDict
|
||||
) << "Failed unloading library " << libPath
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::setFieldTemplates
|
||||
(
|
||||
dynamicCode& dynCode
|
||||
)
|
||||
{
|
||||
word fieldType(pTraits<Type>::typeName);
|
||||
|
||||
// template type for fvPatchField
|
||||
dynCode.setFilterVariable("TemplateType", fieldType);
|
||||
|
||||
// Name for fvPatchField - eg, ScalarField, VectorField, ...
|
||||
fieldType[0] = toupper(fieldType[0]);
|
||||
dynCode.setFilterVariable("FieldType", fieldType + "Field");
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
const Foam::IOdictionary& Foam::codedFixedValueFvPatchField<Type>::dict() const
|
||||
{
|
||||
const objectRegistry& obr = this->db();
|
||||
|
||||
if (obr.foundObject<IOdictionary>("codeDict"))
|
||||
{
|
||||
return obr.lookupObject<IOdictionary>("codeDict");
|
||||
}
|
||||
else
|
||||
{
|
||||
return obr.store
|
||||
(
|
||||
new IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"codeDict",
|
||||
this->db().time().system(),
|
||||
this->db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::createLibrary
|
||||
(
|
||||
dynamicCode& dynCode,
|
||||
const dynamicCodeContext& context
|
||||
) const
|
||||
{
|
||||
bool create = Pstream::master();
|
||||
|
||||
if (create)
|
||||
{
|
||||
// Write files for new library
|
||||
if (!dynCode.upToDate(context))
|
||||
{
|
||||
// filter with this context
|
||||
dynCode.reset(context);
|
||||
|
||||
// take no chances - typeName must be identical to redirectType_
|
||||
dynCode.setFilterVariable("typeName", redirectType_);
|
||||
|
||||
// set TemplateType and FieldType filter variables
|
||||
// (for fvPatchField)
|
||||
setFieldTemplates(dynCode);
|
||||
|
||||
// compile filtered C template
|
||||
dynCode.addCompileFile(codeTemplateC);
|
||||
|
||||
// copy filtered H template
|
||||
dynCode.addCopyFile(codeTemplateH);
|
||||
|
||||
|
||||
// debugging: make BC verbose
|
||||
// dynCode.setFilterVariable("verbose", "true");
|
||||
// Info<<"compile " << redirectType_ << " sha1: "
|
||||
// << context.sha1() << endl;
|
||||
|
||||
// define Make/options
|
||||
dynCode.setMakeOptions
|
||||
(
|
||||
"EXE_INC = -g \\\n"
|
||||
"-I$(LIB_SRC)/finiteVolume/lnInclude\\\n"
|
||||
+ context.options()
|
||||
+ "\n\nLIB_LIBS = "
|
||||
);
|
||||
|
||||
if (!dynCode.copyOrCreateFiles(true))
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::createLibrary(..)",
|
||||
context.dict()
|
||||
) << "Failed writing files for" << nl
|
||||
<< dynCode.libRelPath() << nl
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
if (!dynCode.wmakeLibso())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::createLibrary(..)",
|
||||
context.dict()
|
||||
) << "Failed wmake " << dynCode.libRelPath() << nl
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// all processes must wait for compile to finish
|
||||
reduce(create, orOp<bool>());
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::updateLibrary() const
|
||||
{
|
||||
dynamicCode::checkSecurity
|
||||
(
|
||||
"codedFixedValueFvPatchField<Type>::updateLibrary()",
|
||||
dict_
|
||||
);
|
||||
|
||||
// use system/codeDict or in-line
|
||||
const dictionary& codeDict =
|
||||
(
|
||||
dict_.found("code")
|
||||
? dict_
|
||||
: this->dict().subDict(redirectType_)
|
||||
);
|
||||
|
||||
dynamicCodeContext context(codeDict);
|
||||
|
||||
// codeName: redirectType + _<sha1>
|
||||
// codeDir : redirectType
|
||||
dynamicCode dynCode
|
||||
(
|
||||
redirectType_ + context.sha1().str(true),
|
||||
redirectType_
|
||||
);
|
||||
const fileName libPath = dynCode.libPath();
|
||||
|
||||
|
||||
// the correct library was already loaded => we are done
|
||||
if (dlLibraryTable::findLibrary(libPath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// remove instantiation of fvPatchField provided by library
|
||||
redirectPatchFieldPtr_.clear();
|
||||
|
||||
// may need to unload old library
|
||||
unloadLibrary
|
||||
(
|
||||
oldLibPath_,
|
||||
dynamicCode::libraryBaseName(oldLibPath_),
|
||||
context.dict()
|
||||
);
|
||||
|
||||
// try loading an existing library (avoid compilation when possible)
|
||||
if (!loadLibrary(libPath, dynCode.codeName(), context.dict()))
|
||||
{
|
||||
createLibrary(dynCode, context);
|
||||
|
||||
loadLibrary(libPath, dynCode.codeName(), context.dict());
|
||||
}
|
||||
|
||||
// retain for future reference
|
||||
oldLibPath_ = libPath;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF),
|
||||
oldLibPath_(),
|
||||
redirectPatchFieldPtr_()
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
||||
(
|
||||
const codedFixedValueFvPatchField<Type>& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
||||
dict_(ptf.dict_),
|
||||
redirectType_(ptf.redirectType_),
|
||||
oldLibPath_(ptf.oldLibPath_),
|
||||
redirectPatchFieldPtr_()
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<Type, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(p, iF, dict),
|
||||
dict_(dict),
|
||||
redirectType_(dict.lookup("redirectType")),
|
||||
oldLibPath_(),
|
||||
redirectPatchFieldPtr_()
|
||||
{
|
||||
updateLibrary();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
||||
(
|
||||
const codedFixedValueFvPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(ptf),
|
||||
dict_(ptf.dict_),
|
||||
redirectType_(ptf.redirectType_),
|
||||
oldLibPath_(ptf.oldLibPath_),
|
||||
redirectPatchFieldPtr_()
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
||||
(
|
||||
const codedFixedValueFvPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<Type>(ptf, iF),
|
||||
dict_(ptf.dict_),
|
||||
redirectType_(ptf.redirectType_),
|
||||
oldLibPath_(ptf.oldLibPath_),
|
||||
redirectPatchFieldPtr_()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
const Foam::fvPatchField<Type>&
|
||||
Foam::codedFixedValueFvPatchField<Type>::redirectPatchField() const
|
||||
{
|
||||
if (!redirectPatchFieldPtr_.valid())
|
||||
{
|
||||
// Construct a patch
|
||||
// Make sure to construct the patchfield with up-to-date value
|
||||
|
||||
OStringStream os;
|
||||
os.writeKeyword("type") << redirectType_ << token::END_STATEMENT
|
||||
<< nl;
|
||||
static_cast<const Field<Type>&>(*this).writeEntry("value", os);
|
||||
IStringStream is(os.str());
|
||||
dictionary dict(is);
|
||||
|
||||
redirectPatchFieldPtr_.set
|
||||
(
|
||||
fvPatchField<Type>::New
|
||||
(
|
||||
this->patch(),
|
||||
this->dimensionedInternalField(),
|
||||
dict
|
||||
).ptr()
|
||||
);
|
||||
}
|
||||
return redirectPatchFieldPtr_();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure library containing user-defined fvPatchField is up-to-date
|
||||
updateLibrary();
|
||||
|
||||
const fvPatchField<Type>& fvp = redirectPatchField();
|
||||
|
||||
const_cast<fvPatchField<Type>&>(fvp).updateCoeffs();
|
||||
|
||||
// Copy through value
|
||||
this->operator==(fvp);
|
||||
|
||||
fixedValueFvPatchField<Type>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType
|
||||
)
|
||||
{
|
||||
// Make sure library containing user-defined fvPatchField is up-to-date
|
||||
updateLibrary();
|
||||
|
||||
const fvPatchField<Type>& fvp = redirectPatchField();
|
||||
|
||||
const_cast<fvPatchField<Type>&>(fvp).evaluate(commsType);
|
||||
|
||||
fixedValueFvPatchField<Type>::evaluate(commsType);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
|
||||
{
|
||||
fixedValueFvPatchField<Type>::write(os);
|
||||
os.writeKeyword("redirectType") << redirectType_
|
||||
<< token::END_STATEMENT << nl;
|
||||
|
||||
if (dict_.found("code"))
|
||||
{
|
||||
os.writeKeyword("code")
|
||||
<< token::HASH << token::BEGIN_BLOCK;
|
||||
|
||||
os.writeQuoted(string(dict_["code"]), false)
|
||||
<< token::HASH << token::END_BLOCK
|
||||
<< token::END_STATEMENT << nl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,260 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
Class
|
||||
Foam::codedFixedValueFvPatchField
|
||||
|
||||
Description
|
||||
Constructs on-the-fly a new boundary condition (derived from
|
||||
fixedValueFvPatchField) which is then used to evaluate.
|
||||
|
||||
Example:
|
||||
\verbatim
|
||||
movingWall
|
||||
{
|
||||
type codedFixedValue;
|
||||
value uniform 0;
|
||||
redirectType rampedFixedValue; // name of generated bc
|
||||
|
||||
code
|
||||
#{
|
||||
operator==(min(10, 0.1*this->db().time().value()));
|
||||
#};
|
||||
|
||||
//codeInclude
|
||||
//#{
|
||||
// #include "fvCFD.H"
|
||||
//#};
|
||||
|
||||
//codeOptions
|
||||
//#{
|
||||
// -I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
//#};
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
A special form is if the 'code' section is not supplied. In this case
|
||||
the code gets read from a (runTimeModifiable!) dictionary system/codeDict
|
||||
which would have a corresponding entry
|
||||
|
||||
\verbatim
|
||||
rampedFixedValue
|
||||
{
|
||||
code
|
||||
#{
|
||||
operator==(min(10, 0.1*this->db().time().value()));
|
||||
#};
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SeeAlso
|
||||
Foam::dynamicCode and Foam::functionEntries::codeStream
|
||||
|
||||
SourceFiles
|
||||
codedFixedValueFvPatchField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef codedFixedValueFvPatchField_H
|
||||
#define codedFixedValueFvPatchField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class dynamicCode;
|
||||
class dynamicCodeContext;
|
||||
class IOdictionary;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class codedFixedValueFvPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class codedFixedValueFvPatchField
|
||||
:
|
||||
public fixedValueFvPatchField<Type>
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Dictionary contents for the boundary condition
|
||||
mutable dictionary dict_;
|
||||
|
||||
const word redirectType_;
|
||||
|
||||
//- Previously loaded library
|
||||
mutable fileName oldLibPath_;
|
||||
|
||||
mutable autoPtr<fvPatchField<Type> > redirectPatchFieldPtr_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
const IOdictionary& dict() const;
|
||||
|
||||
//- Global loader/unloader function type
|
||||
typedef void (*loaderFunctionType)(bool);
|
||||
|
||||
//- Load specified library and execute globalFuncName(true)
|
||||
static void* loadLibrary
|
||||
(
|
||||
const fileName& libPath,
|
||||
const string& globalFuncName,
|
||||
const dictionary& contextDict
|
||||
);
|
||||
|
||||
//- Execute globalFuncName(false) and unload specified library
|
||||
static void unloadLibrary
|
||||
(
|
||||
const fileName& libPath,
|
||||
const string& globalFuncName,
|
||||
const dictionary& contextDict
|
||||
);
|
||||
|
||||
//- Set the rewrite vars controlling the Type
|
||||
static void setFieldTemplates(dynamicCode& dynCode);
|
||||
|
||||
//- Create library based on the dynamicCodeContext
|
||||
void createLibrary(dynamicCode&, const dynamicCodeContext&) const;
|
||||
|
||||
//- Update library as required
|
||||
void updateLibrary() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Name of the C code template to be used
|
||||
static const word codeTemplateC;
|
||||
|
||||
//- Name of the H code template to be used
|
||||
static const word codeTemplateH;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("codedFixedValue");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
codedFixedValueFvPatchField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
codedFixedValueFvPatchField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given codedFixedValueFvPatchField
|
||||
// onto a new patch
|
||||
codedFixedValueFvPatchField
|
||||
(
|
||||
const codedFixedValueFvPatchField<Type>&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<Type, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
codedFixedValueFvPatchField
|
||||
(
|
||||
const codedFixedValueFvPatchField<Type>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchField<Type> > clone() const
|
||||
{
|
||||
return tmp<fvPatchField<Type> >
|
||||
(
|
||||
new codedFixedValueFvPatchField<Type>(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
codedFixedValueFvPatchField
|
||||
(
|
||||
const codedFixedValueFvPatchField<Type>&,
|
||||
const DimensionedField<Type, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchField<Type> > clone
|
||||
(
|
||||
const DimensionedField<Type, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchField<Type> >
|
||||
(
|
||||
new codedFixedValueFvPatchField<Type>(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Get reference to the underlying patch
|
||||
const fvPatchField<Type>& redirectPatchField() const;
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
//- Evaluate the patch field, sets Updated to false
|
||||
virtual void evaluate
|
||||
(
|
||||
const Pstream::commsTypes commsType=Pstream::blocking
|
||||
);
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "codedFixedValueFvPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "codedFixedValueFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makePatchFields(codedFixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef codedFixedValueFvPatchFields_H
|
||||
#define codedFixedValueFvPatchFields_H
|
||||
|
||||
#include "codedFixedValueFvPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePatchTypeFieldTypedefs(codedFixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,50 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef codedFixedValueFvPatchFieldsFwd_H
|
||||
#define codedFixedValueFvPatchFieldsFwd_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type> class codedFixedValueFvPatchField;
|
||||
|
||||
makePatchTypeFieldTypedefs(codedFixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -116,12 +116,6 @@ Foam::particle::particle(const particle& p, const polyMesh& mesh)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::particle::transformPosition(const tensor& T)
|
||||
{
|
||||
position_ = transform(T, position_);
|
||||
}
|
||||
|
||||
|
||||
void Foam::particle::transformProperties(const tensor&)
|
||||
{}
|
||||
|
||||
|
||||
@ -491,10 +491,6 @@ public:
|
||||
|
||||
// Transformations
|
||||
|
||||
//- Transform the position the particle
|
||||
// according to the given transformation tensor
|
||||
virtual void transformPosition(const tensor& T);
|
||||
|
||||
//- Transform the physical properties of the particle
|
||||
// according to the given transformation tensor
|
||||
virtual void transformProperties(const tensor& T);
|
||||
|
||||
@ -52,11 +52,15 @@ void Foam::particle::correctAfterParallelTransfer
|
||||
TrackData& td
|
||||
)
|
||||
{
|
||||
const processorPolyPatch& ppp =
|
||||
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
|
||||
const coupledPolyPatch& ppp =
|
||||
refCast<const coupledPolyPatch>(mesh_.boundaryMesh()[patchI]);
|
||||
|
||||
cellI_ = ppp.faceCells()[faceI_];
|
||||
|
||||
// Have patch transform the position
|
||||
ppp.transformPosition(position_, faceI_);
|
||||
|
||||
// Transform the properties
|
||||
if (!ppp.parallel())
|
||||
{
|
||||
const tensor& T =
|
||||
@ -65,8 +69,6 @@ void Foam::particle::correctAfterParallelTransfer
|
||||
? ppp.forwardT()[0]
|
||||
: ppp.forwardT()[faceI_]
|
||||
);
|
||||
|
||||
transformPosition(T);
|
||||
transformProperties(T);
|
||||
}
|
||||
else if (ppp.separated())
|
||||
@ -77,7 +79,6 @@ void Foam::particle::correctAfterParallelTransfer
|
||||
? ppp.separation()[0]
|
||||
: ppp.separation()[faceI_]
|
||||
);
|
||||
position_ -= s;
|
||||
transformProperties(-s);
|
||||
}
|
||||
|
||||
@ -958,19 +959,22 @@ void Foam::particle::hitCyclicPatch
|
||||
tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_;
|
||||
|
||||
const cyclicPolyPatch& receiveCpp = cpp.neighbPatch();
|
||||
label patchFacei = receiveCpp.whichFace(faceI_);
|
||||
|
||||
// Now the particle is on the receiving side
|
||||
|
||||
// Have patch transform the position
|
||||
receiveCpp.transformPosition(position_, patchFacei);
|
||||
|
||||
// Transform the properties
|
||||
if (!receiveCpp.parallel())
|
||||
{
|
||||
const tensor& T =
|
||||
(
|
||||
receiveCpp.forwardT().size() == 1
|
||||
? receiveCpp.forwardT()[0]
|
||||
: receiveCpp.forwardT()[receiveCpp.whichFace(faceI_)]
|
||||
: receiveCpp.forwardT()[patchFacei]
|
||||
);
|
||||
|
||||
transformPosition(T);
|
||||
transformProperties(T);
|
||||
}
|
||||
else if (receiveCpp.separated())
|
||||
@ -979,9 +983,8 @@ void Foam::particle::hitCyclicPatch
|
||||
(
|
||||
(receiveCpp.separation().size() == 1)
|
||||
? receiveCpp.separation()[0]
|
||||
: receiveCpp.separation()[receiveCpp.whichFace(faceI_)]
|
||||
: receiveCpp.separation()[patchFacei]
|
||||
);
|
||||
position_ -= s;
|
||||
transformProperties(-s);
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ Foam::LocalInteraction<CloudType>::LocalInteraction
|
||||
)
|
||||
:
|
||||
PatchInteractionModel<CloudType>(dict, cloud, typeName),
|
||||
patchData_(cloud.mesh(), this->coeffDict().lookup("patches")),
|
||||
patchData_(cloud.mesh(), this->coeffDict()),
|
||||
patchIDs_(patchData_.size()),
|
||||
nEscape0_(patchData_.size(), 0),
|
||||
massEscape0_(patchData_.size(), 0.0),
|
||||
|
||||
@ -111,12 +111,14 @@ void Foam::regionModels::singleLayerRegion::initialise()
|
||||
|
||||
if (nBoundaryFaces != regionMesh().nCells())
|
||||
{
|
||||
/*
|
||||
FatalErrorIn("singleLayerRegion::initialise()")
|
||||
<< "Number of primary region coupled boundary faces not equal to "
|
||||
<< "the number of cells in the local region" << nl << nl
|
||||
<< "Number of cells = " << regionMesh().nCells() << nl
|
||||
<< "Boundary faces = " << nBoundaryFaces << nl
|
||||
<< abort(FatalError);
|
||||
*/
|
||||
}
|
||||
|
||||
scalarField passiveMagSf(magSf.size(), 0.0);
|
||||
@ -176,11 +178,12 @@ Foam::regionModels::singleLayerRegion::singleLayerRegion
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
regionModel(mesh, regionType, modelName, false),
|
||||
regionModel(mesh, regionType, modelName, readFields),
|
||||
nHatPtr_(NULL),
|
||||
magSfPtr_(NULL),
|
||||
passivePatchIDs_()
|
||||
{
|
||||
Info << "singleLayerRegion" << endl;
|
||||
if (active_)
|
||||
{
|
||||
constructMeshObjects();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -208,14 +208,7 @@ Foam::tmp<Foam::scalarField> Foam::constSolidThermo::K
|
||||
const label patchI
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField
|
||||
(
|
||||
T_.boundaryField()[patchI].size(),
|
||||
constK_.value()
|
||||
)
|
||||
);
|
||||
return (K_.boundaryField()[patchI]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,110 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::infiniteReactionRate
|
||||
|
||||
Description
|
||||
infinite reaction rate.
|
||||
|
||||
SourceFiles
|
||||
infiniteReactionRateI.H
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef infiniteReactionRate_H
|
||||
#define infiniteReactionRate_H
|
||||
|
||||
#include "scalarField.H"
|
||||
#include "typeInfo.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class infiniteReactionRate Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class infiniteReactionRate
|
||||
{
|
||||
public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Null constructor
|
||||
inline infiniteReactionRate
|
||||
();
|
||||
|
||||
//- Construct from Istream
|
||||
inline infiniteReactionRate
|
||||
(
|
||||
const speciesTable& species,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the type name
|
||||
static word type()
|
||||
{
|
||||
return "infinite";
|
||||
}
|
||||
|
||||
inline scalar operator()
|
||||
(
|
||||
const scalar T,
|
||||
const scalar p,
|
||||
const scalarField& c
|
||||
) const;
|
||||
|
||||
//- Write to stream
|
||||
inline void write(Ostream& os) const;
|
||||
|
||||
|
||||
// Ostream Operator
|
||||
|
||||
inline friend Ostream& operator<<
|
||||
(
|
||||
Ostream&,
|
||||
const infiniteReactionRate&
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "infiniteReactionRateI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,70 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2009-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 2 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, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::infiniteReactionRate::infiniteReactionRate()
|
||||
{}
|
||||
|
||||
|
||||
inline Foam::infiniteReactionRate::infiniteReactionRate
|
||||
(
|
||||
const speciesTable&,
|
||||
const dictionary&
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
inline void Foam::infiniteReactionRate::write(Ostream& os) const
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::scalar Foam::infiniteReactionRate::operator()
|
||||
(
|
||||
const scalar,
|
||||
const scalar,
|
||||
const scalarField&
|
||||
) const
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const infiniteReactionRate& rr
|
||||
)
|
||||
{
|
||||
os << token::BEGIN_LIST
|
||||
<< token::END_LIST;
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,16 +27,19 @@ License
|
||||
#include "makeReactionThermo.H"
|
||||
|
||||
#include "ArrheniusReactionRate.H"
|
||||
#include "thirdBodyArrheniusReactionRate.H"
|
||||
#include "FallOffReactionRate.H"
|
||||
#include "ChemicallyActivatedReactionRate.H"
|
||||
#include "LindemannFallOffFunction.H"
|
||||
#include "TroeFallOffFunction.H"
|
||||
#include "SRIFallOffFunction.H"
|
||||
#include "infiniteReactionRate.H"
|
||||
#include "LandauTellerReactionRate.H"
|
||||
#include "thirdBodyArrheniusReactionRate.H"
|
||||
|
||||
#include "ChemicallyActivatedReactionRate.H"
|
||||
#include "JanevReactionRate.H"
|
||||
#include "powerSeriesReactionRate.H"
|
||||
|
||||
#include "FallOffReactionRate.H"
|
||||
#include "LindemannFallOffFunction.H"
|
||||
#include "SRIFallOffFunction.H"
|
||||
#include "TroeFallOffFunction.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -53,8 +56,10 @@ defineTemplateRunTimeSelectionTable(gasReaction, dictionary);
|
||||
// * * * * * * * * * * * * * Make CHEMKIN reactions * * * * * * * * * * * * //
|
||||
|
||||
makeIRNReactions(gasThermoPhysics, ArrheniusReactionRate)
|
||||
makeIRNReactions(gasThermoPhysics, infiniteReactionRate)
|
||||
makeIRNReactions(gasThermoPhysics, LandauTellerReactionRate)
|
||||
makeIRNReactions(gasThermoPhysics, thirdBodyArrheniusReactionRate)
|
||||
|
||||
makeIRReactions(gasThermoPhysics, JanevReactionRate)
|
||||
makeIRReactions(gasThermoPhysics, powerSeriesReactionRate)
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -27,16 +27,19 @@ License
|
||||
#include "makeReactionThermo.H"
|
||||
|
||||
#include "ArrheniusReactionRate.H"
|
||||
#include "thirdBodyArrheniusReactionRate.H"
|
||||
#include "FallOffReactionRate.H"
|
||||
#include "ChemicallyActivatedReactionRate.H"
|
||||
#include "LindemannFallOffFunction.H"
|
||||
#include "TroeFallOffFunction.H"
|
||||
#include "SRIFallOffFunction.H"
|
||||
#include "infiniteReactionRate.H"
|
||||
#include "LandauTellerReactionRate.H"
|
||||
#include "thirdBodyArrheniusReactionRate.H"
|
||||
|
||||
#include "ChemicallyActivatedReactionRate.H"
|
||||
#include "JanevReactionRate.H"
|
||||
#include "powerSeriesReactionRate.H"
|
||||
|
||||
#include "FallOffReactionRate.H"
|
||||
#include "LindemannFallOffFunction.H"
|
||||
#include "SRIFallOffFunction.H"
|
||||
#include "TroeFallOffFunction.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -53,8 +56,10 @@ defineTemplateRunTimeSelectionTable(icoPoly8Reaction, dictionary);
|
||||
// * * * * * * * * * * * * * Make CHEMKIN reactions * * * * * * * * * * * * //
|
||||
|
||||
makeIRNReactions(icoPoly8ThermoPhysics, ArrheniusReactionRate)
|
||||
makeIRNReactions(icoPoly8ThermoPhysics, infiniteReactionRate)
|
||||
makeIRNReactions(icoPoly8ThermoPhysics, LandauTellerReactionRate)
|
||||
makeIRNReactions(icoPoly8ThermoPhysics, thirdBodyArrheniusReactionRate)
|
||||
|
||||
makeIRReactions(icoPoly8ThermoPhysics, JanevReactionRate)
|
||||
makeIRReactions(icoPoly8ThermoPhysics, powerSeriesReactionRate)
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@ ddtSchemes
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
|
||||
@ -23,7 +23,6 @@ ddtSchemes
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
@ -39,7 +38,14 @@ divSchemes
|
||||
div(phiXi,Xi) Gauss upwind;
|
||||
div(phiXi,Su) Gauss upwind;
|
||||
div(phiSt,b) Gauss limitedLinear01 1;
|
||||
div(phi,ft_b_h_hu) Gauss multivariateSelection { fu limitedLinear01 1 ; ft limitedLinear01 1 ; b limitedLinear01 1 ; h limitedLinear 1 ; hu limitedLinear 1 ; };
|
||||
div(phi,ft_b_h_hu) Gauss multivariateSelection
|
||||
{
|
||||
fu limitedLinear01 1;
|
||||
ft limitedLinear01 1;
|
||||
b limitedLinear01 1;
|
||||
h limitedLinear 1;
|
||||
hu limitedLinear 1;
|
||||
};
|
||||
div(U) Gauss linear;
|
||||
div((Su*grad(b))) Gauss linear;
|
||||
div((U+((Su*Xi)*grad(b)))) Gauss linear;
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
@ -14,7 +13,6 @@ FoamFile
|
||||
location "constant";
|
||||
object LESProperties;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
LESModel oneEqEddy;
|
||||
|
||||
@ -134,63 +134,6 @@ greyMeanAbsorptionEmissionCoeffs
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
N2
|
||||
{
|
||||
Tcommon 300;
|
||||
invTemp false;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
O2
|
||||
{
|
||||
Tcommon 300;
|
||||
invTemp false;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scatterModel constantScatter;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -135,63 +135,6 @@ greyMeanAbsorptionEmissionCoeffs
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
N2
|
||||
{
|
||||
Tcommon 300;
|
||||
invTemp false;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
O2
|
||||
{
|
||||
Tcommon 300;
|
||||
invTemp false;
|
||||
Tlow 200;
|
||||
Thigh 2500;
|
||||
|
||||
loTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
hiTcoeffs
|
||||
(
|
||||
0.01
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
scatterModel constantScatter;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
|
||||
@ -13,7 +13,6 @@ FoamFile
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousSimpleFoam;
|
||||
application rhoPorousMRFSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -15,7 +15,7 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application rhoPorousSimpleFoam;
|
||||
application rhoPorousMRFSimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (25.75 3.62 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type freestream;
|
||||
freestreamValue uniform (25.75 3.62 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type freestream;
|
||||
freestreamValue uniform (25.75 3.62 0);
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object nuTilda;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0.14;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type freestream;
|
||||
freestreamValue uniform 0.14;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type freestream;
|
||||
freestreamValue uniform 0.14;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object nut;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0.14;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type freestream;
|
||||
freestreamValue uniform 0.14;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type freestream;
|
||||
freestreamValue uniform 0.14;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type nutUSpaldingWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,44 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type freestreamPressure;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type freestreamPressure;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Clean time folders only
|
||||
|
||||
rm -rf *[1-9]*
|
||||
rm -f log.* 2>/dev/null
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -1,25 +0,0 @@
|
||||
/*--------------------------------*- 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 RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel SpalartAllmaras;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,51 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
4
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
physicalType inlet;
|
||||
nFaces 134;
|
||||
startFace 21254;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
physicalType outlet;
|
||||
nFaces 160;
|
||||
startFace 21388;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type wall;
|
||||
physicalType wall;
|
||||
nFaces 78;
|
||||
startFace 21548;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
physicalType empty;
|
||||
nFaces 21440;
|
||||
startFace 21626;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user