mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' into cvm
This commit is contained in:
@ -32,7 +32,5 @@ if (dieselSpray.twoD())
|
|||||||
gasMass0 *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
|
gasMass0 *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
reduce(gasMass0, sumOp<scalar>());
|
|
||||||
|
|
||||||
gasMass0 -=
|
gasMass0 -=
|
||||||
dieselSpray.injectedMass(runTime.value()) - dieselSpray.liquidMass();
|
dieselSpray.injectedMass(runTime.value()) - dieselSpray.liquidMass();
|
||||||
|
|||||||
@ -23,8 +23,6 @@
|
|||||||
gasMass *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
|
gasMass *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge();
|
||||||
}
|
}
|
||||||
|
|
||||||
reduce(gasMass, sumOp<scalar>());
|
|
||||||
|
|
||||||
scalar addedMass = gasMass - gasMass0;
|
scalar addedMass = gasMass - gasMass0;
|
||||||
|
|
||||||
Info<< "Added gas mass................. | " << 1e6*addedMass << " mg"
|
Info<< "Added gas mass................. | " << 1e6*addedMass << " mg"
|
||||||
|
|||||||
@ -52,19 +52,18 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
# include "setRoots.H"
|
#include "setRoots.H"
|
||||||
# include "createTimeExtruded.H"
|
#include "createTimeExtruded.H"
|
||||||
|
|
||||||
|
if (args.options().found("sourceCase") == args.options().found("surface"))
|
||||||
if (args.options().found("sourceRoot") == args.options().found("surface"))
|
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
<< "Need to specify either -sourceRoot/Case/Patch or -surface"
|
<< "Specify either -sourceCase and -sourcePatch"
|
||||||
<< " option to specify the source of the patch to extrude"
|
" or -surface options\n"
|
||||||
|
" to specify the source of the patch to extrude"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
autoPtr<extrudedMesh> meshPtr(NULL);
|
autoPtr<extrudedMesh> meshPtr(NULL);
|
||||||
|
|
||||||
autoPtr<extrudeModel> model
|
autoPtr<extrudeModel> model
|
||||||
@ -84,23 +83,24 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (args.options().found("sourceRoot"))
|
if (args.options().found("sourceCase"))
|
||||||
{
|
{
|
||||||
fileName rootDirSource(args.options()["sourceRoot"]);
|
fileName sourceCasePath(args.options()["sourceCase"]);
|
||||||
fileName caseDirSource(args.options()["sourceCase"]);
|
fileName sourceRootDir = sourceCasePath.path();
|
||||||
fileName patchName(args.options()["sourcePatch"]);
|
fileName sourceCaseDir = sourceCasePath.name();
|
||||||
|
word patchName(args.options()["sourcePatch"]);
|
||||||
|
|
||||||
Info<< "Extruding patch " << patchName
|
Info<< "Extruding patch " << patchName
|
||||||
<< " on mesh " << rootDirSource << ' ' << caseDirSource << nl
|
<< " on mesh " << sourceCasePath << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
Time runTime
|
Time runTime
|
||||||
(
|
(
|
||||||
Time::controlDictName,
|
Time::controlDictName,
|
||||||
rootDirSource,
|
sourceRootDir,
|
||||||
caseDirSource
|
sourceCaseDir
|
||||||
);
|
);
|
||||||
# include "createPolyMesh.H"
|
#include "createPolyMesh.H"
|
||||||
|
|
||||||
label patchID = mesh.boundaryMesh().findPatchID(patchName);
|
label patchID = mesh.boundaryMesh().findPatchID(patchName);
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ int main(int argc, char *argv[])
|
|||||||
fMesh,
|
fMesh,
|
||||||
model()
|
model()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
extrudedMesh& mesh = meshPtr();
|
extrudedMesh& mesh = meshPtr();
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ int main(int argc, char *argv[])
|
|||||||
const vector span = bb.span();
|
const vector span = bb.span();
|
||||||
const scalar mergeDim = 1E-4 * bb.minDim();
|
const scalar mergeDim = 1E-4 * bb.minDim();
|
||||||
|
|
||||||
Pout<< "Mesh bounding box:" << bb << nl
|
Info<< "Mesh bounding box:" << bb << nl
|
||||||
<< " with span:" << span << nl
|
<< " with span:" << span << nl
|
||||||
<< "Merge distance :" << mergeDim << nl
|
<< "Merge distance :" << mergeDim << nl
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -201,7 +201,7 @@ int main(int argc, char *argv[])
|
|||||||
// ~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~
|
||||||
|
|
||||||
{
|
{
|
||||||
Pout<< "Collapsing edges < " << mergeDim << " ..." << nl << endl;
|
Info<< "Collapsing edges < " << mergeDim << " ..." << nl << endl;
|
||||||
|
|
||||||
// Edge collapsing engine
|
// Edge collapsing engine
|
||||||
edgeCollapser collapser(mesh);
|
edgeCollapser collapser(mesh);
|
||||||
@ -217,7 +217,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (d < mergeDim)
|
if (d < mergeDim)
|
||||||
{
|
{
|
||||||
Pout<< "Merging edge " << e << " since length " << d
|
Info<< "Merging edge " << e << " since length " << d
|
||||||
<< " << " << mergeDim << nl;
|
<< " << " << mergeDim << nl;
|
||||||
|
|
||||||
// Collapse edge to e[0]
|
// Collapse edge to e[0]
|
||||||
@ -252,8 +252,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (args.options().found("mergeFaces"))
|
if (args.options().found("mergeFaces"))
|
||||||
{
|
{
|
||||||
Pout<< "Assuming full 360 degree axisymmetric case;"
|
Info<< "Assuming full 360 degree axisymmetric case;"
|
||||||
<< " stitching faces on patches "
|
<< " stitching faces on patches "
|
||||||
<< patches[origPatchID].name() << " and "
|
<< patches[origPatchID].name() << " and "
|
||||||
<< patches[otherPatchID].name() << " together ..." << nl << endl;
|
<< patches[otherPatchID].name() << " together ..." << nl << endl;
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ wedge::wedge(const dictionary& dict)
|
|||||||
:
|
:
|
||||||
extrudeModel(typeName, dict),
|
extrudeModel(typeName, dict),
|
||||||
axisPt_(coeffDict_.lookup("axisPt")),
|
axisPt_(coeffDict_.lookup("axisPt")),
|
||||||
axisNormal_(coeffDict_.lookup("axisNormal")),
|
axis_(coeffDict_.lookup("axis")),
|
||||||
angle_
|
angle_
|
||||||
(
|
(
|
||||||
readScalar(coeffDict_.lookup("angle"))
|
readScalar(coeffDict_.lookup("angle"))
|
||||||
@ -96,7 +96,7 @@ point wedge::operator()
|
|||||||
// of surface point and surface normal.
|
// of surface point and surface normal.
|
||||||
point d = surfacePoint - axisPt_;
|
point d = surfacePoint - axisPt_;
|
||||||
|
|
||||||
d -= (axisNormal_ & d)*axisNormal_;
|
d -= (axis_ & d)*axis_;
|
||||||
|
|
||||||
scalar dMag = mag(d);
|
scalar dMag = mag(d);
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ point wedge::operator()
|
|||||||
|
|
||||||
if (dMag > VSMALL)
|
if (dMag > VSMALL)
|
||||||
{
|
{
|
||||||
vector n = (d/dMag) ^ axisNormal_;
|
vector n = (d/dMag) ^ axis_;
|
||||||
|
|
||||||
rotatedPoint +=
|
rotatedPoint +=
|
||||||
+ cos(sliceAngle)*d
|
+ cos(sliceAngle)*d
|
||||||
@ -124,4 +124,3 @@ point wedge::operator()
|
|||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -60,13 +60,13 @@ class wedge
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- point on axis
|
//- Point on axis
|
||||||
const point axisPt_;
|
const point axisPt_;
|
||||||
|
|
||||||
//- normalized direction of axis
|
//- Normalized direction of axis
|
||||||
const vector axisNormal_;
|
const vector axis_;
|
||||||
|
|
||||||
//- overall angle (radians)
|
//- Overall angle (radians)
|
||||||
const scalar angle_;
|
const scalar angle_;
|
||||||
|
|
||||||
|
|
||||||
@ -80,6 +80,7 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
wedge(const dictionary& dict);
|
wedge(const dictionary& dict);
|
||||||
|
|
||||||
|
|
||||||
//- Destrcuctor
|
//- Destrcuctor
|
||||||
~wedge();
|
~wedge();
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ nLayers 1;
|
|||||||
wedgeCoeffs
|
wedgeCoeffs
|
||||||
{
|
{
|
||||||
axisPt (0 0 0);
|
axisPt (0 0 0);
|
||||||
axisNormal (0 -1 0);
|
axis (0 -1 0);
|
||||||
angle 2.0;
|
angle 2.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,4 +47,3 @@ sigmaRadialCoeffs
|
|||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
argList::validArgs.clear();
|
argList::validArgs.clear();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
|
|
||||||
argList::validOptions.insert("sourceRoot", "source root");
|
|
||||||
argList::validOptions.insert("sourceCase", "source case");
|
argList::validOptions.insert("sourceCase", "source case");
|
||||||
argList::validOptions.insert("sourcePatch", "source patch");
|
argList::validOptions.insert("sourcePatch", "source patch");
|
||||||
|
|
||||||
@ -15,4 +14,3 @@
|
|||||||
{
|
{
|
||||||
FatalError.exit();
|
FatalError.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -224,7 +224,16 @@ Foam::Istream& Foam::ISstream::read(token& t)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t = label(atol(numberBuffer));
|
long lt = atol(numberBuffer);
|
||||||
|
t = label(lt);
|
||||||
|
|
||||||
|
// If the integer is too large to be represented as a label
|
||||||
|
// return it as a scalar
|
||||||
|
if (t.labelToken() != lt)
|
||||||
|
{
|
||||||
|
isScalar = true;
|
||||||
|
t = scalar(atof(numberBuffer));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::engineMesh::engineMesh(const IOobject& io)
|
|||||||
linerIndex_(-1),
|
linerIndex_(-1),
|
||||||
cylinderHeadIndex_(-1),
|
cylinderHeadIndex_(-1),
|
||||||
deckHeight_("deckHeight", dimLength, GREAT),
|
deckHeight_("deckHeight", dimLength, GREAT),
|
||||||
pistonPosition_("deckHeight", dimLength, GREAT)
|
pistonPosition_("pistonPosition", dimLength, -GREAT)
|
||||||
{
|
{
|
||||||
bool foundPiston = false;
|
bool foundPiston = false;
|
||||||
bool foundLiner = false;
|
bool foundLiner = false;
|
||||||
@ -80,14 +80,14 @@ Foam::engineMesh::engineMesh(const IOobject& io)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!foundLiner)
|
if (!foundLiner)
|
||||||
{
|
{
|
||||||
FatalErrorIn("engineMesh::engineMesh(const IOobject& io)")
|
FatalErrorIn("engineMesh::engineMesh(const IOobject& io)")
|
||||||
<< "cannot find liner patch"
|
<< "cannot find liner patch"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundCylinderHead)
|
if (!foundCylinderHead)
|
||||||
{
|
{
|
||||||
FatalErrorIn("engineMesh::engineMesh(const IOobject& io)")
|
FatalErrorIn("engineMesh::engineMesh(const IOobject& io)")
|
||||||
<< "cannot find cylinderHead patch"
|
<< "cannot find cylinderHead patch"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
@ -96,17 +96,25 @@ Foam::engineMesh::engineMesh(const IOobject& io)
|
|||||||
{
|
{
|
||||||
if (pistonIndex_ != -1)
|
if (pistonIndex_ != -1)
|
||||||
{
|
{
|
||||||
pistonPosition_.value() =
|
pistonPosition_.value() = -GREAT;
|
||||||
max(boundary()[pistonIndex_].patch().localPoints()).z();
|
if (boundary()[pistonIndex_].patch().localPoints().size())
|
||||||
|
{
|
||||||
|
pistonPosition_.value() =
|
||||||
|
max(boundary()[pistonIndex_].patch().localPoints()).z();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
reduce(pistonPosition_.value(), minOp<scalar>());
|
reduce(pistonPosition_.value(), maxOp<scalar>());
|
||||||
|
|
||||||
if (cylinderHeadIndex_ != -1)
|
if (cylinderHeadIndex_ != -1)
|
||||||
{
|
{
|
||||||
deckHeight_.value() = min
|
deckHeight_.value() = GREAT;
|
||||||
(
|
if (boundary()[cylinderHeadIndex_].patch().localPoints().size())
|
||||||
boundary()[cylinderHeadIndex_].patch().localPoints()
|
{
|
||||||
).z();
|
deckHeight_.value() = min
|
||||||
|
(
|
||||||
|
boundary()[cylinderHeadIndex_].patch().localPoints()
|
||||||
|
).z();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
reduce(deckHeight_.value(), minOp<scalar>());
|
reduce(deckHeight_.value(), minOp<scalar>());
|
||||||
|
|
||||||
|
|||||||
@ -63,9 +63,7 @@ Foam::fixedInternalValueFvPatchField<Type>::fixedInternalValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
zeroGradientFvPatchField<Type>(p, iF, dict)
|
zeroGradientFvPatchField<Type>(p, iF, dict)
|
||||||
{
|
{}
|
||||||
fvPatchField<Type>::operator=(this->patchInternalField());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -337,7 +337,7 @@ void LRR::correct()
|
|||||||
RASModel::correct();
|
RASModel::correct();
|
||||||
|
|
||||||
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
||||||
volScalarField G("G", 0.5*mag(tr(P)));
|
volScalarField G("RASModel::G", 0.5*mag(tr(P)));
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -367,7 +367,7 @@ void LaunderGibsonRSTM::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
||||||
volScalarField G("G", 0.5*mag(tr(P)));
|
volScalarField G("RASModel::G", 0.5*mag(tr(P)));
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -300,7 +300,7 @@ void RNGkEpsilon::correct()
|
|||||||
volScalarField S2 = (tgradU() && dev(twoSymm(tgradU())));
|
volScalarField S2 = (tgradU() && dev(twoSymm(tgradU())));
|
||||||
tgradU.clear();
|
tgradU.clear();
|
||||||
|
|
||||||
volScalarField G("G", mut_*S2);
|
volScalarField G("RASModel::G", mut_*S2);
|
||||||
|
|
||||||
volScalarField eta = sqrt(mag(S2))*k_/epsilon_;
|
volScalarField eta = sqrt(mag(S2))*k_/epsilon_;
|
||||||
volScalarField eta3 = eta*sqr(eta);
|
volScalarField eta3 = eta*sqr(eta);
|
||||||
|
|||||||
@ -67,7 +67,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
|
|||||||
fixedInternalValueFvPatchField<scalar>(p, iF),
|
fixedInternalValueFvPatchField<scalar>(p, iF),
|
||||||
UName_("U"),
|
UName_("U"),
|
||||||
kName_("k"),
|
kName_("k"),
|
||||||
GName_("G"),
|
GName_("RASModel::G"),
|
||||||
rhoName_("rho"),
|
rhoName_("rho"),
|
||||||
muName_("mu"),
|
muName_("mu"),
|
||||||
mutName_("mut")
|
mutName_("mut")
|
||||||
@ -106,7 +106,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
|
|||||||
fixedInternalValueFvPatchField<scalar>(p, iF, dict),
|
fixedInternalValueFvPatchField<scalar>(p, iF, dict),
|
||||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||||
GName_(dict.lookupOrDefault<word>("G", "G")),
|
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||||
mutName_(dict.lookupOrDefault<word>("mut", "mut"))
|
mutName_(dict.lookupOrDefault<word>("mut", "mut"))
|
||||||
@ -229,7 +229,7 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
fixedInternalValueFvPatchField<scalar>::write(os);
|
fixedInternalValueFvPatchField<scalar>::write(os);
|
||||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||||
writeEntryIfDifferent<word>(os, "G", "G", GName_);
|
writeEntryIfDifferent<word>(os, "G", "RASModel::G", GName_);
|
||||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||||
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
|
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
|
||||||
|
|||||||
@ -68,7 +68,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
UName_("U"),
|
UName_("U"),
|
||||||
rhoName_("rho"),
|
rhoName_("rho"),
|
||||||
kName_("k"),
|
kName_("k"),
|
||||||
GName_("G"),
|
GName_("RASModel::G"),
|
||||||
muName_("mu"),
|
muName_("mu"),
|
||||||
mutName_("mut")
|
mutName_("mut")
|
||||||
{
|
{
|
||||||
@ -107,7 +107,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||||
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "rho")),
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||||
GName_(dict.lookupOrDefault<word>("G", "G")),
|
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
|
||||||
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
muName_(dict.lookupOrDefault<word>("mu", "mu")),
|
||||||
mutName_(dict.lookupOrDefault<word>("mut", "mut"))
|
mutName_(dict.lookupOrDefault<word>("mut", "mut"))
|
||||||
{
|
{
|
||||||
@ -221,7 +221,7 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||||
writeEntryIfDifferent<word>(os, "G", "G", GName_);
|
writeEntryIfDifferent<word>(os, "G", "RASModel::G", GName_);
|
||||||
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
writeEntryIfDifferent<word>(os, "mu", "mu", muName_);
|
||||||
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
|
writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
|
|||||||
@ -278,7 +278,7 @@ void kEpsilon::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
tmp<volTensorField> tgradU = fvc::grad(U_);
|
tmp<volTensorField> tgradU = fvc::grad(U_);
|
||||||
volScalarField G("G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
|
volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
|
||||||
tgradU.clear();
|
tgradU.clear();
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
|
|||||||
@ -381,7 +381,7 @@ void kOmegaSST::correct()
|
|||||||
tmp<volTensorField> tgradU = fvc::grad(U_);
|
tmp<volTensorField> tgradU = fvc::grad(U_);
|
||||||
volScalarField S2 = magSqr(symm(tgradU()));
|
volScalarField S2 = magSqr(symm(tgradU()));
|
||||||
volScalarField GbyMu = (tgradU() && dev(twoSymm(tgradU())));
|
volScalarField GbyMu = (tgradU() && dev(twoSymm(tgradU())));
|
||||||
volScalarField G("G", mut_*GbyMu);
|
volScalarField G("RASModel::G", mut_*GbyMu);
|
||||||
tgradU.clear();
|
tgradU.clear();
|
||||||
|
|
||||||
// Update omega and G at the wall
|
// Update omega and G at the wall
|
||||||
|
|||||||
@ -317,7 +317,7 @@ void realizableKE::correct()
|
|||||||
volScalarField eta = magS*k_/epsilon_;
|
volScalarField eta = magS*k_/epsilon_;
|
||||||
volScalarField C1 = max(eta/(scalar(5) + eta), scalar(0.43));
|
volScalarField C1 = max(eta/(scalar(5) + eta), scalar(0.43));
|
||||||
|
|
||||||
volScalarField G("G", mut_*(gradU && dev(twoSymm(gradU))));
|
volScalarField G("RASModel::G", mut_*(gradU && dev(twoSymm(gradU))));
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -297,7 +297,7 @@ void LRR::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
||||||
volScalarField G("G", 0.5*mag(tr(P)));
|
volScalarField G("RASModel::G", 0.5*mag(tr(P)));
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -329,7 +329,7 @@ void LaunderGibsonRSTM::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_));
|
||||||
volScalarField G("G", 0.5*mag(tr(P)));
|
volScalarField G("RASModel::G", 0.5*mag(tr(P)));
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -328,7 +328,7 @@ void LienCubicKE::correct()
|
|||||||
|
|
||||||
volScalarField G
|
volScalarField G
|
||||||
(
|
(
|
||||||
"G",
|
"RASModel::G",
|
||||||
Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU_)
|
Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU_)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -249,7 +249,7 @@ void RNGkEpsilon::correct()
|
|||||||
|
|
||||||
volScalarField S2 = 2*magSqr(symm(fvc::grad(U_)));
|
volScalarField S2 = 2*magSqr(symm(fvc::grad(U_)));
|
||||||
|
|
||||||
volScalarField G("G", nut_*S2);
|
volScalarField G("RASModel::G", nut_*S2);
|
||||||
|
|
||||||
volScalarField eta = sqrt(S2)*k_/epsilon_;
|
volScalarField eta = sqrt(S2)*k_/epsilon_;
|
||||||
volScalarField R =
|
volScalarField R =
|
||||||
|
|||||||
@ -67,7 +67,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
|
|||||||
fixedInternalValueFvPatchField<scalar>(p, iF),
|
fixedInternalValueFvPatchField<scalar>(p, iF),
|
||||||
UName_("U"),
|
UName_("U"),
|
||||||
kName_("k"),
|
kName_("k"),
|
||||||
GName_("G"),
|
GName_("RASModel::G"),
|
||||||
nuName_("nu"),
|
nuName_("nu"),
|
||||||
nutName_("nut")
|
nutName_("nut")
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField
|
|||||||
fixedInternalValueFvPatchField<scalar>(p, iF, dict),
|
fixedInternalValueFvPatchField<scalar>(p, iF, dict),
|
||||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||||
GName_(dict.lookupOrDefault<word>("G", "G")),
|
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
|
||||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||||
nutName_(dict.lookupOrDefault<word>("nut", "nut"))
|
nutName_(dict.lookupOrDefault<word>("nut", "nut"))
|
||||||
{
|
{
|
||||||
@ -219,7 +219,7 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
fixedInternalValueFvPatchField<scalar>::write(os);
|
fixedInternalValueFvPatchField<scalar>::write(os);
|
||||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||||
writeEntryIfDifferent<word>(os, "G", "G", GName_);
|
writeEntryIfDifferent<word>(os, "G", "RASModel::G", GName_);
|
||||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||||
writeEntryIfDifferent<word>(os, "nut", "nut", nutName_);
|
writeEntryIfDifferent<word>(os, "nut", "nut", nutName_);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
|
|||||||
@ -67,7 +67,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
fixedInternalValueFvPatchField<scalar>(p, iF),
|
fixedInternalValueFvPatchField<scalar>(p, iF),
|
||||||
UName_("U"),
|
UName_("U"),
|
||||||
kName_("k"),
|
kName_("k"),
|
||||||
GName_("G"),
|
GName_("RASModel::G"),
|
||||||
nuName_("nu"),
|
nuName_("nu"),
|
||||||
nutName_("nut")
|
nutName_("nut")
|
||||||
{
|
{
|
||||||
@ -104,7 +104,7 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField
|
|||||||
fixedInternalValueFvPatchField<scalar>(p, iF, dict),
|
fixedInternalValueFvPatchField<scalar>(p, iF, dict),
|
||||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||||
kName_(dict.lookupOrDefault<word>("k", "k")),
|
kName_(dict.lookupOrDefault<word>("k", "k")),
|
||||||
GName_(dict.lookupOrDefault<word>("G", "G")),
|
GName_(dict.lookupOrDefault<word>("G", "RASModel::G")),
|
||||||
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
nuName_(dict.lookupOrDefault<word>("nu", "nu")),
|
||||||
nutName_(dict.lookupOrDefault<word>("nut", "nut"))
|
nutName_(dict.lookupOrDefault<word>("nut", "nut"))
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
fixedInternalValueFvPatchField<scalar>::write(os);
|
fixedInternalValueFvPatchField<scalar>::write(os);
|
||||||
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
writeEntryIfDifferent<word>(os, "U", "U", UName_);
|
||||||
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
writeEntryIfDifferent<word>(os, "k", "k", kName_);
|
||||||
writeEntryIfDifferent<word>(os, "G", "G", GName_);
|
writeEntryIfDifferent<word>(os, "G", "RASModel::G", GName_);
|
||||||
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
writeEntryIfDifferent<word>(os, "nu", "nu", nuName_);
|
||||||
writeEntryIfDifferent<word>(os, "nut", "nut", nutName_);
|
writeEntryIfDifferent<word>(os, "nut", "nut", nutName_);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
|
|||||||
@ -129,7 +129,7 @@ kEpsilon::kEpsilon
|
|||||||
autoCreateNut("nut", mesh_)
|
autoCreateNut("nut", mesh_)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
nut_ == Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
|
nut_ = Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_);
|
||||||
nut_.correctBoundaryConditions();
|
nut_.correctBoundaryConditions();
|
||||||
|
|
||||||
printCoeffs();
|
printCoeffs();
|
||||||
@ -216,7 +216,7 @@ void kEpsilon::correct()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField G("G", nut_*2*magSqr(symm(fvc::grad(U_))));
|
volScalarField G("RASModel::G", nut_*2*magSqr(symm(fvc::grad(U_))));
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
@ -259,7 +259,7 @@ void kEpsilon::correct()
|
|||||||
|
|
||||||
|
|
||||||
// Re-calculate viscosity
|
// Re-calculate viscosity
|
||||||
nut_ == Cmu_*sqr(k_)/epsilon_;
|
nut_ = Cmu_*sqr(k_)/epsilon_;
|
||||||
nut_.correctBoundaryConditions();
|
nut_.correctBoundaryConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -225,7 +225,7 @@ void kOmega::correct()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
volScalarField G("G", nut_*2*magSqr(symm(fvc::grad(U_))));
|
volScalarField G("RASModel::G", nut_*2*magSqr(symm(fvc::grad(U_))));
|
||||||
|
|
||||||
// Update omega and G at the wall
|
// Update omega and G at the wall
|
||||||
omega_.boundaryField().updateCoeffs();
|
omega_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -343,7 +343,7 @@ void kOmegaSST::correct()
|
|||||||
}
|
}
|
||||||
|
|
||||||
volScalarField S2 = magSqr(symm(fvc::grad(U_)));
|
volScalarField S2 = magSqr(symm(fvc::grad(U_)));
|
||||||
volScalarField G("G", nut_*2*S2);
|
volScalarField G("RASModel::G", nut_*2*S2);
|
||||||
|
|
||||||
// Update omega and G at the wall
|
// Update omega and G at the wall
|
||||||
omega_.boundaryField().updateCoeffs();
|
omega_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
@ -277,7 +277,7 @@ void realizableKE::correct()
|
|||||||
volScalarField eta = magS*k_/epsilon_;
|
volScalarField eta = magS*k_/epsilon_;
|
||||||
volScalarField C1 = max(eta/(scalar(5) + eta), scalar(0.43));
|
volScalarField C1 = max(eta/(scalar(5) + eta), scalar(0.43));
|
||||||
|
|
||||||
volScalarField G("G", nut_*S2);
|
volScalarField G("RASModel::G", nut_*S2);
|
||||||
|
|
||||||
// Update espsilon and G at the wall
|
// Update espsilon and G at the wall
|
||||||
epsilon_.boundaryField().updateCoeffs();
|
epsilon_.boundaryField().updateCoeffs();
|
||||||
|
|||||||
Reference in New Issue
Block a user