Formatting
This commit is contained in:
parent
aa0342f9a1
commit
88f3579418
4 changed files with 22 additions and 50 deletions
|
@ -87,9 +87,10 @@ bool Foam::mixingPlaneCheckFunctionObject::execute()
|
|||
|
||||
forAll (mesh.boundaryMesh(), patchI)
|
||||
{
|
||||
if (
|
||||
isA<mixingPlanePolyPatch>(mesh.boundaryMesh()[patchI]) &&
|
||||
mesh.boundaryMesh()[patchI].size()
|
||||
if
|
||||
(
|
||||
isA<mixingPlanePolyPatch>(mesh.boundaryMesh()[patchI])
|
||||
&& mesh.boundaryMesh()[patchI].size()
|
||||
)
|
||||
{
|
||||
if (!visited[patchI])
|
||||
|
@ -202,7 +203,7 @@ bool Foam::mixingPlaneCheckFunctionObject::execute()
|
|||
|
||||
// Old way of computing phi balance
|
||||
|
||||
if( mesh.foundObject<surfaceScalarField>(phiName_) )
|
||||
if (mesh.foundObject<surfaceScalarField>(phiName_))
|
||||
{
|
||||
const surfaceScalarField& phi =
|
||||
mesh.lookupObject<surfaceScalarField>(phiName_);
|
||||
|
@ -210,10 +211,13 @@ bool Foam::mixingPlaneCheckFunctionObject::execute()
|
|||
// Calculate local and shadow flux
|
||||
scalar masterPatchScaleFactor_ = 1.0;
|
||||
scalar shadowPatchScaleFactor_ = sumMasterAreas/sumShadowAreas;
|
||||
scalar localFlux = masterPatchScaleFactor_ * sum(phi.boundaryField()[patchI]);
|
||||
scalar localFlux =masterPatchScaleFactor_*
|
||||
sum(phi.boundaryField()[patchI]);
|
||||
|
||||
scalar localFluxMag = mag(localFlux);
|
||||
|
||||
scalar shadowFlux = shadowPatchScaleFactor_ * sum(phi.boundaryField()[shadowPatchI]);
|
||||
scalar shadowFlux =shadowPatchScaleFactor_*
|
||||
sum(phi.boundaryField()[shadowPatchI]);
|
||||
// scalar shadowFluxMag = mag(shadowFlux);
|
||||
|
||||
Info<< "Mixing plane pair "
|
||||
|
@ -228,43 +232,6 @@ bool Foam::mixingPlaneCheckFunctionObject::execute()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// {
|
||||
// word patchName = phi.boundaryField()[patchI].patch().name();
|
||||
|
||||
// if (patchName == masterPatchName_ && !visited[patchI])
|
||||
// {
|
||||
// visited[patchI] = true;
|
||||
|
||||
// // Calculate local and shadow flux
|
||||
// scalar localFlux = masterPatchScaleFactor_ * sum(phi.boundaryField()[patchI]);
|
||||
// //scalar localFluxMag = masterPatchScaleFactor_ * sumMag(phi.boundaryField()[patchI]);
|
||||
// scalar localFluxMag = mag(localFlux);
|
||||
|
||||
// const mixingPlanePolyPatch& mixingPlanePatch =
|
||||
// refCast<const mixingPlanePolyPatch>
|
||||
// (
|
||||
// phi.boundaryField()[patchI].patch().patch()
|
||||
// );
|
||||
|
||||
// const label shadowPatchI = mixingPlanePatch.shadowIndex();
|
||||
|
||||
// visited[shadowPatchI] = true;
|
||||
|
||||
// scalar shadowFlux = shadowPatchScaleFactor_ * sum(phi.boundaryField()[shadowPatchI]);
|
||||
// //scalar shadowFluxMag = shadowPatchScaleFactor_ * sumMag(phi.boundaryField()[shadowPatchI]);
|
||||
// scalar shadowFluxMag = mag(shadowFlux);
|
||||
|
||||
// Info<< "mixingPlane pair " << name_ << " (" << mixingPlanePatch.name() << ", " << mixingPlanePatch.shadow().name() << ") : "
|
||||
// << " flux: " << localFlux << " " << shadowFlux
|
||||
// << " : mag: " << localFluxMag << " " << shadowFluxMag
|
||||
// << " Diff = " << localFlux + shadowFlux << " or "
|
||||
// << mag(localFlux + shadowFlux)/(localFluxMag + SMALL)*100
|
||||
// << " %" << endl;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ bool Foam::cuttingPlane::walkCell
|
|||
<< "Did not find closed walk along surface of cell " << cellI
|
||||
<< " starting from edge " << startEdgeI
|
||||
<< " in " << nIter << " iterations." << nl
|
||||
<< "Collected cutPoints so far:" << faceVerts
|
||||
<< "Collected " << faceVerts.size() << " cutPoints so far"
|
||||
<< endl;
|
||||
|
||||
return false;
|
||||
|
@ -235,13 +235,14 @@ bool Foam::cuttingPlane::walkCell
|
|||
|
||||
nIter++;
|
||||
|
||||
if (nIter > 1000)
|
||||
// Note: reduce number of points in the cut before error
|
||||
if (nIter > 100)
|
||||
{
|
||||
WarningIn("Foam::cuttingPlane::walkCell")
|
||||
<< "Did not find closed walk along surface of cell " << cellI
|
||||
<< " starting from edge " << startEdgeI
|
||||
<< " in " << nIter << " iterations." << nl
|
||||
<< "Collected cutPoints so far:" << faceVerts
|
||||
<< "Collected " << faceVerts.size() << " cutPoints so far"
|
||||
<< endl;
|
||||
return false;
|
||||
}
|
||||
|
@ -258,7 +259,7 @@ bool Foam::cuttingPlane::walkCell
|
|||
WarningIn("Foam::cuttingPlane::walkCell")
|
||||
<< "Did not find closed walk along surface of cell " << cellI
|
||||
<< " starting from edge " << startEdgeI << nl
|
||||
<< "Collected cutPoints so far:" << faceVerts
|
||||
<< "Collected " << faceVerts.size() << " cutPoints so far"
|
||||
<< endl;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -36,7 +36,11 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::basicPsiThermo::basicPsiThermo(const fvMesh& mesh, const objectRegistry& obj)
|
||||
Foam::basicPsiThermo::basicPsiThermo
|
||||
(
|
||||
const fvMesh& mesh,
|
||||
const objectRegistry& obj
|
||||
)
|
||||
:
|
||||
basicThermo(mesh, obj)
|
||||
{}
|
||||
|
|
|
@ -66,8 +66,8 @@ Foam::redlichKwong::redlichKwong(const dictionary& dict)
|
|||
Tcrit_(readScalar(dict.subDict("equationOfState").lookup("TCritical"))),
|
||||
a_(0.42748*pow(this->RR(),2)*pow(Tcrit_,2.5)/pcrit_),
|
||||
b_(0.08664*this->RR()*Tcrit_/pcrit_),
|
||||
b2_(pow(b_,2)),
|
||||
b3_(pow(b_,3)),
|
||||
b2_(pow(b_, 2)),
|
||||
b3_(pow(b_, 3)),
|
||||
//CL: rhoMin and rhoMax are only used as boundaries for the bisection methode (see rho function)
|
||||
//CL: important: rhoMin and rhoMax are not used as boundary for the newton solver
|
||||
//CL: therefore, rho can be larger than rhoMax and smaller than rhoMin
|
||||
|
|
Reference in a new issue