diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index 1101d8d55f..d0c1b6e52c 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -60,7 +60,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), UName_(dict.lookupOrDefault("U", "U")), rhoName_(dict.lookupOrDefault("rho", "rho")), psiName_(dict.lookupOrDefault("psi", "thermo:psi")), diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C index 4b65bc4aae..5659e16832 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -61,7 +61,7 @@ JohnsonJacksonParticleThetaFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), restitutionCoefficient_ ( "restitutionCoefficient", diff --git a/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/coupledTemperature/coupledTemperatureFvPatchScalarField.C b/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/coupledTemperature/coupledTemperatureFvPatchScalarField.C index fd232c9dd5..921f4faca9 100644 --- a/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/coupledTemperature/coupledTemperatureFvPatchScalarField.C +++ b/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/coupledTemperature/coupledTemperatureFvPatchScalarField.C @@ -62,7 +62,7 @@ coupledTemperatureFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), TnbrName_(dict.lookupOrDefault("Tnbr", "T")), qrNbrName_(dict.lookupOrDefault("qrNbr", "none")), qrName_(dict.lookupOrDefault("qr", "none")), diff --git a/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/externalTemperature/externalTemperatureFvPatchScalarField.C b/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/externalTemperature/externalTemperatureFvPatchScalarField.C index 60f7ee5caf..5b75c522d9 100644 --- a/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/externalTemperature/externalTemperatureFvPatchScalarField.C +++ b/src/ThermophysicalTransportModels/coupledThermophysicalTransportModels/externalTemperature/externalTemperatureFvPatchScalarField.C @@ -70,7 +70,7 @@ externalTemperatureFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), haveQ_(dict.found("Q")), Q_(haveQ_ ? dict.lookup("Q") : NaN), haveq_(dict.found("q")), diff --git a/src/ThermophysicalTransportModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/ThermophysicalTransportModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index dc464d0dcd..bf4e6e0db4 100644 --- a/src/ThermophysicalTransportModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/ThermophysicalTransportModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -68,7 +68,7 @@ thermalBaffle1DFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), TName_("T"), baffleActivated_(dict.lookupOrDefault("baffleActivated", true)), thickness_(), diff --git a/src/ThermophysicalTransportModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C b/src/ThermophysicalTransportModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C index 8e29edd15b..ba332f6b01 100644 --- a/src/ThermophysicalTransportModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C +++ b/src/ThermophysicalTransportModels/derivedFvPatchFields/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C @@ -56,7 +56,7 @@ totalFlowRateAdvectiveDiffusiveFvPatchScalarField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), rhoName_(dict.lookupOrDefault("rho", "none")), massFluxFraction_(dict.lookupOrDefault("massFluxFraction", 1.0)) diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C index 3fe7aad567..b897df4dba 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.C @@ -46,15 +46,52 @@ Foam::mixedFvPatchField::mixedFvPatchField ( const fvPatch& p, const DimensionedField& iF, - const dictionary& dict + const dictionary& dict, + const bool valuesRequired ) : fvPatchField(p, iF, dict, false), - refValue_("refValue", dict, p.size()), - refGrad_("refGradient", dict, p.size()), - valueFraction_("valueFraction", dict, p.size()) + refValue_(p.size()), + refGrad_(p.size()), + valueFraction_(p.size()) { - evaluate(); + if (valuesRequired) + { + if (dict.found("refValue")) + { + refValue_ = Field("refValue", dict, p.size()); + } + else + { + FatalIOErrorInFunction(dict) + << "Essential entry 'refValue' missing" + << exit(FatalIOError); + } + + if (dict.found("refGradient")) + { + refGrad_ = Field("refGradient", dict, p.size()); + } + else + { + FatalIOErrorInFunction(dict) + << "Essential entry 'refGradient' missing" + << exit(FatalIOError); + } + + if (dict.found("valueFraction")) + { + valueFraction_ = Field("valueFraction", dict, p.size()); + } + else + { + FatalIOErrorInFunction(dict) + << "Essential entry 'valueFraction' missing" + << exit(FatalIOError); + } + + evaluate(); + } } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H index b1f7188f98..28c9f7ed3e 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/mixed/mixedFvPatchField.H @@ -114,7 +114,8 @@ public: ( const fvPatch&, const DimensionedField&, - const dictionary& + const dictionary&, + const bool valuesRequired=true ); //- Construct by mapping the given mixedFvPatchField onto a new patch diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C index 1edf05adb8..50784945db 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C @@ -62,7 +62,7 @@ Foam::advectiveFvPatchField::advectiveFvPatchField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), rhoName_(dict.lookupOrDefault("rho", "rho")), fieldInf_(Zero), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C index 5ca39d7026..ffe962bdae 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -471,7 +471,7 @@ externalCoupledMixedFvPatchField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), commsDir_(dict.lookup("commsDir")), fName_(dict.lookup("file")), waitInterval_(dict.lookupOrDefault("waitInterval", 1)), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C index d17cc4b5cb..24596d3398 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamPressure/freestreamPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ freestreamPressureFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), UName_(dict.lookupOrDefault("U", "U")), supersonic_ ( diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.C index a53755f253..edcfc709a5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestreamVelocity/freestreamVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,7 +45,7 @@ Foam::freestreamVelocityFvPatchVectorField::freestreamVelocityFvPatchVectorField const dictionary& dict ) : - mixedFvPatchVectorField(p, iF) + mixedFvPatchVectorField(p, iF, dict, false) { freestreamValue() = vectorField("freestreamValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C index 853ef8d836..90c530715c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutlet/inletOutletFvPatchField.C @@ -51,7 +51,7 @@ Foam::inletOutletFvPatchField::inletOutletFvPatchField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")) { this->refValue() = Field("inletValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C index 86b0cae65f..67deb82d8e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletInlet/outletInletFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ Foam::outletInletFvPatchField::outletInletFvPatchField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")) { this->refValue() = Field("outletValue", dict, p.size()); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C index 567443dc39..4b8cce2f37 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,7 +56,7 @@ outletPhaseMeanVelocityFvPatchVectorField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), UnMean_(Function1::New("UnMean", dict)), alphaName_(dict.lookup("alpha")) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C index ab8bdf8e75..ead90c07e4 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/phaseHydrostaticPressure/phaseHydrostaticPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -59,7 +59,7 @@ phaseHydrostaticPressureFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), phaseFraction_(dict.lookupOrDefault("phaseFraction", "alpha")), rho_(dict.lookup("rho")), pRefValue_(dict.lookup("pRefValue")), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C index 5f0b0678e0..a5d05c2280 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureDirectedInletOutletVelocity/pressureDirectedInletOutletVelocityFvPatchVectorField.C @@ -57,7 +57,7 @@ pressureDirectedInletOutletVelocityFvPatchVectorField const dictionary& dict ) : - mixedFvPatchVectorField(p, iF), + mixedFvPatchVectorField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), rhoName_(dict.lookupOrDefault("rho", "rho")), inletDir_("inletDirection", dict, p.size()) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C index b2c5f2a968..aa9ccb72c8 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureInletOutletParSlipVelocity/pressureInletOutletParSlipVelocityFvPatchVectorField.C @@ -57,7 +57,7 @@ pressureInletOutletParSlipVelocityFvPatchVectorField const dictionary& dict ) : - mixedFvPatchVectorField(p, iF), + mixedFvPatchVectorField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), rhoName_(dict.lookupOrDefault("rho", "rho")) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C index 2c520c56d7..a0b9960db7 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/pressureNormalInletOutletVelocity/pressureNormalInletOutletVelocityFvPatchVectorField.C @@ -57,7 +57,7 @@ pressureNormalInletOutletVelocityFvPatchVectorField const dictionary& dict ) : - mixedFvPatchVectorField(p, iF), + mixedFvPatchVectorField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), rhoName_(dict.lookupOrDefault("rho", "rho")) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C index a00d826a71..b79e939dc6 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/supersonicFreestream/supersonicFreestreamFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ supersonicFreestreamFvPatchVectorField const dictionary& dict ) : - mixedFvPatchVectorField(p, iF), + mixedFvPatchVectorField(p, iF, dict, false), TName_(dict.lookupOrDefault("T", "T")), pName_(dict.lookupOrDefault("p", "p")), psiName_(dict.lookupOrDefault("psi", "thermo:psi")), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/transonicEntrainmentPressure/transonicEntrainmentPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/transonicEntrainmentPressure/transonicEntrainmentPressureFvPatchScalarField.C index c4a79b8ee3..e7210f861a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/transonicEntrainmentPressure/transonicEntrainmentPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/transonicEntrainmentPressure/transonicEntrainmentPressureFvPatchScalarField.C @@ -54,7 +54,7 @@ transonicEntrainmentPressureFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), rhoName_(dict.lookupOrDefault("rho", "rho")), psiName_(dict.lookupOrDefault("psi", "thermo:psi")), phiName_(dict.lookupOrDefault("phi", "phi")), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C index 0be8e76f04..e185113dea 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C @@ -51,7 +51,7 @@ Foam::uniformInletOutletFvPatchField::uniformInletOutletFvPatchField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), uniformInletValue_(Function1::New("uniformInletValue", dict)) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C index f155d314e0..9f7cbcc68e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,7 +38,7 @@ variableHeightFlowRateFvPatchScalarField const DimensionedField& iF ) : - mixedFvPatchField(p, iF), + mixedFvPatchScalarField(p, iF), phiName_("phi"), lowerBound_(0.0), upperBound_(1.0) @@ -57,7 +57,7 @@ variableHeightFlowRateFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), lowerBound_(dict.lookup("lowerBound")), upperBound_(dict.lookup("upperBound")) diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 14fc5b7f91..eed5fff6f4 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -72,6 +72,7 @@ Foam::fvPatchField::fvPatchField ) : Field(p.size()), + libs_(dict.lookupOrDefault("libs", fileNameList::null())), patch_(p), internalField_(iF), updated_(false), diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C index a72a831ea4..4cc4c0c5fe 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C @@ -168,14 +168,7 @@ Foam::tmp> Foam::fvPatchField::New } } - tmp> ptf(cstrIter()(p, iF, dict)); - - if (dict.found("libs")) - { - dict.lookup("libs") >> ptf.ref().libs_; - } - - return ptf; + return cstrIter()(p, iF, dict); } diff --git a/src/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C b/src/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C index e6cce3b586..82fffcf520 100644 --- a/src/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C +++ b/src/radiationModels/derivedFvPatchFields/MarshakRadiation/MarshakRadiationFvPatchScalarField.C @@ -55,7 +55,7 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), radiationCoupledBase(p, dict), TName_(dict.lookupOrDefault("T", "T")) { diff --git a/src/radiationModels/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C b/src/radiationModels/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C index 06edc643cd..70377f8b03 100644 --- a/src/radiationModels/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C +++ b/src/radiationModels/derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTemperatureFvPatchScalarField.C @@ -57,7 +57,7 @@ MarshakRadiationFixedTemperatureFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), radiationCoupledBase(p, dict), Trad_("Trad", dict, p.size()) { diff --git a/src/radiationModels/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/radiationModels/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index 62a6b95735..e2d95b3bf7 100644 --- a/src/radiationModels/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/radiationModels/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -61,7 +61,7 @@ greyDiffusiveRadiationMixedFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), radiationCoupledBase(p, dict), TName_(dict.lookupOrDefault("T", "T")) { diff --git a/src/radiationModels/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/radiationModels/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index f68cc9693a..ff4878c5ab 100644 --- a/src/radiationModels/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/radiationModels/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -62,7 +62,7 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), radiationCoupledBase(p, dict), TName_(dict.lookupOrDefault("T", "T")) { diff --git a/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.C b/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.C index 568b7fed60..0153386c26 100644 --- a/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.C +++ b/src/specieTransfer/derivedFvPatchFields/specieTransferMassFraction/specieTransferMassFractionFvPatchScalarField.C @@ -100,7 +100,7 @@ specieTransferMassFractionFvPatchScalarField const dictionary& dict ) : - mixedFvPatchScalarField(p, iF), + mixedFvPatchScalarField(p, iF, dict, false), phiName_(dict.lookupOrDefault("phi", "phi")), UName_(dict.lookupOrDefault("U", "U")), phiYp_(p.size(), 0), diff --git a/src/waves/derivedFvPatchFields/waveInletOutlet/waveInletOutletFvPatchField.C b/src/waves/derivedFvPatchFields/waveInletOutlet/waveInletOutletFvPatchField.C index 8b61c3fce7..5803d2df9a 100644 --- a/src/waves/derivedFvPatchFields/waveInletOutlet/waveInletOutletFvPatchField.C +++ b/src/waves/derivedFvPatchFields/waveInletOutlet/waveInletOutletFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ Foam::waveInletOutletFvPatchField::waveInletOutletFvPatchField const dictionary& dict ) : - mixedFvPatchField(p, iF), + mixedFvPatchField(p, iF, dict, false), inletValueAbove_(Function1::New("inletValueAbove", dict)), inletValueBelow_(Function1::New("inletValueBelow", dict)), phiName_(dict.lookupOrDefault("phi", "phi"))