mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'olesenm'
This commit is contained in:
@ -29,14 +29,9 @@ License
|
||||
#include "volFields.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
@ -52,7 +47,8 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
valueFraction() = 0.0;
|
||||
}
|
||||
|
||||
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
|
||||
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
(
|
||||
const smoluchowskiJumpTFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
@ -67,7 +63,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
{}
|
||||
|
||||
|
||||
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
@ -118,7 +114,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
}
|
||||
|
||||
|
||||
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
(
|
||||
const smoluchowskiJumpTFvPatchScalarField& ptpsf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
@ -134,7 +130,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
// Map from self
|
||||
void smoluchowskiJumpTFvPatchScalarField::autoMap
|
||||
void Foam::smoluchowskiJumpTFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
@ -144,7 +140,7 @@ void smoluchowskiJumpTFvPatchScalarField::autoMap
|
||||
|
||||
|
||||
// Reverse-map the given fvPatchField onto this fvPatchField
|
||||
void smoluchowskiJumpTFvPatchScalarField::rmap
|
||||
void Foam::smoluchowskiJumpTFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchField<scalar>& ptf,
|
||||
const labelList& addr
|
||||
@ -155,7 +151,7 @@ void smoluchowskiJumpTFvPatchScalarField::rmap
|
||||
|
||||
|
||||
// Update the coefficients associated with the patch field
|
||||
void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
@ -174,11 +170,16 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
// Prandtl number reading consistent with rhoCentralFoam
|
||||
const dictionary& thermophysicalProperties =
|
||||
db().lookupObject<IOdictionary>("thermophysicalProperties");
|
||||
dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
|
||||
if (thermophysicalProperties.found("Pr"))
|
||||
{
|
||||
Pr = thermophysicalProperties.lookup("Pr");
|
||||
}
|
||||
|
||||
dimensionedScalar Pr
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"Pr",
|
||||
thermophysicalProperties,
|
||||
1.0
|
||||
)
|
||||
);
|
||||
|
||||
Field<scalar> C2 = pmu/prho
|
||||
*sqrt(ppsi*constant::mathematical::piByTwo)
|
||||
@ -197,7 +198,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
|
||||
|
||||
// Write
|
||||
void smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
||||
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchScalarField::write(os);
|
||||
os.writeKeyword("accommodationCoeff")
|
||||
@ -211,10 +212,12 @@ void smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
makePatchTypeField(fvPatchScalarField, smoluchowskiJumpTFvPatchScalarField);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
}
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
word fluxScheme("Kurganov");
|
||||
if (mesh.schemesDict().found("fluxScheme"))
|
||||
if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme))
|
||||
{
|
||||
fluxScheme = word(mesh.schemesDict().lookup("fluxScheme"));
|
||||
if ((fluxScheme == "Tadmor") || (fluxScheme == "Kurganov"))
|
||||
{
|
||||
Info<< "fluxScheme: " << fluxScheme << endl;
|
||||
|
||||
@ -14,9 +14,13 @@ IOdictionary thermophysicalProperties
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
|
||||
dimensionedScalar Pr
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"Pr",
|
||||
thermophysicalProperties,
|
||||
1.0
|
||||
)
|
||||
);
|
||||
|
||||
if (thermophysicalProperties.found("Pr"))
|
||||
{
|
||||
Pr = thermophysicalProperties.lookup("Pr");
|
||||
}
|
||||
|
||||
@ -70,22 +70,13 @@
|
||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
||||
|
||||
thermalPorousZones pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
// nUCorrectors used for pressureImplicitPorosity
|
||||
int nUCorr = 0;
|
||||
if (pZones.size())
|
||||
{
|
||||
// nUCorrectors for pressureImplicitPorosity
|
||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||
{
|
||||
nUCorr = readInt
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||
);
|
||||
}
|
||||
const bool pressureImplicitPorosity =
|
||||
(
|
||||
pZones.size()
|
||||
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent("nUCorrectors", nUCorr)
|
||||
&& (nUCorr > 0)
|
||||
);
|
||||
|
||||
if (nUCorr > 0)
|
||||
{
|
||||
pressureImplicitPorosity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,8 +26,13 @@
|
||||
|
||||
dimensionedScalar gamma = Cp/Cv;
|
||||
|
||||
dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
|
||||
if (thermodynamicProperties.found("Pr"))
|
||||
{
|
||||
Pr = thermodynamicProperties.lookup("Pr");
|
||||
}
|
||||
dimensionedScalar Pr
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"Pr",
|
||||
thermodynamicProperties,
|
||||
1.0
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
||||
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
||||
|
||||
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
|
||||
|
||||
int nBcorr(readInt(Bpiso.lookup("nCorrectors")));
|
||||
|
||||
@ -1,25 +1,11 @@
|
||||
dictionary simple = fluidRegions[i].solutionDict().subDict("SIMPLE");
|
||||
const dictionary& simple = fluidRegions[i].solutionDict().subDict("SIMPLE");
|
||||
|
||||
int nNonOrthCorr = 0;
|
||||
if (simple.found("nNonOrthogonalCorrectors"))
|
||||
{
|
||||
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
|
||||
}
|
||||
const int nNonOrthCorr =
|
||||
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
bool momentumPredictor = true;
|
||||
if (simple.found("momentumPredictor"))
|
||||
{
|
||||
momentumPredictor = Switch(simple.lookup("momentumPredictor"));
|
||||
}
|
||||
const bool momentumPredictor =
|
||||
simple.lookupOrDefault("momentumPredictor", true);
|
||||
|
||||
bool fluxGradp = false;
|
||||
if (simple.found("fluxGradp"))
|
||||
{
|
||||
fluxGradp = Switch(simple.lookup("fluxGradp"));
|
||||
}
|
||||
const bool transonic =
|
||||
simple.lookupOrDefault("transonic", false);
|
||||
|
||||
bool transonic = false;
|
||||
if (simple.found("transonic"))
|
||||
{
|
||||
transonic = Switch(simple.lookup("transonic"));
|
||||
}
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
dictionary simple = solidRegions[i].solutionDict().subDict("SIMPLE");
|
||||
const dictionary& simple = solidRegions[i].solutionDict().subDict("SIMPLE");
|
||||
|
||||
const int nNonOrthCorr =
|
||||
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
int nNonOrthCorr = 0;
|
||||
if (simple.found("nNonOrthogonalCorrectors"))
|
||||
{
|
||||
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
|
||||
}
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE");
|
||||
|
||||
int nCorr(readInt(pimple.lookup("nCorrectors")));
|
||||
const int nCorr =
|
||||
pimple.lookupOrDefault<int>("nCorrectors", 1);
|
||||
|
||||
int nNonOrthCorr =
|
||||
const int nNonOrthCorr =
|
||||
pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
bool momentumPredictor =
|
||||
pimple.lookupOrDefault<Switch>("momentumPredictor", true);
|
||||
const bool momentumPredictor =
|
||||
pimple.lookupOrDefault("momentumPredictor", true);
|
||||
|
||||
|
||||
@ -1,27 +1,17 @@
|
||||
dictionary piso = fluidRegions[i].solutionDict().subDict("PISO");
|
||||
const dictionary& piso = fluidRegions[i].solutionDict().subDict("PISO");
|
||||
|
||||
int nCorr(readInt(piso.lookup("nCorrectors")));
|
||||
const int nOuterCorr =
|
||||
piso.lookupOrDefault<int>("nOuterCorrectors", 1);
|
||||
|
||||
int nNonOrthCorr = 0;
|
||||
if (piso.found("nNonOrthogonalCorrectors"))
|
||||
{
|
||||
nNonOrthCorr = readInt(piso.lookup("nNonOrthogonalCorrectors"));
|
||||
}
|
||||
const int nCorr =
|
||||
piso.lookupOrDefault<int>("nCorrectors", 1);
|
||||
|
||||
bool momentumPredictor = true;
|
||||
if (piso.found("momentumPredictor"))
|
||||
{
|
||||
momentumPredictor = Switch(piso.lookup("momentumPredictor"));
|
||||
}
|
||||
const int nNonOrthCorr =
|
||||
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
bool transonic = false;
|
||||
if (piso.found("transonic"))
|
||||
{
|
||||
transonic = Switch(piso.lookup("transonic"));
|
||||
}
|
||||
const bool momentumPredictor =
|
||||
piso.lookupOrDefault("momentumPredictor", true);
|
||||
|
||||
const bool transonic =
|
||||
piso.lookupOrDefault("transonic", false);
|
||||
|
||||
int nOuterCorr = 1;
|
||||
if (piso.found("nOuterCorrectors"))
|
||||
{
|
||||
nOuterCorr = readInt(piso.lookup("nOuterCorrectors"));
|
||||
}
|
||||
|
||||
@ -4,4 +4,6 @@
|
||||
|
||||
const dictionary& pimple = solutionDict.subDict("PIMPLE");
|
||||
|
||||
int nOuterCorr(readInt(pimple.lookup("nOuterCorrectors")));
|
||||
const int nOuterCorr =
|
||||
pimple.lookupOrDefault<int>("nOuterCorrectors", 1);
|
||||
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
const dictionary& piso = solidRegions[i].solutionDict().subDict("PISO");
|
||||
|
||||
int nNonOrthCorr = 0;
|
||||
if (piso.found("nNonOrthogonalCorrectors"))
|
||||
{
|
||||
nNonOrthCorr = readInt(piso.lookup("nNonOrthogonalCorrectors"));
|
||||
}
|
||||
const int nNonOrthCorr =
|
||||
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||
|
||||
|
||||
@ -1,14 +1,9 @@
|
||||
#include "readTimeControls.H"
|
||||
#include "readPIMPLEControls.H"
|
||||
|
||||
bool correctPhi = false;
|
||||
if (pimple.found("correctPhi"))
|
||||
{
|
||||
correctPhi = Switch(pimple.lookup("correctPhi"));
|
||||
}
|
||||
const bool correctPhi =
|
||||
pimple.lookupOrDefault("correctPhi", false);
|
||||
|
||||
const bool checkMeshCourantNo =
|
||||
pimple.lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
bool checkMeshCourantNo = false;
|
||||
if (pimple.found("checkMeshCourantNo"))
|
||||
{
|
||||
checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo"));
|
||||
}
|
||||
|
||||
@ -43,22 +43,13 @@
|
||||
|
||||
|
||||
porousZones pZones(mesh);
|
||||
Switch pressureImplicitPorosity(false);
|
||||
|
||||
// nUCorrectors used for pressureImplicitPorosity
|
||||
int nUCorr = 0;
|
||||
if (pZones.size())
|
||||
{
|
||||
// nUCorrectors for pressureImplicitPorosity
|
||||
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
|
||||
{
|
||||
nUCorr = readInt
|
||||
(
|
||||
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
|
||||
);
|
||||
}
|
||||
const bool pressureImplicitPorosity =
|
||||
(
|
||||
pZones.size()
|
||||
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent("nUCorrectors", nUCorr)
|
||||
&& (nUCorr > 0)
|
||||
);
|
||||
|
||||
if (nUCorr > 0)
|
||||
{
|
||||
pressureImplicitPorosity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
|
||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
||||
{
|
||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "readPISOControls.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "readPISOControls.H"
|
||||
#include "readTimeControls.H"
|
||||
|
||||
label nAlphaCorr
|
||||
(
|
||||
@ -19,14 +19,9 @@
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
bool correctPhi = true;
|
||||
if (piso.found("correctPhi"))
|
||||
{
|
||||
correctPhi = Switch(piso.lookup("correctPhi"));
|
||||
}
|
||||
const bool correctPhi =
|
||||
piso.lookupOrDefault("correctPhi", true);
|
||||
|
||||
const bool checkMeshCourantNo =
|
||||
piso.lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
bool checkMeshCourantNo = false;
|
||||
if (piso.found("checkMeshCourantNo"))
|
||||
{
|
||||
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
||||
}
|
||||
|
||||
@ -1,14 +1,9 @@
|
||||
# include "readTimeControls.H"
|
||||
# include "readPISOControls.H"
|
||||
|
||||
bool correctPhi = true;
|
||||
if (piso.found("correctPhi"))
|
||||
{
|
||||
correctPhi = Switch(piso.lookup("correctPhi"));
|
||||
}
|
||||
const bool correctPhi =
|
||||
piso.lookupOrDefault("correctPhi", true);
|
||||
|
||||
const bool checkMeshCourantNo =
|
||||
piso.lookupOrDefault("checkMeshCourantNo", false);
|
||||
|
||||
bool checkMeshCourantNo = false;
|
||||
if (piso.found("checkMeshCourantNo"))
|
||||
{
|
||||
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
|
||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
||||
{
|
||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
||||
|
||||
@ -175,10 +175,8 @@
|
||||
);
|
||||
|
||||
word dragPhase("blended");
|
||||
if (interfacialProperties.found("dragPhase"))
|
||||
if (interfacialProperties.readIfPresent("dragPhase", dragPhase))
|
||||
{
|
||||
dragPhase = word(interfacialProperties.lookup("dragPhase"));
|
||||
|
||||
bool validDrag =
|
||||
dragPhase == "a" || dragPhase == "b" || dragPhase == "blended";
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
const dictionary& stressControl = mesh.solutionDict().subDict("stressAnalysis");
|
||||
|
||||
int nCorr(readInt(stressControl.lookup("nCorrectors")));
|
||||
const int nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
|
||||
|
||||
scalar convergenceTolerance(readScalar(stressControl.lookup("D")));
|
||||
Switch compactNormalStress(stressControl.lookup("compactNormalStress"));
|
||||
|
||||
Reference in New Issue
Block a user