STYLE: Consistency updates to change input of <var>Name to <var>. Fixes #306

This commit is contained in:
Andrew Heather
2016-11-22 14:50:33 +00:00
parent 143e99194f
commit 1f826361c6
89 changed files with 242 additions and 271 deletions

View File

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
{ {
argList::addOption argList::addOption
( (
"cloudName", "cloud",
"name", "name",
"specify alternative cloud name. default is 'kinematicCloud'" "specify alternative cloud name. default is 'kinematicCloud'"
); );

View File

@ -11,7 +11,7 @@ word continuousPhaseName
mesh, mesh,
IOobject::MUST_READ IOobject::MUST_READ
) )
).lookup("continuousPhaseName") ).lookup("continuousPhase")
); );
Info<< "Reading field U\n" << endl; Info<< "Reading field U\n" << endl;
@ -123,7 +123,7 @@ volScalarField alphac
); );
word kinematicCloudName("kinematicCloud"); word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName); args.optionReadIfPresent("cloud", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicTypeCloud kinematicCloud basicKinematicTypeCloud kinematicCloud

View File

@ -58,7 +58,7 @@ volScalarField mu
); );
word kinematicCloudName("kinematicCloud"); word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName); args.optionReadIfPresent("cloud", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCollidingCloud kinematicCloud basicKinematicCollidingCloud kinematicCloud

View File

@ -47,7 +47,7 @@ int main(int argc, char *argv[])
{ {
argList::addOption argList::addOption
( (
"cloudName", "cloud",
"name", "name",
"specify alternative cloud name. default is 'kinematicCloud'" "specify alternative cloud name. default is 'kinematicCloud'"
); );

View File

@ -46,7 +46,7 @@ int main(int argc, char *argv[])
{ {
argList::addOption argList::addOption
( (
"cloudName", "cloud",
"name", "name",
"specify alternative cloud name. default is 'kinematicCloud'" "specify alternative cloud name. default is 'kinematicCloud'"
); );

View File

@ -51,7 +51,7 @@ autoPtr<compressible::turbulenceModel> turbulence
const word kinematicCloudName const word kinematicCloudName
( (
args.optionLookupOrDefault<word>("cloudName", "kinematicCloud") args.optionLookupOrDefault<word>("cloud", "kinematicCloud")
); );
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;

View File

@ -45,7 +45,7 @@ int main(int argc, char *argv[])
{ {
argList::addOption argList::addOption
( (
"cloudName", "cloud",
"name", "name",
"specify alternative cloud name. default is 'kinematicCloud'" "specify alternative cloud name. default is 'kinematicCloud'"
); );

View File

@ -49,7 +49,7 @@ Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
) )
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
sourceFieldName_(dict.lookup("sourceFieldName")) sourceFieldName_(dict.lookup("sourceField"))
{} {}
@ -109,7 +109,7 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs()
void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const
{ {
fvPatchField<scalar>::write(os); fvPatchField<scalar>::write(os);
os.writeKeyword("sourceFieldName") os.writeKeyword("sourceField")
<< sourceFieldName_ << token::END_STATEMENT << nl; << sourceFieldName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }

View File

@ -62,6 +62,7 @@ protected:
word sourceFieldName_; word sourceFieldName_;
public: public:
//- Runtime type information //- Runtime type information

View File

@ -36,7 +36,7 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::validArgs.append("cloudName"); argList::validArgs.append("cloud");
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"

View File

@ -602,8 +602,8 @@ int main(int argc, char *argv[])
const word& key = iter().keyword(); const word& key = iter().keyword();
const dictionary& dict = iter().dict(); const dictionary& dict = iter().dict();
const word cyclicName = dict.lookup("cyclicMasterPatchName"); const word cyclicName = dict.lookup("cyclicMasterPatch");
const word wallName = dict.lookup("wallPatchName"); const word wallName = dict.lookup("wallPatch");
FixedList<word, 3> nameAndType; FixedList<word, 3> nameAndType;
nameAndType[0] = key; nameAndType[0] = key;
nameAndType[1] = wallName; nameAndType[1] = wallName;

View File

@ -15,10 +15,12 @@ EXE_LIBS = \
-lchemistryModel \ -lchemistryModel \
-lcoalCombustion \ -lcoalCombustion \
-lcombustionModels \ -lcombustionModels \
-lcompressibleTransportModels \ -lcompressibleEulerianInterfacialModels \
-lcompressibleMultiphaseEulerianInterfacialModels \
-lcompressibleTurbulenceModels \ -lcompressibleTurbulenceModels \
-lconversion \ -lCompressibleTwoPhaseMixtureTurbulenceModels \
-ldecompose \ -lcompressibleTwoPhaseSystem \
-lconformalVoronoiMesh \
-ldecompositionMethods \ -ldecompositionMethods \
-ldistributed \ -ldistributed \
-ldistributionModels \ -ldistributionModels \
@ -35,29 +37,32 @@ EXE_LIBS = \
-lfileFormats \ -lfileFormats \
-lfiniteVolume \ -lfiniteVolume \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lfoamToVTK \
-lforces \ -lforces \
-lfvMotionSolvers \ -lfvMotionSolvers \
-lfvOptions \ -lfvOptions \
-lgenericPatchFields \ -lgenericPatchFields \
-limmiscibleIncompressibleTwoPhaseMixture \ -lhelpTypes \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-linterfaceProperties \ -linterfaceProperties \
-llagrangianFunctionObjects \ -llagrangianFunctionObjects \
-llagrangianIntermediate \ -llagrangianIntermediate \
-llagrangian \
-llagrangianSpray \ -llagrangianSpray \
-llagrangianTurbulence \ -llagrangianTurbulence \
-llaminarFlameSpeedModels \ -llaminarFlameSpeedModels \
-lliquidMixtureProperties \ -lliquidPropertiesFvPatchFields \
-lliquidProperties \ -lliquidProperties \
-lmeshTools \ -lmeshTools \
-lmolecularMeasurements \ -lmultiphaseInterFoam \
-lmolecule \ -lmultiphaseMixtureThermo \
-lmultiphaseReactingTurbulenceModels \
-lmultiphaseSystem \
-lODE \ -lODE \
-lOpenFOAM \ -lOpenFOAM \
-lpairPatchAgglomeration \
-lphaseChangeTwoPhaseMixtures \ -lphaseChangeTwoPhaseMixtures \
-lphaseCompressibleTurbulenceModels \
-lphaseTemperatureChangeTwoPhaseMixtures \
-lpotential \ -lpotential \
-lpyrolysisModels \ -lpyrolysisModels \
-lradiationModels \ -lradiationModels \
@ -68,7 +73,6 @@ EXE_LIBS = \
-lreactingPhaseSystem \ -lreactingPhaseSystem \
-lreactingTwoPhaseSystem \ -lreactingTwoPhaseSystem \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lreconstruct \
-lregionCoupled \ -lregionCoupled \
-lregionCoupling \ -lregionCoupling \
-lregionModels \ -lregionModels \
@ -79,11 +83,9 @@ EXE_LIBS = \
-lsampling \ -lsampling \
-lscotchDecomp \ -lscotchDecomp \
-lsixDoFRigidBodyMotion \ -lsixDoFRigidBodyMotion \
-lSLGThermo \ -lSloanRenumber \
-lsnappyHexMesh \ -lsnappyHexMesh \
-lsolidChemistryModel \ -lsolidChemistryModel \
-lsolidMixtureProperties \
-lsolidParticle \
-lsolidProperties \ -lsolidProperties \
-lsolidSpecie \ -lsolidSpecie \
-lsolidThermo \ -lsolidThermo \
@ -92,13 +94,12 @@ EXE_LIBS = \
-lsurfaceFilmDerivedFvPatchFields \ -lsurfaceFilmDerivedFvPatchFields \
-lsurfaceFilmModels \ -lsurfaceFilmModels \
-lsurfMesh \ -lsurfMesh \
-ltabulatedWallFunctions \
-lthermalBaffleModels \ -lthermalBaffleModels \
-lthermophysicalFunctions \ -lthermophysicalFunctions \
-ltopoChangerFvMesh \ -ltopoChangerFvMesh \
-ltriSurface \ -lturbulenceModelSchemes \
-lturbulenceModels \ -lturbulenceModels \
-ltwoPhaseMixture \
-ltwoPhaseMixtureThermo \
-ltwoPhaseProperties \ -ltwoPhaseProperties \
-ltwoPhaseReactingTurbulenceModels \ -ltwoPhaseReactingTurbulenceModels \
-lutilityFunctionObjects -lutilityFunctionObjects

View File

@ -9,7 +9,7 @@ IOdictionary propsDict
) )
); );
const word cloudName(propsDict.lookup("cloudName")); const word cloudName(propsDict.lookup("cloud"));
label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency"))); label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency")));

View File

@ -4,6 +4,6 @@ const word dictName("particleTrackDict");
IOdictionary propsDict(dictIO); IOdictionary propsDict(dictIO);
word cloudName(propsDict.lookup("cloudName")); word cloudName(propsDict.lookup("cloud"));
List<word> userFields(propsDict.lookup("fields")); List<word> userFields(propsDict.lookup("fields"));

View File

@ -74,7 +74,7 @@ outletMappedUniformInletHeatAdditionFvPatchField
) )
: :
fixedValueFvPatchScalarField(p, iF, dict), fixedValueFvPatchScalarField(p, iF, dict),
outletPatchName_(dict.lookup("outletPatchName")), outletPatchName_(dict.lookup("outletPatch")),
phiName_(dict.lookupOrDefault<word>("phi", "phi")), phiName_(dict.lookupOrDefault<word>("phi", "phi")),
Q_(readScalar(dict.lookup("Q"))), Q_(readScalar(dict.lookup("Q"))),
minTempLimit_(dict.lookupOrDefault<scalar>("minTempLimit", 0)), minTempLimit_(dict.lookupOrDefault<scalar>("minTempLimit", 0)),
@ -167,8 +167,7 @@ void Foam::outletMappedUniformInletHeatAdditionFvPatchField::updateCoeffs()
scalar averageOutletField = scalar averageOutletField =
gSum(outletPatchPhi*outletPatchField)/sumOutletPatchPhi; gSum(outletPatchPhi*outletPatchField)/sumOutletPatchPhi;
const scalarField Cpf = const scalarField Cpf(thermo.Cp()().boundaryField()[outletPatchID]);
thermo.Cp()().boundaryField()[outletPatchID];
scalar totalPhiCp = gSum(outletPatchPhi)*gAverage(Cpf); scalar totalPhiCp = gSum(outletPatchPhi)*gAverage(Cpf);
@ -198,11 +197,13 @@ void Foam::outletMappedUniformInletHeatAdditionFvPatchField::updateCoeffs()
} }
void Foam::outletMappedUniformInletHeatAdditionFvPatchField:: void Foam::outletMappedUniformInletHeatAdditionFvPatchField::write
write(Ostream& os) const (
Ostream& os
) const
{ {
fvPatchScalarField::write(os); fvPatchScalarField::write(os);
os.writeKeyword("outletPatchName") os.writeKeyword("outletPatch")
<< outletPatchName_ << token::END_STATEMENT << nl; << outletPatchName_ << token::END_STATEMENT << nl;
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_); writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
@ -216,6 +217,7 @@ write(Ostream& os) const
this->writeEntry("value", os); this->writeEntry("value", os);
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam

View File

@ -29,7 +29,7 @@ Group
Description Description
This temperature boundary conditon averages the temperature over the This temperature boundary conditon averages the temperature over the
"outlet" patch specified by name "outletPatchName" and applies an extra "outlet" patch specified by name "outletPatch" and applies an extra
heat source. This is set as a uniform temperature value on this patch. heat source. This is set as a uniform temperature value on this patch.
Additionally minTempLimit/maxTempLimit limits can be applied Additionally minTempLimit/maxTempLimit limits can be applied
@ -37,7 +37,7 @@ Description
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
outletPatchName | name of outlet patch | yes | outletPatch | name of outlet patch | yes |
Q | Heat addition | yes Q | Heat addition | yes
phi | flux field name | no | phi phi | flux field name | no | phi
minTempLimit | min temperature limit | no | 0.0 minTempLimit | min temperature limit | no | 0.0
@ -49,7 +49,7 @@ Description
myPatch myPatch
{ {
type outletMappedUniformInletHeatAddition; type outletMappedUniformInletHeatAddition;
outletPatchName aPatch; outletPatch aPatch;
Q 10; // Heat addition in W Q 10; // Heat addition in W
phi phi; phi phi;
value uniform 0; value uniform 0;
@ -100,6 +100,7 @@ class outletMappedUniformInletHeatAdditionFvPatchField
//- Maxmum Temperature Limit //- Maxmum Temperature Limit
scalar maxTempLimit_; scalar maxTempLimit_;
public: public:
//- Runtime type information //- Runtime type information

View File

@ -29,13 +29,13 @@ Group
Description Description
This boundary conditon averages the field over the "outlet" patch specified This boundary conditon averages the field over the "outlet" patch specified
by name "outletPatchName" and applies this as the uniform value of the by name "outletPatch" and applies this as the uniform value of the
field over this patch. field over this patch.
Usage Usage
\table \table
Property | Description | Required | Default value Property | Description | Required | Default value
outletPatchName | name of outlet patch | yes | outletPatch | name of outlet patch | yes |
phi | flux field name | no | phi phi | flux field name | no | phi
\endtable \endtable
@ -44,7 +44,7 @@ Usage
<patchName> <patchName>
{ {
type outletMappedUniformInlet; type outletMappedUniformInlet;
outletPatchName aPatch; outletPatch aPatch;
phi phi; phi phi;
value uniform 0; value uniform 0;
} }

View File

@ -113,7 +113,7 @@ bool Foam::functionObjects::DESModelRegions::read(const dictionary& dict)
fvMeshFunctionObject::read(dict); fvMeshFunctionObject::read(dict);
writeFile::read(dict); writeFile::read(dict);
dict.readIfPresent("resultName", resultName_); dict.readIfPresent("result", resultName_);
return true; return true;
} }

View File

@ -623,7 +623,7 @@ bool Foam::functionObjects::fluxSummary::read(const dictionary& dict)
writeFile::read(dict); writeFile::read(dict);
mode_ = modeTypeNames_.read(dict.lookup("mode")); mode_ = modeTypeNames_.read(dict.lookup("mode"));
phiName_= dict.lookupOrDefault<word>("phiName", "phi"); phiName_= dict.lookupOrDefault<word>("phi", "phi");
dict.readIfPresent("scaleFactor", scaleFactor_); dict.readIfPresent("scaleFactor", scaleFactor_);
dict.readIfPresent("tolerance", tolerance_); dict.readIfPresent("tolerance", tolerance_);

View File

@ -558,7 +558,7 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict)
//Info<< " using interpolation " << interpolationScheme_ << endl; //Info<< " using interpolation " << interpolationScheme_ << endl;
cloudName_ = dict.lookupOrDefault<word>("cloudName", type()); cloudName_ = dict.lookupOrDefault<word>("cloud", type());
dict.lookup("seedSampleSet") >> seedSet_; dict.lookup("seedSampleSet") >> seedSet_;
const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs"); const dictionary& coeffsDict = dict.subDict(seedSet_ + "Coeffs");

View File

@ -70,7 +70,7 @@ Foam::functionObjects::valueAverage::valueAverage
: :
regionFunctionObject(name, runTime, dict), regionFunctionObject(name, runTime, dict),
writeFile(obr_, name, typeName, dict), writeFile(obr_, name, typeName, dict),
functionObjectName_("unknown-functionObjectName"), functionObjectName_("unknown-functionObject"),
fieldNames_(), fieldNames_(),
window_(-1), window_(-1),
totalTime_(), totalTime_(),
@ -109,7 +109,7 @@ bool Foam::functionObjects::valueAverage::read(const dictionary& dict)
regionFunctionObject::read(dict); regionFunctionObject::read(dict);
writeFile::read(dict); writeFile::read(dict);
dict.lookup("functionObjectName") >> functionObjectName_; dict.lookup("functionObject") >> functionObjectName_;
dict.lookup("fields") >> fieldNames_; dict.lookup("fields") >> fieldNames_;
window_ = dict.lookupOrDefault<scalar>("window", -1); window_ = dict.lookupOrDefault<scalar>("window", -1);

View File

@ -514,7 +514,7 @@ Foam::functionObjects::fieldVisualisationBase::fieldVisualisationBase
: :
parent_(parent), parent_(parent),
colours_(colours), colours_(colours),
fieldName_(dict.lookup("fieldName")), fieldName_(dict.lookup("field")),
colourBy_(cbColour), colourBy_(cbColour),
colourMap_(cmRainbow), colourMap_(cmRainbow),
range_() range_()

View File

@ -63,9 +63,9 @@ Foam::functionObjects::runTimePostPro::functionObjectCloud::functionObjectCloud
: :
pointData(parent, dict, colours), pointData(parent, dict, colours),
fieldVisualisationBase(parent, dict, colours), fieldVisualisationBase(parent, dict, colours),
cloudName_(dict.lookup("cloudName")), cloudName_(dict.lookup("cloud")),
functionObject_(dict.lookup("functionObject")), functionObject_(dict.lookup("functionObject")),
colourFieldName_(dict.lookup("colourFieldName")), colourFieldName_(dict.lookup("colourField")),
actor_() actor_()
{ {
actor_ = vtkSmartPointer<vtkActor>::New(); actor_ = vtkSmartPointer<vtkActor>::New();

View File

@ -53,7 +53,7 @@ Foam::functionObjects::runTimeControls::averageCondition::averageCondition
) )
: :
runTimeCondition(name, obr, dict, state), runTimeCondition(name, obr, dict, state),
functionObjectName_(dict.lookup("functionObjectName")), functionObjectName_(dict.lookup("functionObject")),
fieldNames_(dict.lookup("fields")), fieldNames_(dict.lookup("fields")),
tolerance_(readScalar(dict.lookup("tolerance"))), tolerance_(readScalar(dict.lookup("tolerance"))),
window_(dict.lookupOrDefault<scalar>("window", -1)), window_(dict.lookupOrDefault<scalar>("window", -1)),

View File

@ -102,7 +102,7 @@ Foam::fv::interRegionOption::interRegionOption
mesh mesh
), ),
master_(coeffs_.lookupOrDefault<bool>("master", true)), master_(coeffs_.lookupOrDefault<bool>("master", true)),
nbrRegionName_(coeffs_.lookup("nbrRegionName")), nbrRegionName_(coeffs_.lookup("nbrRegion")),
meshInterpPtr_() meshInterpPtr_()
{ {
if (active()) if (active())

View File

@ -106,7 +106,7 @@ Foam::fv::acousticDampingSource::acousticDampingSource
zeroGradientFvPatchField<vector>::typeName zeroGradientFvPatchField<vector>::typeName
) )
), ),
URefName_("unknown-URefName"), URefName_("unknown-URef"),
x0_(Zero), x0_(Zero),
r1_(0), r1_(0),
r2_(0), r2_(0),

View File

@ -304,9 +304,9 @@ bool Foam::fv::effectivenessHeatExchangerSource::read(const dictionary& dict)
{ {
if (cellSetOption::read(dict)) if (cellSetOption::read(dict))
{ {
UName_ = coeffs_.lookupOrDefault<word>("UName", "U"); UName_ = coeffs_.lookupOrDefault<word>("U", "U");
TName_ = coeffs_.lookupOrDefault<word>("TName", "T"); TName_ = coeffs_.lookupOrDefault<word>("T", "T");
phiName_ = coeffs_.lookupOrDefault<word>("phiName", "phi"); phiName_ = coeffs_.lookupOrDefault<word>("phi", "phi");
coeffs_.lookup("faceZone") >> faceZoneName_; coeffs_.lookup("faceZone") >> faceZoneName_;
coeffs_.lookup("secondaryMassFlowRate") >> secondaryMassFlowRate_; coeffs_.lookup("secondaryMassFlowRate") >> secondaryMassFlowRate_;

View File

@ -207,10 +207,10 @@ Foam::fv::tabulatedNTUHeatTransfer::tabulatedNTUHeatTransfer
) )
: :
interRegionHeatTransferModel(name, modelType, dict, mesh), interRegionHeatTransferModel(name, modelType, dict, mesh),
UName_(coeffs_.lookupOrDefault<word>("UName", "U")), UName_(coeffs_.lookupOrDefault<word>("U", "U")),
UNbrName_(coeffs_.lookupOrDefault<word>("UNbrName", "U")), UNbrName_(coeffs_.lookupOrDefault<word>("UNbr", "U")),
rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho")), rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")),
rhoNbrName_(coeffs_.lookupOrDefault<word>("rhoNbrName", "rho")), rhoNbrName_(coeffs_.lookupOrDefault<word>("rhoNbr", "rho")),
ntuTable_(), ntuTable_(),
geometryMode_(gmCalculated), geometryMode_(gmCalculated),
Ain_(-1), Ain_(-1),
@ -275,10 +275,10 @@ bool Foam::fv::tabulatedNTUHeatTransfer::read(const dictionary& dict)
{ {
if (option::read(dict)) if (option::read(dict))
{ {
coeffs_.readIfPresent("UName", UName_); coeffs_.readIfPresent("U", UName_);
coeffs_.readIfPresent("UNbrName", UNbrName_); coeffs_.readIfPresent("UNbr", UNbrName_);
coeffs_.readIfPresent("rhoName", rhoName_); coeffs_.readIfPresent("rho", rhoName_);
coeffs_.readIfPresent("rhoNbrName", rhoNbrName_); coeffs_.readIfPresent("rhoNbr", rhoNbrName_);
// Force geometry re-initialisation // Force geometry re-initialisation
Ain_ = -1; Ain_ = -1;

View File

@ -68,13 +68,13 @@ Description
tabulatedNTUHeatTransferCoeffs tabulatedNTUHeatTransferCoeffs
{ {
interpolationMethod cellVolumeWeight; interpolationMethod cellVolumeWeight;
nbrRegionName air; nbrRegion air;
master true; master true;
fieldNames (h); fieldNames (h);
outOfBounds clamp; outOfBounds clamp;
fileName "ntuTable"; fileName "ntuTable";
nbrModelName airToCooler; nbrModel airToCooler;
semiImplicit no; semiImplicit no;

View File

@ -40,7 +40,7 @@ Foam::PatchFlowRateInjection<CloudType>::PatchFlowRateInjection
) )
: :
InjectionModel<CloudType>(dict, owner, modelName,typeName), InjectionModel<CloudType>(dict, owner, modelName,typeName),
patchInjectionBase(owner.mesh(), this->coeffDict().lookup("patchName")), patchInjectionBase(owner.mesh(), this->coeffDict().lookup("patch")),
phiName_(this->coeffDict().template lookupOrDefault<word>("phi", "phi")), phiName_(this->coeffDict().template lookupOrDefault<word>("phi", "phi")),
rhoName_(this->coeffDict().template lookupOrDefault<word>("rho", "rho")), rhoName_(this->coeffDict().template lookupOrDefault<word>("rho", "rho")),
duration_(readScalar(this->coeffDict().lookup("duration"))), duration_(readScalar(this->coeffDict().lookup("duration"))),

View File

@ -38,7 +38,7 @@ Foam::PatchInjection<CloudType>::PatchInjection
) )
: :
InjectionModel<CloudType>(dict, owner, modelName, typeName), InjectionModel<CloudType>(dict, owner, modelName, typeName),
patchInjectionBase(owner.mesh(), this->coeffDict().lookup("patchName")), patchInjectionBase(owner.mesh(), this->coeffDict().lookup("patch")),
duration_(readScalar(this->coeffDict().lookup("duration"))), duration_(readScalar(this->coeffDict().lookup("duration"))),
parcelsPerSecond_ parcelsPerSecond_
( (

View File

@ -37,23 +37,14 @@ Foam::InterfaceForce<CloudType>::InterfaceForce
) )
: :
ParticleForce<CloudType>(owner, mesh, dict, typeName, true), ParticleForce<CloudType>(owner, mesh, dict, typeName, true),
alpaName_ alpaName_(this->coeffs().lookup("alpha")),
( C_(readScalar(this->coeffs().lookup("C"))),
this->coeffs().template lookup("alphaName")
),
C_
(
readScalar(this->coeffs().lookup("C"))
),
gradInterForceInterpPtr_(nullptr) gradInterForceInterpPtr_(nullptr)
{} {}
template<class CloudType> template<class CloudType>
Foam::InterfaceForce<CloudType>::InterfaceForce Foam::InterfaceForce<CloudType>::InterfaceForce(const InterfaceForce& pf)
(
const InterfaceForce& pf
)
: :
ParticleForce<CloudType>(pf), ParticleForce<CloudType>(pf),
alpaName_(pf.alpaName_), alpaName_(pf.alpaName_),

View File

@ -41,7 +41,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
( (
this->coeffs().template lookupOrDefault<word> this->coeffs().template lookupOrDefault<word>
( (
"linearAccelerationName", "linearAcceleration",
"linearAcceleration" "linearAcceleration"
) )
), ),
@ -50,7 +50,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
( (
this->coeffs().template lookupOrDefault<word> this->coeffs().template lookupOrDefault<word>
( (
"angularVelocityName", "angularVelocity",
"angularVelocity" "angularVelocity"
) )
), ),
@ -59,7 +59,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
( (
this->coeffs().template lookupOrDefault<word> this->coeffs().template lookupOrDefault<word>
( (
"angularAccelerationName", "angularAcceleration",
"angularAcceleration" "angularAcceleration"
) )
), ),
@ -68,7 +68,7 @@ Foam::NonInertialFrameForce<CloudType>::NonInertialFrameForce
( (
this->coeffs().template lookupOrDefault<word> this->coeffs().template lookupOrDefault<word>
( (
"centreOfRotationName", "centreOfRotation",
"centreOfRotation" "centreOfRotation"
) )
), ),

View File

@ -25,7 +25,7 @@ Class
Foam::cartesianCS Foam::cartesianCS
Description Description
Cylindrical coordinate system Cartesian coordinate system
SourceFiles SourceFiles
cartesianCS.C cartesianCS.C

View File

@ -431,7 +431,7 @@ Foam::regionModels::regionModel::regionModel
outputPropertiesPtr_(nullptr), outputPropertiesPtr_(nullptr),
primaryPatchIDs_(), primaryPatchIDs_(),
intCoupledPatchIDs_(), intCoupledPatchIDs_(),
regionName_(lookup("regionName")), regionName_(lookup("region")),
functions_(*this, subOrEmptyDict("functions")) functions_(*this, subOrEmptyDict("functions"))
{ {
if (active_) if (active_)
@ -479,7 +479,7 @@ Foam::regionModels::regionModel::regionModel
outputPropertiesPtr_(nullptr), outputPropertiesPtr_(nullptr),
primaryPatchIDs_(), primaryPatchIDs_(),
intCoupledPatchIDs_(), intCoupledPatchIDs_(),
regionName_(dict.lookup("regionName")), regionName_(dict.lookup("region")),
functions_(*this, subOrEmptyDict("functions")) functions_(*this, subOrEmptyDict("functions"))
{ {
if (active_) if (active_)

View File

@ -38,8 +38,7 @@ namespace compressible
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
thermalBaffleFvPatchScalarField:: thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
thermalBaffleFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -53,8 +52,7 @@ thermalBaffleFvPatchScalarField
{} {}
thermalBaffleFvPatchScalarField:: thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
thermalBaffleFvPatchScalarField
( (
const thermalBaffleFvPatchScalarField& ptf, const thermalBaffleFvPatchScalarField& ptf,
const fvPatch& p, const fvPatch& p,
@ -76,8 +74,7 @@ thermalBaffleFvPatchScalarField
{} {}
thermalBaffleFvPatchScalarField:: thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
thermalBaffleFvPatchScalarField
( (
const fvPatch& p, const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF, const DimensionedField<scalar, volMesh>& iF,
@ -97,8 +94,7 @@ thermalBaffleFvPatchScalarField
if (thisMesh.name() == polyMesh::defaultRegion) if (thisMesh.name() == polyMesh::defaultRegion)
{ {
const word regionName = const word regionName = dict_.lookupOrDefault<word>("region", "none");
dict_.lookupOrDefault<word>("regionName", "none");
const word baffleName("3DBaffle" + regionName); const word baffleName("3DBaffle" + regionName);
@ -121,8 +117,7 @@ thermalBaffleFvPatchScalarField
} }
thermalBaffleFvPatchScalarField:: thermalBaffleFvPatchScalarField::thermalBaffleFvPatchScalarField
thermalBaffleFvPatchScalarField
( (
const thermalBaffleFvPatchScalarField& ptf, const thermalBaffleFvPatchScalarField& ptf,
const DimensionedField<scalar, volMesh>& iF const DimensionedField<scalar, volMesh>& iF
@ -160,10 +155,9 @@ void thermalBaffleFvPatchScalarField::rmap
void thermalBaffleFvPatchScalarField::createPatchMesh() void thermalBaffleFvPatchScalarField::createPatchMesh()
{ {
const fvMesh& thisMesh = patch().boundaryMesh().mesh(); const fvMesh& thisMesh = patch().boundaryMesh().mesh();
word regionName = dict_.lookup("regionName"); word regionName = dict_.lookup("region");
List<polyPatch*> regionPatches(3); List<polyPatch*> regionPatches(3);
List<word> patchNames(regionPatches.size()); List<word> patchNames(regionPatches.size());
@ -270,9 +264,8 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const
const fvMesh& thisMesh = patch().boundaryMesh().mesh(); const fvMesh& thisMesh = patch().boundaryMesh().mesh();
if (thisMesh.name() == polyMesh::defaultRegion && owner_) if (owner_ && (thisMesh.name() == polyMesh::defaultRegion))
{ {
os.writeKeyword("extrudeModel"); os.writeKeyword("extrudeModel");
os << word(dict_.lookup("extrudeModel")) os << word(dict_.lookup("extrudeModel"))
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
@ -293,9 +286,8 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const
os.writeKeyword(extrudeModel); os.writeKeyword(extrudeModel);
os << dict_.subDict(extrudeModel) << nl; os << dict_.subDict(extrudeModel) << nl;
word regionName = dict_.lookup("regionName"); word regionName = dict_.lookup("region");
os.writeKeyword("regionName") << regionName os.writeKeyword("region") << regionName << token::END_STATEMENT << nl;
<< token::END_STATEMENT << nl;
bool active = readBool(dict_.lookup("active")); bool active = readBool(dict_.lookup("active"));
os.writeKeyword("active") << active os.writeKeyword("active") << active

View File

@ -263,7 +263,7 @@ bool Foam::patchProbes::read(const dictionary& dict)
{ {
if (!dict.readIfPresent("patches", patchNames_)) if (!dict.readIfPresent("patches", patchNames_))
{ {
word patchName(dict.lookup("patchName")); word patchName(dict.lookup("patch"));
patchNames_ = wordReList(1, wordRe(patchName)); patchNames_ = wordReList(1, wordRe(patchName));
} }
return probes::read(dict); return probes::read(dict);

View File

@ -47,56 +47,40 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
HO2Id_(-1), HO2Id_(-1),
H2OId_(-1), H2OId_(-1),
NOId_(-1), NOId_(-1),
automaticSIS_(true), automaticSIS_
phiTol_(this->tolerance()),
NOxThreshold_(1800),
CO2Name_
( (
dict.subDict("reduction").lookupOrDefault<word> this->coeffsDict_.lookupOrDefault<Switch>("automaticSIS", true)
(
"CO2Name","CO2"
)
), ),
COName_ phiTol_
( (
dict.subDict("reduction").lookupOrDefault<word> this->coeffsDict_.lookupOrDefault<scalar>("phiTol", this->tolerance())
(
"COName","CO"
)
), ),
HO2Name_ NOxThreshold_
( (
dict.subDict("reduction").lookupOrDefault<word> this->coeffsDict_.lookupOrDefault<scalar>("NOxThreshold", 1800)
(
"HO2Name","HO2"
)
), ),
H2OName_ CO2Name_(dict.subDict("reduction").lookupOrDefault<word>("CO2","CO2")),
COName_(dict.subDict("reduction").lookupOrDefault<word>("CO","CO")),
HO2Name_(dict.subDict("reduction").lookupOrDefault<word>("HO2","HO2")),
H2OName_(dict.subDict("reduction").lookupOrDefault<word>("H2O","H2O")),
NOName_(dict.subDict("reduction").lookupOrDefault<word>("NO","NO")),
forceFuelInclusion_
( (
dict.subDict("reduction").lookupOrDefault<word> this->coeffsDict_.lookupOrDefault<Switch>("forceFuelInclusion", false)
(
"H2OName","H2O"
) )
),
NOName_
(
dict.subDict("reduction").lookupOrDefault<word>
(
"NOName","NO"
)
),
forceFuelInclusion_(false)
{ {
label j=0; label j = 0;
dictionary initSet = this->coeffsDict_.subDict("initialSet"); dictionary initSet = this->coeffsDict_.subDict("initialSet");
for (label i=0; i<chemistry.nSpecie(); i++)
for (label i = 0; i < chemistry.nSpecie(); i++)
{ {
if (initSet.found(chemistry.Y()[i].name())) if (initSet.found(chemistry.Y()[i].name()))
{ {
searchInitSet_[j++] = i; searchInitSet_[j++] = i;
} }
} }
if (j<searchInitSet_.size())
if (j < searchInitSet_.size())
{ {
FatalErrorInFunction FatalErrorInFunction
<< searchInitSet_.size()-j << searchInitSet_.size()-j
@ -105,28 +89,7 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
<< exit(FatalError); << exit(FatalError);
} }
if (this->coeffsDict_.found("automaticSIS"))
{
automaticSIS_.readIfPresent("automaticSIS", this->coeffsDict_);
}
if (this->coeffsDict_.found("forceFuelInclusion"))
{
forceFuelInclusion_.readIfPresent
(
"forceFuelInclusion",this->coeffsDict_
);
}
if (this->coeffsDict_.found("phiTol"))
{
phiTol_ = readScalar(this->coeffsDict_.lookup("phiTol"));
}
if (this->coeffsDict_.found("NOxThreshold"))
{
NOxThreshold_ = readScalar(this->coeffsDict_.lookup("NOxThreshold"));
}
const List<List<specieElement>>& specieComposition = const List<List<specieElement>>& specieComposition =
chemistry.specieComp(); chemistry.specieComp();
@ -134,11 +97,12 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
{ {
const List<specieElement>& curSpecieComposition = const List<specieElement>& curSpecieComposition =
specieComposition[i]; specieComposition[i];
// For all elements in the current species // For all elements in the current species
forAll(curSpecieComposition, j) forAll(curSpecieComposition, j)
{ {
const specieElement& curElement = const specieElement& curElement = curSpecieComposition[j];
curSpecieComposition[j];
if (curElement.name() == "C") if (curElement.name() == "C")
{ {
sC_[i] = curElement.nAtoms(); sC_[i] = curElement.nAtoms();
@ -157,7 +121,7 @@ Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::DAC
} }
else else
{ {
Info<< "element not considered"<<endl; Info<< "element not considered" <<endl;
} }
} }
if (this->chemistry_.Y()[i].name() == CO2Name_) if (this->chemistry_.Y()[i].name() == CO2Name_)
@ -287,7 +251,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
c1[this->nSpecie_+1] = p; c1[this->nSpecie_+1] = p;
// Compute the rAB matrix // Compute the rAB matrix
RectangularMatrix<scalar> rABNum(this->nSpecie_,this->nSpecie_,0.0); RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_,0.0);
scalarField PA(this->nSpecie_,0.0); scalarField PA(this->nSpecie_,0.0);
scalarField CA(this->nSpecie_,0.0); scalarField CA(this->nSpecie_,0.0);
@ -319,8 +283,8 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
// of the species. It stores the species encountered in the reaction but // of the species. It stores the species encountered in the reaction but
// use another list to see if this species has already been used // use another list to see if this species has already been used
DynamicList<scalar> wA(R.lhs().size()+R.rhs().size()); DynamicList<scalar> wA(R.lhs().size() + R.rhs().size());
DynamicList<label> wAID(R.lhs().size()+R.rhs().size()); DynamicList<label> wAID(R.lhs().size() + R.rhs().size());
forAll(R.lhs(), s) // Compute rAB for all species in the left hand side forAll(R.lhs(), s) // Compute rAB for all species in the left hand side
{ {
@ -344,7 +308,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
// Disable for self reference (by definition rAA=0) // Disable for self reference (by definition rAA=0)
deltaBi[ss] = false; deltaBi[ss] = false;
while(!usedIndex.empty()) while (!usedIndex.empty())
{ {
label curIndex = usedIndex.pop(); label curIndex = usedIndex.pop();
if (deltaBi[curIndex]) if (deltaBi[curIndex])
@ -352,7 +316,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
// Disable to avoid counting it more than once // Disable to avoid counting it more than once
deltaBi[curIndex] = false; deltaBi[curIndex] = false;
// Test if this rAB is not initialized // Test if this rAB is not initialized
if (rABPos(ss, curIndex)==-1) if (rABPos(ss, curIndex) == -1)
{ {
// It starts at rABPos(ss, sj)=0 // It starts at rABPos(ss, sj)=0
rABPos(ss, curIndex) = NbrABInit[ss]; rABPos(ss, curIndex) = NbrABInit[ss];
@ -372,7 +336,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
bool found(false); bool found(false);
forAll(wAID, id) forAll(wAID, id)
{ {
if (ss==wAID[id]) if (ss == wAID[id])
{ {
wA[id] += sl*omegai; wA[id] += sl*omegai;
found = true; found = true;
@ -385,7 +349,8 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
} }
} }
forAll(R.rhs(), s) // Compute rAB for all species in the right hand side // Compute rAB for all species in the right hand side
forAll(R.rhs(), s)
{ {
label ss = R.rhs()[s].index; label ss = R.rhs()[s].index;
scalar sl = R.rhs()[s].stoichCoeff; // vAi = v''-v' => here v'' scalar sl = R.rhs()[s].stoichCoeff; // vAi = v''-v' => here v''
@ -488,8 +453,8 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
label nElements = 4; // 4 main elements (C, H, O, N) label nElements = 4; // 4 main elements (C, H, O, N)
// Total number of C, H and O (in this order) // Total number of C, H and O (in this order)
scalarList Na(nElements,0.0); scalarList Na(nElements, 0.0);
scalarList Nal(nElements,0.0); // for large hydrocarbons scalarList Nal(nElements, 0.0); // for large hydrocarbons
for (label i=0; i<this->nSpecie_; i++) for (label i=0; i<this->nSpecie_; i++)
{ {
@ -502,6 +467,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
{ {
continue; continue;
} }
Na[0] += sC_[i]*c[i]; Na[0] += sC_[i]*c[i];
Na[1] += sH_[i]*c[i]; Na[1] += sH_[i]*c[i];
Na[2] += sO_[i]*c[i]; Na[2] += sO_[i]*c[i];
@ -523,12 +489,12 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
// 2Cl + Hl/2 // 2Cl + Hl/2
// Equivalence ratio for fuel decomposition = ---------- // Equivalence ratio for fuel decomposition = ----------
// Ol(+O2) // Ol(+O2)
phiLarge = (2*Nal[0]+Nal[1]/2)/Nal[2]; phiLarge = (2*Nal[0] + Nal[1]/2)/Nal[2];
} }
// Using the rAB matrix (numerator and denominator separated) // Using the rAB matrix (numerator and denominator separated)
// compute the R value according to the search initiating set // compute the R value according to the search initiating set
scalarField Rvalue(this->nSpecie_,0.0); scalarField Rvalue(this->nSpecie_, 0.0);
label speciesNumber = 0; label speciesNumber = 0;
// Set all species to inactive and activate them according // Set all species to inactive and activate them according
@ -583,7 +549,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
if (forceFuelInclusion_) if (forceFuelInclusion_)
{ {
forAll(fuelSpeciesID_,i) forAll(fuelSpeciesID_, i)
{ {
Q.push(fuelSpeciesID_[i]); Q.push(fuelSpeciesID_[i]);
speciesNumber++; speciesNumber++;
@ -607,7 +573,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
Rvalue[H2OId_] = 1.0; Rvalue[H2OId_] = 1.0;
if (forceFuelInclusion_) if (forceFuelInclusion_)
{ {
forAll(fuelSpeciesID_,i) forAll(fuelSpeciesID_, i)
{ {
Q.push(fuelSpeciesID_[i]); Q.push(fuelSpeciesID_[i]);
speciesNumber++; speciesNumber++;
@ -641,7 +607,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
while (!Q.empty()) while (!Q.empty())
{ {
label u = Q.pop(); label u = Q.pop();
scalar Den = max(PA[u],CA[u]); scalar Den = max(PA[u], CA[u]);
if (Den!=0.0) if (Den!=0.0)
{ {
for (label v=0; v<NbrABInit[u]; v++) for (label v=0; v<NbrABInit[u]; v++)
@ -709,7 +675,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism
this->NsSimp_ = speciesNumber; this->NsSimp_ = speciesNumber;
scalarField& simplifiedC(this->chemistry_.simplifiedC()); scalarField& simplifiedC(this->chemistry_.simplifiedC());
simplifiedC.setSize(this->NsSimp_+2); simplifiedC.setSize(this->NsSimp_ + 2);
DynamicList<label>& s2c(this->chemistry_.simplifiedToCompleteIndex()); DynamicList<label>& s2c(this->chemistry_.simplifiedToCompleteIndex());
s2c.setSize(this->NsSimp_); s2c.setSize(this->NsSimp_);
Field<label>& c2s(this->chemistry_.completeToSimplifiedIndex()); Field<label>& c2s(this->chemistry_.completeToSimplifiedIndex());

View File

@ -25,7 +25,7 @@ Class
Foam::chemistryReductionMethods::DAC Foam::chemistryReductionMethods::DAC
Description Description
The Dynamic Adaptive Chemistry (DAC) method [1] simplify the chemistry The Dynamic Adaptive Chemistry (DAC) method [1] simplifies the chemistry
using the matrix rAB defined by (DRGEP algorithm [2]) using the matrix rAB defined by (DRGEP algorithm [2])
|sum_i=1->Nr vAi wi dBi| |sum_i=1->Nr vAi wi dBi|
@ -40,13 +40,14 @@ Description
stoechiometric coefficient of species A in the ith reaction (vAi = v''-v') stoechiometric coefficient of species A in the ith reaction (vAi = v''-v')
, wi is the progress variable of reaction i and dBi equals 1 if reaction i , wi is the progress variable of reaction i and dBi equals 1 if reaction i
involves B and O otherwise. involves B and O otherwise.
rAB show the error introduced to the production rates of A when B and all
rAB shows the error introduced to the production rates of A when B and all
the reactions including it are removed. It is computed as in [3] so that the reactions including it are removed. It is computed as in [3] so that
the algorithm is O(Nr). the algorithm is O(Nr).
DAC uses a initial set of species that represents the major parts of the DAC uses an initial set of species that represent the major parts of the
combustion mechanism, i.e. H2/O2, fuel decomposition and CO2 production. combustion mechanism, i.e. H2/O2, fuel decomposition and CO2 production.
Usualy, it includes the fuel, HO2 and CO. Then it computes the dependance Usually, it includes the fuel, HO2 and CO. Then it computes the dependance
of these set to the other species. This is done by introducing R-value of these set to the other species. This is done by introducing R-value
defined by defined by
@ -122,6 +123,7 @@ class DAC
word CO2Name_, COName_, HO2Name_, H2OName_, NOName_; word CO2Name_, COName_, HO2Name_, H2OName_, NOName_;
Switch forceFuelInclusion_; Switch forceFuelInclusion_;
public: public:
//- Runtime type information //- Runtime type information

View File

@ -226,7 +226,7 @@ humidityTemperatureCoupledMixedFvPatchScalarField
TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")), TnbrName_(dict.lookupOrDefault<word>("Tnbr", "T")),
QrNbrName_(dict.lookupOrDefault<word>("QrNbr", "none")), QrNbrName_(dict.lookupOrDefault<word>("QrNbr", "none")),
QrName_(dict.lookupOrDefault<word>("Qr", "none")), QrName_(dict.lookupOrDefault<word>("Qr", "none")),
specieName_(dict.lookupOrDefault<word>("specieName", "none")), specieName_(dict.lookupOrDefault<word>("specie", "none")),
liquid_(nullptr), liquid_(nullptr),
liquidDict_(), liquidDict_(),
mass_(patch().size(), 0.0), mass_(patch().size(), 0.0),
@ -749,7 +749,7 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::write
os.writeKeyword("mode")<< massModeTypeNames_[mode_] os.writeKeyword("mode")<< massModeTypeNames_[mode_]
<< token::END_STATEMENT <<nl; << token::END_STATEMENT <<nl;
writeEntryIfDifferent<word>(os, "specieName", "none", specieName_); writeEntryIfDifferent<word>(os, "specie", "none", specieName_);
os.writeKeyword("carrierMolWeight")<< Mcomp_ os.writeKeyword("carrierMolWeight")<< Mcomp_
<< token::END_STATEMENT <<nl; << token::END_STATEMENT <<nl;

View File

@ -23,8 +23,8 @@ coupledFaces
coupledFacesSet coupledFacesSet
{ {
wallPatchName baffleWall; wallPatch baffleWall;
cyclicMasterPatchName baffleCyclic_half0; cyclicMasterPatch baffleCyclic_half0;
} }
} }

View File

@ -44,7 +44,7 @@ boundaryField
"region0_to_.*" "region0_to_.*"
{ {
type compressible::turbulentTemperatureRadCoupledMixed; type compressible::turbulentTemperatureRadCoupledMixed;
neighbourFieldName T; neighbourField T;
kappaMethod solidThermo; kappaMethod solidThermo;
QrNbr Qr; QrNbr Qr;
Qr none; Qr none;

View File

@ -20,7 +20,7 @@ FoamFile
pyrolysisModel thermo; pyrolysisModel thermo;
regionName panelRegion; region panelRegion;
noPyrolysisCoeffs noPyrolysisCoeffs
{ {

View File

@ -11,12 +11,12 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel none; surfaceFilmModel none;
regionName none; region none;
active false; active false;

View File

@ -77,7 +77,7 @@ functions
writeControl timeStep; writeControl timeStep;
writeInterval 200; writeInterval 200;
log true; log true;
patchName region0_to_panelRegion_wallPanel; patch region0_to_panelRegion_wallPanel;
probeLocations probeLocations
( (
(0.15 0.0 0.01) // HF2 (0.15 0.0 0.01) // HF2
@ -94,7 +94,7 @@ functions
writeControl timeStep; writeControl timeStep;
writeInterval 200; writeInterval 200;
log true; log true;
patchName inlet; patch inlet;
probeLocations probeLocations
( (
( 0.0 0.0 0.0 ) // HF1 ( 0.0 0.0 0.0 ) // HF1

View File

@ -21,7 +21,7 @@ pyrolysis
pyrolysisModel reactingOneDim; pyrolysisModel reactingOneDim;
regionName pyrolysisRegion; region pyrolysisRegion;
reactingOneDimCoeffs reactingOneDimCoeffs
{ {

View File

@ -11,7 +11,7 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,7 +19,7 @@ active true;
surfaceFilmModel thermoSingleLayer; surfaceFilmModel thermoSingleLayer;
regionName filmRegion; region filmRegion;
thermoSingleLayerCoeffs thermoSingleLayerCoeffs
{ {

View File

@ -21,7 +21,7 @@ pyrolysis
pyrolysisModel reactingOneDim; pyrolysisModel reactingOneDim;
regionName panelRegion; region panelRegion;
reactingOneDimCoeffs reactingOneDimCoeffs
{ {

View File

@ -11,12 +11,12 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel none; surfaceFilmModel none;
regionName none; region none;
active false; active false;

View File

@ -21,7 +21,7 @@ FoamFile
pyrolysisModel reactingOneDim; pyrolysisModel reactingOneDim;
regionName panelRegion; region panelRegion;
reactingOneDimCoeffs reactingOneDimCoeffs
{ {

View File

@ -11,7 +11,7 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,5 +19,5 @@ active false;
surfaceFilmModel none; surfaceFilmModel none;
regionName none; region none;

View File

@ -21,7 +21,7 @@ pyrolysis
pyrolysisModel none; pyrolysisModel none;
regionName panelRegion; region panelRegion;
reactingOneDimCoeffs reactingOneDimCoeffs
{ {

View File

@ -11,12 +11,12 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel none; surfaceFilmModel none;
regionName none; region none;
active false; active false;

View File

@ -21,7 +21,7 @@ pyrolysis
pyrolysisModel none; pyrolysisModel none;
regionName panelRegion; region panelRegion;
reactingOneDimCoeffs reactingOneDimCoeffs
{ {

View File

@ -11,12 +11,12 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel none; surfaceFilmModel none;
regionName none; region none;
active false; active false;

View File

@ -12,7 +12,7 @@ T
kappaMethod fluidThermo; kappaMethod fluidThermo;
value uniform 300; value uniform 300;
regionName ${baffleRegionName}; region ${baffleRegion};
active yes; active yes;
# include "3DbaffleSolidThermo" # include "3DbaffleSolidThermo"

View File

@ -6,11 +6,11 @@
| \\/ M anipulation | | | \\/ M anipulation | |
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
baffleRegionName baffle3DRegion; baffleRegion baffle3DRegion;
masterPatchName baffle3DRegionMaster; masterPatch baffle3DRegionMaster;
slavePatchName baffle3DRegionSlave; slavePatch baffle3DRegionSlave;
oneD false; oneD false;

View File

@ -55,7 +55,7 @@ boundaryField
// Mode of operation: inert, condensation, vaporization, // Mode of operation: inert, condensation, vaporization,
// condensationAndEvaporation // condensationAndEvaporation
mode condensationAndEvaporation; mode condensationAndEvaporation;
specieName H2O; specie H2O;
carrierMolWeight 28.9 ;//Air from thermophysicalProperties carrierMolWeight 28.9 ;//Air from thermophysicalProperties
L 0.1; L 0.1;
Tvap 273; //Minimum temperature for evaporation Tvap 273; //Minimum temperature for evaporation

View File

@ -47,6 +47,7 @@ laplacianSchemes
laplacian(rhorAUf,p_rgh) Gauss linear corrected; laplacian(rhorAUf,p_rgh) Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected;
laplacian(((rho*nut)+thermo:mu),H2O) Gauss linear corrected; laplacian(((rho*nut)+thermo:mu),H2O) Gauss linear corrected;
laplacian(DH2O,H2O) Gauss linear corrected;
} }
interpolationSchemes interpolationSchemes

View File

@ -23,7 +23,7 @@ airToporous
constantHeatTransferCoeffs constantHeatTransferCoeffs
{ {
interpolationMethod cellVolumeWeight; interpolationMethod cellVolumeWeight;
nbrRegionName porous; nbrRegion porous;
master false; master false;
nbrModel porousToair; nbrModel porousToair;
@ -40,7 +40,7 @@ porosityBlockage
interRegionExplicitPorositySourceCoeffs interRegionExplicitPorositySourceCoeffs
{ {
interpolationMethod cellVolumeWeight; interpolationMethod cellVolumeWeight;
nbrRegionName porous; nbrRegion porous;
type DarcyForchheimer; type DarcyForchheimer;

View File

@ -23,7 +23,7 @@ porousToair
constantHeatTransferCoeffs constantHeatTransferCoeffs
{ {
interpolationMethod cellVolumeWeight; interpolationMethod cellVolumeWeight;
nbrRegionName air; nbrRegion air;
master true; master true;
nbrModel airToporous; nbrModel airToporous;

View File

@ -48,5 +48,19 @@ runTimeModifiable yes;
adjustTimeStep yes; adjustTimeStep yes;
maxCo 5; maxCo 5;
functions
{
mag(U)
{
type mag;
libs ( "libfieldFunctionObjects.so" );
field U;
executeControl writeTime;
writeControl writeTime;
fields 1 ( U );
result myMagU;
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -58,7 +58,7 @@ functions
fields (p U); fields (p U);
lifeTime 10000; lifeTime 10000;
nSubCycle 5; nSubCycle 5;
cloudName particleTracks; cloud particleTracks;
seedSampleSet uniform; seedSampleSet uniform;
uniformCoeffs uniformCoeffs
{ {

View File

@ -57,7 +57,7 @@ postPro1
visible yes; visible yes;
tubeRadius 0.01; tubeRadius 0.01;
colourBy field; colourBy field;
fieldName U; field U;
range (0 20); range (0 20);
opacity 1; opacity 1;
scalarBar scalarBar
@ -97,7 +97,7 @@ postPro1
visible yes; visible yes;
featureEdges no; featureEdges no;
colourBy field; colourBy field;
fieldName U; field U;
range (0 30); range (0 30);
opacity 1; opacity 1;
scalarBar scalarBar

View File

@ -32,7 +32,7 @@ streamLines
nSubCycle 5; nSubCycle 5;
// Cloud name to use // Cloud name to use
cloudName particleTracks; cloud particleTracks;
// Seeding method. // Seeding method.
seedSampleSet uniform; //cloud; //triSurfaceMeshPointSet; seedSampleSet uniform; //cloud; //triSurfaceMeshPointSet;

View File

@ -15,7 +15,7 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 6; numberOfSubdomains 4;
method hierarchical; method hierarchical;
// method ptscotch; // method ptscotch;

View File

@ -39,7 +39,7 @@ streamLines
// Cloud name to use // Cloud name to use
cloudName particleTracks; cloud particleTracks;
// Seeding method. // Seeding method.
seedSampleSet uniform; //cloud; //triSurfaceMeshPointSet; seedSampleSet uniform; //cloud; //triSurfaceMeshPointSet;

View File

@ -65,7 +65,7 @@ wallBoundedStreamLines
lifeTime 100; lifeTime 100;
// Cloud name to use // Cloud name to use
cloudName wallBoundedParticleTracks; cloud wallBoundedParticleTracks;
// Seeding method. // Seeding method.
seedSampleSet patchSeed; //cloud; //triSurfaceMeshPointSet; seedSampleSet patchSeed; //cloud; //triSurfaceMeshPointSet;

View File

@ -73,7 +73,7 @@ functions
nSubCycle 5; nSubCycle 5;
// Cloud name to use // Cloud name to use
cloudName particleTracks; cloud particleTracks;
// Seeding method. // Seeding method.
seedSampleSet uniform; //cloud; //triSurfaceMeshPointSet; seedSampleSet uniform; //cloud; //triSurfaceMeshPointSet;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
continuousPhaseName air; continuousPhase air;
rho.air 1.2; rho.air 1.2;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
continuousPhaseName air; continuousPhase air;
rho.air 1.2; rho.air 1.2;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
continuousPhaseName air; continuousPhase air;
rho.air 1.2; rho.air 1.2;

View File

@ -72,7 +72,7 @@ subModels
massTotal 40; massTotal 40;
SOI 1; SOI 1;
parcelBasisType mass; parcelBasisType mass;
patchName inlet; patch inlet;
duration 4; duration 4;
parcelsPerSecond 100644; parcelsPerSecond 100644;
U0 (-10 0 0); U0 (-10 0 0);

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
continuousPhaseName air; continuousPhase air;
rho.air 1.2; rho.air 1.2;

View File

@ -80,7 +80,7 @@ subModels
{ {
type patchInjection; type patchInjection;
parcelBasisType fixed; parcelBasisType fixed;
patchName lowerInlet; patch lowerInlet;
U0 (18.7939 6.8404 0); U0 (18.7939 6.8404 0);
nParticle 1; nParticle 1;
parcelsPerSecond 1390885; parcelsPerSecond 1390885;
@ -105,7 +105,7 @@ subModels
{ {
type patchInjection; type patchInjection;
parcelBasisType fixed; parcelBasisType fixed;
patchName upperInlet; patch upperInlet;
U0 (18.7939 -6.8404 0); U0 (18.7939 -6.8404 0);
nParticle 1; nParticle 1;
parcelsPerSecond 1390885; parcelsPerSecond 1390885;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
continuousPhaseName air; continuousPhase air;
rho.air 1.2; rho.air 1.2;

View File

@ -11,13 +11,13 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel thermoSingleLayer; surfaceFilmModel thermoSingleLayer;
regionName wallFilmRegion; region wallFilmRegion;
active true; active true;

View File

@ -11,13 +11,13 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel thermoSingleLayer; surfaceFilmModel thermoSingleLayer;
regionName wallFilmRegion; region wallFilmRegion;
active true; active true;
@ -108,7 +108,7 @@ thermoSingleLayerCoeffs
drippingInjectionCoeffs drippingInjectionCoeffs
{ {
cloudName reactingCloud1; cloud reactingCloud1;
deltaStable 0; deltaStable 0;
particlesPerParcel 100.0; particlesPerParcel 100.0;

View File

@ -11,13 +11,13 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel kinematicSingleLayer; surfaceFilmModel kinematicSingleLayer;
regionName wallFilmRegion; region wallFilmRegion;
active true; active true;

View File

@ -11,13 +11,13 @@ FoamFile
format ascii; format ascii;
class dictionary; class dictionary;
location "constant"; location "constant";
object SurfaceFilmProperties; object surfaceFilmProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFilmModel thermoSingleLayer; surfaceFilmModel thermoSingleLayer;
regionName wallFilmRegion; region wallFilmRegion;
active true; active true;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloudName reactingCloud1; cloud reactingCloud1;
sampleFrequency 1; sampleFrequency 1;

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloudName reactingCloud1; cloud reactingCloud1;
sampleFrequency 1; sampleFrequency 1;

View File

@ -80,7 +80,7 @@ subModels
SOI 0.01; SOI 0.01;
massTotal 8; massTotal 8;
parcelBasisType mass; parcelBasisType mass;
patchName inletCentral; patch inletCentral;
duration 10000; duration 10000;
parcelsPerSecond 1e5; parcelsPerSecond 1e5;
U0 (40 0 0); U0 (40 0 0);

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloudName reactingCloud1Tracks; cloud reactingCloud1Tracks;
fields fields
( (

View File

@ -84,7 +84,7 @@ subModels
type patchInjection; type patchInjection;
massFlowRate 0.8e-03; massFlowRate 0.8e-03;
parcelBasisType mass; parcelBasisType mass;
patchName inletCentral; patch inletCentral;
parcelsPerSecond 100; parcelsPerSecond 100;
duration 1; // NOTE: set to 1 for steady state duration 1; // NOTE: set to 1 for steady state
U0 (0 40 0); U0 (0 40 0);

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloudName reactingCloud1Tracks; cloud reactingCloud1Tracks;
fields fields
( (

View File

@ -84,7 +84,7 @@ subModels
type patchInjection; type patchInjection;
massFlowRate 0.8e-03; massFlowRate 0.8e-03;
parcelBasisType mass; parcelBasisType mass;
patchName inletCentral; patch inletCentral;
parcelsPerSecond 100; parcelsPerSecond 100;
duration 1; // NOTE: set to 1 for steady state duration 1; // NOTE: set to 1 for steady state
U0 (0 40 0); U0 (0 40 0);

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
cloudName reactingCloud1; cloud reactingCloud1;
sampleFrequency 1; sampleFrequency 1;

View File

@ -66,7 +66,7 @@ subModels
interface interface
{ {
C -10; C -10;
alphaName alpha.water; alpha alpha.water;
} }
} }
@ -79,7 +79,7 @@ subModels
SOI 0; SOI 0;
parcelBasisType fixed;//mass; parcelBasisType fixed;//mass;
nParticle 1; nParticle 1;
patchName inlet; patch inlet;
duration 1; duration 1;
parcelsPerSecond 1e5; parcelsPerSecond 1e5;
U0 (0 0 0.1); U0 (0 0 0.1);