From 5233335924a367e0c938b2efde94d1a7dc80f12a Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 8 Jun 2023 09:46:12 +0100 Subject: [PATCH] thermophysicalModels: Permit wildcard names of thermo dictionaries This can be useful when reusing thermo configurations across multiple setups. In one simulation, the fluid might be entirely air, and in another there might be additional pollutant or fuel species. This could be defined without changing the species' thermo enties as follows: "(mixture|air)" { specie { molWeight 28.9; } thermodynamics { Hf 0; Cv 724.8; } transport { mu 1.84e-05; Pr 0.7; } } This was semi-supported before, but it lead to the wrong name (i.e., the wildcard string) being stored in the base specie class. Now the name is passed through the thermo constructors, so it is always correct. --- .../test/thermoMixture/Test-thermoMixture.C | 6 +-- .../adiabaticFlameT/adiabaticFlameT.C | 39 ++++------------- .../equilibriumCO/equilibriumCO.C | 20 ++++----- .../equilibriumFlameT/equilibriumFlameT.C | 16 +++---- .../mixtureAdiabaticFlameT.C | 26 +++++++++--- .../thermalBaffle1DFvPatchScalarField.C | 2 +- .../basic/mixtures/pureMixture/pureMixture.C | 6 +-- .../mixtures/egrMixture/egrMixture.C | 13 +++--- .../homogeneousMixture/homogeneousMixture.C | 10 ++--- .../inhomogeneousMixture.C | 15 +++---- .../multicomponentMixture.C | 4 +- .../singleComponentMixture.C | 6 +-- .../veryInhomogeneousMixture.C | 15 +++---- .../constAniso/constAnisoSolidTransport.C | 5 ++- .../constAniso/constAnisoSolidTransport.H | 13 +++--- .../constIso/constIsoSolidTransport.C | 5 ++- .../constIso/constIsoSolidTransport.H | 13 +++--- .../exponential/exponentialSolidTransport.C | 5 ++- .../exponential/exponentialSolidTransport.H | 13 +++--- .../polynomial/polynomialSolidTransport.C | 5 ++- .../polynomial/polynomialSolidTransport.H | 13 +++--- .../tabulated/tabulatedSolidTransport.C | 5 ++- .../tabulated/tabulatedSolidTransport.H | 13 +++--- .../equationOfState/Boussinesq/Boussinesq.C | 5 ++- .../equationOfState/Boussinesq/Boussinesq.H | 4 +- .../equationOfState/Boussinesq/BoussinesqI.H | 5 ++- .../PengRobinsonGas/PengRobinsonGas.C | 5 ++- .../PengRobinsonGas/PengRobinsonGas.H | 4 +- .../PengRobinsonGas/PengRobinsonGasI.H | 4 +- .../adiabaticPerfectFluid.C | 5 ++- .../adiabaticPerfectFluid.H | 4 +- .../adiabaticPerfectFluidI.H | 4 +- .../icoPolynomial/icoPolynomial.C | 10 +++-- .../icoPolynomial/icoPolynomial.H | 4 +- .../icoPolynomial/icoPolynomialI.H | 4 +- .../icoTabulated/icoTabulated.C | 10 +++-- .../icoTabulated/icoTabulated.H | 9 ++-- .../icoTabulated/icoTabulatedI.H | 4 +- .../incompressiblePerfectGas.C | 5 ++- .../incompressiblePerfectGas.H | 4 +- .../incompressiblePerfectGasI.H | 3 +- .../specie/equationOfState/linear/linear.C | 6 +-- .../specie/equationOfState/linear/linear.H | 4 +- .../specie/equationOfState/linear/linearI.H | 4 +- .../perfectFluid/perfectFluid.C | 10 +++-- .../perfectFluid/perfectFluid.H | 4 +- .../perfectFluid/perfectFluidI.H | 4 +- .../equationOfState/perfectGas/perfectGas.C | 6 +-- .../equationOfState/perfectGas/perfectGas.H | 4 +- .../equationOfState/perfectGas/perfectGasI.H | 4 +- .../equationOfState/rPolynomial/rPolynomial.C | 10 +++-- .../equationOfState/rPolynomial/rPolynomial.H | 17 ++++---- .../rPolynomial/rPolynomialI.H | 4 +- .../equationOfState/rhoConst/rhoConst.C | 6 +-- .../equationOfState/rhoConst/rhoConst.H | 6 +-- .../equationOfState/rhoConst/rhoConstI.H | 6 +-- .../rhoTabulated/rhoTabulated.C | 10 +++-- .../rhoTabulated/rhoTabulated.H | 9 ++-- .../rhoTabulated/rhoTabulatedI.H | 4 +- .../specie/specie/specie.C | 6 +-- .../specie/specie/specie.H | 6 +-- .../absoluteEnthalpy/absoluteEnthalpy.H | 3 +- .../absoluteInternalEnergy.H | 3 +- .../specie/thermo/eConst/eConstThermo.C | 10 +++-- .../specie/thermo/eConst/eConstThermo.H | 13 +++--- .../specie/thermo/eConst/eConstThermoI.H | 4 +- .../eIcoTabulated/eIcoTabulatedThermo.C | 5 ++- .../eIcoTabulated/eIcoTabulatedThermo.H | 11 +++-- .../thermo/ePolynomial/ePolynomialThermo.C | 5 ++- .../thermo/ePolynomial/ePolynomialThermo.H | 6 +-- .../thermo/ePolynomial/ePolynomialThermoI.H | 6 +-- .../specie/thermo/ePower/ePowerThermo.C | 5 ++- .../specie/thermo/ePower/ePowerThermo.H | 14 +++---- .../specie/thermo/ePower/ePowerThermoI.H | 30 ++++++------- .../thermo/eTabulated/eTabulatedThermo.C | 5 ++- .../thermo/eTabulated/eTabulatedThermo.H | 11 +++-- .../specie/thermo/hConst/hConstThermo.C | 10 +++-- .../specie/thermo/hConst/hConstThermo.H | 13 +++--- .../specie/thermo/hConst/hConstThermoI.H | 4 +- .../hIcoTabulated/hIcoTabulatedThermo.C | 5 ++- .../hIcoTabulated/hIcoTabulatedThermo.H | 11 +++-- .../thermo/hPolynomial/hPolynomialThermo.C | 5 ++- .../thermo/hPolynomial/hPolynomialThermo.H | 15 +++---- .../thermo/hPolynomial/hPolynomialThermoI.H | 6 +-- .../specie/thermo/hPower/hPowerThermo.C | 5 ++- .../specie/thermo/hPower/hPowerThermo.H | 14 +++---- .../specie/thermo/hPower/hPowerThermoI.H | 30 ++++++------- .../thermo/hTabulated/hTabulatedThermo.C | 5 ++- .../thermo/hTabulated/hTabulatedThermo.H | 11 +++-- .../specie/thermo/janaf/janafThermo.C | 10 +++-- .../specie/thermo/janaf/janafThermo.H | 17 ++++++-- .../specie/thermo/janaf/janafThermoI.H | 42 +++++++++---------- .../sensibleEnthalpy/sensibleEnthalpy.H | 3 +- .../sensibleInternalEnergy.H | 3 +- .../specie/thermo/thermo/thermo.C | 10 +++-- .../specie/thermo/thermo/thermo.H | 12 +++--- .../transport/Andrade/AndradeTransport.C | 10 +++-- .../transport/Andrade/AndradeTransport.H | 20 +++++---- .../specie/transport/WLF/WLFTransport.C | 10 +++-- .../specie/transport/WLF/WLFTransport.H | 25 +++++------ .../specie/transport/const/constTransport.C | 10 +++-- .../specie/transport/const/constTransport.H | 13 +++--- .../icoTabulated/icoTabulatedTransport.C | 5 ++- .../icoTabulated/icoTabulatedTransport.H | 18 ++++---- .../logPolynomial/logPolynomialTransport.C | 5 ++- .../logPolynomial/logPolynomialTransport.H | 13 +++--- .../polynomial/polynomialTransport.C | 5 ++- .../polynomial/polynomialTransport.H | 13 +++--- .../sutherland/sutherlandTransport.C | 10 +++-- .../sutherland/sutherlandTransport.H | 16 ++++--- .../sutherland/sutherlandTransportI.H | 12 ++++-- .../transport/tabulated/tabulatedTransport.C | 5 ++- .../transport/tabulated/tabulatedTransport.H | 18 ++++---- .../thermophysicalPropertiesSelector.C | 27 +++++++++--- .../thermophysicalPropertiesSelector.H | 31 +++++++++++--- .../thermophysicalPropertiesSelectorI.H | 10 +++++ 116 files changed, 613 insertions(+), 516 deletions(-) diff --git a/applications/test/thermoMixture/Test-thermoMixture.C b/applications/test/thermoMixture/Test-thermoMixture.C index 2207cb69c3..c4b1a9eabf 100644 --- a/applications/test/thermoMixture/Test-thermoMixture.C +++ b/applications/test/thermoMixture/Test-thermoMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,8 +55,8 @@ int main(int argc, char *argv[]) dictionary dict(IFstream("thermoDict")()); - ThermoType t1(dict.subDict("specie1")); - ThermoType t2(dict.subDict("specie2")); + ThermoType t1("specie1", dict.subDict("specie1")); + ThermoType t2("specie2", dict.subDict("specie2")); Info<< "Checking Cp of mixture of hConstThermo" << endl; diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index eab74385ef..d3d83f4c9e 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,48 +101,23 @@ int main(int argc, char *argv[]) scalar stoicCO2 = n; scalar stoicH2O = m/2.0; - thermo FUEL - ( - "fuel", - thermo(thermoData.subDict(fuelName)) - ); + thermo FUEL("fuel", thermoData.subDict(fuelName)); Info<< "fuel " << FUEL << ';' << endl; FUEL *= FUEL.W(); - thermo O2 - ( - "O2", - thermo(thermoData.subDict("O2")) - ); + thermo O2("O2", thermoData.subDict("O2")); O2 *= O2.W(); - thermo N2 - ( - "N2", - thermo(thermoData.subDict("N2")) - ); + thermo N2("N2", thermoData.subDict("N2")); N2 *= N2.W(); - thermo CO2 - ( - "CO2", - thermo(thermoData.subDict("CO2")) - ); + thermo CO2("CO2", thermoData.subDict("CO2")); CO2 *= CO2.W(); - thermo H2O - ( - "H2O", - thermo(thermoData.subDict("H2O")) - ); + thermo H2O("H2O", thermoData.subDict("H2O")); H2O *= H2O.W(); - thermo oxidant - ( - "oxidant", - stoicO2*O2 - + stoicN2*N2 - ); + thermo oxidant("oxidant", stoicO2*O2 + stoicN2*N2); Info<< "oxidant " << (1/oxidant.Y())*oxidant << ';' << endl; dimensionedScalar stoichiometricAirFuelMassRatio diff --git a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C index 081447a0d2..77117469bf 100644 --- a/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C +++ b/applications/utilities/thermophysical/equilibriumCO/equilibriumCO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,19 +77,19 @@ int main(int argc, char *argv[]) const scalar T = 3000.0; // Oxidant (mole-based) - thermo O2(thermoData.subDict("O2")); O2 *= O2.W(); - thermo N2(thermoData.subDict("N2")); N2 *= N2.W(); + thermo O2("O2", thermoData.subDict("O2")); O2 *= O2.W(); + thermo N2("N2", thermoData.subDict("N2")); N2 *= N2.W(); // Intermediates (mole-based) - thermo H2(thermoData.subDict("H2")); H2 *= H2.W(); - thermo OH(thermoData.subDict("OH")); OH *= OH.W(); - thermo H(thermoData.subDict("H")); H *= H.W(); - thermo O(thermoData.subDict("O")); O *= O.W(); + thermo H2("H2", thermoData.subDict("H2")); H2 *= H2.W(); + thermo OH("OH", thermoData.subDict("OH")); OH *= OH.W(); + thermo H("H", thermoData.subDict("H")); H *= H.W(); + thermo O("O", thermoData.subDict("O")); O *= O.W(); // Products (mole-based) - thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W(); - thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W(); - thermo CO(thermoData.subDict("CO")); CO *= CO.W(); + thermo CO2("CO2", thermoData.subDict("CO2")); CO2 *= CO2.W(); + thermo H2O("H2O", thermoData.subDict("H2O")); H2O *= H2O.W(); + thermo CO("CO", thermoData.subDict("CO")); CO *= CO.W(); SLPtrList EQreactions; diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 2230753f8a..506bb20bcb 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,19 +102,19 @@ int main(int argc, char *argv[]) << nl << endl; // Reactants (mole-based) - thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W(); + thermo FUEL(fuelName, thermoData.subDict(fuelName)); FUEL *= FUEL.W(); // Oxidant (mole-based) - thermo O2(thermoData.subDict("O2")); O2 *= O2.W(); - thermo N2(thermoData.subDict("N2")); N2 *= N2.W(); + thermo O2("O2", thermoData.subDict("O2")); O2 *= O2.W(); + thermo N2("N2", thermoData.subDict("N2")); N2 *= N2.W(); // Intermediates (mole-based) - thermo H2(thermoData.subDict("H2")); H2 *= H2.W(); + thermo H2("H2", thermoData.subDict("H2")); H2 *= H2.W(); // Products (mole-based) - thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W(); - thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W(); - thermo CO(thermoData.subDict("CO")); CO *= CO.W(); + thermo CO2("CO2", thermoData.subDict("CO2")); CO2 *= CO2.W(); + thermo H2O("H2O", thermoData.subDict("H2O")); H2O *= H2O.W(); + thermo CO("CO", thermoData.subDict("CO")); CO *= CO.W(); // Product dissociation reactions diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C index 6b11f4cdd3..40aa945d9c 100644 --- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C +++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,22 +97,38 @@ int main(int argc, char *argv[]) dictionary thermoData(thermoDataFile); - const thermo reactant0(thermoData.subDict(rMix[0].name())); + const thermo reactant0 + ( + rMix[0].name(), + thermoData.subDict(rMix[0].name()) + ); thermo reactants(rMix[0].volFrac()*reactant0.rho(p, T0)*reactant0); for (label i=1; i::solid() const { if (solidPtr_.empty()) { - solidPtr_.reset(new solidType(solidDict_)); + solidPtr_.reset(new solidType("solid", solidDict_)); } return solidPtr_(); diff --git a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.C b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.C index 76ce89753c..4f71ca4b46 100644 --- a/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.C +++ b/src/thermophysicalModels/basic/mixtures/pureMixture/pureMixture.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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Foam::pureMixture::pureMixture ) : basicMixture(thermoDict, mesh, phaseName), - mixture_(thermoDict.subDict("mixture")) + mixture_("mixture", thermoDict.subDict("mixture")) {} @@ -46,7 +46,7 @@ Foam::pureMixture::pureMixture template void Foam::pureMixture::read(const dictionary& thermoDict) { - mixture_ = ThermoType(thermoDict.subDict("mixture")); + mixture_ = ThermoType("mixture", thermoDict.subDict("mixture")); } diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/egrMixture/egrMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/egrMixture/egrMixture.C index f5db6dc46d..d53f4afb5d 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/egrMixture/egrMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/egrMixture/egrMixture.C @@ -51,9 +51,9 @@ Foam::egrMixture::egrMixture stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), - fuel_(thermoDict.subDict("fuel")), - oxidant_(thermoDict.subDict("oxidant")), - products_(thermoDict.subDict("burntProducts")), + fuel_("fuel", thermoDict.subDict("fuel")), + oxidant_("oxidant", thermoDict.subDict("oxidant")), + products_("burntProducts", thermoDict.subDict("burntProducts")), mixture_("mixture", fuel_), @@ -102,9 +102,10 @@ void Foam::egrMixture::read(const dictionary& thermoDict) { stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio"); - fuel_ = ThermoType(thermoDict.subDict("fuel")); - oxidant_ = ThermoType(thermoDict.subDict("oxidant")); - products_ = ThermoType(thermoDict.subDict("burntProducts")); + fuel_ = ThermoType("fuel", thermoDict.subDict("fuel")); + oxidant_ = ThermoType("oxidant", thermoDict.subDict("oxidant")); + products_ = + ThermoType("burntProducts", thermoDict.subDict("burntProducts")); } diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/homogeneousMixture/homogeneousMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/homogeneousMixture/homogeneousMixture.C index b59c98c5f3..c4de45e0c0 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/homogeneousMixture/homogeneousMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/homogeneousMixture/homogeneousMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,8 +50,8 @@ Foam::homogeneousMixture::homogeneousMixture phaseName ), - reactants_(thermoDict.subDict("reactants")), - products_(thermoDict.subDict("products")), + reactants_("reactants", thermoDict.subDict("reactants")), + products_("products", thermoDict.subDict("products")), mixture_("mixture", reactants_), b_(Y("b")) {} @@ -86,8 +86,8 @@ const ThermoType& Foam::homogeneousMixture::mixture template void Foam::homogeneousMixture::read(const dictionary& thermoDict) { - reactants_ = ThermoType(thermoDict.subDict("reactants")); - products_ = ThermoType(thermoDict.subDict("products")); + reactants_ = ThermoType("reactants", thermoDict.subDict("reactants")); + products_ = ThermoType("products", thermoDict.subDict("products")); } diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C index 77f584759d..6c1fd6ad58 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/inhomogeneousMixture/inhomogeneousMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,9 +56,9 @@ Foam::inhomogeneousMixture::inhomogeneousMixture stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), - fuel_(thermoDict.subDict("fuel")), - oxidant_(thermoDict.subDict("oxidant")), - products_(thermoDict.subDict("burntProducts")), + fuel_("fuel", thermoDict.subDict("fuel")), + oxidant_("oxidant", thermoDict.subDict("oxidant")), + products_("burntProducts", thermoDict.subDict("burntProducts")), mixture_("mixture", fuel_), @@ -100,9 +100,10 @@ void Foam::inhomogeneousMixture::read(const dictionary& thermoDict) { stoicRatio_ = thermoDict.lookup("stoichiometricAirFuelMassRatio"); - fuel_ = ThermoType(thermoDict.subDict("fuel")); - oxidant_ = ThermoType(thermoDict.subDict("oxidant")); - products_ = ThermoType(thermoDict.subDict("burntProducts")); + fuel_ = ThermoType("fuel", thermoDict.subDict("fuel")); + oxidant_ = ThermoType("oxidant", thermoDict.subDict("oxidant")); + products_ = + ThermoType("burntProducts", thermoDict.subDict("burntProducts")); } diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/multicomponentMixture/multicomponentMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/multicomponentMixture/multicomponentMixture.C index 3993a0b36b..1716e98c10 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/multicomponentMixture/multicomponentMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/multicomponentMixture/multicomponentMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ Foam::multicomponentMixture::readSpeciesData specieThermos.set ( i, - new ThermoType(thermoDict.subDict(species_[i])) + new ThermoType(species_[i], thermoDict.subDict(species_[i])) ); } diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/singleComponentMixture/singleComponentMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/singleComponentMixture/singleComponentMixture.C index 04f4642910..90e935bdb5 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/singleComponentMixture/singleComponentMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/singleComponentMixture/singleComponentMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Foam::singleComponentMixture::singleComponentMixture ) : basicSpecieMixture(thermoDict, wordList(), mesh, phaseName), - mixture_(thermoDict.subDict("mixture")) + mixture_("mixture", thermoDict.subDict("mixture")) {} @@ -55,7 +55,7 @@ void Foam::singleComponentMixture::read const dictionary& thermoDict ) { - mixture_ = ThermoType(thermoDict.subDict("mixture")); + mixture_ = ThermoType("mixture", thermoDict.subDict("mixture")); } diff --git a/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C b/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C index 6184f18b5e..dc3a4dd66e 100644 --- a/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C +++ b/src/thermophysicalModels/multicomponentThermo/mixtures/veryInhomogeneousMixture/veryInhomogeneousMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,9 +57,9 @@ Foam::veryInhomogeneousMixture::veryInhomogeneousMixture stoicRatio_(thermoDict.lookup("stoichiometricAirFuelMassRatio")), - fuel_(thermoDict.subDict("fuel")), - oxidant_(thermoDict.subDict("oxidant")), - products_(thermoDict.subDict("burntProducts")), + fuel_("fuel", thermoDict.subDict("fuel")), + oxidant_("oxidant", thermoDict.subDict("oxidant")), + products_("burntProducts", thermoDict.subDict("burntProducts")), mixture_("mixture", fuel_), @@ -102,9 +102,10 @@ void Foam::veryInhomogeneousMixture::read const dictionary& thermoDict ) { - fuel_ = ThermoType(thermoDict.subDict("fuel")); - oxidant_ = ThermoType(thermoDict.subDict("oxidant")); - products_ = ThermoType(thermoDict.subDict("burntProducts")); + fuel_ = ThermoType("fuel", thermoDict.subDict("fuel")); + oxidant_ = ThermoType("oxidant", thermoDict.subDict("oxidant")); + products_ = + ThermoType("burntProducts", thermoDict.subDict("burntProducts")); } diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.C b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.C index 6a5fe5ae13..d6aba48fb8 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.C +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::constAnisoSolidTransport::constAnisoSolidTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), kappa_(dict.subDict("transport").lookup("kappa")) {} diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.H b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.H index 0644427601..5da84e0a4c 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.H +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constAniso/constAnisoSolidTransport.H @@ -76,16 +76,13 @@ class constAnisoSolidTransport vector kappa_; - // Private Member Functions - - //- Construct from components - inline constAnisoSolidTransport(const Thermo& t, const vector kappa); - - public: // Constructors + //- Construct from components + inline constAnisoSolidTransport(const Thermo& t, const vector kappa); + //- Construct as named copy inline constAnisoSolidTransport ( @@ -93,8 +90,8 @@ public: const constAnisoSolidTransport& ); - //- Construct from dictionary - constAnisoSolidTransport(const dictionary&); + //- Construct from name and dictionary + constAnisoSolidTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.C b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.C index f4798301bb..71521ec0e1 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.C +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::constIsoSolidTransport::constIsoSolidTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), kappa_(dict.subDict("transport").lookup("kappa")) {} diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.H b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.H index 0edd08bb8f..967e107e1e 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.H +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/constIso/constIsoSolidTransport.H @@ -77,16 +77,13 @@ class constIsoSolidTransport scalar kappa_; - // Private Member Functions - - //- Construct from components - inline constIsoSolidTransport(const Thermo& t, const scalar kappa); - - public: // Constructors + //- Construct from components + inline constIsoSolidTransport(const Thermo& t, const scalar kappa); + //- Construct as named copy inline constIsoSolidTransport ( @@ -94,8 +91,8 @@ public: const constIsoSolidTransport& ); - //- Construct from dictionary - constIsoSolidTransport(const dictionary& dict); + //- Construct from name and dictionary + constIsoSolidTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.C b/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.C index ec321619e9..14d0f6d56f 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.C +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::exponentialSolidTransport::exponentialSolidTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), kappa0_(0.0), n0_(0.0), Tref_(0.0) diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.H index 9defc7ddaf..e8845c9dec 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/exponential/exponentialSolidTransport.H @@ -80,7 +80,9 @@ class exponentialSolidTransport scalar Tref_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline exponentialSolidTransport @@ -91,11 +93,6 @@ class exponentialSolidTransport const scalar Tref ); - -public: - - // Constructors - //- Construct as named copy inline exponentialSolidTransport ( @@ -103,8 +100,8 @@ public: const exponentialSolidTransport& ); - //- Construct from dictionary - exponentialSolidTransport(const dictionary&); + //- Construct from name and dictionary + exponentialSolidTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.C b/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.C index 1cfa91fa1c..c2c06badec 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.C +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::polynomialSolidTransport::polynomialSolidTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), kappaCoeffs_ ( dict.subDict("transport").lookup diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.H index 5f4b95f3c5..21fbb68020 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.H +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/polynomial/polynomialSolidTransport.H @@ -113,7 +113,9 @@ class polynomialSolidTransport Polynomial kappaCoeffs_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline polynomialSolidTransport @@ -122,11 +124,6 @@ class polynomialSolidTransport const Polynomial& kappaPoly ); - -public: - - // Constructors - //- Construct as named copy inline polynomialSolidTransport ( @@ -134,8 +131,8 @@ public: const polynomialSolidTransport& ); - //- Construct from dictionary - polynomialSolidTransport(const dictionary& dict); + //- Construct from name and dictionary + polynomialSolidTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.C b/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.C index a79e827bb4..9656460b45 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.C +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::tabulatedSolidTransport::tabulatedSolidTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), kappa_("kappa", dict.subDict("transport").subDict("kappa")) {} diff --git a/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.H b/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.H index 69f66cf526..95bec049f9 100644 --- a/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.H +++ b/src/thermophysicalModels/solidThermo/solidSpecie/transport/tabulated/tabulatedSolidTransport.H @@ -101,7 +101,9 @@ class tabulatedSolidTransport nonUniformTable kappa_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline tabulatedSolidTransport @@ -110,11 +112,6 @@ class tabulatedSolidTransport const nonUniformTable& kappa ); - -public: - - // Constructors - //- Construct as named copy inline tabulatedSolidTransport ( @@ -122,8 +119,8 @@ public: const tabulatedSolidTransport& ); - //- Construct from dictionary - tabulatedSolidTransport(const dictionary&); + //- Construct from name and dictionary + tabulatedSolidTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C index 4bbbfd62b3..51ff11966a 100644 --- a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C +++ b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::Boussinesq::Boussinesq ( + const word& name, const dictionary& dict ) : - Specie(dict), + Specie(name, dict), rho0_(dict.subDict("equationOfState").lookup("rho0")), T0_(dict.subDict("equationOfState").lookup("T0")), beta_(dict.subDict("equationOfState").lookup("beta")) diff --git a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H index e7128daa92..aa01390adb 100644 --- a/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H +++ b/src/thermophysicalModels/specie/equationOfState/Boussinesq/Boussinesq.H @@ -136,8 +136,8 @@ public: const scalar beta ); - //- Construct from dictionary - Boussinesq(const dictionary& dict); + //- Construct from name and dictionary + Boussinesq(const word& name, const dictionary& dict); //- Construct as named copy inline Boussinesq diff --git a/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H b/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H index fa0f3ab96d..5d0c61f8fe 100644 --- a/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H +++ b/src/thermophysicalModels/specie/equationOfState/Boussinesq/BoussinesqI.H @@ -31,7 +31,10 @@ License template inline Foam::Boussinesq::Boussinesq ( - const Specie& sp, const scalar rho0, const scalar T0, const scalar beta + const Specie& sp, + const scalar rho0, + const scalar T0, + const scalar beta ) : Specie(sp), diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C index 8387b41cce..ff6a1dbf2b 100644 --- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C +++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::PengRobinsonGas::PengRobinsonGas ( + const word& name, const dictionary& dict ) : - Specie(dict), + Specie(name, dict), Tc_(dict.subDict("equationOfState").lookup("Tc")), Vc_(dict.subDict("equationOfState").lookup("Vc")), Zc_(1.0), diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H index d438f26fa8..8a5808362f 100644 --- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H +++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGas.H @@ -144,8 +144,8 @@ public: const scalar& omega ); - //- Construct from dictionary - PengRobinsonGas(const dictionary& dict); + //- Construct from name and dictionary + PengRobinsonGas(const word& name, const dictionary& dict); //- Construct as named copy inline PengRobinsonGas(const word& name, const PengRobinsonGas&); diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H index 57410d2ae9..6ed3a01767 100644 --- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H @@ -26,7 +26,7 @@ License #include "PengRobinsonGas.H" #include "mathematicalConstants.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::PengRobinsonGas::PengRobinsonGas @@ -48,8 +48,6 @@ inline Foam::PengRobinsonGas::PengRobinsonGas {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::PengRobinsonGas::PengRobinsonGas ( diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C index 021575c033..1309f7925b 100644 --- a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::adiabaticPerfectFluid::adiabaticPerfectFluid ( + const word& name, const dictionary& dict ) : - Specie(dict), + Specie(name, dict), p0_(dict.subDict("equationOfState").lookup("p0")), rho0_(dict.subDict("equationOfState").lookup("rho0")), gamma_(dict.subDict("equationOfState").lookup("gamma")), diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H index b0c2cb6b26..df0b2298bc 100644 --- a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H @@ -143,8 +143,8 @@ public: const scalar B ); - //- Construct from dictionary - adiabaticPerfectFluid(const dictionary& dict); + //- Construct from name and dictionary + adiabaticPerfectFluid(const word& name, const dictionary& dict); //- Construct as named copy inline adiabaticPerfectFluid diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H index 86097ec144..95b60b37cd 100644 --- a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H @@ -25,7 +25,7 @@ License #include "adiabaticPerfectFluid.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::adiabaticPerfectFluid::adiabaticPerfectFluid @@ -45,8 +45,6 @@ inline Foam::adiabaticPerfectFluid::adiabaticPerfectFluid {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::adiabaticPerfectFluid::adiabaticPerfectFluid ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C index 3c6987e471..c073eb18b5 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::icoPolynomial::icoPolynomial(const dictionary& dict) +Foam::icoPolynomial::icoPolynomial +( + const word& name, + const dictionary& dict +) : - Specie(dict), + Specie(name, dict), rhoCoeffs_ ( dict.subDict("equationOfState").lookup diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index f1c52dce5b..d18179889b 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -131,8 +131,8 @@ public: const Polynomial& rhoPoly ); - //- Construct from dictionary - icoPolynomial(const dictionary& dict); + //- Construct from name and dictionary + icoPolynomial(const word& name, const dictionary& dict); //- Construct as named copy inline icoPolynomial(const word& name, const icoPolynomial&); diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H index f841e8ed63..919df2ff96 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H @@ -25,7 +25,7 @@ License #include "icoPolynomial.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::icoPolynomial::icoPolynomial @@ -39,8 +39,6 @@ inline Foam::icoPolynomial::icoPolynomial {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::icoPolynomial::icoPolynomial ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.C b/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.C index be3ad45b1d..213d9e31ac 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.C +++ b/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::icoTabulated::icoTabulated(const dictionary& dict) +Foam::icoTabulated::icoTabulated +( + const word& name, + const dictionary& dict +) : - Specie(dict), + Specie(name, dict), rho_("rho", dict.subDict("equationOfState").subDict("rho")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.H b/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.H index b19e163e2b..9405f1d90c 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.H +++ b/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulated.H @@ -91,7 +91,10 @@ class icoTabulated : public Specie { - typedef Function1s::NonUniformTable nonUniformTable; + // Private Typedefs + + //- Table type + typedef Function1s::NonUniformTable nonUniformTable; // Private Data @@ -111,8 +114,8 @@ public: const nonUniformTable& rho ); - //- Construct from dictionary - icoTabulated(const dictionary& dict); + //- Construct from name and dictionary + icoTabulated(const word& name, const dictionary& dict); //- Construct as named copy inline icoTabulated(const word& name, const icoTabulated&); diff --git a/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulatedI.H b/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulatedI.H index fb9022373a..df8b0e51b4 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulatedI.H +++ b/src/thermophysicalModels/specie/equationOfState/icoTabulated/icoTabulatedI.H @@ -25,7 +25,7 @@ License #include "icoTabulated.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::icoTabulated::icoTabulated @@ -39,8 +39,6 @@ inline Foam::icoTabulated::icoTabulated {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::icoTabulated::icoTabulated ( diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C index dd739d7dc4..a79a5a9eba 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::incompressiblePerfectGas::incompressiblePerfectGas ( + const word& name, const dictionary& dict ) : - Specie(dict), + Specie(name, dict), pRef_(dict.subDict("equationOfState").lookup("pRef")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index 5b1aca27bd..a92397da45 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H @@ -118,8 +118,8 @@ public: //- Construct from components inline incompressiblePerfectGas(const Specie& sp, const scalar pRef); - //- Construct from dictionary - incompressiblePerfectGas(const dictionary& dict); + //- Construct from name and dictionary + incompressiblePerfectGas(const word& name, const dictionary& dict); //- Construct as named copy inline incompressiblePerfectGas diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index 31a34cd313..ecad482827 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -31,7 +31,8 @@ License template inline Foam::incompressiblePerfectGas::incompressiblePerfectGas ( - const Specie& sp, const scalar pRef + const Specie& sp, + const scalar pRef ) : Specie(sp), diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linear.C b/src/thermophysicalModels/specie/equationOfState/linear/linear.C index 2515b38fb2..eaff9f3c72 100644 --- a/src/thermophysicalModels/specie/equationOfState/linear/linear.C +++ b/src/thermophysicalModels/specie/equationOfState/linear/linear.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,9 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::linear::linear(const dictionary& dict) +Foam::linear::linear(const word& name, const dictionary& dict) : - Specie(dict), + Specie(name, dict), psi_(dict.subDict("equationOfState").lookup("psi")), rho0_(dict.subDict("equationOfState").lookup("rho0")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linear.H b/src/thermophysicalModels/specie/equationOfState/linear/linear.H index aeaf3df4c6..97d6df3ba0 100644 --- a/src/thermophysicalModels/specie/equationOfState/linear/linear.H +++ b/src/thermophysicalModels/specie/equationOfState/linear/linear.H @@ -129,8 +129,8 @@ public: const scalar rho0 ); - //- Construct from dictionary - linear(const dictionary& dict); + //- Construct from name and dictionary + linear(const word& name, const dictionary& dict); //- Construct as named copy inline linear(const word& name, const linear&); diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linearI.H b/src/thermophysicalModels/specie/equationOfState/linear/linearI.H index 8ec0a454c7..f8d69da15e 100644 --- a/src/thermophysicalModels/specie/equationOfState/linear/linearI.H +++ b/src/thermophysicalModels/specie/equationOfState/linear/linearI.H @@ -25,7 +25,7 @@ License #include "linear.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::linear::linear @@ -41,8 +41,6 @@ inline Foam::linear::linear {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::linear::linear ( diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C index c7c7ad0b84..2a45d23626 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C +++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::perfectFluid::perfectFluid(const dictionary& dict) +Foam::perfectFluid::perfectFluid +( + const word& name, + const dictionary& dict +) : - Specie(dict), + Specie(name, dict), R_(dict.subDict("equationOfState").lookup("R")), rho0_(dict.subDict("equationOfState").lookup("rho0")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H index 67024bae91..7b738b2183 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluid.H @@ -133,8 +133,8 @@ public: const scalar rho0 ); - //- Construct from dictionary - perfectFluid(const dictionary& dict); + //- Construct from name and dictionary + perfectFluid(const word& name, const dictionary& dict); //- Construct as named copy inline perfectFluid(const word& name, const perfectFluid&); diff --git a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H index 57ab720116..643b461cfe 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectFluid/perfectFluidI.H @@ -25,7 +25,7 @@ License #include "perfectFluid.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::perfectFluid::perfectFluid @@ -41,8 +41,6 @@ inline Foam::perfectFluid::perfectFluid {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::perfectFluid::perfectFluid ( diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.C b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.C index 3be090af4f..d0ca3deb3c 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.C +++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,9 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::perfectGas::perfectGas(const dictionary& dict) +Foam::perfectGas::perfectGas(const word& name, const dictionary& dict) : - Specie(dict) + Specie(name, dict) {} diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H index 3b10a4ea2c..46fcb16d2e 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGas.H @@ -103,8 +103,8 @@ public: //- Construct from components inline perfectGas(const Specie& sp); - //- Construct from dictionary - perfectGas(const dictionary& dict); + //- Construct from name and dictionary + perfectGas(const word& name, const dictionary& dict); //- Construct as named copy inline perfectGas(const word& name, const perfectGas&); diff --git a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H index 94c539978e..6e2416a53e 100644 --- a/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H @@ -25,7 +25,7 @@ License #include "perfectGas.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::perfectGas::perfectGas(const Specie& sp) @@ -34,8 +34,6 @@ inline Foam::perfectGas::perfectGas(const Specie& sp) {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::perfectGas::perfectGas ( diff --git a/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.C b/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.C index 633e34e585..e6ce31a722 100644 --- a/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.C +++ b/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::rPolynomial::rPolynomial(const dictionary& dict) +Foam::rPolynomial::rPolynomial +( + const word& name, + const dictionary& dict +) : - Specie(dict), + Specie(name, dict), C_(dict.subDict("equationOfState").lookup("C")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.H b/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.H index 0ad7776c6f..8ed1fb32b1 100644 --- a/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomial.H @@ -111,13 +111,14 @@ class rPolynomial : public Specie { - // Private Data + // Private Classes + //- Coefficient list class class coeffList : public VectorSpace { - public: + public: // Constructors @@ -133,6 +134,8 @@ class rPolynomial }; + // Private Data + //- Density coefficients coeffList C_; @@ -142,14 +145,10 @@ public: // Constructors //- Construct from components - inline rPolynomial - ( - const Specie& sp, - const coeffList& coeffs - ); + inline rPolynomial(const Specie& sp, const coeffList& coeffs); - //- Construct from dictionary - rPolynomial(const dictionary& dict); + //- Construct from name and dictionary + rPolynomial(const word& name, const dictionary& dict); //- Construct as named copy inline rPolynomial(const word& name, const rPolynomial&); diff --git a/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomialI.H index abe47bb3c4..e888cfc897 100644 --- a/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomialI.H +++ b/src/thermophysicalModels/specie/equationOfState/rPolynomial/rPolynomialI.H @@ -25,7 +25,7 @@ License #include "rPolynomial.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::rPolynomial::rPolynomial @@ -39,8 +39,6 @@ inline Foam::rPolynomial::rPolynomial {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::rPolynomial::rPolynomial ( diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C index af3e3b2fb8..c6c8f93aa7 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C +++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,9 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::rhoConst::rhoConst(const dictionary& dict) +Foam::rhoConst::rhoConst(const word& name, const dictionary& dict) : - Specie(dict), + Specie(name, dict), rho_(dict.subDict("equationOfState").lookup("rho")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H index ae6bac0d69..bfaa8d08b7 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H +++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConst.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,8 +113,8 @@ public: //- Construct from components inline rhoConst(const Specie& sp, const scalar rho); - //- Construct from dictionary - rhoConst(const dictionary& dict); + //- Construct from name and dictionary + rhoConst(const word& name, const dictionary& dict); //- Construct as named copy inline rhoConst(const word& name, const rhoConst&); diff --git a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H index 4ac51e895e..35ed75f986 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H +++ b/src/thermophysicalModels/specie/equationOfState/rhoConst/rhoConstI.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "rhoConst.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::rhoConst::rhoConst @@ -39,8 +39,6 @@ inline Foam::rhoConst::rhoConst {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::rhoConst::rhoConst ( diff --git a/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.C b/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.C index 2fd47ca258..f1c6f3496a 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.C +++ b/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::rhoTabulated::rhoTabulated(const dictionary& dict) +Foam::rhoTabulated::rhoTabulated +( + const word& name, + const dictionary& dict +) : - Specie(dict), + Specie(name, dict), rho_("rho", dict.subDict("equationOfState").subDict("rho")) {} diff --git a/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.H b/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.H index fffcc7d327..549170d0da 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.H +++ b/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulated.H @@ -128,7 +128,10 @@ class rhoTabulated : public Specie { - typedef Function2s::UniformTable table2D; + // Private Typedefs + + //- Table type + typedef Function2s::UniformTable table2D; // Private Data @@ -148,8 +151,8 @@ public: const table2D& rho ); - //- Construct from dictionary - rhoTabulated(const dictionary& dict); + //- Construct from name and dictionary + rhoTabulated(const word& name, const dictionary& dict); //- Construct as named copy inline rhoTabulated(const word& name, const rhoTabulated&); diff --git a/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulatedI.H b/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulatedI.H index 4ed747c86e..cb5a1e9896 100644 --- a/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulatedI.H +++ b/src/thermophysicalModels/specie/equationOfState/rhoTabulated/rhoTabulatedI.H @@ -25,7 +25,7 @@ License #include "rhoTabulated.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::rhoTabulated::rhoTabulated @@ -39,8 +39,6 @@ inline Foam::rhoTabulated::rhoTabulated {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::rhoTabulated::rhoTabulated ( diff --git a/src/thermophysicalModels/specie/specie/specie.C b/src/thermophysicalModels/specie/specie/specie.C index 8eddb0a919..00277b32de 100644 --- a/src/thermophysicalModels/specie/specie/specie.C +++ b/src/thermophysicalModels/specie/specie/specie.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,9 +36,9 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::specie::specie(const dictionary& dict) +Foam::specie::specie(const word& name, const dictionary& dict) : - name_(dict.dictName()), + name_(name), Y_(dict.subDict("specie").lookupOrDefault("massFraction", 1.0)), molWeight_(dict.subDict("specie").lookup("molWeight")) {} diff --git a/src/thermophysicalModels/specie/specie/specie.H b/src/thermophysicalModels/specie/specie/specie.H index 55892d43a8..5fda802fc4 100644 --- a/src/thermophysicalModels/specie/specie/specie.H +++ b/src/thermophysicalModels/specie/specie/specie.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,8 +99,8 @@ public: //- Construct as named copy inline specie(const word& name, const specie&); - //- Construct from dictionary - specie(const dictionary& dict); + //- Construct from name and dictionary + specie(const word& name, const dictionary& dict); //- Copy constructor specie(const specie&) = default; diff --git a/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H b/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H index 9dfd7bf3f8..630bc8fe46 100644 --- a/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H +++ b/src/thermophysicalModels/specie/thermo/absoluteEnthalpy/absoluteEnthalpy.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,6 +62,7 @@ public: return "absoluteEnthalpy"; } + // Fundamental properties static bool enthalpy() diff --git a/src/thermophysicalModels/specie/thermo/absoluteInternalEnergy/absoluteInternalEnergy.H b/src/thermophysicalModels/specie/thermo/absoluteInternalEnergy/absoluteInternalEnergy.H index f5320016a6..48ad0c83d0 100644 --- a/src/thermophysicalModels/specie/thermo/absoluteInternalEnergy/absoluteInternalEnergy.H +++ b/src/thermophysicalModels/specie/thermo/absoluteInternalEnergy/absoluteInternalEnergy.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,6 +63,7 @@ public: return "absoluteInternalEnergy"; } + // Fundamental properties static bool enthalpy() diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C index 6ff4f7a177..aa16d9cbb8 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::eConstThermo::eConstThermo(const dictionary& dict) +Foam::eConstThermo::eConstThermo +( + const word& name, + const dictionary& dict +) : - EquationOfState(dict), + EquationOfState(name, dict), Cv_(dict.subDict("thermodynamics").lookup("Cv")), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Tref_(dict.subDict("thermodynamics").lookupOrDefault("Tref", Tstd)), diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H index 96b85f5f9a..9990e8e41b 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermo.H @@ -121,7 +121,9 @@ class eConstThermo scalar Esref_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline eConstThermo @@ -133,13 +135,8 @@ class eConstThermo const scalar Esref ); - -public: - - // Constructors - - //- Construct from dictionary - eConstThermo(const dictionary& dict); + //- Construct from name and dictionary + eConstThermo(const word& name, const dictionary& dict); //- Construct as named copy inline eConstThermo(const word&, const eConstThermo&); diff --git a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H index dfb143bc21..54d7eacfc0 100644 --- a/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H +++ b/src/thermophysicalModels/specie/thermo/eConst/eConstThermoI.H @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::eConstThermo::eConstThermo @@ -43,8 +43,6 @@ inline Foam::eConstThermo::eConstThermo {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::eConstThermo::eConstThermo ( diff --git a/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.C b/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.C index d1ce392895..41768068f1 100644 --- a/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.C +++ b/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::eIcoTabulatedThermo::eIcoTabulatedThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Sf_(dict.subDict("thermodynamics").lookup("Sf")), Cv_("Cv", dict.subDict("thermodynamics").subDict("Cv")) diff --git a/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.H b/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.H index b756d2f242..762c05bccb 100644 --- a/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.H +++ b/src/thermophysicalModels/specie/thermo/eIcoTabulated/eIcoTabulatedThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,7 +95,10 @@ class eIcoTabulatedThermo : public EquationOfState { - typedef Function1s::integratedNonUniformTable integratedNonUniformTable; + // Private Typedefs + + //- Table type + typedef Function1s::integratedNonUniformTable integratedNonUniformTable; // Private Data @@ -114,8 +117,8 @@ public: // Constructors - //- Construct from dictionary - eIcoTabulatedThermo(const dictionary& dict); + //- Construct from name and dictionary + eIcoTabulatedThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline eIcoTabulatedThermo(const word&, const eIcoTabulatedThermo&); diff --git a/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.C b/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.C index 5412729174..359faca30b 100644 --- a/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.C +++ b/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::ePolynomialThermo::ePolynomialThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Sf_(dict.subDict("thermodynamics").lookup("Sf")), CvCoeffs_ diff --git a/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.H b/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.H index 0cc6f4867b..da18d3b9e1 100644 --- a/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -161,8 +161,8 @@ public: // Constructors - //- Construct from dictionary - ePolynomialThermo(const dictionary& dict); + //- Construct from name and dictionary + ePolynomialThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline ePolynomialThermo(const word&, const ePolynomialThermo&); diff --git a/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermoI.H index 5f3bb001b0..f2259641fb 100644 --- a/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/ePolynomial/ePolynomialThermoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "ePolynomialThermo.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::ePolynomialThermo::ePolynomialThermo @@ -47,8 +47,6 @@ inline Foam::ePolynomialThermo::ePolynomialThermo {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::ePolynomialThermo::ePolynomialThermo ( diff --git a/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.C b/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.C index e88c683c30..75be11439e 100644 --- a/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.C +++ b/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::ePowerThermo::ePowerThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), c0_(dict.subDict("thermodynamics").lookup("C0")), n0_(dict.subDict("thermodynamics").lookup("n0")), Tref_(dict.subDict("thermodynamics").lookup("Tref")), diff --git a/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.H b/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.H index 3bff72fe40..f9c72d0c98 100644 --- a/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.H +++ b/src/thermophysicalModels/specie/thermo/ePower/ePowerThermo.H @@ -126,6 +126,11 @@ class ePowerThermo //- Check given temperature is within the range of the fitted coeffs inline void checkT(const scalar T) const; + +public: + + // Constructors + //- Construct from components inline ePowerThermo ( @@ -136,13 +141,8 @@ class ePowerThermo const scalar Hf ); - -public: - - // Constructors - - //- Construct from dictionary - ePowerThermo(const dictionary&); + //- Construct from name and dictionary + ePowerThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline ePowerThermo diff --git a/src/thermophysicalModels/specie/thermo/ePower/ePowerThermoI.H b/src/thermophysicalModels/specie/thermo/ePower/ePowerThermoI.H index dbd8d61cd1..1b56a2eb1a 100644 --- a/src/thermophysicalModels/specie/thermo/ePower/ePowerThermoI.H +++ b/src/thermophysicalModels/specie/thermo/ePower/ePowerThermoI.H @@ -44,21 +44,6 @@ inline void Foam::ePowerThermo::checkT } -template -inline Foam::ePowerThermo::ePowerThermo -( - const word& name, - const ePowerThermo& jt -) -: - EquationOfState(name, jt), - c0_(jt.c0_), - n0_(jt.n0_), - Tref_(jt.Tref_), - Hf_(jt.Hf_) -{} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -79,6 +64,21 @@ inline Foam::ePowerThermo::ePowerThermo {} +template +inline Foam::ePowerThermo::ePowerThermo +( + const word& name, + const ePowerThermo& jt +) +: + EquationOfState(name, jt), + c0_(jt.c0_), + n0_(jt.n0_), + Tref_(jt.Tref_), + Hf_(jt.Hf_) +{} + + template inline Foam::autoPtr> Foam::ePowerThermo::clone() const diff --git a/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.C b/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.C index 3e39b01bd8..cb9f232e6b 100644 --- a/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.C +++ b/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::eTabulatedThermo::eTabulatedThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Sf_(dict.subDict("thermodynamics").lookup("Sf")), Es_("Es", dict.subDict("thermodynamics").subDict("Es")), diff --git a/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.H b/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.H index ff595cd447..cc0f0c41f0 100644 --- a/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.H +++ b/src/thermophysicalModels/specie/thermo/eTabulated/eTabulatedThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,7 +126,10 @@ class eTabulatedThermo : public EquationOfState { - typedef Function2s::UniformTable table2D; + // Private Typedefs + + //- Table type + typedef Function2s::UniformTable table2D; // Private Data @@ -151,8 +154,8 @@ public: // Constructors - //- Construct from dictionary - eTabulatedThermo(const dictionary& dict); + //- Construct from name and dictionary + eTabulatedThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline eTabulatedThermo(const word&, const eTabulatedThermo&); diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C index e42b30108e..7d0caa5fee 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.C +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::hConstThermo::hConstThermo(const dictionary& dict) +Foam::hConstThermo::hConstThermo +( + const word& name, + const dictionary& dict +) : - EquationOfState(dict), + EquationOfState(name, dict), Cp_(dict.subDict("thermodynamics").lookup("Cp")), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Tref_(dict.subDict("thermodynamics").lookupOrDefault("Tref", Tstd)), diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H index 661de8da71..8c5e4eef66 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermo.H @@ -121,7 +121,9 @@ class hConstThermo scalar Hsref_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline hConstThermo @@ -133,13 +135,8 @@ class hConstThermo const scalar Hsref ); - -public: - - // Constructors - - //- Construct from dictionary - hConstThermo(const dictionary& dict); + //- Construct from name and dictionary + hConstThermo(const word& name, const dictionary& dict); //- Construct as named copy inline hConstThermo(const word&, const hConstThermo&); diff --git a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H index a5b6b8f276..1a8dde2c52 100644 --- a/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hConst/hConstThermoI.H @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::hConstThermo::hConstThermo @@ -43,8 +43,6 @@ inline Foam::hConstThermo::hConstThermo {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::hConstThermo::hConstThermo ( diff --git a/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.C b/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.C index d474f47b57..e0a748c336 100644 --- a/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.C +++ b/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::hIcoTabulatedThermo::hIcoTabulatedThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Sf_(dict.subDict("thermodynamics").lookup("Sf")), Cp_("Cp", dict.subDict("thermodynamics").subDict("Cp")) diff --git a/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.H b/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.H index 6fea844d32..52a4abedca 100644 --- a/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.H +++ b/src/thermophysicalModels/specie/thermo/hIcoTabulated/hIcoTabulatedThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,7 +96,10 @@ class hIcoTabulatedThermo : public EquationOfState { - typedef Function1s::integratedNonUniformTable integratedNonUniformTable; + // Private Typedefs + + //- Table type + typedef Function1s::integratedNonUniformTable integratedNonUniformTable; // Private Data @@ -115,8 +118,8 @@ public: // Constructors - //- Construct from dictionary - hIcoTabulatedThermo(const dictionary& dict); + //- Construct from name and dictionary + hIcoTabulatedThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline hIcoTabulatedThermo(const word&, const hIcoTabulatedThermo&); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C index c3087cfe11..e91eca9e65 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::hPolynomialThermo::hPolynomialThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Sf_(dict.subDict("thermodynamics").lookup("Sf")), CpCoeffs_ diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index 4021d07be1..98e731265b 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -141,7 +141,9 @@ class hPolynomialThermo Polynomial sCoeffs_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline hPolynomialThermo @@ -154,13 +156,8 @@ class hPolynomialThermo const Polynomial& sCoeffs ); - -public: - - // Constructors - - //- Construct from dictionary - hPolynomialThermo(const dictionary& dict); + //- Construct from name and dictionary + hPolynomialThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline hPolynomialThermo(const word&, const hPolynomialThermo&); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index 27a9141dd6..72a22b4a7b 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,7 +25,7 @@ License #include "hPolynomialThermo.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::hPolynomialThermo::hPolynomialThermo @@ -47,8 +47,6 @@ inline Foam::hPolynomialThermo::hPolynomialThermo {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::hPolynomialThermo::hPolynomialThermo ( diff --git a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C index bf6a4e15b7..996308b1fd 100644 --- a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::hPowerThermo::hPowerThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), c0_(dict.subDict("thermodynamics").lookup("C0")), n0_(dict.subDict("thermodynamics").lookup("n0")), Tref_(dict.subDict("thermodynamics").lookup("Tref")), diff --git a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H index af8456a535..e066b64a5e 100644 --- a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermo.H @@ -123,6 +123,11 @@ class hPowerThermo //- Check given temperature is within the range of the fitted coeffs inline void checkT(const scalar T) const; + +public: + + // Constructors + //- Construct from components inline hPowerThermo ( @@ -133,13 +138,8 @@ class hPowerThermo const scalar Hf ); - -public: - - // Constructors - - //- Construct from dictionary - hPowerThermo(const dictionary&); + //- Construct from name and dictionary + hPowerThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline hPowerThermo diff --git a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H index d9dece2dde..6e676d4355 100644 --- a/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPower/hPowerThermoI.H @@ -44,21 +44,6 @@ inline void Foam::hPowerThermo::checkT } -template -inline Foam::hPowerThermo::hPowerThermo -( - const word& name, - const hPowerThermo& jt -) -: - EquationOfState(name, jt), - c0_(jt.c0_), - n0_(jt.n0_), - Tref_(jt.Tref_), - Hf_(jt.Hf_) -{} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -79,6 +64,21 @@ inline Foam::hPowerThermo::hPowerThermo {} +template +inline Foam::hPowerThermo::hPowerThermo +( + const word& name, + const hPowerThermo& jt +) +: + EquationOfState(name, jt), + c0_(jt.c0_), + n0_(jt.n0_), + Tref_(jt.Tref_), + Hf_(jt.Hf_) +{} + + template inline Foam::autoPtr> Foam::hPowerThermo::clone() const diff --git a/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.C b/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.C index 431778bd0d..690bad05d4 100644 --- a/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.C +++ b/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::hTabulatedThermo::hTabulatedThermo ( + const word& name, const dictionary& dict ) : - EquationOfState(dict), + EquationOfState(name, dict), Hf_(dict.subDict("thermodynamics").lookup("Hf")), Sf_(dict.subDict("thermodynamics").lookup("Sf")), Hs_("Hs", dict.subDict("thermodynamics").subDict("Hs")), diff --git a/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.H b/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.H index 5ed0accc3e..5fe60d3205 100644 --- a/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.H +++ b/src/thermophysicalModels/specie/thermo/hTabulated/hTabulatedThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,7 +126,10 @@ class hTabulatedThermo : public EquationOfState { - typedef Function2s::UniformTable table2D; + // Private Typedefs + + //- Table type + typedef Function2s::UniformTable table2D; // Private Data @@ -151,8 +154,8 @@ public: // Constructors - //- Construct from dictionary - hTabulatedThermo(const dictionary& dict); + //- Construct from name and dictionary + hTabulatedThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline hTabulatedThermo(const word&, const hTabulatedThermo&); diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C index a3f5a3e8ce..06d4449e1f 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,9 +57,13 @@ void Foam::janafThermo::checkInputData() const // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::janafThermo::janafThermo(const dictionary& dict) +Foam::janafThermo::janafThermo +( + const word& name, + const dictionary& dict +) : - EquationOfState(dict), + EquationOfState(name, dict), Tlow_(dict.subDict("thermodynamics").lookup("Tlow")), Thigh_(dict.subDict("thermodynamics").lookup("Thigh")), Tcommon_(dict.subDict("thermodynamics").lookup("Tcommon")), diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H index 0f4cc57069..22dd3809c8 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermo.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,9 +136,15 @@ class janafThermo public: - // Public data + // Public static data + //- Number of coefficients static const int nCoeffs_ = 7; + + + // Public typdefs + + //- Coefficient array type typedef FixedList coeffArray; @@ -149,7 +155,10 @@ private: // Temperature limits of applicability of functions scalar Tlow_, Thigh_, Tcommon_; + //- Cp coefficients for the high temperature range (Tcommon to Thigh) coeffArray highCpCoeffs_; + + //- Cp coefficients for the low temperature range (Tlow to Tcommon) coeffArray lowCpCoeffs_; @@ -178,8 +187,8 @@ public: const bool convertCoeffs = false ); - //- Construct from dictionary - janafThermo(const dictionary& dict); + //- Construct from name and dictionary + janafThermo(const word& name, const dictionary& dict); //- Construct as a named copy inline janafThermo(const word&, const janafThermo&); diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H index 67913c188e..6b45696660 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,6 +28,26 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +template +inline const typename Foam::janafThermo::coeffArray& +Foam::janafThermo::coeffs +( + const scalar T +) const +{ + if (T < Tcommon_) + { + return lowCpCoeffs_; + } + else + { + return highCpCoeffs_; + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + template inline Foam::janafThermo::janafThermo ( @@ -64,26 +84,6 @@ inline Foam::janafThermo::janafThermo } -template -inline const typename Foam::janafThermo::coeffArray& -Foam::janafThermo::coeffs -( - const scalar T -) const -{ - if (T < Tcommon_) - { - return lowCpCoeffs_; - } - else - { - return highCpCoeffs_; - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - template inline Foam::janafThermo::janafThermo ( diff --git a/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H b/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H index e8a4f59126..987cb6c627 100644 --- a/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H +++ b/src/thermophysicalModels/specie/thermo/sensibleEnthalpy/sensibleEnthalpy.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,6 +62,7 @@ public: return "sensibleEnthalpy"; } + // Fundamental properties static bool enthalpy() diff --git a/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H b/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H index 4248abe58c..2d8184e347 100644 --- a/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H +++ b/src/thermophysicalModels/specie/thermo/sensibleInternalEnergy/sensibleInternalEnergy.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,6 +63,7 @@ public: return "sensibleInternalEnergy"; } + // Fundamental properties static bool enthalpy() diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermo.C b/src/thermophysicalModels/specie/thermo/thermo/thermo.C index 63201b9d36..a1e92b430d 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermo.C +++ b/src/thermophysicalModels/specie/thermo/thermo/thermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,9 +37,13 @@ const int Foam::species::thermo::maxIter_ = 100; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template class Type> -Foam::species::thermo::thermo(const dictionary& dict) +Foam::species::thermo::thermo +( + const word& name, + const dictionary& dict +) : - Thermo(dict) + Thermo(name, dict) {} diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermo.H b/src/thermophysicalModels/specie/thermo/thermo/thermo.H index 62b6fb87a7..1c9aad7c91 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermo.H +++ b/src/thermophysicalModels/specie/thermo/thermo/thermo.H @@ -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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,8 +102,10 @@ class thermo public: - //- The thermodynamics of the individual species' - typedef thermo thermoType; + // Public Typedefs + + //- The thermodynamics of the individual species' + typedef thermo thermoType; // Constructors @@ -111,8 +113,8 @@ public: //- Construct from components inline thermo(const Thermo& sp); - //- Construct from dictionary - thermo(const dictionary& dict); + //- Construct from name and dictionary + thermo(const word& name, const dictionary& dict); //- Construct as named copy inline thermo(const word& name, const thermo&); diff --git a/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.C b/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.C index 4a4f702016..2362c276a4 100644 --- a/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.C +++ b/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::AndradeTransport::AndradeTransport(const dictionary& dict) +Foam::AndradeTransport::AndradeTransport +( + const word& name, + const dictionary& dict +) : - Thermo(dict), + Thermo(name, dict), muCoeffs_(dict.subDict("transport").lookup("muCoeffs")), kappaCoeffs_(dict.subDict("transport").lookup("kappaCoeffs")) {} diff --git a/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.H b/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.H index 03dbd79c7e..c7da30dc13 100644 --- a/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.H +++ b/src/thermophysicalModels/specie/transport/Andrade/AndradeTransport.H @@ -117,10 +117,14 @@ class AndradeTransport : public Thermo { - // Private Data + // Private Typedefs + //- Coefficient list type typedef FixedList coeffList; + + // Private Data + //- Dynamic viscosity coefficients coeffList muCoeffs_; @@ -128,7 +132,9 @@ class AndradeTransport coeffList kappaCoeffs_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline AndradeTransport @@ -138,20 +144,16 @@ class AndradeTransport const coeffList& kappaCoeffs ); - -public: - - // Constructors - //- Construct as named copy inline AndradeTransport + ( const word&, const AndradeTransport& ); - //- Construct from dictionary - AndradeTransport(const dictionary& dict); + //- Construct from name and dictionary + AndradeTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.C b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.C index 30247009f8..f130508a08 100644 --- a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.C +++ b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,9 +42,13 @@ Foam::scalar Foam::WLFTransport::readCoeff // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::WLFTransport::WLFTransport(const dictionary& dict) +Foam::WLFTransport::WLFTransport +( + const word& name, + const dictionary& dict +) : - Thermo(dict), + Thermo(name, dict), mu0_(readCoeff("mu0", dict)), Tr_(readCoeff("Tr", dict)), C1_(readCoeff("C1", dict)), diff --git a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H index 33b26d6a08..6ff03f3f87 100644 --- a/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H +++ b/src/thermophysicalModels/specie/transport/WLF/WLFTransport.H @@ -131,7 +131,15 @@ class WLFTransport scalar rPr_; - // Private Constructors + // Private Member Functions + + //- Read coefficient from dictionary + scalar readCoeff(const word& coeffName, const dictionary& dict); + + +public: + + // Constructors //- Construct from components inline WLFTransport @@ -144,22 +152,11 @@ class WLFTransport const scalar Pr ); - - // Private Member Functions - - //- Read coefficient from dictionary - scalar readCoeff(const word& coeffName, const dictionary& dict); - - -public: - - // Constructors - //- Construct as named copy inline WLFTransport(const word&, const WLFTransport&); - //- Construct from dictionary - WLFTransport(const dictionary& dict); + //- Construct from name and dictionary + WLFTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.C b/src/thermophysicalModels/specie/transport/const/constTransport.C index 2dccd62dbb..06166ba0ae 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.C +++ b/src/thermophysicalModels/specie/transport/const/constTransport.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-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,9 +29,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::constTransport::constTransport(const dictionary& dict) +Foam::constTransport::constTransport +( + const word& name, + const dictionary& dict +) : - Thermo(dict) + Thermo(name, dict) { const dictionary& transportDict = dict.subDict("transport"); diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 100933d2dd..f148eac999 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -107,7 +107,9 @@ class constTransport scalar kappa_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline constTransport @@ -119,16 +121,11 @@ class constTransport const scalar kappa ); - -public: - - // Constructors - //- Construct as named copy inline constTransport(const word&, const constTransport&); - //- Construct from dictionary - constTransport(const dictionary& dict); + //- Construct from name and dictionary + constTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.C b/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.C index 6d7e7265ba..eb36ab7825 100644 --- a/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.C +++ b/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::icoTabulatedTransport::icoTabulatedTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), mu_("mu", dict.subDict("transport").subDict("mu")), kappa_("kappa", dict.subDict("transport").subDict("kappa")) {} diff --git a/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.H b/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.H index 267ce35b48..585fcff42e 100644 --- a/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.H +++ b/src/thermophysicalModels/specie/transport/icoTabulated/icoTabulatedTransport.H @@ -97,7 +97,10 @@ class icoTabulatedTransport : public Thermo { - typedef Function1s::NonUniformTable nonUniformTable; + // Private Typedefs + + //- Table type + typedef Function1s::NonUniformTable nonUniformTable; // Private Data @@ -109,7 +112,9 @@ class icoTabulatedTransport nonUniformTable kappa_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline icoTabulatedTransport @@ -119,16 +124,11 @@ class icoTabulatedTransport const nonUniformTable& kappa ); - -public: - - // Constructors - //- Construct as named copy inline icoTabulatedTransport(const word&, const icoTabulatedTransport&); - //- Construct from dictionary - icoTabulatedTransport(const dictionary& dict); + //- Construct from name and dictionary + icoTabulatedTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C index 7d540c9900..157b46f104 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::logPolynomialTransport::logPolynomialTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), muCoeffs_ ( dict.subDict("transport").lookup diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H index 7fe7c1faa6..38674f6670 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H @@ -123,7 +123,9 @@ class logPolynomialTransport Polynomial kappaCoeffs_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline logPolynomialTransport @@ -133,11 +135,6 @@ class logPolynomialTransport const Polynomial& kappaPoly ); - -public: - - // Constructors - //- Construct as named copy inline logPolynomialTransport ( @@ -145,8 +142,8 @@ public: const logPolynomialTransport& ); - //- Construct from dictionary - logPolynomialTransport(const dictionary& dict); + //- Construct from name and dictionary + logPolynomialTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C index 29d1be6b34..5fb64db5ff 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::polynomialTransport::polynomialTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), muCoeffs_ ( dict.subDict("transport").lookup diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index 63339b12bc..35dc5fc153 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -122,7 +122,9 @@ class polynomialTransport Polynomial kappaCoeffs_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline polynomialTransport @@ -132,16 +134,11 @@ class polynomialTransport const Polynomial& kappaPoly ); - -public: - - // Constructors - //- Construct as named copy inline polynomialTransport(const word&, const polynomialTransport&); - //- Construct from dictionary - polynomialTransport(const dictionary& dict); + //- Construct from name and dictionary + polynomialTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C index 7e2117c0ac..3a8a2f4e74 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,9 +42,13 @@ Foam::scalar Foam::sutherlandTransport::readCoeff // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::sutherlandTransport::sutherlandTransport(const dictionary& dict) +Foam::sutherlandTransport::sutherlandTransport +( + const word& name, + const dictionary& dict +) : - Thermo(dict), + Thermo(name, dict), As_(readCoeff("As", dict)), Ts_(readCoeff("Ts", dict)) {} diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 40e94f73f1..27d9ba2d9d 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -114,8 +114,10 @@ class sutherlandTransport // given two viscosities and temperatures inline void calcCoeffs ( - const scalar mu1, const scalar T1, - const scalar mu2, const scalar T2 + const scalar mu1, + const scalar T1, + const scalar mu2, + const scalar T2 ); //- Read coefficient from dictionary @@ -138,15 +140,17 @@ public: inline sutherlandTransport ( const Thermo& t, - const scalar mu1, const scalar T1, - const scalar mu2, const scalar T2 + const scalar mu1, + const scalar T1, + const scalar mu2, + const scalar T2 ); //- Construct as named copy inline sutherlandTransport(const word&, const sutherlandTransport&); - //- Construct from dictionary - sutherlandTransport(const dictionary& dict); + //- Construct from name and dictionary + sutherlandTransport(const word& name, const dictionary& dict); //- Construct from base thermo and dictionary sutherlandTransport(const Thermo& t,const dictionary& dict); diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 56556d70b3..c36ee2e179 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -30,8 +30,10 @@ License template inline void Foam::sutherlandTransport::calcCoeffs ( - const scalar mu1, const scalar T1, - const scalar mu2, const scalar T2 + const scalar mu1, + const scalar T1, + const scalar mu2, + const scalar T2 ) { scalar rootT1 = sqrt(T1); @@ -64,8 +66,10 @@ template inline Foam::sutherlandTransport::sutherlandTransport ( const Thermo& t, - const scalar mu1, const scalar T1, - const scalar mu2, const scalar T2 + const scalar mu1, + const scalar T1, + const scalar mu2, + const scalar T2 ) : Thermo(t) diff --git a/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.C b/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.C index 20933a518f..9b704d4b36 100644 --- a/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.C +++ b/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,10 +31,11 @@ License template Foam::tabulatedTransport::tabulatedTransport ( + const word& name, const dictionary& dict ) : - Thermo(dict), + Thermo(name, dict), mu_("mu", dict.subDict("transport").subDict("mu")), kappa_("kappa", dict.subDict("transport").subDict("kappa")) {} diff --git a/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.H b/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.H index aa9d7624eb..cf27b6e05d 100644 --- a/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.H +++ b/src/thermophysicalModels/specie/transport/tabulated/tabulatedTransport.H @@ -117,7 +117,10 @@ class tabulatedTransport : public Thermo { - typedef Function2s::UniformTable table2D; + // Private Typedefs + + //- Table type + typedef Function2s::UniformTable table2D; // Private Data @@ -129,7 +132,9 @@ class tabulatedTransport table2D kappa_; - // Private Member Functions +public: + + // Constructors //- Construct from components inline tabulatedTransport @@ -139,16 +144,11 @@ class tabulatedTransport const table2D& kappaPoly ); - -public: - - // Constructors - //- Construct as named copy inline tabulatedTransport(const word&, const tabulatedTransport&); - //- Construct from dictionary - tabulatedTransport(const dictionary& dict); + //- Construct from name and dictionary + tabulatedTransport(const word& name, const dictionary& dict); //- Construct and return a clone inline autoPtr clone() const; diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.C b/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.C index 3f2de089b4..6dcaceca4b 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.C +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,6 +34,7 @@ thermophysicalPropertiesSelector const word& name ) : + name_(name), propertiesPtr_(ThermophysicalProperties::New(name)) {} @@ -42,22 +43,38 @@ template Foam::thermophysicalPropertiesSelector:: thermophysicalPropertiesSelector ( + const word& name, const dictionary& dict ) +: + name_(name) { - const word name(dict.first()->keyword()); + const word type(dict.first()->keyword()); - if (dict.isDict(name)) + if (dict.isDict(type)) { - propertiesPtr_ = ThermophysicalProperties::New(dict.subDict(name)); + propertiesPtr_ = ThermophysicalProperties::New(dict.subDict(type)); } else { - propertiesPtr_ = ThermophysicalProperties::New(name); + propertiesPtr_ = ThermophysicalProperties::New(type); } } +template +Foam::thermophysicalPropertiesSelector:: +thermophysicalPropertiesSelector +( + const word& name, + const thermophysicalPropertiesSelector& tps +) +: + name_(tps.name), + propertiesPtr_(tps.propertiesPtr_.clone()) +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.H b/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.H index 10ab3a327d..70161e45a9 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.H +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelector.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,6 +53,10 @@ class thermophysicalPropertiesSelector { // Private member data + //- Specie name + word name_; + + //- Properties model autoPtr propertiesPtr_; @@ -63,8 +67,19 @@ public: //- Construct from name thermophysicalPropertiesSelector(const word& name); - //- Construct from dictionary - thermophysicalPropertiesSelector(const dictionary& dict); + //- Construct from name and dictionary + thermophysicalPropertiesSelector + ( + const word& name, + const dictionary& dict + ); + + //- Construct as named copy + thermophysicalPropertiesSelector + ( + const word& name, + const thermophysicalPropertiesSelector& + ); // Static data @@ -89,8 +104,14 @@ public: + '>'; } - //- Return reference to the selected physical properties class - inline const ThermophysicalProperties& properties() const; + + // Access + + //- Return the specie name + inline const word& name() const; + + //- Return the physical properties model + inline const ThermophysicalProperties& properties() const; // Physical constants which define the specie diff --git a/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelectorI.H b/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelectorI.H index 9a2e2101fe..775d6a77c4 100644 --- a/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelectorI.H +++ b/src/thermophysicalModels/thermophysicalProperties/thermophysicalPropertiesSelector/thermophysicalPropertiesSelectorI.H @@ -23,8 +23,18 @@ License \*---------------------------------------------------------------------------*/ +#include "thermophysicalPropertiesSelector.H" + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template +inline const Foam::word& +Foam::thermophysicalPropertiesSelector::name() const +{ + return name_; +} + + template inline const ThermophysicalProperties& Foam::thermophysicalPropertiesSelector::