mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -49,6 +49,8 @@
|
|||||||
{
|
{
|
||||||
phi = phiHbyA - p_rghEqn.flux();
|
phi = phiHbyA - p_rghEqn.flux();
|
||||||
|
|
||||||
|
p_rgh.relax();
|
||||||
|
|
||||||
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
|
|||||||
@ -303,7 +303,9 @@ surfaces
|
|||||||
// Sampling on triSurface
|
// Sampling on triSurface
|
||||||
type sampledTriSurfaceMesh;
|
type sampledTriSurfaceMesh;
|
||||||
surface integrationPlane.stl;
|
surface integrationPlane.stl;
|
||||||
source boundaryFaces; // sample cells or boundaryFaces
|
source boundaryFaces; // What to sample: cells (nearest cell)
|
||||||
|
// insideCells (only triangles inside cell)
|
||||||
|
// boundaryFaces (nearest boundary face)
|
||||||
interpolate true;
|
interpolate true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@ -14,7 +14,13 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// List of pairs of source/target patches for mapping
|
// Specify how to map patches. There are three different options:
|
||||||
|
// - patch exists in the source case: specify mapping (patchMap)
|
||||||
|
// - patch should be interpolated from internal values in source case
|
||||||
|
// (cuttingPatches)
|
||||||
|
// - patch should not be mapped. Default if not in patchMap or cuttingPatches
|
||||||
|
|
||||||
|
// List of pairs of target/source patches for mapping
|
||||||
patchMap
|
patchMap
|
||||||
(
|
(
|
||||||
lid movingWall
|
lid movingWall
|
||||||
|
|||||||
@ -387,6 +387,7 @@ $(cellShape)/cellShapeIO.C
|
|||||||
$(cellShape)/cellShapeIOList.C
|
$(cellShape)/cellShapeIOList.C
|
||||||
|
|
||||||
meshes/Identifiers/patch/patchIdentifier.C
|
meshes/Identifiers/patch/patchIdentifier.C
|
||||||
|
meshes/Identifiers/patch/coupleGroupIdentifier.C
|
||||||
|
|
||||||
meshes/MeshObject/meshObject.C
|
meshes/MeshObject/meshObject.C
|
||||||
|
|
||||||
|
|||||||
@ -171,7 +171,7 @@ void Foam::cyclicPolyPatch::calcTransforms
|
|||||||
"cyclicPolyPatch::calcTransforms()"
|
"cyclicPolyPatch::calcTransforms()"
|
||||||
) << "Patch " << name()
|
) << "Patch " << name()
|
||||||
<< " has transform type " << transformTypeNames[transform()]
|
<< " has transform type " << transformTypeNames[transform()]
|
||||||
<< ", neighbour patch " << neighbPatchName_
|
<< ", neighbour patch " << neighbPatchName()
|
||||||
<< " has transform type "
|
<< " has transform type "
|
||||||
<< neighbPatch().transformTypeNames[neighbPatch().transform()]
|
<< neighbPatch().transformTypeNames[neighbPatch().transform()]
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
@ -350,7 +350,7 @@ void Foam::cyclicPolyPatch::calcTransforms
|
|||||||
<< neighbPatch().separationVector_
|
<< neighbPatch().separationVector_
|
||||||
<< " by more than tolerance " << avgTol << endl
|
<< " by more than tolerance " << avgTol << endl
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " neighbour:" << neighbPatchName_
|
<< " neighbour:" << neighbPatchName()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ void Foam::cyclicPolyPatch::calcTransforms
|
|||||||
<< "Continuing with specified separation vector "
|
<< "Continuing with specified separation vector "
|
||||||
<< separationVector_ << endl
|
<< separationVector_ << endl
|
||||||
<< "patch:" << name()
|
<< "patch:" << name()
|
||||||
<< " neighbour:" << neighbPatchName_
|
<< " neighbour:" << neighbPatchName()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,6 +658,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
|||||||
:
|
:
|
||||||
coupledPolyPatch(name, dict, index, bm, patchType),
|
coupledPolyPatch(name, dict, index, bm, patchType),
|
||||||
neighbPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
|
neighbPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
|
||||||
|
coupleGroup_(dict),
|
||||||
neighbPatchID_(-1),
|
neighbPatchID_(-1),
|
||||||
rotationAxis_(vector::zero),
|
rotationAxis_(vector::zero),
|
||||||
rotationCentre_(point::zero),
|
rotationCentre_(point::zero),
|
||||||
@ -665,7 +666,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
|||||||
coupledPointsPtr_(NULL),
|
coupledPointsPtr_(NULL),
|
||||||
coupledEdgesPtr_(NULL)
|
coupledEdgesPtr_(NULL)
|
||||||
{
|
{
|
||||||
if (neighbPatchName_ == word::null)
|
if (neighbPatchName_ == word::null && !coupleGroup_.valid())
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
@ -733,7 +734,8 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledPolyPatch(pp, bm),
|
coupledPolyPatch(pp, bm),
|
||||||
neighbPatchName_(pp.neighbPatchName()),
|
neighbPatchName_(pp.neighbPatchName_),
|
||||||
|
coupleGroup_(pp.coupleGroup_),
|
||||||
neighbPatchID_(-1),
|
neighbPatchID_(-1),
|
||||||
rotationAxis_(pp.rotationAxis_),
|
rotationAxis_(pp.rotationAxis_),
|
||||||
rotationCentre_(pp.rotationCentre_),
|
rotationCentre_(pp.rotationCentre_),
|
||||||
@ -753,11 +755,12 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
|||||||
const label index,
|
const label index,
|
||||||
const label newSize,
|
const label newSize,
|
||||||
const label newStart,
|
const label newStart,
|
||||||
const word& neighbPatchName
|
const word& neighbName
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledPolyPatch(pp, bm, index, newSize, newStart),
|
coupledPolyPatch(pp, bm, index, newSize, newStart),
|
||||||
neighbPatchName_(neighbPatchName),
|
neighbPatchName_(neighbName),
|
||||||
|
coupleGroup_(pp.coupleGroup_),
|
||||||
neighbPatchID_(-1),
|
neighbPatchID_(-1),
|
||||||
rotationAxis_(pp.rotationAxis_),
|
rotationAxis_(pp.rotationAxis_),
|
||||||
rotationCentre_(pp.rotationCentre_),
|
rotationCentre_(pp.rotationCentre_),
|
||||||
@ -765,10 +768,10 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
|||||||
coupledPointsPtr_(NULL),
|
coupledPointsPtr_(NULL),
|
||||||
coupledEdgesPtr_(NULL)
|
coupledEdgesPtr_(NULL)
|
||||||
{
|
{
|
||||||
if (neighbPatchName_ == name())
|
if (neighbName == name())
|
||||||
{
|
{
|
||||||
FatalErrorIn("cyclicPolyPatch::cyclicPolyPatch(..)")
|
FatalErrorIn("cyclicPolyPatch::cyclicPolyPatch(..)")
|
||||||
<< "Neighbour patch name " << neighbPatchName_
|
<< "Neighbour patch name " << neighbName
|
||||||
<< " cannot be the same as this patch " << name()
|
<< " cannot be the same as this patch " << name()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
@ -789,6 +792,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
|||||||
:
|
:
|
||||||
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||||
neighbPatchName_(pp.neighbPatchName_),
|
neighbPatchName_(pp.neighbPatchName_),
|
||||||
|
coupleGroup_(pp.coupleGroup_),
|
||||||
neighbPatchID_(-1),
|
neighbPatchID_(-1),
|
||||||
rotationAxis_(pp.rotationAxis_),
|
rotationAxis_(pp.rotationAxis_),
|
||||||
rotationCentre_(pp.rotationCentre_),
|
rotationCentre_(pp.rotationCentre_),
|
||||||
@ -809,16 +813,29 @@ Foam::cyclicPolyPatch::~cyclicPolyPatch()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
const Foam::word& Foam::cyclicPolyPatch::neighbPatchName() const
|
||||||
|
{
|
||||||
|
if (neighbPatchName_.empty())
|
||||||
|
{
|
||||||
|
// Try and use patchGroup to find samplePatch and sampleRegion
|
||||||
|
label patchID = coupleGroup_.findOtherPatchID(*this);
|
||||||
|
|
||||||
|
neighbPatchName_ = boundaryMesh()[patchID].name();
|
||||||
|
}
|
||||||
|
return neighbPatchName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::label Foam::cyclicPolyPatch::neighbPatchID() const
|
Foam::label Foam::cyclicPolyPatch::neighbPatchID() const
|
||||||
{
|
{
|
||||||
if (neighbPatchID_ == -1)
|
if (neighbPatchID_ == -1)
|
||||||
{
|
{
|
||||||
neighbPatchID_ = this->boundaryMesh().findPatchID(neighbPatchName_);
|
neighbPatchID_ = this->boundaryMesh().findPatchID(neighbPatchName());
|
||||||
|
|
||||||
if (neighbPatchID_ == -1)
|
if (neighbPatchID_ == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("cyclicPolyPatch::neighbPatchID() const")
|
FatalErrorIn("cyclicPolyPatch::neighbPatchID() const")
|
||||||
<< "Illegal neighbourPatch name " << neighbPatchName_
|
<< "Illegal neighbourPatch name " << neighbPatchName()
|
||||||
<< endl << "Valid patch names are "
|
<< endl << "Valid patch names are "
|
||||||
<< this->boundaryMesh().names()
|
<< this->boundaryMesh().names()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
@ -1256,7 +1273,7 @@ bool Foam::cyclicPolyPatch::order
|
|||||||
{
|
{
|
||||||
Pout<< "order : of " << pp.size()
|
Pout<< "order : of " << pp.size()
|
||||||
<< " faces of patch:" << name()
|
<< " faces of patch:" << name()
|
||||||
<< " neighbour:" << neighbPatchName_
|
<< " neighbour:" << neighbPatchName()
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
faceMap.setSize(pp.size());
|
faceMap.setSize(pp.size());
|
||||||
@ -1444,8 +1461,12 @@ bool Foam::cyclicPolyPatch::order
|
|||||||
void Foam::cyclicPolyPatch::write(Ostream& os) const
|
void Foam::cyclicPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
coupledPolyPatch::write(os);
|
coupledPolyPatch::write(os);
|
||||||
|
if (!neighbPatchName_.empty())
|
||||||
|
{
|
||||||
os.writeKeyword("neighbourPatch") << neighbPatchName_
|
os.writeKeyword("neighbourPatch") << neighbPatchName_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
|
coupleGroup_.write(os);
|
||||||
switch (transform())
|
switch (transform())
|
||||||
{
|
{
|
||||||
case ROTATIONAL:
|
case ROTATIONAL:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -50,6 +50,7 @@ SourceFiles
|
|||||||
#include "edgeList.H"
|
#include "edgeList.H"
|
||||||
#include "polyBoundaryMesh.H"
|
#include "polyBoundaryMesh.H"
|
||||||
#include "diagTensorField.H"
|
#include "diagTensorField.H"
|
||||||
|
#include "coupleGroupIdentifier.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -67,7 +68,10 @@ class cyclicPolyPatch
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Name of other half
|
//- Name of other half
|
||||||
const word neighbPatchName_;
|
mutable word neighbPatchName_;
|
||||||
|
|
||||||
|
//- Optional patchGroup to find neighbPatch
|
||||||
|
const coupleGroupIdentifier coupleGroup_;
|
||||||
|
|
||||||
//- Index of other half
|
//- Index of other half
|
||||||
mutable label neighbPatchID_;
|
mutable label neighbPatchID_;
|
||||||
@ -306,12 +310,10 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
const word& neighbPatchName() const
|
//- Neighbour patch name
|
||||||
{
|
const word& neighbPatchName() const;
|
||||||
return neighbPatchName_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Neighbour patchID.
|
//- Neighbour patchID
|
||||||
virtual label neighbPatchID() const;
|
virtual label neighbPatchID() const;
|
||||||
|
|
||||||
virtual bool owner() const
|
virtual bool owner() const
|
||||||
|
|||||||
@ -46,7 +46,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(0.0),
|
mixingLength_(0.0),
|
||||||
phiName_("phi"),
|
|
||||||
kName_("k")
|
kName_("k")
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -66,7 +65,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -81,9 +79,10 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -100,7 +99,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -114,7 +112,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -147,7 +144,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -164,7 +161,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("mixingLength")
|
os.writeKeyword("mixingLength")
|
||||||
<< mixingLength_ << token::END_STATEMENT << nl;
|
<< mixingLength_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,9 +98,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
//- turbulent length scale
|
//- turbulent length scale
|
||||||
scalar mixingLength_;
|
scalar mixingLength_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the turbulent kinetic energy field
|
//- Name of the turbulent kinetic energy field
|
||||||
word kName_;
|
word kName_;
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(0.0),
|
mixingLength_(0.0),
|
||||||
phiName_("undefined-phi"),
|
|
||||||
kName_("undefined-k")
|
kName_("undefined-k")
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -65,7 +64,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -79,9 +77,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -97,7 +96,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -110,7 +108,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -143,7 +140,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -160,7 +157,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("mixingLength")
|
os.writeKeyword("mixingLength")
|
||||||
<< mixingLength_ << token::END_STATEMENT << nl;
|
<< mixingLength_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,9 +99,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
//- Turbulent length scale
|
//- Turbulent length scale
|
||||||
scalar mixingLength_;
|
scalar mixingLength_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the turbulent kinetic energy field
|
//- Name of the turbulent kinetic energy field
|
||||||
word kName_;
|
word kName_;
|
||||||
|
|
||||||
|
|||||||
@ -73,6 +73,8 @@ SRFFreestreamVelocityFvPatchVectorField
|
|||||||
relative_(dict.lookupOrDefault("relative", false)),
|
relative_(dict.lookupOrDefault("relative", false)),
|
||||||
UInf_(dict.lookup("UInf"))
|
UInf_(dict.lookup("UInf"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi","phi");
|
||||||
|
|
||||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,6 +160,7 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::write(Ostream& os) const
|
|||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl;
|
os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl;
|
os.writeKeyword("UInf") << UInf_ << token::END_STATEMENT << nl;
|
||||||
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -66,6 +66,8 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchField<Type>(p, iF)
|
inletOutletFvPatchField<Type>(p, iF)
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi","phi");
|
||||||
|
|
||||||
freestreamValue() = Field<Type>("freestreamValue", dict, p.size());
|
freestreamValue() = Field<Type>("freestreamValue", dict, p.size());
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
@ -79,8 +81,6 @@ freestreamFvPatchField<Type>::freestreamFvPatchField
|
|||||||
{
|
{
|
||||||
fvPatchField<Type>::operator=(freestreamValue());
|
fvPatchField<Type>::operator=(freestreamValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
dict.readIfPresent("phi", this->phiName_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,6 @@ inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
UName_("U"),
|
UName_("U"),
|
||||||
phiName_("phi"),
|
|
||||||
psiName_("psi"),
|
psiName_("psi"),
|
||||||
gamma_(0.0),
|
gamma_(0.0),
|
||||||
T0_(p.size(), 0.0)
|
T0_(p.size(), 0.0)
|
||||||
@ -62,7 +61,6 @@ inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
UName_(ptf.UName_),
|
UName_(ptf.UName_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
psiName_(ptf.psiName_),
|
psiName_(ptf.psiName_),
|
||||||
gamma_(ptf.gamma_),
|
gamma_(ptf.gamma_),
|
||||||
T0_(ptf.T0_, mapper)
|
T0_(ptf.T0_, mapper)
|
||||||
@ -79,11 +77,12 @@ inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
psiName_(dict.lookupOrDefault<word>("psi", "psi")),
|
psiName_(dict.lookupOrDefault<word>("psi", "psi")),
|
||||||
gamma_(readScalar(dict.lookup("gamma"))),
|
gamma_(readScalar(dict.lookup("gamma"))),
|
||||||
T0_("T0", dict, p.size())
|
T0_("T0", dict, p.size())
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
this->refValue() = pTraits<scalar>::zero;
|
this->refValue() = pTraits<scalar>::zero;
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
@ -110,7 +109,6 @@ inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(tppsf),
|
inletOutletFvPatchScalarField(tppsf),
|
||||||
UName_(tppsf.UName_),
|
UName_(tppsf.UName_),
|
||||||
phiName_(tppsf.phiName_),
|
|
||||||
psiName_(tppsf.psiName_),
|
psiName_(tppsf.psiName_),
|
||||||
gamma_(tppsf.gamma_),
|
gamma_(tppsf.gamma_),
|
||||||
T0_(tppsf.T0_)
|
T0_(tppsf.T0_)
|
||||||
@ -126,7 +124,6 @@ inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(tppsf, iF),
|
inletOutletFvPatchScalarField(tppsf, iF),
|
||||||
UName_(tppsf.UName_),
|
UName_(tppsf.UName_),
|
||||||
phiName_(tppsf.phiName_),
|
|
||||||
psiName_(tppsf.psiName_),
|
psiName_(tppsf.psiName_),
|
||||||
gamma_(tppsf.gamma_),
|
gamma_(tppsf.gamma_),
|
||||||
T0_(tppsf.T0_)
|
T0_(tppsf.T0_)
|
||||||
@ -171,7 +168,7 @@ void Foam::inletOutletTotalTemperatureFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||||
|
|
||||||
const fvsPatchField<scalar>& phip =
|
const fvsPatchField<scalar>& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
const fvPatchField<scalar>& psip =
|
const fvPatchField<scalar>& psip =
|
||||||
patch().lookupPatchField<volScalarField, scalar>(psiName_);
|
patch().lookupPatchField<volScalarField, scalar>(psiName_);
|
||||||
@ -191,7 +188,7 @@ const
|
|||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
|
||||||
writeEntryIfDifferent<word>(os, "psi", "psi", psiName_);
|
writeEntryIfDifferent<word>(os, "psi", "psi", psiName_);
|
||||||
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
|
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
|
||||||
T0_.writeEntry("T0", os);
|
T0_.writeEntry("T0", os);
|
||||||
|
|||||||
@ -90,9 +90,6 @@ class inletOutletTotalTemperatureFvPatchScalarField
|
|||||||
//- Name of the velocity field
|
//- Name of the velocity field
|
||||||
word UName_;
|
word UName_;
|
||||||
|
|
||||||
//- Name of the flux transporting the field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the compressibility field used to calculate the wave speed
|
//- Name of the compressibility field used to calculate the wave speed
|
||||||
word psiName_;
|
word psiName_;
|
||||||
|
|
||||||
|
|||||||
@ -40,8 +40,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
intensity_(0.0),
|
intensity_(0.0),
|
||||||
UName_("U"),
|
UName_("U")
|
||||||
phiName_("phi")
|
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
this->refGrad() = 0.0;
|
this->refGrad() = 0.0;
|
||||||
@ -59,8 +58,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
intensity_(ptf.intensity_),
|
intensity_(ptf.intensity_),
|
||||||
UName_(ptf.UName_),
|
UName_(ptf.UName_)
|
||||||
phiName_(ptf.phiName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
|
Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
|
||||||
@ -73,9 +71,10 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
intensity_(readScalar(dict.lookup("intensity"))),
|
intensity_(readScalar(dict.lookup("intensity"))),
|
||||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
UName_(dict.lookupOrDefault<word>("U", "U"))
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi"))
|
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
if (intensity_ < 0 || intensity_ > 1)
|
if (intensity_ < 0 || intensity_ > 1)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
@ -111,8 +110,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
intensity_(ptf.intensity_),
|
intensity_(ptf.intensity_),
|
||||||
UName_(ptf.UName_),
|
UName_(ptf.UName_)
|
||||||
phiName_(ptf.phiName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -125,8 +123,7 @@ turbulentIntensityKineticEnergyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
intensity_(ptf.intensity_),
|
intensity_(ptf.intensity_),
|
||||||
UName_(ptf.UName_),
|
UName_(ptf.UName_)
|
||||||
phiName_(ptf.phiName_)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +141,7 @@ updateCoeffs()
|
|||||||
patch().lookupPatchField<volVectorField, vector>(UName_);
|
patch().lookupPatchField<volVectorField, vector>(UName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = 1.5*sqr(intensity_)*magSqr(Up);
|
this->refValue() = 1.5*sqr(intensity_)*magSqr(Up);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -161,7 +158,7 @@ void Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl;
|
os.writeKeyword("intensity") << intensity_ << token::END_STATEMENT << nl;
|
||||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
writeEntryIfDifferent<word>(os, "phi", "phi", this->phiName_);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -99,9 +99,6 @@ class turbulentIntensityKineticEnergyInletFvPatchScalarField
|
|||||||
//- Name of the velocity field
|
//- Name of the velocity field
|
||||||
word UName_;
|
word UName_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ void Foam::cyclicAMIPolyPatch::calcTransforms
|
|||||||
FatalErrorIn("cyclicAMIPolyPatch::calcTransforms()")
|
FatalErrorIn("cyclicAMIPolyPatch::calcTransforms()")
|
||||||
<< "Patch " << name()
|
<< "Patch " << name()
|
||||||
<< " has transform type " << transformTypeNames[transform()]
|
<< " has transform type " << transformTypeNames[transform()]
|
||||||
<< ", neighbour patch " << nbrPatchName_
|
<< ", neighbour patch " << neighbPatchName()
|
||||||
<< " has transform type "
|
<< " has transform type "
|
||||||
<< neighbPatch().transformTypeNames[neighbPatch().transform()]
|
<< neighbPatch().transformTypeNames[neighbPatch().transform()]
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
@ -416,7 +416,8 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledPolyPatch(name, dict, index, bm, patchType),
|
coupledPolyPatch(name, dict, index, bm, patchType),
|
||||||
nbrPatchName_(dict.lookup("neighbourPatch")),
|
nbrPatchName_(dict.lookupOrDefault<word>("neighbourPatch", "")),
|
||||||
|
coupleGroup_(dict),
|
||||||
nbrPatchID_(-1),
|
nbrPatchID_(-1),
|
||||||
rotationAxis_(vector::zero),
|
rotationAxis_(vector::zero),
|
||||||
rotationCentre_(point::zero),
|
rotationCentre_(point::zero),
|
||||||
@ -426,6 +427,22 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
surfPtr_(NULL),
|
surfPtr_(NULL),
|
||||||
surfDict_(dict.subOrEmptyDict("surface"))
|
surfDict_(dict.subOrEmptyDict("surface"))
|
||||||
{
|
{
|
||||||
|
if (nbrPatchName_ == word::null && !coupleGroup_.valid())
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"cyclicAMIPolyPatch::cyclicAMIPolyPatch"
|
||||||
|
"("
|
||||||
|
"const word&, "
|
||||||
|
"const dictionary&, "
|
||||||
|
"const label, "
|
||||||
|
"const polyBoundaryMesh&"
|
||||||
|
")",
|
||||||
|
dict
|
||||||
|
) << "No \"neighbourPatch\" or \"coupleGroup\" provided."
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
if (nbrPatchName_ == name)
|
if (nbrPatchName_ == name)
|
||||||
{
|
{
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
@ -495,6 +512,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
:
|
:
|
||||||
coupledPolyPatch(pp, bm),
|
coupledPolyPatch(pp, bm),
|
||||||
nbrPatchName_(pp.nbrPatchName_),
|
nbrPatchName_(pp.nbrPatchName_),
|
||||||
|
coupleGroup_(pp.coupleGroup_),
|
||||||
nbrPatchID_(-1),
|
nbrPatchID_(-1),
|
||||||
rotationAxis_(pp.rotationAxis_),
|
rotationAxis_(pp.rotationAxis_),
|
||||||
rotationCentre_(pp.rotationCentre_),
|
rotationCentre_(pp.rotationCentre_),
|
||||||
@ -521,6 +539,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
:
|
:
|
||||||
coupledPolyPatch(pp, bm, index, newSize, newStart),
|
coupledPolyPatch(pp, bm, index, newSize, newStart),
|
||||||
nbrPatchName_(nbrPatchName),
|
nbrPatchName_(nbrPatchName),
|
||||||
|
coupleGroup_(pp.coupleGroup_),
|
||||||
nbrPatchID_(-1),
|
nbrPatchID_(-1),
|
||||||
rotationAxis_(pp.rotationAxis_),
|
rotationAxis_(pp.rotationAxis_),
|
||||||
rotationCentre_(pp.rotationCentre_),
|
rotationCentre_(pp.rotationCentre_),
|
||||||
@ -561,6 +580,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
|||||||
:
|
:
|
||||||
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||||
nbrPatchName_(pp.nbrPatchName_),
|
nbrPatchName_(pp.nbrPatchName_),
|
||||||
|
coupleGroup_(pp.coupleGroup_),
|
||||||
nbrPatchID_(-1),
|
nbrPatchID_(-1),
|
||||||
rotationAxis_(pp.rotationAxis_),
|
rotationAxis_(pp.rotationAxis_),
|
||||||
rotationCentre_(pp.rotationCentre_),
|
rotationCentre_(pp.rotationCentre_),
|
||||||
@ -584,12 +604,12 @@ Foam::label Foam::cyclicAMIPolyPatch::neighbPatchID() const
|
|||||||
{
|
{
|
||||||
if (nbrPatchID_ == -1)
|
if (nbrPatchID_ == -1)
|
||||||
{
|
{
|
||||||
nbrPatchID_ = this->boundaryMesh().findPatchID(nbrPatchName_);
|
nbrPatchID_ = this->boundaryMesh().findPatchID(neighbPatchName());
|
||||||
|
|
||||||
if (nbrPatchID_ == -1)
|
if (nbrPatchID_ == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const")
|
FatalErrorIn("cyclicPolyAMIPatch::neighbPatchID() const")
|
||||||
<< "Illegal neighbourPatch name " << nbrPatchName_
|
<< "Illegal neighbourPatch name " << neighbPatchName()
|
||||||
<< nl << "Valid patch names are "
|
<< nl << "Valid patch names are "
|
||||||
<< this->boundaryMesh().names()
|
<< this->boundaryMesh().names()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
@ -832,8 +852,12 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace
|
|||||||
void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
|
void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
coupledPolyPatch::write(os);
|
coupledPolyPatch::write(os);
|
||||||
|
if (!nbrPatchName_.empty())
|
||||||
|
{
|
||||||
os.writeKeyword("neighbourPatch") << nbrPatchName_
|
os.writeKeyword("neighbourPatch") << nbrPatchName_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
|
coupleGroup_.write(os);
|
||||||
|
|
||||||
switch (transform())
|
switch (transform())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,6 +38,7 @@ SourceFiles
|
|||||||
#include "coupledPolyPatch.H"
|
#include "coupledPolyPatch.H"
|
||||||
#include "AMIPatchToPatchInterpolation.H"
|
#include "AMIPatchToPatchInterpolation.H"
|
||||||
#include "polyBoundaryMesh.H"
|
#include "polyBoundaryMesh.H"
|
||||||
|
#include "coupleGroupIdentifier.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -58,7 +59,10 @@ private:
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Name of other half
|
//- Name of other half
|
||||||
const word nbrPatchName_;
|
mutable word nbrPatchName_;
|
||||||
|
|
||||||
|
//- Optional patchGroup to find neighbPatch
|
||||||
|
const coupleGroupIdentifier coupleGroup_;
|
||||||
|
|
||||||
//- Index of other half
|
//- Index of other half
|
||||||
mutable label nbrPatchID_;
|
mutable label nbrPatchID_;
|
||||||
|
|||||||
@ -27,6 +27,13 @@ License
|
|||||||
|
|
||||||
inline const Foam::word& Foam::cyclicAMIPolyPatch::neighbPatchName() const
|
inline const Foam::word& Foam::cyclicAMIPolyPatch::neighbPatchName() const
|
||||||
{
|
{
|
||||||
|
if (nbrPatchName_.empty())
|
||||||
|
{
|
||||||
|
// Try and use patchGroup to find samplePatch and sampleRegion
|
||||||
|
label patchID = coupleGroup_.findOtherPatchID(*this);
|
||||||
|
|
||||||
|
nbrPatchName_ = boundaryMesh()[patchID].name();
|
||||||
|
}
|
||||||
return nbrPatchName_;
|
return nbrPatchName_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -199,7 +199,6 @@ mappedPatches/mappedPolyPatch/mappedPatchBase.C
|
|||||||
mappedPatches/mappedPolyPatch/mappedPolyPatch.C
|
mappedPatches/mappedPolyPatch/mappedPolyPatch.C
|
||||||
mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C
|
mappedPatches/mappedPolyPatch/mappedWallPolyPatch.C
|
||||||
mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C
|
mappedPatches/mappedPolyPatch/mappedVariableThicknessWallPolyPatch.C
|
||||||
mappedPatches/mappedPolyPatch/coupleGroupIdentifier.C
|
|
||||||
|
|
||||||
mappedPatches/mappedPointPatch/mappedPointPatch.C
|
mappedPatches/mappedPointPatch/mappedPointPatch.C
|
||||||
mappedPatches/mappedPointPatch/mappedWallPointPatch.C
|
mappedPatches/mappedPointPatch/mappedWallPointPatch.C
|
||||||
|
|||||||
@ -1402,10 +1402,16 @@ void Foam::mappedPatchBase::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
os.writeKeyword("sampleMode") << sampleModeNames_[mode_]
|
os.writeKeyword("sampleMode") << sampleModeNames_[mode_]
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("sampleRegion") << sampleRegion()
|
if (!sampleRegion_.empty())
|
||||||
|
{
|
||||||
|
os.writeKeyword("sampleRegion") << sampleRegion_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("samplePatch") << samplePatch()
|
}
|
||||||
|
if (!samplePatch_.empty())
|
||||||
|
{
|
||||||
|
os.writeKeyword("samplePatch") << samplePatch_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
}
|
||||||
coupleGroup_.write(os);
|
coupleGroup_.write(os);
|
||||||
|
|
||||||
if
|
if
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -326,7 +326,7 @@ void Foam::booleanSurface::propagateSide
|
|||||||
{
|
{
|
||||||
side[faceI] = prevState;
|
side[faceI] = prevState;
|
||||||
|
|
||||||
const labelledTri& tri = surf[faceI];
|
const labelledTri& tri = surf.localFaces()[faceI];
|
||||||
|
|
||||||
// Get copy of face labels
|
// Get copy of face labels
|
||||||
label a = tri[0];
|
label a = tri[0];
|
||||||
|
|||||||
@ -46,13 +46,14 @@ namespace Foam
|
|||||||
);
|
);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const char* NamedEnum<sampledTriSurfaceMesh::samplingSource, 2>::names[] =
|
const char* NamedEnum<sampledTriSurfaceMesh::samplingSource, 3>::names[] =
|
||||||
{
|
{
|
||||||
"cells",
|
"cells",
|
||||||
|
"insideCells",
|
||||||
"boundaryFaces"
|
"boundaryFaces"
|
||||||
};
|
};
|
||||||
|
|
||||||
const NamedEnum<sampledTriSurfaceMesh::samplingSource, 2>
|
const NamedEnum<sampledTriSurfaceMesh::samplingSource, 3>
|
||||||
sampledTriSurfaceMesh::samplingSourceNames_;
|
sampledTriSurfaceMesh::samplingSourceNames_;
|
||||||
|
|
||||||
|
|
||||||
@ -147,7 +148,7 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher)
|
|||||||
// elements
|
// elements
|
||||||
globalIndex globalCells
|
globalIndex globalCells
|
||||||
(
|
(
|
||||||
sampleSource_ == cells
|
(sampleSource_ == cells || sampleSource_ == insideCells)
|
||||||
? mesh().nCells()
|
? mesh().nCells()
|
||||||
: mesh().nFaces()
|
: mesh().nFaces()
|
||||||
);
|
);
|
||||||
@ -178,6 +179,25 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (sampleSource_ == insideCells)
|
||||||
|
{
|
||||||
|
// Search for cell containing point
|
||||||
|
|
||||||
|
const indexedOctree<treeDataCell>& cellTree = meshSearcher.cellTree();
|
||||||
|
|
||||||
|
forAll(fc, triI)
|
||||||
|
{
|
||||||
|
if (cellTree.bb().contains(fc[triI]))
|
||||||
|
{
|
||||||
|
label index = cellTree.findInside(fc[triI]);
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
nearest[triI].first() = 0.0;
|
||||||
|
nearest[triI].second() = globalCells.toGlobal(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Search for nearest boundaryFace
|
// Search for nearest boundaryFace
|
||||||
@ -364,6 +384,19 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (sampleSource_ == insideCells)
|
||||||
|
{
|
||||||
|
// samplePoints_ : per surface point a location inside the cell
|
||||||
|
// sampleElements_ : per surface point the cell
|
||||||
|
|
||||||
|
forAll(points(), pointI)
|
||||||
|
{
|
||||||
|
const point& pt = points()[pointI];
|
||||||
|
label cellI = cellOrFaceLabels[pointToFace[pointI]];
|
||||||
|
sampleElements_[pointI] = cellI;
|
||||||
|
samplePoints_[pointI] = pt;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// samplePoints_ : per surface point a location on the boundary
|
// samplePoints_ : per surface point a location on the boundary
|
||||||
@ -388,6 +421,9 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher)
|
|||||||
// if sampleSource_ == cells:
|
// if sampleSource_ == cells:
|
||||||
// samplePoints_ : n/a
|
// samplePoints_ : n/a
|
||||||
// sampleElements_ : per surface triangle the cell
|
// sampleElements_ : per surface triangle the cell
|
||||||
|
// if sampleSource_ == insideCells:
|
||||||
|
// samplePoints_ : n/a
|
||||||
|
// sampleElements_ : -1 or per surface triangle the cell
|
||||||
// else:
|
// else:
|
||||||
// samplePoints_ : n/a
|
// samplePoints_ : n/a
|
||||||
// sampleElements_ : per surface triangle the boundary face
|
// sampleElements_ : per surface triangle the boundary face
|
||||||
@ -406,7 +442,7 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher)
|
|||||||
|
|
||||||
if (sampledSurface::interpolate())
|
if (sampledSurface::interpolate())
|
||||||
{
|
{
|
||||||
if (sampleSource_ == cells)
|
if (sampleSource_ == cells || sampleSource_ == insideCells)
|
||||||
{
|
{
|
||||||
forAll(samplePoints_, pointI)
|
forAll(samplePoints_, pointI)
|
||||||
{
|
{
|
||||||
@ -443,7 +479,7 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sampleSource_ == cells)
|
if (sampleSource_ == cells || sampleSource_ == insideCells)
|
||||||
{
|
{
|
||||||
forAll(sampleElements_, triI)
|
forAll(sampleElements_, triI)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Description
|
|||||||
|
|
||||||
- it either samples cells or (non-coupled) boundary faces
|
- it either samples cells or (non-coupled) boundary faces
|
||||||
|
|
||||||
- 4 different modes:
|
- 6 different modes:
|
||||||
- source=cells, interpolate=false:
|
- source=cells, interpolate=false:
|
||||||
finds per triangle centre the nearest cell centre and uses its value
|
finds per triangle centre the nearest cell centre and uses its value
|
||||||
- source=cells, interpolate=true
|
- source=cells, interpolate=true
|
||||||
@ -40,6 +40,12 @@ Description
|
|||||||
the boundary of the cell (to make sure interpolateCellPoint
|
the boundary of the cell (to make sure interpolateCellPoint
|
||||||
gets a valid location)
|
gets a valid location)
|
||||||
|
|
||||||
|
- source=insideCells, interpolate=false:
|
||||||
|
finds per triangle centre the cell containing it and uses its value.
|
||||||
|
Trims triangles outside mesh.
|
||||||
|
- source=insideCells, interpolate=true
|
||||||
|
Per surface point interpolate cell containing it.
|
||||||
|
|
||||||
- source=boundaryFaces, interpolate=false:
|
- source=boundaryFaces, interpolate=false:
|
||||||
finds per triangle centre the nearest point on the boundary
|
finds per triangle centre the nearest point on the boundary
|
||||||
(uncoupled faces only) and uses the value (or 0 if the nearest
|
(uncoupled faces only) and uses the value (or 0 if the nearest
|
||||||
@ -88,7 +94,8 @@ public:
|
|||||||
enum samplingSource
|
enum samplingSource
|
||||||
{
|
{
|
||||||
cells,
|
cells,
|
||||||
boundaryFaces
|
insideCells,
|
||||||
|
boundaryFaces,
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -99,7 +106,7 @@ private:
|
|||||||
|
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
static const NamedEnum<samplingSource, 2> samplingSourceNames_;
|
static const NamedEnum<samplingSource, 3> samplingSourceNames_;
|
||||||
|
|
||||||
//- Surface to sample on
|
//- Surface to sample on
|
||||||
const triSurfaceMesh surface_;
|
const triSurfaceMesh surface_;
|
||||||
|
|||||||
@ -38,7 +38,7 @@ Foam::sampledTriSurfaceMesh::sampleField
|
|||||||
tmp<Field<Type> > tvalues(new Field<Type>(sampleElements_.size()));
|
tmp<Field<Type> > tvalues(new Field<Type>(sampleElements_.size()));
|
||||||
Field<Type>& values = tvalues();
|
Field<Type>& values = tvalues();
|
||||||
|
|
||||||
if (sampleSource_ == cells)
|
if (sampleSource_ == cells || sampleSource_ == insideCells)
|
||||||
{
|
{
|
||||||
// Sample cells
|
// Sample cells
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ Foam::sampledTriSurfaceMesh::interpolateField
|
|||||||
tmp<Field<Type> > tvalues(new Field<Type>(sampleElements_.size()));
|
tmp<Field<Type> > tvalues(new Field<Type>(sampleElements_.size()));
|
||||||
Field<Type>& values = tvalues();
|
Field<Type>& values = tvalues();
|
||||||
|
|
||||||
if (sampleSource_ == cells)
|
if (sampleSource_ == cells || sampleSource_ == insideCells)
|
||||||
{
|
{
|
||||||
// Sample cells.
|
// Sample cells.
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(0.0),
|
mixingLength_(0.0),
|
||||||
phiName_("phi"),
|
|
||||||
kName_("k")
|
kName_("k")
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -68,7 +67,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -83,9 +81,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -102,7 +100,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -116,7 +113,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -143,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -160,7 +156,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("mixingLength")
|
os.writeKeyword("mixingLength")
|
||||||
<< mixingLength_ << token::END_STATEMENT << nl;
|
<< mixingLength_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,9 +101,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
//- turbulent length scale
|
//- turbulent length scale
|
||||||
scalar mixingLength_;
|
scalar mixingLength_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the turbulent kinetic energy field
|
//- Name of the turbulent kinetic energy field
|
||||||
word kName_;
|
word kName_;
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(0.0),
|
mixingLength_(0.0),
|
||||||
phiName_("phi"),
|
|
||||||
kName_("k")
|
kName_("k")
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -68,7 +67,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -83,9 +81,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -102,7 +101,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -116,7 +114,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -143,7 +140,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -160,7 +157,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("mixingLength")
|
os.writeKeyword("mixingLength")
|
||||||
<< mixingLength_ << token::END_STATEMENT << nl;
|
<< mixingLength_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -100,9 +100,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
//- Turbulent length scale
|
//- Turbulent length scale
|
||||||
scalar mixingLength_;
|
scalar mixingLength_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the turbulent kinetic energy field
|
//- Name of the turbulent kinetic energy field
|
||||||
word kName_;
|
word kName_;
|
||||||
|
|
||||||
|
|||||||
@ -74,11 +74,11 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
mixedFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
TName_(ptf.TName_),
|
TName_(ptf.TName_),
|
||||||
baffleActivated_(ptf.baffleActivated_),
|
baffleActivated_(ptf.baffleActivated_),
|
||||||
thickness_(ptf.thickness_),
|
thickness_(ptf.thickness_, mapper),
|
||||||
Qs_(ptf.Qs_),
|
Qs_(ptf.Qs_, mapper),
|
||||||
solidDict_(ptf.solidDict_),
|
solidDict_(ptf.solidDict_),
|
||||||
solidPtr_(ptf.solidPtr_),
|
solidPtr_(ptf.solidPtr_),
|
||||||
QrPrevious_(ptf.QrPrevious_),
|
QrPrevious_(ptf.QrPrevious_, mapper),
|
||||||
QrRelaxation_(ptf.QrRelaxation_),
|
QrRelaxation_(ptf.QrRelaxation_),
|
||||||
QrName_(ptf.QrName_)
|
QrName_(ptf.QrName_)
|
||||||
{}
|
{}
|
||||||
@ -98,7 +98,7 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
TName_("T"),
|
TName_("T"),
|
||||||
baffleActivated_(dict.lookupOrDefault<bool>("baffleActivated", true)),
|
baffleActivated_(dict.lookupOrDefault<bool>("baffleActivated", true)),
|
||||||
thickness_(),
|
thickness_(),
|
||||||
Qs_(),
|
Qs_(p.size(), 0),
|
||||||
solidDict_(dict),
|
solidDict_(dict),
|
||||||
solidPtr_(),
|
solidPtr_(),
|
||||||
QrPrevious_(p.size(), 0.0),
|
QrPrevious_(p.size(), 0.0),
|
||||||
@ -107,6 +107,21 @@ thermalBaffle1DFvPatchScalarField
|
|||||||
{
|
{
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
|
if (dict.found("thickness"))
|
||||||
|
{
|
||||||
|
thickness_ = scalarField("thickness", dict, p.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("Qs"))
|
||||||
|
{
|
||||||
|
Qs_ = scalarField("Qs", dict, p.size());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dict.found("QrPrevious"))
|
||||||
|
{
|
||||||
|
QrPrevious_ = scalarField("QrPrevious", dict, p.size());
|
||||||
|
}
|
||||||
|
|
||||||
if (dict.found("refValue") && baffleActivated_)
|
if (dict.found("refValue") && baffleActivated_)
|
||||||
{
|
{
|
||||||
// Full restart
|
// Full restart
|
||||||
@ -209,23 +224,30 @@ const solidType& thermalBaffle1DFvPatchScalarField<solidType>::solid() const
|
|||||||
|
|
||||||
|
|
||||||
template<class solidType>
|
template<class solidType>
|
||||||
const scalarField& thermalBaffle1DFvPatchScalarField<solidType>::
|
tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::
|
||||||
baffleThickness() const
|
baffleThickness() const
|
||||||
{
|
{
|
||||||
if (this->owner())
|
if (this->owner())
|
||||||
{
|
{
|
||||||
if (thickness_.size() > 0)
|
if (thickness_.size() != patch().size())
|
||||||
{
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
" template<class solidType>"
|
||||||
|
" tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>
|
||||||
|
" baffleThickness() const"
|
||||||
|
)<< " Field thickness has not been specified "
|
||||||
|
<< " for patch " << this->patch().name()
|
||||||
|
<< " in dictionary " << solidDict_
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
return thickness_;
|
return thickness_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
thickness_ = scalarField("thickness", solidDict_, patch().size());
|
const mapDistribute& mapDist = this->mappedPatchBase::map();
|
||||||
return thickness_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const fvPatch& nbrPatch =
|
const fvPatch& nbrPatch =
|
||||||
patch().boundaryMesh()[samplePolyPatch().index()];
|
patch().boundaryMesh()[samplePolyPatch().index()];
|
||||||
const thermalBaffle1DFvPatchScalarField& nbrField =
|
const thermalBaffle1DFvPatchScalarField& nbrField =
|
||||||
@ -234,28 +256,28 @@ baffleThickness() const
|
|||||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||||
);
|
);
|
||||||
|
|
||||||
return nbrField.thickness_;
|
tmp<scalarField> tthickness
|
||||||
|
(
|
||||||
|
new scalarField(nbrField.baffleThickness())
|
||||||
|
);
|
||||||
|
scalarField& thickness = tthickness();
|
||||||
|
mapDist.distribute(thickness);
|
||||||
|
return tthickness;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class solidType>
|
template<class solidType>
|
||||||
const scalarField& thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
|
tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
|
||||||
{
|
{
|
||||||
if (this->owner())
|
if (this->owner())
|
||||||
{
|
|
||||||
if (Qs_.size() > 0)
|
|
||||||
{
|
{
|
||||||
return Qs_;
|
return Qs_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Qs_ = scalarField("Qs", solidDict_, patch().size());
|
const mapDistribute& mapDist = this->mappedPatchBase::map();
|
||||||
return Qs_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const fvPatch& nbrPatch =
|
const fvPatch& nbrPatch =
|
||||||
patch().boundaryMesh()[samplePolyPatch().index()];
|
patch().boundaryMesh()[samplePolyPatch().index()];
|
||||||
|
|
||||||
@ -265,7 +287,10 @@ const scalarField& thermalBaffle1DFvPatchScalarField<solidType>::Qs() const
|
|||||||
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
nbrPatch.template lookupPatchField<volScalarField, scalar>(TName_)
|
||||||
);
|
);
|
||||||
|
|
||||||
return nbrField.Qs_;
|
tmp<scalarField> tQs(new scalarField(nbrField.Qs()));
|
||||||
|
scalarField& Qs = tQs();
|
||||||
|
mapDist.distribute(Qs);
|
||||||
|
return tQs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,8 +318,11 @@ void thermalBaffle1DFvPatchScalarField<solidType>::rmap
|
|||||||
const thermalBaffle1DFvPatchScalarField& tiptf =
|
const thermalBaffle1DFvPatchScalarField& tiptf =
|
||||||
refCast<const thermalBaffle1DFvPatchScalarField>(ptf);
|
refCast<const thermalBaffle1DFvPatchScalarField>(ptf);
|
||||||
|
|
||||||
|
if (this->owner())
|
||||||
|
{
|
||||||
thickness_.rmap(tiptf.thickness_, addr);
|
thickness_.rmap(tiptf.thickness_, addr);
|
||||||
Qs_.rmap(tiptf.Qs_, addr);
|
Qs_.rmap(tiptf.Qs_, addr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -310,6 +338,8 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
|||||||
int oldTag = UPstream::msgType();
|
int oldTag = UPstream::msgType();
|
||||||
UPstream::msgType() = oldTag+1;
|
UPstream::msgType() = oldTag+1;
|
||||||
|
|
||||||
|
const mapDistribute& mapDist = this->mappedPatchBase::map();
|
||||||
|
|
||||||
const label patchi = patch().index();
|
const label patchi = patch().index();
|
||||||
|
|
||||||
const label nbrPatchi = samplePolyPatch().index();
|
const label nbrPatchi = samplePolyPatch().index();
|
||||||
@ -347,8 +377,9 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs()
|
|||||||
scalarField myKDelta(patch().deltaCoeffs()*kappaw);
|
scalarField myKDelta(patch().deltaCoeffs()*kappaw);
|
||||||
|
|
||||||
// nrb properties
|
// nrb properties
|
||||||
const fvPatchScalarField& nbrTp =
|
scalarField nbrTp =
|
||||||
turbModel.thermo().T().boundaryField()[nbrPatchi];
|
turbModel.thermo().T().boundaryField()[nbrPatchi];
|
||||||
|
mapDist.distribute(nbrTp);
|
||||||
|
|
||||||
// solid properties
|
// solid properties
|
||||||
scalarField kappas(patch().size(), 0.0);
|
scalarField kappas(patch().size(), 0.0);
|
||||||
@ -396,11 +427,12 @@ void thermalBaffle1DFvPatchScalarField<solidType>::write(Ostream& os) const
|
|||||||
|
|
||||||
if (this->owner())
|
if (this->owner())
|
||||||
{
|
{
|
||||||
baffleThickness().writeEntry("thickness", os);
|
baffleThickness()().writeEntry("thickness", os);
|
||||||
Qs().writeEntry("Qs", os);
|
Qs()().writeEntry("Qs", os);
|
||||||
solid().write(os);
|
solid().write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QrPrevious_.writeEntry("QrPrevious", os);
|
||||||
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("QrRelaxation")<< QrRelaxation_
|
os.writeKeyword("QrRelaxation")<< QrRelaxation_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -152,10 +152,10 @@ class thermalBaffle1DFvPatchScalarField
|
|||||||
const solidType& solid() const;
|
const solidType& solid() const;
|
||||||
|
|
||||||
//- Return Qs from master
|
//- Return Qs from master
|
||||||
const scalarField& Qs() const;
|
tmp<scalarField> Qs() const;
|
||||||
|
|
||||||
//- Return thickness from master
|
//- Return thickness from master
|
||||||
const scalarField& baffleThickness() const;
|
tmp<scalarField> baffleThickness() const;
|
||||||
|
|
||||||
//- Is Owner
|
//- Is Owner
|
||||||
bool owner() const;
|
bool owner() const;
|
||||||
|
|||||||
@ -48,7 +48,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(0.0),
|
mixingLength_(0.0),
|
||||||
phiName_("phi"),
|
|
||||||
kName_("k")
|
kName_("k")
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -68,7 +67,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -83,9 +81,9 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -102,7 +100,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -116,7 +113,6 @@ turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -143,7 +139,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
this->refValue() = Cmu75*kp*sqrt(kp)/mixingLength_;
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -160,7 +156,7 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("mixingLength")
|
os.writeKeyword("mixingLength")
|
||||||
<< mixingLength_ << token::END_STATEMENT << nl;
|
<< mixingLength_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,9 +101,6 @@ class turbulentMixingLengthDissipationRateInletFvPatchScalarField
|
|||||||
//- turbulent length scale
|
//- turbulent length scale
|
||||||
scalar mixingLength_;
|
scalar mixingLength_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the turbulent kinetic energy field
|
//- Name of the turbulent kinetic energy field
|
||||||
word kName_;
|
word kName_;
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(0.0),
|
mixingLength_(0.0),
|
||||||
phiName_("undefined-phi"),
|
|
||||||
kName_("undefined-k")
|
kName_("undefined-k")
|
||||||
{
|
{
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -67,7 +66,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
inletOutletFvPatchScalarField(ptf, p, iF, mapper),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -81,9 +79,10 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(p, iF),
|
inletOutletFvPatchScalarField(p, iF),
|
||||||
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
mixingLength_(readScalar(dict.lookup("mixingLength"))),
|
||||||
phiName_(dict.lookupOrDefault<word>("phi", "phi")),
|
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k"))
|
kName_(dict.lookupOrDefault<word>("k", "k"))
|
||||||
{
|
{
|
||||||
|
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||||
|
|
||||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||||
|
|
||||||
this->refValue() = 0.0;
|
this->refValue() = 0.0;
|
||||||
@ -99,7 +98,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf),
|
inletOutletFvPatchScalarField(ptf),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -112,7 +110,6 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
:
|
:
|
||||||
inletOutletFvPatchScalarField(ptf, iF),
|
inletOutletFvPatchScalarField(ptf, iF),
|
||||||
mixingLength_(ptf.mixingLength_),
|
mixingLength_(ptf.mixingLength_),
|
||||||
phiName_(ptf.phiName_),
|
|
||||||
kName_(ptf.kName_)
|
kName_(ptf.kName_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -139,7 +136,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
|
|||||||
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
patch().lookupPatchField<volScalarField, scalar>(kName_);
|
||||||
|
|
||||||
const fvsPatchScalarField& phip =
|
const fvsPatchScalarField& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(this->phiName_);
|
||||||
|
|
||||||
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
this->refValue() = sqrt(kp)/(Cmu25*mixingLength_);
|
||||||
this->valueFraction() = 1.0 - pos(phip);
|
this->valueFraction() = 1.0 - pos(phip);
|
||||||
@ -156,7 +153,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
|
|||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
os.writeKeyword("mixingLength")
|
os.writeKeyword("mixingLength")
|
||||||
<< mixingLength_ << token::END_STATEMENT << nl;
|
<< mixingLength_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,9 +101,6 @@ class turbulentMixingLengthFrequencyInletFvPatchScalarField
|
|||||||
//- Turbulent length scale
|
//- Turbulent length scale
|
||||||
scalar mixingLength_;
|
scalar mixingLength_;
|
||||||
|
|
||||||
//- Name of the flux field
|
|
||||||
word phiName_;
|
|
||||||
|
|
||||||
//- Name of the turbulent kinetic energy field
|
//- Name of the turbulent kinetic energy field
|
||||||
word kName_;
|
word kName_;
|
||||||
|
|
||||||
|
|||||||
10
tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean
Executable file
10
tutorials/incompressible/pimpleFoam/TJunctionFan/Allclean
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
|
# Source tutorial clean functions
|
||||||
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
|
cleanCase
|
||||||
|
rm -rf 0
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -11,6 +11,8 @@ runApplication blockMesh
|
|||||||
# Create faceZones for baffles and fan
|
# Create faceZones for baffles and fan
|
||||||
runApplication topoSet
|
runApplication topoSet
|
||||||
|
|
||||||
|
cp -r 0.org 0
|
||||||
|
|
||||||
# Create wall and cyclic baffles and the fields on them
|
# Create wall and cyclic baffles and the fields on them
|
||||||
runApplication createBaffles -overwrite
|
runApplication createBaffles -overwrite
|
||||||
|
|
||||||
|
|||||||
@ -29,16 +29,8 @@ baffles
|
|||||||
type faceZone;
|
type faceZone;
|
||||||
zoneName baffleFaces;
|
zoneName baffleFaces;
|
||||||
|
|
||||||
|
patchPairs
|
||||||
//- Optional flip
|
|
||||||
//flip false;
|
|
||||||
|
|
||||||
patches
|
|
||||||
{
|
{
|
||||||
master
|
|
||||||
{
|
|
||||||
//- Master side patch
|
|
||||||
name baffles;
|
|
||||||
type wall;
|
type wall;
|
||||||
|
|
||||||
patchFields
|
patchFields
|
||||||
@ -79,12 +71,6 @@ baffles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slave
|
|
||||||
{
|
|
||||||
// Reuse master data
|
|
||||||
${..master}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -97,15 +83,9 @@ baffles
|
|||||||
origin (0.099 -0.006 0.004);
|
origin (0.099 -0.006 0.004);
|
||||||
span (0 0.012 0.012);
|
span (0 0.012 0.012);
|
||||||
|
|
||||||
patches
|
patchPairs
|
||||||
{
|
{
|
||||||
master
|
|
||||||
{
|
|
||||||
//- Master side patch
|
|
||||||
|
|
||||||
name fan_half0;
|
|
||||||
type cyclic;
|
type cyclic;
|
||||||
neighbourPatch fan_half1;
|
|
||||||
|
|
||||||
//- Optional override of added patchfields. If not specified
|
//- Optional override of added patchfields. If not specified
|
||||||
// any added patchfields are of type calculated.
|
// any added patchfields are of type calculated.
|
||||||
@ -121,25 +101,6 @@ baffles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
slave
|
|
||||||
{
|
|
||||||
//- Slave side patch
|
|
||||||
|
|
||||||
name fan_half1;
|
|
||||||
type cyclic;
|
|
||||||
neighbourPatch fan_half0;
|
|
||||||
|
|
||||||
patchFields
|
|
||||||
{
|
|
||||||
p
|
|
||||||
{
|
|
||||||
type fan;
|
|
||||||
patchType cyclic;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user