mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use writeEntry(), beginBlock(), endBlock() methods
- use dictionary::get<..> instead of lookup in a few more places
This commit is contained in:
@ -37,11 +37,7 @@
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
const word& name = Y[i].name();
|
||||
if (fractions.found(name))
|
||||
{
|
||||
X0[i] = fractions.get<scalar>(name);
|
||||
}
|
||||
fractions.readIfPresent(Y[i].name(), X0[i]);
|
||||
}
|
||||
|
||||
scalar mw = 0.0;
|
||||
@ -61,11 +57,7 @@
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
const word& name = Y[i].name();
|
||||
if (fractions.found(name))
|
||||
{
|
||||
Y0[i] = fractions.get<scalar>(name);
|
||||
}
|
||||
fractions.readIfPresent(Y[i].name(), Y0[i]);
|
||||
}
|
||||
|
||||
scalar invW = 0.0;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -495,11 +495,8 @@ void turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField::write
|
||||
os.writeEntryIfDifferent<word>("qrNbr", "none", qrNbrName_);
|
||||
os.writeEntryIfDifferent<word>("qr", "none", qrName_);
|
||||
|
||||
os.writeKeyword("region") << regionTypeNames_[regionType_]
|
||||
<< token::END_STATEMENT << nl;
|
||||
|
||||
os.writeKeyword("otherPhase") << otherPhaseName_ << token::END_STATEMENT
|
||||
<< nl;
|
||||
os.writeEntry("region", regionTypeNames_[regionType_]);
|
||||
os.writeEntry("otherPhase", otherPhaseName_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ word continuousPhaseName
|
||||
mesh,
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
).lookup("continuousPhase")
|
||||
).get<word>("continuousPhase")
|
||||
);
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,9 +58,9 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
|
||||
)
|
||||
);
|
||||
|
||||
word simulationType
|
||||
const word simulationType
|
||||
(
|
||||
turbulenceProperties.lookup("simulationType")
|
||||
turbulenceProperties.get<word>("simulationType")
|
||||
);
|
||||
|
||||
if (simulationType == "twoPhaseTransport")
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -72,43 +72,39 @@ VoFPatchTransfer::VoFPatchTransfer
|
||||
transferRateCoeff_
|
||||
(
|
||||
coeffDict_.lookupOrDefault<scalar>("transferRateCoeff", 0.1)
|
||||
)
|
||||
),
|
||||
patchIDs_(),
|
||||
patchTransferredMasses_()
|
||||
{
|
||||
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
|
||||
patchIDs_.setSize
|
||||
|
||||
const label nPatches
|
||||
(
|
||||
pbm.size() - film.regionMesh().globalData().processorPatches().size()
|
||||
);
|
||||
|
||||
if (coeffDict_.found("patches"))
|
||||
wordReList patchNames;
|
||||
if (coeffDict_.readIfPresent("patches", patchNames))
|
||||
{
|
||||
const wordReList patchNames(coeffDict_.lookup("patches"));
|
||||
const labelHashSet patchSet = pbm.patchSet(patchNames);
|
||||
patchIDs_ = pbm.patchSet(patchNames).sortedToc();
|
||||
|
||||
Info<< " applying to patches:" << nl;
|
||||
Info<< " applying to " << patchIDs_.size() << " patches:" << nl;
|
||||
|
||||
label pidi = 0;
|
||||
for (const label patchi : patchSet)
|
||||
for (const label patchi : patchIDs_)
|
||||
{
|
||||
patchIDs_[pidi++] = patchi;
|
||||
Info<< " " << pbm[patchi].name() << endl;
|
||||
}
|
||||
patchIDs_.setSize(pidi);
|
||||
patchTransferredMasses_.setSize(pidi, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " applying to all patches" << endl;
|
||||
|
||||
forAll(patchIDs_, patchi)
|
||||
{
|
||||
patchIDs_[patchi] = patchi;
|
||||
patchIDs_ = identity(nPatches);
|
||||
}
|
||||
|
||||
patchTransferredMasses_.setSize(patchIDs_.size(), 0);
|
||||
}
|
||||
patchTransferredMasses_.resize(patchIDs_.size(), Zero);
|
||||
|
||||
if (!patchIDs_.size())
|
||||
if (patchIDs_.empty())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "No patches selected"
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -191,7 +191,7 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::solveYi
|
||||
|
||||
const dictionary& MULEScontrols = mesh.solverDict(alpha1.name());
|
||||
|
||||
scalar cAlpha(readScalar(MULEScontrols.lookup("cYi")));
|
||||
scalar cAlpha(MULEScontrols.get<scalar>("cYi"));
|
||||
|
||||
PtrList<surfaceScalarField> phiYiCorrs(species_.size());
|
||||
const surfaceScalarField& phi = this->fluid().phi();
|
||||
|
||||
@ -220,7 +220,7 @@ Foam::phaseSystem::phaseSystem
|
||||
dimensionedScalar(dimViscosity*dimDensity, Zero),
|
||||
calculatedFvPatchScalarField::typeName
|
||||
),
|
||||
phaseNames_(lookup("phases")),
|
||||
phaseNames_(get<wordList>("phases")),
|
||||
phi_
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -64,9 +64,9 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture
|
||||
)
|
||||
),
|
||||
|
||||
phase1Name_(wordList(lookup("phases"))[0]),
|
||||
phase2Name_(wordList(lookup("phases"))[1]),
|
||||
phase3Name_(wordList(lookup("phases"))[2]),
|
||||
phase1Name_(get<wordList>("phases")[0]),
|
||||
phase2Name_(get<wordList>("phases")[1]),
|
||||
phase3Name_(get<wordList>("phases")[2]),
|
||||
|
||||
alpha1_
|
||||
(
|
||||
|
||||
@ -98,7 +98,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
|
||||
)
|
||||
),
|
||||
|
||||
equilibrium_(coeffDict_.lookup("equilibrium")),
|
||||
equilibrium_(coeffDict_.get<bool>("equilibrium")),
|
||||
e_("e", dimless, coeffDict_),
|
||||
alphaMax_("alphaMax", dimless, coeffDict_),
|
||||
alphaMinFriction_("alphaMinFriction", dimless, coeffDict_),
|
||||
|
||||
@ -109,7 +109,7 @@ class kineticTheoryModel
|
||||
// Kinetic Theory Model coefficients
|
||||
|
||||
//- Use equilibrium approximation: generation == dissipation
|
||||
Switch equilibrium_;
|
||||
bool equilibrium_;
|
||||
|
||||
//- Coefficient of restitution
|
||||
dimensionedScalar e_;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2014 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,7 +55,7 @@ Foam::blendingMethods::noBlending::noBlending
|
||||
)
|
||||
:
|
||||
blendingMethod(dict),
|
||||
continuousPhase_(dict.lookup("continuousPhase"))
|
||||
continuousPhase_(dict.get<word>("continuousPhase"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -75,14 +76,14 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
(
|
||||
*this,
|
||||
*this,
|
||||
wordList(lookup("phases"))[0]
|
||||
this->get<wordList>("phases")[0]
|
||||
),
|
||||
|
||||
phase2_
|
||||
(
|
||||
*this,
|
||||
*this,
|
||||
wordList(lookup("phases"))[1]
|
||||
this->get<wordList>("phases")[1]
|
||||
),
|
||||
|
||||
phi_
|
||||
@ -109,7 +110,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dgdt", dimless/dimTime, 0)
|
||||
dimensionedScalar("dgdt", dimless/dimTime, Zero)
|
||||
)
|
||||
{
|
||||
phase2_.volScalarField::operator=(scalar(1) - phase1_);
|
||||
@ -124,7 +125,7 @@ Foam::twoPhaseSystem::twoPhaseSystem
|
||||
blendingMethod::New
|
||||
(
|
||||
iter().dict(),
|
||||
wordList(lookup("phases"))
|
||||
this->get<wordList>("phases")
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
keyType keyre("x.*", keyType::REGEX);
|
||||
|
||||
wordReList wordrelist
|
||||
wordRes wordrelist
|
||||
{
|
||||
{"this", wordRe::LITERAL},
|
||||
{"x.*", wordRe::REGEX},
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -308,8 +308,7 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
fileName sourceCasePath(dict.lookup("sourceCase"));
|
||||
sourceCasePath.expand();
|
||||
fileName sourceCasePath(dict.get<fileName>("sourceCase").expand());
|
||||
fileName sourceRootDir = sourceCasePath.path();
|
||||
fileName sourceCaseDir = sourceCasePath.name();
|
||||
if (Pstream::parRun())
|
||||
@ -758,8 +757,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
// Read from surface
|
||||
fileName surfName(dict.lookup("surface"));
|
||||
surfName.expand();
|
||||
fileName surfName(dict.get<fileName>("surface").expand());
|
||||
|
||||
Info<< "Extruding surfaceMesh read from file " << surfName << nl
|
||||
<< endl;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -50,7 +51,7 @@ Foam::faceSelections::faceZoneSelection::faceZoneSelection
|
||||
)
|
||||
:
|
||||
faceSelection(name, mesh, dict),
|
||||
zoneName_(dict_.lookup("zoneName"))
|
||||
zoneName_(dict_.get<word>("zoneName"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,7 +54,7 @@ Description
|
||||
#include "IOPtrList.H"
|
||||
#include "polyTopoChange.H"
|
||||
#include "polyModifyFace.H"
|
||||
#include "wordReList.H"
|
||||
#include "wordRes.H"
|
||||
#include "processorMeshes.H"
|
||||
#include "IOdictionary.H"
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -378,16 +378,17 @@ int main(int argc, char *argv[])
|
||||
"from the body reference frame to the global "
|
||||
"reference frame, i.e.:" << nl
|
||||
<< "globalVector = orientation & bodyLocalVector"
|
||||
<< endl;
|
||||
<< nl;
|
||||
|
||||
Info<< nl
|
||||
<< "Entries for sixDoFRigidBodyDisplacement boundary condition:"
|
||||
<< nl
|
||||
<< " mass " << m << token::END_STATEMENT << nl
|
||||
<< " centreOfMass " << cM << token::END_STATEMENT << nl
|
||||
<< " momentOfInertia " << eVal << token::END_STATEMENT << nl
|
||||
<< " orientation " << eVec.T() << token::END_STATEMENT
|
||||
<< endl;
|
||||
<< nl;
|
||||
|
||||
Info()
|
||||
.writeEntry("mass", m)
|
||||
.writeEntry("centreOfMass", cM)
|
||||
.writeEntry("momentOfInertia", eVal)
|
||||
.writeEntry("orientation", eVec.T());
|
||||
}
|
||||
|
||||
if (calcAroundRefPt)
|
||||
|
||||
@ -275,7 +275,7 @@ Foam::searchableSurfaceModifiers::cut::cut
|
||||
)
|
||||
:
|
||||
searchableSurfaceModifier(geometry, dict),
|
||||
cutterNames_(dict_.lookup("cutters"))
|
||||
cutterNames_(dict_.get<wordRes>("cutters"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -197,7 +197,7 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
word funcName(funcNameArgs);
|
||||
|
||||
int argLevel = 0;
|
||||
wordReList args;
|
||||
wordRes args;
|
||||
|
||||
List<Tuple2<word, string>> namedArgs;
|
||||
bool hasNamedArg = false;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,7 +60,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone
|
||||
dictionary coeffs(dict.optionalSubDict(modelType + "Coeffs"));
|
||||
|
||||
// Vertical direction within porous region
|
||||
vector zDir(coeffs.lookup("zDir"));
|
||||
vector zDir(coeffs.get<vector>("zDir"));
|
||||
|
||||
// Span of the search for the cells in the porous region
|
||||
scalar searchSpan(coeffs.get<scalar>("searchSpan"));
|
||||
@ -69,7 +70,7 @@ Foam::porosityModels::powerLawLopesdaCostaZone::powerLawLopesdaCostaZone
|
||||
|
||||
// List of the ground patches defining the lower surface
|
||||
// of the porous region
|
||||
List<wordRe> groundPatches(coeffs.lookup("groundPatches"));
|
||||
wordRes groundPatches(coeffs.get<wordRes>("groundPatches"));
|
||||
|
||||
// Functional form of the porosity surface area per unit volume as a
|
||||
// function of the normalized vertical position
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -128,8 +128,10 @@ Foam::combustionModels::zoneCombustion<ReactionThermo>::zoneCombustion
|
||||
"zoneCombustionProperties"
|
||||
)
|
||||
),
|
||||
zoneNames_(this->coeffs().lookup("zones"))
|
||||
{}
|
||||
zoneNames_()
|
||||
{
|
||||
this->coeffs().readEntry("zones", zoneNames_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -945,7 +945,7 @@ Foam::vector Foam::interfaceTrackingFvMesh::totalViscousForce() const
|
||||
// "transportProperties"
|
||||
// );
|
||||
|
||||
// dimensionedScalar nu(properties.lookup("nu"));
|
||||
// dimensionedScalar nu("nu", properties);
|
||||
|
||||
const scalarField& S = aMesh().S();
|
||||
const vectorField& n = aMesh().faceAreaNormals().internalField();
|
||||
@ -1557,16 +1557,16 @@ Foam::interfaceTrackingFvMesh::interfaceTrackingFvMesh(const IOobject& io)
|
||||
fsPatchIndex_(-1),
|
||||
fixedFreeSurfacePatches_
|
||||
(
|
||||
motion().lookup("fixedFreeSurfacePatches")
|
||||
motion().get<wordList>("fixedFreeSurfacePatches")
|
||||
),
|
||||
nonReflectingFreeSurfacePatches_(),
|
||||
pointNormalsCorrectionPatches_
|
||||
(
|
||||
motion().lookup("pointNormalsCorrectionPatches")
|
||||
motion().get<wordList>("pointNormalsCorrectionPatches")
|
||||
),
|
||||
normalMotionDir_
|
||||
(
|
||||
motion().lookup("normalMotionDir")
|
||||
motion().get<bool>("normalMotionDir")
|
||||
),
|
||||
motionDir_(Zero),
|
||||
smoothing_(motion().lookupOrDefault("smoothing", false)),
|
||||
@ -1619,16 +1619,16 @@ Foam::interfaceTrackingFvMesh::interfaceTrackingFvMesh
|
||||
fsPatchIndex_(-1),
|
||||
fixedFreeSurfacePatches_
|
||||
(
|
||||
motion().lookup("fixedFreeSurfacePatches")
|
||||
motion().get<wordList>("fixedFreeSurfacePatches")
|
||||
),
|
||||
nonReflectingFreeSurfacePatches_(),
|
||||
pointNormalsCorrectionPatches_
|
||||
(
|
||||
motion().lookup("pointNormalsCorrectionPatches")
|
||||
motion().get<wordList>("pointNormalsCorrectionPatches")
|
||||
),
|
||||
normalMotionDir_
|
||||
(
|
||||
motion().lookup("normalMotionDir")
|
||||
motion().get<bool>("normalMotionDir")
|
||||
),
|
||||
motionDir_(Zero),
|
||||
smoothing_(motion().lookupOrDefault("smoothing", false)),
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -275,11 +276,13 @@ Foam::directions::directions
|
||||
const twoDPointCorrector* correct2DPtr
|
||||
)
|
||||
:
|
||||
List<vectorField>(wordList(dict.lookup("directions")).size())
|
||||
List<vectorField>()
|
||||
{
|
||||
const wordList wantedDirs(dict.lookup("directions"));
|
||||
const wordList wantedDirs(dict.get<wordList>("directions"));
|
||||
const word coordSystem(dict.get<word>("coordinateSystem"));
|
||||
|
||||
List<vectorField>::resize(wantedDirs.size());
|
||||
|
||||
bool wantNormal = false;
|
||||
bool wantTan1 = false;
|
||||
bool wantTan2 = false;
|
||||
@ -311,10 +314,10 @@ Foam::directions::directions
|
||||
{
|
||||
const dictionary& globalDict = dict.subDict("globalCoeffs");
|
||||
|
||||
vector tan1(globalDict.lookup("tan1"));
|
||||
vector tan1(globalDict.get<vector>("tan1"));
|
||||
check2D(correct2DPtr, tan1);
|
||||
|
||||
vector tan2(globalDict.lookup("tan2"));
|
||||
vector tan2(globalDict.get<vector>("tan2"));
|
||||
check2D(correct2DPtr, tan2);
|
||||
|
||||
const vector normal = normalised(tan1 ^ tan2);
|
||||
@ -357,7 +360,7 @@ Foam::directions::directions
|
||||
// Take zeroth face on patch
|
||||
const polyPatch& pp = mesh.boundaryMesh()[patchi];
|
||||
|
||||
vector tan1(patchDict.lookup("tan1"));
|
||||
vector tan1(patchDict.get<vector>("tan1"));
|
||||
|
||||
const vector& n0 = pp.faceNormals()[0];
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -494,7 +494,7 @@ Foam::multiDirRefinement::multiDirRefinement
|
||||
|
||||
const bool writeMesh(dict.get<bool>("writeMesh"));
|
||||
|
||||
wordList dirNames(dict.lookup("directions"));
|
||||
const wordList dirNames(dict.get<wordList>("directions"));
|
||||
|
||||
if (useHex && dirNames.size() == 3)
|
||||
{
|
||||
@ -537,7 +537,7 @@ Foam::multiDirRefinement::multiDirRefinement
|
||||
|
||||
const bool writeMesh(dict.get<bool>("writeMesh"));
|
||||
|
||||
wordList dirNames(dict.lookup("directions"));
|
||||
const wordList dirNames(dict.get<wordList>("directions"));
|
||||
|
||||
if (useHex && dirNames.size() == 3)
|
||||
{
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -76,7 +77,7 @@ Foam::componentDisplacementMotionSolver::componentDisplacementMotionSolver
|
||||
)
|
||||
:
|
||||
motionSolver(mesh, dict, type),
|
||||
cmptName_(coeffDict().lookup("component")),
|
||||
cmptName_(coeffDict().get<word>("component")),
|
||||
cmpt_(cmpt(cmptName_)),
|
||||
points0_
|
||||
(
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,7 +53,7 @@ Foam::solidBodyMotionFunctions::SDA::SDA
|
||||
)
|
||||
:
|
||||
solidBodyMotionFunction(SBMFCoeffs, runTime),
|
||||
CofG_(SBMFCoeffs_.lookup("CofG"))
|
||||
CofG_(SBMFCoeffs_.get<vector>("CofG"))
|
||||
{
|
||||
read(SBMFCoeffs);
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,8 +58,8 @@ Foam::solidBodyMotionFunctions::rotatingMotion::rotatingMotion
|
||||
)
|
||||
:
|
||||
solidBodyMotionFunction(SBMFCoeffs, runTime),
|
||||
origin_(SBMFCoeffs_.lookup("origin")),
|
||||
axis_(SBMFCoeffs_.lookup("axis")),
|
||||
origin_(SBMFCoeffs_.get<vector>("origin")),
|
||||
axis_(SBMFCoeffs_.get<vector>("axis")),
|
||||
omega_(Function1<scalar>::New("omega", SBMFCoeffs_))
|
||||
{}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -126,7 +126,7 @@ bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
|
||||
|
||||
fileName newTimeDataFileName
|
||||
(
|
||||
fileName(SBMFCoeffs_.lookup("timeDataFileName")).expand()
|
||||
SBMFCoeffs_.get<fileName>("timeDataFileName").expand()
|
||||
);
|
||||
|
||||
if (newTimeDataFileName != timeDataFileName_)
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -110,17 +110,17 @@ Foam::perfectInterface::perfectInterface
|
||||
polyMeshModifier(name, index, mme, dict.get<bool>("active")),
|
||||
faceZoneID_
|
||||
(
|
||||
dict.lookup("faceZoneName"),
|
||||
dict.get<keyType>("faceZoneName"),
|
||||
mme.mesh().faceZones()
|
||||
),
|
||||
masterPatchID_
|
||||
(
|
||||
dict.lookup("masterPatchName"),
|
||||
dict.get<keyType>("masterPatchName"),
|
||||
mme.mesh().boundaryMesh()
|
||||
),
|
||||
slavePatchID_
|
||||
(
|
||||
dict.lookup("slavePatchName"),
|
||||
dict.get<keyType>("slavePatchName"),
|
||||
mme.mesh().boundaryMesh()
|
||||
)
|
||||
{}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -215,37 +216,37 @@ Foam::slidingInterface::slidingInterface
|
||||
polyMeshModifier(name, index, mme, dict.get<bool>("active")),
|
||||
masterFaceZoneID_
|
||||
(
|
||||
dict.lookup("masterFaceZoneName"),
|
||||
dict.get<keyType>("masterFaceZoneName"),
|
||||
mme.mesh().faceZones()
|
||||
),
|
||||
slaveFaceZoneID_
|
||||
(
|
||||
dict.lookup("slaveFaceZoneName"),
|
||||
dict.get<keyType>("slaveFaceZoneName"),
|
||||
mme.mesh().faceZones()
|
||||
),
|
||||
cutPointZoneID_
|
||||
(
|
||||
dict.lookup("cutPointZoneName"),
|
||||
dict.get<keyType>("cutPointZoneName"),
|
||||
mme.mesh().pointZones()
|
||||
),
|
||||
cutFaceZoneID_
|
||||
(
|
||||
dict.lookup("cutFaceZoneName"),
|
||||
dict.get<keyType>("cutFaceZoneName"),
|
||||
mme.mesh().faceZones()
|
||||
),
|
||||
masterPatchID_
|
||||
(
|
||||
dict.lookup("masterPatchName"),
|
||||
dict.get<keyType>("masterPatchName"),
|
||||
mme.mesh().boundaryMesh()
|
||||
),
|
||||
slavePatchID_
|
||||
(
|
||||
dict.lookup("slavePatchName"),
|
||||
dict.get<keyType>("slavePatchName"),
|
||||
mme.mesh().boundaryMesh()
|
||||
),
|
||||
matchType_(typeOfMatchNames.get("typeOfMatch", dict)),
|
||||
coupleDecouple_(dict.lookup("coupleDecouple")),
|
||||
attached_(dict.lookup("attached")),
|
||||
coupleDecouple_(dict.get<bool>("coupleDecouple")),
|
||||
attached_(dict.get<bool>("attached")),
|
||||
projectionAlgo_
|
||||
(
|
||||
intersection::algorithmNames_.get("projection", dict)
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -125,30 +126,42 @@ Foam::engineValve::engineValve
|
||||
(
|
||||
coordinateSystem::New(mesh_, dict, coordinateSystem::typeName_())
|
||||
),
|
||||
bottomPatch_(dict.lookup("bottomPatch"), mesh.boundaryMesh()),
|
||||
poppetPatch_(dict.lookup("poppetPatch"), mesh.boundaryMesh()),
|
||||
stemPatch_(dict.lookup("stemPatch"), mesh.boundaryMesh()),
|
||||
bottomPatch_
|
||||
(
|
||||
dict.get<keyType>("bottomPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
poppetPatch_
|
||||
(
|
||||
dict.get<keyType>("poppetPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
stemPatch_
|
||||
(
|
||||
dict.get<keyType>("stemPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
curtainInPortPatch_
|
||||
(
|
||||
dict.lookup("curtainInPortPatch"),
|
||||
dict.get<keyType>("curtainInPortPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
curtainInCylinderPatch_
|
||||
(
|
||||
dict.lookup("curtainInCylinderPatch"),
|
||||
dict.get<keyType>("curtainInCylinderPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
detachInCylinderPatch_
|
||||
(
|
||||
dict.lookup("detachInCylinderPatch"),
|
||||
dict.get<keyType>("detachInCylinderPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
detachInPortPatch_
|
||||
(
|
||||
dict.lookup("detachInPortPatch"),
|
||||
dict.get<keyType>("detachInPortPatch"),
|
||||
mesh.boundaryMesh()
|
||||
),
|
||||
detachFaces_(dict.lookup("detachFaces")),
|
||||
detachFaces_(dict.get<labelList>("detachFaces")),
|
||||
liftProfile_("theta", "lift", name_, dict.lookup("liftProfile")),
|
||||
liftProfileStart_(min(liftProfile_.x())),
|
||||
liftProfileEnd_(max(liftProfile_.x())),
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,7 +59,7 @@ class ignition
|
||||
|
||||
const fvMesh& mesh_;
|
||||
|
||||
Switch ignite_;
|
||||
bool ignite_;
|
||||
|
||||
PtrList<ignitionSite> ignSites_;
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -38,7 +39,7 @@ Foam::ignition::ignition
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
ignite_(combustionProperties.lookup("ignite")),
|
||||
ignite_(combustionProperties.get<bool>("ignite")),
|
||||
ignSites_
|
||||
(
|
||||
combustionProperties.lookup("ignitionSites"),
|
||||
@ -64,7 +65,7 @@ Foam::ignition::ignition
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
ignite_(combustionProperties.lookup("ignite")),
|
||||
ignite_(combustionProperties.get<bool>("ignite")),
|
||||
ignSites_
|
||||
(
|
||||
combustionProperties.lookup("ignitionSites"),
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -40,7 +41,7 @@ Foam::ignitionSite::ignitionSite
|
||||
db_(db),
|
||||
mesh_(mesh),
|
||||
ignitionSiteDict_(is),
|
||||
location_(ignitionSiteDict_.lookup("location")),
|
||||
location_(ignitionSiteDict_.get<vector>("location")),
|
||||
diameter_(ignitionSiteDict_.get<scalar>("diameter")),
|
||||
time_
|
||||
(
|
||||
@ -76,7 +77,7 @@ Foam::ignitionSite::ignitionSite
|
||||
db_(edb),
|
||||
mesh_(mesh),
|
||||
ignitionSiteDict_(is),
|
||||
location_(ignitionSiteDict_.lookup("location")),
|
||||
location_(ignitionSiteDict_.get<vector>("location")),
|
||||
diameter_(ignitionSiteDict_.get<scalar>("diameter")),
|
||||
time_
|
||||
(
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -392,7 +393,10 @@ Foam::faMesh::faMesh
|
||||
)
|
||||
);
|
||||
|
||||
const wordList polyMeshPatches(faMeshDefinition.lookup("polyMeshPatches"));
|
||||
const wordList polyMeshPatches
|
||||
(
|
||||
faMeshDefinition.get<wordList>("polyMeshPatches")
|
||||
);
|
||||
|
||||
const dictionary& bndDict = faMeshDefinition.subDict("boundary");
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -83,7 +83,7 @@ Foam::faPatch::faPatch
|
||||
const faBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
labelList(dict.lookup("edgeLabels")),
|
||||
labelList(dict.get<labelList>("edgeLabels")),
|
||||
patchIdentifier(name, dict, index),
|
||||
ngbPolyPatchIndex_(dict.get<label>("ngbPolyPatchIndex")),
|
||||
boundaryMesh_(bm),
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -254,8 +254,8 @@ Foam::MRFZone::MRFZone
|
||||
(
|
||||
coeffs_.lookupOrDefault<wordRes>("nonRotatingPatches", wordRes())
|
||||
),
|
||||
origin_(coeffs_.lookup("origin")),
|
||||
axis_(coeffs_.lookup("axis")),
|
||||
origin_(coeffs_.get<vector>("origin")),
|
||||
axis_(coeffs_.get<vector>("axis").normalise()),
|
||||
omega_(Function1<scalar>::New("omega", coeffs_))
|
||||
{
|
||||
if (cellZoneName_ == word::null)
|
||||
@ -271,8 +271,6 @@ Foam::MRFZone::MRFZone
|
||||
{
|
||||
cellZoneID_ = mesh_.cellZones().findZoneID(cellZoneName_);
|
||||
|
||||
axis_ = axis_/mag(axis_);
|
||||
|
||||
const labelHashSet excludedPatchSet
|
||||
(
|
||||
mesh_.boundaryMesh().patchSet(excludedPatchNames_)
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -73,9 +74,9 @@ SRFFreestreamVelocityFvPatchVectorField
|
||||
:
|
||||
inletOutletFvPatchVectorField(p, iF),
|
||||
relative_(dict.lookupOrDefault("relative", false)),
|
||||
UInf_(dict.lookup("UInf"))
|
||||
UInf_(dict.get<vector>("UInf"))
|
||||
{
|
||||
this->phiName_ = dict.lookupOrDefault<word>("phi","phi");
|
||||
this->phiName_ = dict.lookupOrDefault<word>("phi", "phi");
|
||||
|
||||
fvPatchVectorField::operator=(vectorField("value", dict, p.size()));
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -149,7 +149,7 @@ SourceFiles
|
||||
#include "timeFunctionObject.H"
|
||||
#include "externalFileCoupler.H"
|
||||
#include "DynamicList.H"
|
||||
#include "wordReList.H"
|
||||
#include "wordRes.H"
|
||||
#include "scalarField.H"
|
||||
#include "UPtrList.H"
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -135,7 +135,7 @@ bool Foam::functionObjects::fieldExtents::read(const dictionary& dict)
|
||||
patchIDs_.clear();
|
||||
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
|
||||
|
||||
wordReList patchNames;
|
||||
wordRes patchNames;
|
||||
if (dict.readIfPresent("patches", patchNames))
|
||||
{
|
||||
for (const wordRe& name : patchNames)
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -256,7 +257,7 @@ bool Foam::functionObjects::interfaceHeight::read(const dictionary& dict)
|
||||
|
||||
dict.readIfPresent("alpha", alphaName_);
|
||||
dict.readIfPresent("liquid", liquid_);
|
||||
dict.lookup("locations") >> locations_;
|
||||
dict.readEntry("locations", locations_);
|
||||
dict.readIfPresent("interpolationScheme", interpolationScheme_);
|
||||
dict.readIfPresent("direction", direction_);
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2015-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -27,7 +27,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "nearWallFields.H"
|
||||
#include "wordReList.H"
|
||||
#include "wordRes.H"
|
||||
#include "findCellParticle.H"
|
||||
#include "mappedPatchBase.H"
|
||||
#include "OBJstream.H"
|
||||
|
||||
@ -157,7 +157,7 @@ bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
|
||||
patchSet_ =
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.lookupOrDefault("patches", wordReList()))
|
||||
dict.getOrDefault<wordRes>("patches", wordRes())
|
||||
);
|
||||
|
||||
dict.readIfPresent("qr", qrName_);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -136,7 +136,7 @@ bool Foam::functionObjects::wallShearStress::read(const dictionary& dict)
|
||||
patchSet_ =
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.lookupOrDefault("patches", wordReList()))
|
||||
dict.getOrDefault<wordRes>("patches", wordRes())
|
||||
);
|
||||
|
||||
Info<< type() << " " << name() << ":" << nl;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,7 +52,7 @@ Foam::coalCloudList::coalCloudList
|
||||
)
|
||||
);
|
||||
|
||||
const wordHashSet cloudNames(wordList(props.lookup("clouds")));
|
||||
const wordHashSet cloudNames(props.get<wordList>("clouds"));
|
||||
|
||||
setSize(cloudNames.size());
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -81,7 +81,10 @@ Foam::ParticleErosion<CloudType>::ParticleErosion
|
||||
K_(this->coeffDict().template lookupOrDefault<scalar>("K", 2.0))
|
||||
{
|
||||
const wordList allPatchNames(owner.mesh().boundaryMesh().names());
|
||||
const wordReList patchNames(this->coeffDict().lookup("patches"));
|
||||
const wordRes patchNames
|
||||
(
|
||||
this->coeffDict().template get<wordRes>("patches")
|
||||
);
|
||||
|
||||
labelHashSet uniqIds;
|
||||
for (const wordRe& re : patchNames)
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -43,7 +43,7 @@ SourceFiles
|
||||
#define triSurfaceLoader_H
|
||||
|
||||
#include "triSurface.H"
|
||||
#include "wordReList.H"
|
||||
#include "wordRes.H"
|
||||
#include "Enum.H"
|
||||
#include "hashedWordList.H"
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -49,25 +49,28 @@ zeroATCcells::zeroATCcells
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
zeroATCPatches_
|
||||
(
|
||||
dict.lookupOrDefault<wordList>("zeroATCPatchTypes", wordList())
|
||||
),
|
||||
zeroATCZones_(0),
|
||||
zeroATCcells_(0)
|
||||
zeroATCPatches_(),
|
||||
zeroATCZones_(),
|
||||
zeroATCcells_()
|
||||
{
|
||||
if (dict.found("zeroATCZones"))
|
||||
dict.readIfPresent("zeroATCPatchTypes", zeroATCPatches_);
|
||||
|
||||
wordList zeroATCZoneNames;
|
||||
|
||||
if (dict.readIfPresent("zeroATCZones", zeroATCZoneNames))
|
||||
{
|
||||
const wordList zeroATCZoneNames(dict.get<wordList>("zeroATCZones"));
|
||||
zeroATCZones_ = labelList(zeroATCZoneNames.size(), -1);
|
||||
zeroATCZones_.resize(zeroATCZoneNames.size(), -1);
|
||||
|
||||
forAll(zeroATCZoneNames, zI)
|
||||
{
|
||||
label zoneID = mesh.cellZones().findZoneID(zeroATCZoneNames[zI]);
|
||||
const word& zoneName = zeroATCZoneNames[zI];
|
||||
|
||||
label zoneID = mesh.cellZones().findZoneID(zoneName);
|
||||
if (zoneID == -1)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "cannot find cellZone "
|
||||
<< zeroATCZoneNames[zI]
|
||||
<< zoneName
|
||||
<< " for smoothing ATC"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -64,8 +64,8 @@ objectiveForce::objectiveForce
|
||||
(
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.get<wordRes>("patches"))
|
||||
)
|
||||
dict.get<wordRes>("patches")
|
||||
).sortedToc()
|
||||
),
|
||||
forceDirection_(dict.get<vector>("direction")),
|
||||
Aref_(dict.get<scalar>("Aref")),
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -66,8 +66,8 @@ objectiveMoment::objectiveMoment
|
||||
(
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.get<wordRes>("patches"))
|
||||
)
|
||||
dict.get<wordRes>("patches")
|
||||
).sortedToc()
|
||||
),
|
||||
momentDirection_(dict.get<vector>("direction")),
|
||||
rotationCentre_(dict.get<vector>("rotationCenter")),
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -67,16 +67,12 @@ objectivePartialVolume::objectivePartialVolume
|
||||
(
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict.get<wordRes>("patches"))
|
||||
)
|
||||
dict.get<wordRes>("patches")
|
||||
).sortedToc()
|
||||
)
|
||||
{
|
||||
// Read target volume if present. Else use the current one as a target
|
||||
if (dict.found("initialVolume"))
|
||||
{
|
||||
initVol_ = dict.get<scalar>("initialVolume");
|
||||
}
|
||||
else
|
||||
if (!dict.readIfPresent("initialVolume", initVol_))
|
||||
{
|
||||
const scalar oneThird(1.0/3.0);
|
||||
forAllConstIters(objectivePatches_, iter)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -82,16 +82,11 @@ objectivePtLosses::objectivePtLosses
|
||||
void objectivePtLosses::initialize()
|
||||
{
|
||||
// If patches are prescribed, use them
|
||||
if (dict().found("patches"))
|
||||
|
||||
wordRes patchSelection;
|
||||
if (dict().readIfPresent("patches", patchSelection))
|
||||
{
|
||||
labelHashSet patches
|
||||
(
|
||||
mesh_.boundaryMesh().patchSet
|
||||
(
|
||||
wordReList(dict().get<wordRes>("patches"))
|
||||
)
|
||||
);
|
||||
patches_ = patches.toc();
|
||||
patches_ = mesh_.boundaryMesh().patchSet(patchSelection).sortedToc();
|
||||
}
|
||||
// Otherwise, pick them up based on the mass flow.
|
||||
// Note: a non-zero U initialisation should be used in order to pick up the
|
||||
@ -99,9 +94,9 @@ void objectivePtLosses::initialize()
|
||||
else
|
||||
{
|
||||
WarningInFunction
|
||||
<< "No patches provided to PtLosses. Chossing them according to "
|
||||
<< "the patch mass flows"
|
||||
<< endl;
|
||||
<< "No patches provided to PtLosses. "
|
||||
<< "Choosing them according to the patch mass flows" << nl;
|
||||
|
||||
DynamicList<label> objectiveReportPatches(mesh_.boundary().size());
|
||||
const surfaceScalarField& phi = vars_.phiInst();
|
||||
forAll(mesh_.boundary(), patchI)
|
||||
|
||||
@ -237,15 +237,9 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
||||
dDep_ = scalarField("dDep", dict, p.size());
|
||||
}
|
||||
|
||||
if (dict.found("K"))
|
||||
{
|
||||
dict.lookup("K") >> K_;
|
||||
}
|
||||
dict.readIfPresent("K", K_);
|
||||
|
||||
if (dict.found("wp"))
|
||||
{
|
||||
dict.lookup("wp") >> wp_;
|
||||
}
|
||||
dict.readIfPresent("wp", wp_);
|
||||
|
||||
if (dict.found("qQuenching"))
|
||||
{
|
||||
@ -422,7 +416,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
// Check that partitioningModel has been constructed
|
||||
if (!partitioningModel_.valid())
|
||||
if (!partitioningModel_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "partitioningModel has not been constructed!"
|
||||
@ -501,7 +495,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
case liquidPhase:
|
||||
{
|
||||
// Check that nucleationSiteModel has been constructed
|
||||
if (!nucleationSiteModel_.valid())
|
||||
if (!nucleationSiteModel_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "nucleationSiteModel has not been constructed!"
|
||||
@ -509,7 +503,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
// Check that departureDiameterModel has been constructed
|
||||
if (!departureDiamModel_.valid())
|
||||
if (!departureDiamModel_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "departureDiameterModel has not been constructed!"
|
||||
@ -517,7 +511,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
}
|
||||
|
||||
// Check that nucleationSiteModel has been constructed
|
||||
if (!departureFreqModel_.valid())
|
||||
if (!departureFreqModel_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "departureFrequencyModel has not been constructed!"
|
||||
@ -1124,8 +1118,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<scalar>::write(os);
|
||||
|
||||
os.writeKeyword("phaseType") << phaseTypeNames_[phaseType_]
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeEntry("phaseType", phaseTypeNames_[phaseType_]);
|
||||
|
||||
relax_->writeData(os);
|
||||
|
||||
@ -1133,107 +1126,93 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
case vaporPhase:
|
||||
{
|
||||
os.writeKeyword("partitioningModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("partitioningModel");
|
||||
partitioningModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
|
||||
if (filmBoilingModel_.valid())
|
||||
if (filmBoilingModel_)
|
||||
{
|
||||
os.writeKeyword("filmBoilingModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("filmBoilingModel");
|
||||
filmBoilingModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
if (LeidenfrostModel_.valid())
|
||||
if (LeidenfrostModel_)
|
||||
{
|
||||
os.writeKeyword("LeidenfrostModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("LeidenfrostModel");
|
||||
LeidenfrostModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case liquidPhase:
|
||||
{
|
||||
os.writeKeyword("partitioningModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("partitioningModel");
|
||||
partitioningModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
|
||||
os.writeKeyword("nucleationSiteModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("nucleationSiteModel");
|
||||
nucleationSiteModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
|
||||
os.writeKeyword("departureDiamModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("departureDiamModel");
|
||||
departureDiamModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
|
||||
os.writeKeyword("departureFreqModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("departureFreqModel");
|
||||
departureFreqModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
|
||||
if (filmBoilingModel_.valid())
|
||||
if (filmBoilingModel_)
|
||||
{
|
||||
os.writeKeyword("filmBoilingModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("filmBoilingModel");
|
||||
filmBoilingModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
if (LeidenfrostModel_.valid())
|
||||
if (LeidenfrostModel_)
|
||||
{
|
||||
os.writeKeyword("LeidenfrostModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("LeidenfrostModel");
|
||||
LeidenfrostModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
if (CHFModel_.valid())
|
||||
if (CHFModel_)
|
||||
{
|
||||
os.writeKeyword("CHFModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("CHFModel");
|
||||
CHFModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
if (CHFSoobModel_.valid())
|
||||
if (CHFSoobModel_)
|
||||
{
|
||||
os.writeKeyword("CHFSubCoolModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("CHFSubCoolModel");
|
||||
CHFSoobModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
if (MHFModel_.valid())
|
||||
if (MHFModel_)
|
||||
{
|
||||
os.writeKeyword("MHFModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("MHFModel");
|
||||
MHFModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
if (TDNBModel_.valid())
|
||||
if (TDNBModel_)
|
||||
{
|
||||
os.writeKeyword("TDNBModel") << nl;
|
||||
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
|
||||
os.beginBlock("TDNBModel");
|
||||
TDNBModel_->write(os);
|
||||
os << decrIndent << indent << token::END_BLOCK << nl;
|
||||
os.endBlock();
|
||||
}
|
||||
|
||||
os.writeKeyword("K") << K_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("wp") << wp_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("K", K_);
|
||||
os.writeEntry("wp", wp_);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
os.writeKeyword("otherPhase") << otherPhaseName_
|
||||
<< token::END_STATEMENT << nl;
|
||||
os.writeEntry("otherPhase", otherPhaseName_);
|
||||
|
||||
dmdt_.writeEntry("dmdt", os);
|
||||
dDep_.writeEntry("dDep", os);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,7 +55,7 @@ Foam::wallBoilingModels::CHFModel::~CHFModel()
|
||||
|
||||
void Foam::wallBoilingModels::CHFModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -106,7 +106,7 @@ Foam::wallBoilingModels::CHFModels::Zuber::CHF
|
||||
void Foam::wallBoilingModels::CHFModels::Zuber::write(Ostream& os) const
|
||||
{
|
||||
CHFModel::write(os);
|
||||
os.writeKeyword("Cn") << Cn_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("Cn", Cn_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,7 +58,7 @@ void Foam::wallBoilingModels::CHFSubCoolModel::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -126,7 +126,7 @@ void Foam::wallBoilingModels::CHFModels::HuaXu::write
|
||||
) const
|
||||
{
|
||||
CHFSubCoolModel::write(os);
|
||||
os.writeKeyword("Kburn") << Kburn_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("Kburn", Kburn_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,7 +55,7 @@ Foam::wallBoilingModels::LeidenfrostModel::~LeidenfrostModel()
|
||||
|
||||
void Foam::wallBoilingModels::LeidenfrostModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -97,7 +97,7 @@ void Foam::wallBoilingModels::LeidenfrostModels::Spiegler::write
|
||||
) const
|
||||
{
|
||||
LeidenfrostModel::write(os);
|
||||
os.writeKeyword("Tcrit") << Tcrit_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("Tcrit", Tcrit_);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -109,7 +109,7 @@ void Foam::wallBoilingModels::CHFModels::Jeschar::write
|
||||
) const
|
||||
{
|
||||
MHFModel::write(os);
|
||||
os.writeKeyword("Kmhf") << Kmhf_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("Kmhf", Kmhf_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,7 +55,7 @@ Foam::wallBoilingModels::MHFModel::~MHFModel()
|
||||
|
||||
void Foam::wallBoilingModels::MHFModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -103,7 +103,7 @@ void Foam::wallBoilingModels::TDNBModels::Schroeder::write
|
||||
) const
|
||||
{
|
||||
TDNBModel::write(os);
|
||||
os.writeKeyword("kg") << kg_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("kg", kg_);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,7 +55,7 @@ Foam::wallBoilingModels::TDNBModel::~TDNBModel()
|
||||
|
||||
void Foam::wallBoilingModels::TDNBModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,7 +63,7 @@ KocamustafaogullariIshii::KocamustafaogullariIshii
|
||||
)
|
||||
:
|
||||
departureDiameterModel(),
|
||||
phi_(readScalar(dict.lookup("phi")))
|
||||
phi_(dict.get<scalar>("phi"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -130,9 +130,9 @@ void Foam::wallBoilingModels::filmBoilingModels::Bromley::write
|
||||
) const
|
||||
{
|
||||
filmBoilingModel::write(os);
|
||||
os.writeKeyword("Cn") << Cn_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("L") << L_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("Cn", Cn_);
|
||||
os.writeEntry("L", L_);
|
||||
os.writeEntry("emissivity", emissivity_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenCFD Ltd
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -55,7 +55,7 @@ Foam::wallBoilingModels::filmBoilingModel::~filmBoilingModel()
|
||||
|
||||
void Foam::wallBoilingModels::filmBoilingModel::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("type") << this->type() << token::END_STATEMENT << nl;
|
||||
os.writeEntry("type", this->type());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,7 +55,7 @@ Foam::wallBoilingModels::partitioningModels::
|
||||
Lavieville::Lavieville(const dictionary& dict)
|
||||
:
|
||||
partitioningModel(),
|
||||
alphaCrit_(readScalar(dict.lookup("alphaCrit")))
|
||||
alphaCrit_(dict.get<scalar>("alphaCrit"))
|
||||
{}
|
||||
|
||||
|
||||
@ -90,7 +91,7 @@ void Foam::wallBoilingModels::partitioningModels::
|
||||
Lavieville::write(Ostream& os) const
|
||||
{
|
||||
partitioningModel::write(os);
|
||||
os.writeKeyword("alphaCrit") << alphaCrit_ << token::END_STATEMENT << nl;
|
||||
os.writeEntry("alphaCrit", alphaCrit_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,8 +55,8 @@ Foam::wallBoilingModels::partitioningModels::
|
||||
cosine::cosine(const dictionary& dict)
|
||||
:
|
||||
partitioningModel(),
|
||||
alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))),
|
||||
alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0")))
|
||||
alphaLiquid1_(dict.get<scalar>("alphaLiquid1")),
|
||||
alphaLiquid0_(dict.get<scalar>("alphaLiquid0"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,8 +55,8 @@ Foam::wallBoilingModels::partitioningModels::
|
||||
linear::linear(const dictionary& dict)
|
||||
:
|
||||
partitioningModel(),
|
||||
alphaLiquid1_(readScalar(dict.lookup("alphaLiquid1"))),
|
||||
alphaLiquid0_(readScalar(dict.lookup("alphaLiquid0")))
|
||||
alphaLiquid1_(dict.get<scalar>("alphaLiquid1")),
|
||||
alphaLiquid0_(dict.get<scalar>("alphaLiquid0"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -51,9 +52,9 @@ Foam::phaseTransferModels::deposition::deposition
|
||||
)
|
||||
:
|
||||
phaseTransferModel(dict, pair),
|
||||
dropletName_(dict.lookup("droplet")),
|
||||
surfaceName_(dict.lookup("surface")),
|
||||
efficiency_(readScalar(dict.lookup("efficiency")))
|
||||
dropletName_(dict.get<word>("droplet")),
|
||||
surfaceName_(dict.get<word>("surface")),
|
||||
efficiency_(dict.get<scalar>("efficiency"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2014-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -57,7 +58,7 @@ Foam::wallLubricationModels::Frank::Frank
|
||||
wallLubricationModel(dict, pair),
|
||||
Cwd_("Cwd", dimless, dict),
|
||||
Cwc_("Cwc", dimless, dict),
|
||||
p_(readScalar(dict.lookup("p")))
|
||||
p_(dict.get<scalar>("p"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2014-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -54,7 +55,7 @@ Foam::blendingMethods::noBlending::noBlending
|
||||
)
|
||||
:
|
||||
blendingMethod(dict),
|
||||
continuousPhase_(dict.lookup("continuousPhase"))
|
||||
continuousPhase_(dict.get<word>("continuousPhase"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -90,7 +91,7 @@ bool Foam::diameterModels::constant::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("d") >> d_;
|
||||
diameterProperties_.readEntry("d", d_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -99,8 +100,8 @@ bool Foam::diameterModels::isothermal::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("d0") >> d0_;
|
||||
diameterProperties_.lookup("p0") >> p0_;
|
||||
diameterProperties_.readEntry("d0", d0_);
|
||||
diameterProperties_.readEntry("p0", p0_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -144,11 +145,11 @@ void Foam::diameterModels::linearTsub::correct()
|
||||
bool Foam::diameterModels::linearTsub::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
diameterProperties_.lookup("liquidPhase") >> liquidPhaseName_;
|
||||
diameterProperties_.lookup("d2") >> d2_;
|
||||
diameterProperties_.lookup("Tsub2") >> Tsub2_;
|
||||
diameterProperties_.lookup("d1") >> d1_;
|
||||
diameterProperties_.lookup("Tsub1") >> Tsub1_;
|
||||
diameterProperties_.readEntry("liquidPhase", liquidPhaseName_);
|
||||
diameterProperties_.readEntry("d2", d2_);
|
||||
diameterProperties_.readEntry("Tsub2", Tsub2_);
|
||||
diameterProperties_.readEntry("d1", d1_);
|
||||
diameterProperties_.readEntry("Tsub1", Tsub1_);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -59,14 +60,14 @@ Foam::diameterModels::sizeGroup::sizeGroup
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(name, dimless, readScalar(dict.lookup("value"))),
|
||||
dimensionedScalar(name, dimless, dict.get<scalar>("value")),
|
||||
velocityGroup.f().boundaryField().types()
|
||||
),
|
||||
phase_(phase),
|
||||
velocityGroup_(velocityGroup),
|
||||
d_("d", dimLength, dict),
|
||||
x_("x", velocityGroup.formFactor()*pow3(d_)),
|
||||
value_(readScalar(dict.lookup("value")))
|
||||
value_(dict.get<scalar>("value"))
|
||||
{
|
||||
// Adjust refValue at mixedFvPatchField boundaries
|
||||
forAll(this->boundaryField(), patchi)
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,7 +59,7 @@ powerLawUniformBinary
|
||||
)
|
||||
:
|
||||
binaryBreakupModel(popBal, dict),
|
||||
power_(readScalar(dict.lookup("power")))
|
||||
power_(dict.get<scalar>("power"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,8 +53,8 @@ Foam::diameterModels::breakupModels::exponential::exponential
|
||||
)
|
||||
:
|
||||
breakupModel(popBal, dict),
|
||||
exponent_(readScalar(dict.lookup("exponent"))),
|
||||
C_(readScalar(dict.lookup("C")))
|
||||
exponent_(dict.get<scalar>("exponent")),
|
||||
C_(dict.get<scalar>("C"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,7 +53,7 @@ Foam::diameterModels::breakupModels::powerLaw::powerLaw
|
||||
)
|
||||
:
|
||||
breakupModel(popBal, dict),
|
||||
power_(readScalar(dict.lookup("power")))
|
||||
power_(dict.get<scalar>("power"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1232,14 +1233,13 @@ Foam::diameterModels::populationBalanceModel::continuousTurbulence() const
|
||||
void Foam::diameterModels::populationBalanceModel::solve()
|
||||
{
|
||||
const dictionary& solutionControls = mesh_.solverDict(name_);
|
||||
bool solveOnFinalIterOnly =
|
||||
solutionControls.lookupOrDefault<bool>("solveOnFinalIterOnly", false);
|
||||
const bool solveOnFinalIterOnly =
|
||||
solutionControls.getOrDefault("solveOnFinalIterOnly", false);
|
||||
|
||||
if (!solveOnFinalIterOnly || pimple_.finalIter())
|
||||
{
|
||||
const label nCorr = this->nCorr();
|
||||
const scalar tolerance =
|
||||
readScalar(solutionControls.lookup("tolerance"));
|
||||
const scalar tolerance = solutionControls.get<scalar>("tolerance");
|
||||
|
||||
if (nCorr > 0)
|
||||
{
|
||||
|
||||
@ -98,7 +98,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
|
||||
)
|
||||
),
|
||||
|
||||
equilibrium_(coeffDict_.lookup("equilibrium")),
|
||||
equilibrium_(coeffDict_.get<bool>("equilibrium")),
|
||||
e_("e", dimless, coeffDict_),
|
||||
alphaMax_("alphaMax", dimless, coeffDict_),
|
||||
alphaMinFriction_("alphaMinFriction", dimless, coeffDict_),
|
||||
@ -199,7 +199,7 @@ bool Foam::RASModels::kineticTheoryModel::read()
|
||||
>::read()
|
||||
)
|
||||
{
|
||||
coeffDict().lookup("equilibrium") >> equilibrium_;
|
||||
coeffDict().readEntry("equilibrium", equilibrium_);
|
||||
e_.readIfPresent(coeffDict());
|
||||
alphaMax_.readIfPresent(coeffDict());
|
||||
alphaMinFriction_.readIfPresent(coeffDict());
|
||||
|
||||
@ -109,7 +109,7 @@ class kineticTheoryModel
|
||||
// Kinetic Theory Model coefficients
|
||||
|
||||
//- Use equilibrium approximation: generation == dissipation
|
||||
Switch equilibrium_;
|
||||
bool equilibrium_;
|
||||
|
||||
//- Coefficient of restitution
|
||||
dimensionedScalar e_;
|
||||
|
||||
@ -86,9 +86,9 @@ bool Foam::RASModels::phasePressureModel::read()
|
||||
>::read()
|
||||
)
|
||||
{
|
||||
coeffDict().lookup("alphaMax") >> alphaMax_;
|
||||
coeffDict().lookup("preAlphaExp") >> preAlphaExp_;
|
||||
coeffDict().lookup("expMax") >> expMax_;
|
||||
coeffDict().readEntry("alphaMax", alphaMax_);
|
||||
coeffDict().readEntry("preAlphaExp", preAlphaExp_);
|
||||
coeffDict().readEntry("expMax", expMax_);
|
||||
g0_.readIfPresent(coeffDict());
|
||||
|
||||
return true;
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -171,8 +172,8 @@ bool Foam::diameterModels::IATE::read(const dictionary& phaseProperties)
|
||||
{
|
||||
diameterModel::read(phaseProperties);
|
||||
|
||||
diameterProperties_.lookup("dMax") >> dMax_;
|
||||
diameterProperties_.lookup("dMin") >> dMin_;
|
||||
diameterProperties_.readEntry("dMax", dMax_);
|
||||
diameterProperties_.readEntry("dMin", dMin_);
|
||||
|
||||
// Re-create all the sources updating number, type and coefficients
|
||||
PtrList<IATEsource>
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -64,7 +65,7 @@ transferModelList::transferModelList
|
||||
{
|
||||
const wordList activeModels
|
||||
(
|
||||
dict.lookupOrDefault("transferModels", wordList())
|
||||
dict.lookupOrDefault<wordList>("transferModels", wordList())
|
||||
);
|
||||
|
||||
wordHashSet models(activeModels);
|
||||
|
||||
@ -292,8 +292,7 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
const word extrudeModel(dict_.get<word>("extrudeModel") + "Coeffs");
|
||||
|
||||
os.writeKeyword(extrudeModel);
|
||||
os << dict_.subDict(extrudeModel) << nl;
|
||||
dict_.subDict(extrudeModel).writeEntry(extrudeModel, os);
|
||||
|
||||
os.writeEntry("region", dict_.get<word>("region"));
|
||||
|
||||
@ -301,14 +300,9 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const
|
||||
|
||||
os.writeEntry("active", dict_.get<Switch>("active"));
|
||||
|
||||
os.writeKeyword("thermoType");
|
||||
os << dict_.subDict("thermoType") << nl;
|
||||
|
||||
os.writeKeyword("mixture");
|
||||
os << dict_.subDict("mixture") << nl;
|
||||
|
||||
os.writeKeyword("radiation");
|
||||
os << dict_.subDict("radiation") << nl;
|
||||
dict_.subDict("thermoType").writeEntry("thermoType", os);
|
||||
dict_.subDict("mixture").writeEntry("mixture", os);
|
||||
dict_.subDict("radiation").writeEntry("radiation", os);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -52,7 +53,8 @@ Foam::manualRenumber::manualRenumber(const dictionary& renumberDict)
|
||||
renumberMethod(renumberDict),
|
||||
dataFile_
|
||||
(
|
||||
renumberDict.optionalSubDict(typeName+"Coeffs").lookup("dataFile")
|
||||
renumberDict.optionalSubDict(typeName+"Coeffs")
|
||||
.get<fileName>("dataFile")
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -56,8 +56,8 @@ Foam::structuredRenumber::structuredRenumber
|
||||
:
|
||||
renumberMethod(renumberDict),
|
||||
methodDict_(renumberDict.optionalSubDict(typeName + "Coeffs")),
|
||||
patches_(methodDict_.lookup("patches")),
|
||||
nLayers_(methodDict_.lookupOrDefault<label>("nLayers", labelMax)),
|
||||
patches_(methodDict_.get<wordRes>("patches")),
|
||||
nLayers_(methodDict_.getOrDefault<label>("nLayers", labelMax)),
|
||||
depthFirst_(methodDict_.get<bool>("depthFirst")),
|
||||
reverse_(methodDict_.get<bool>("reverse")),
|
||||
method_(renumberMethod::New(methodDict_))
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,11 +63,8 @@ Foam::RBD::joints::Pa::Pa(const vector& axis)
|
||||
|
||||
Foam::RBD::joints::Pa::Pa(const dictionary& dict)
|
||||
:
|
||||
joint(1)
|
||||
{
|
||||
vector axis(dict.lookup("axis"));
|
||||
S_[0] = spatialVector(Zero, axis/mag(axis));
|
||||
}
|
||||
Pa(dict.get<vector>("axis"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Pa::clone() const
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,11 +63,8 @@ Foam::RBD::joints::Ra::Ra(const vector& axis)
|
||||
|
||||
Foam::RBD::joints::Ra::Ra(const dictionary& dict)
|
||||
:
|
||||
joint(1)
|
||||
{
|
||||
vector axis(dict.lookup("axis"));
|
||||
S_[0] = spatialVector(axis/mag(axis), Zero);
|
||||
}
|
||||
Ra(dict.get<vector>("axis"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::autoPtr<Foam::RBD::joint> Foam::RBD::joints::Ra::clone() const
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,7 +63,8 @@ Foam::RBD::restraints::externalForce::externalForce
|
||||
)
|
||||
:
|
||||
restraint(name, dict, model),
|
||||
externalForce_(nullptr)
|
||||
externalForce_(nullptr),
|
||||
location_(Zero)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
@ -106,7 +108,7 @@ bool Foam::RBD::restraints::externalForce::read
|
||||
{
|
||||
restraint::read(dict);
|
||||
|
||||
coeffs_.lookup("location") >> location_;
|
||||
coeffs_.readEntry("location", location_);
|
||||
|
||||
externalForce_ = Function1<vector>::New("force", coeffs_);
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -45,7 +46,7 @@ inline Foam::symmTensor Foam::RBD::rigidBodyInertia::Ioc
|
||||
|
||||
inline Foam::RBD::rigidBodyInertia::rigidBodyInertia()
|
||||
:
|
||||
m_(0),
|
||||
m_(Zero),
|
||||
c_(Zero),
|
||||
Ic_(Zero)
|
||||
{}
|
||||
@ -67,8 +68,8 @@ inline Foam::RBD::rigidBodyInertia::rigidBodyInertia
|
||||
inline Foam::RBD::rigidBodyInertia::rigidBodyInertia(const dictionary& dict)
|
||||
:
|
||||
m_(dict.get<scalar>("mass")),
|
||||
c_(dict.lookup("centreOfMass")),
|
||||
Ic_(dict.lookup("inertia"))
|
||||
c_(dict.get<vector>("centreOfMass")),
|
||||
Ic_(dict.get<symmTensor>("inertia"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -197,7 +198,7 @@ Foam::RBD::rigidBodyModel::rigidBodyModel
|
||||
merge
|
||||
(
|
||||
bodyID(bodyDict.get<word>("mergeWith")),
|
||||
bodyDict.lookup("transform"),
|
||||
bodyDict.get<spatialTransform>("transform"),
|
||||
rigidBody::New(key, bodyDict)
|
||||
);
|
||||
}
|
||||
@ -206,7 +207,7 @@ Foam::RBD::rigidBodyModel::rigidBodyModel
|
||||
join
|
||||
(
|
||||
bodyID(bodyDict.get<word>("parent")),
|
||||
bodyDict.lookup("transform"),
|
||||
bodyDict.get<spatialTransform>("transform"),
|
||||
joint::New(bodyDict.subDict("joint")),
|
||||
rigidBody::New(key, bodyDict)
|
||||
);
|
||||
|
||||
@ -63,7 +63,7 @@ Foam::rigidBodyMeshMotion::bodyMesh::bodyMesh
|
||||
:
|
||||
name_(name),
|
||||
bodyID_(bodyID),
|
||||
patches_(dict.lookup("patches")),
|
||||
patches_(dict.get<wordRes>("patches")),
|
||||
patchSet_(mesh.boundaryMesh().patchSet(patches_)),
|
||||
di_(dict.get<scalar>("innerDistance")),
|
||||
do_(dict.get<scalar>("outerDistance")),
|
||||
|
||||
@ -62,7 +62,7 @@ Foam::rigidBodyMeshMotionSolver::bodyMesh::bodyMesh
|
||||
:
|
||||
name_(name),
|
||||
bodyID_(bodyID),
|
||||
patches_(dict.lookup("patches")),
|
||||
patches_(dict.get<wordRes>("patches")),
|
||||
patchSet_(mesh.boundaryMesh().patchSet(patches_))
|
||||
{}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -113,7 +113,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
dict.lookupOrDefault
|
||||
(
|
||||
"initialCentreOfMass",
|
||||
vector(dict.lookup("centreOfMass"))
|
||||
dict.get<vector>("centreOfMass")
|
||||
)
|
||||
),
|
||||
initialCentreOfRotation_(initialCentreOfMass_),
|
||||
@ -126,7 +126,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
)
|
||||
),
|
||||
mass_(dict.get<scalar>("mass")),
|
||||
momentOfInertia_(dict.lookup("momentOfInertia")),
|
||||
momentOfInertia_(dict.get<diagTensor>("momentOfInertia")),
|
||||
aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)),
|
||||
aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
|
||||
report_(dict.lookupOrDefault("report", false)),
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,9 +59,9 @@ Foam::basicChemistryModel::basicChemistryModel(basicThermo& thermo)
|
||||
)
|
||||
),
|
||||
mesh_(thermo.p().mesh()),
|
||||
chemistry_(lookup("chemistry")),
|
||||
chemistry_(get<Switch>("chemistry")),
|
||||
deltaTChemIni_(get<scalar>("initialChemicalTimeStep")),
|
||||
deltaTChemMax_(lookupOrDefault("maxChemicalTimeStep", GREAT)),
|
||||
deltaTChemMax_(getOrDefault<scalar>("maxChemicalTimeStep", GREAT)),
|
||||
deltaTChem_
|
||||
(
|
||||
IOobject
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -41,7 +42,7 @@ Foam::EulerImplicit<ChemistryModel>::EulerImplicit
|
||||
chemistrySolver<ChemistryModel>(thermo),
|
||||
coeffsDict_(this->subDict("EulerImplicitCoeffs")),
|
||||
cTauChem_(coeffsDict_.get<scalar>("cTauChem")),
|
||||
eqRateLimiter_(coeffsDict_.lookup("equilibriumRateLimiter")),
|
||||
eqRateLimiter_(coeffsDict_.get<Switch>("equilibriumRateLimiter")),
|
||||
cTp_(this->nEqns())
|
||||
{}
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -46,7 +47,7 @@ Foam::laminarFlameSpeed::laminarFlameSpeed
|
||||
)
|
||||
:
|
||||
psiuReactionThermo_(ct),
|
||||
fuel_(dict.lookup("fuel")),
|
||||
fuel_(dict.get<word>("fuel")),
|
||||
equivalenceRatio_(0)
|
||||
{
|
||||
if (!psiuReactionThermo_.composition().contains("ft"))
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -48,23 +48,22 @@ Foam::speciesTable& Foam::foamChemistryReader<ThermoType>::setSpecies
|
||||
template<class ThermoType>
|
||||
void Foam::foamChemistryReader<ThermoType>::readSpeciesComposition()
|
||||
{
|
||||
if (!chemDict_.found("elements"))
|
||||
wordList elems;
|
||||
|
||||
if (!chemDict_.readIfPresent("elements", elems))
|
||||
{
|
||||
Info<< " elements not defined in " << chemDict_.name() << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
wordList e(chemDict_.get<wordList>("elements"));
|
||||
label currentElementIndex(0);
|
||||
|
||||
DynamicList<word> elementNames_;
|
||||
HashTable<label> elementIndices_;
|
||||
|
||||
for (const word& elemName : e)
|
||||
for (const word& elemName : elems)
|
||||
{
|
||||
if (!elementIndices_.found(elemName))
|
||||
{
|
||||
elementIndices_.insert(elemName, currentElementIndex++);
|
||||
elementIndices_.insert(elemName, elementNames_.size());
|
||||
elementNames_.append(elemName);
|
||||
}
|
||||
else
|
||||
@ -156,14 +155,14 @@ Foam::foamChemistryReader<ThermoType>::foamChemistryReader
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
fileName(thermoDict.lookup("foamChemistryFile")).expand()
|
||||
thermoDict.get<fileName>("foamChemistryFile").expand()
|
||||
)()
|
||||
),
|
||||
thermoDict_
|
||||
(
|
||||
IFstream
|
||||
(
|
||||
fileName(thermoDict.lookup("foamChemistryThermoFile")).expand()
|
||||
thermoDict.get<fileName>("foamChemistryThermoFile").expand()
|
||||
)()
|
||||
),
|
||||
speciesTable_(setSpecies(chemDict_, species)),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user