diff --git a/applications/solvers/df0DFoam/createFields.H b/applications/solvers/df0DFoam/createFields.H index 0d648ed84..cfe0c17f9 100644 --- a/applications/solvers/df0DFoam/createFields.H +++ b/applications/solvers/df0DFoam/createFields.H @@ -2,12 +2,11 @@ Info<< "Reading thermophysical properties\n" << endl; +CanteraMixture::setEnergyName("ha"); // fluidThermo* pThermo = new hePsiThermo(mesh, word::null); fluidThermo* pThermo = new heRhoThermo(mesh, word::null); fluidThermo& thermo = *pThermo; -// thermo.validate(args.executable(), "ha"); - volScalarField& p = thermo.p(); IOdictionary CanteraTorchProperties @@ -94,7 +93,6 @@ dfChemistryModel chemistry(thermo); PtrList& Y = chemistry.Y(); const word inertSpecie(chemistry.lookup("inertSpecie")); const label inertIndex(chemistry.species()[inertSpecie]); -chemistry.setEnergyName("ha"); chemistry.updateEnergy(); forAll(Y, i) diff --git a/applications/solvers/dfHighSpeedFoam/createFields.H b/applications/solvers/dfHighSpeedFoam/createFields.H index 08f1dfcd4..5a114cb4c 100644 --- a/applications/solvers/dfHighSpeedFoam/createFields.H +++ b/applications/solvers/dfHighSpeedFoam/createFields.H @@ -53,6 +53,7 @@ if((ddtSchemes != "RK2SSP") && (ddtSchemes != "RK3SSP")) Info<< "Reading thermophysical properties\n" << endl; +CanteraMixture::setEnergyName("ea"); // psiThermo* pThermo = new hePsiThermo(mesh, word::null); // psiThermo& thermo = *pThermo; rhoThermo* pThermo = new heRhoThermo(mesh, word::null); @@ -234,7 +235,6 @@ dfChemistryModel* chemistry = combustion->chemistry(); PtrList& Y = chemistry->Y(); const word inertSpecie(chemistry->lookup("inertSpecie")); const label inertIndex(chemistry->species()[inertSpecie]); -chemistry->setEnergyName("ea"); chemistry->updateEnergy(); volScalarField& ea = thermo.he(); diff --git a/applications/solvers/dfLowMachFoam/createFields.H b/applications/solvers/dfLowMachFoam/createFields.H index 444882e72..a1229a89f 100644 --- a/applications/solvers/dfLowMachFoam/createFields.H +++ b/applications/solvers/dfLowMachFoam/createFields.H @@ -3,11 +3,11 @@ Info<< "Reading thermophysical properties\n" << endl; +CanteraMixture::setEnergyName("ha"); // fluidThermo* pThermo = new hePsiThermo(mesh, word::null); fluidThermo* pThermo = new heRhoThermo(mesh, word::null); fluidThermo& thermo = *pThermo; -// thermo.validate(args.executable(), "ha"); - +Info<< "Readed thermophysical properties\n" << endl; SLGThermo slgThermo(mesh, thermo); const volScalarField& psi = thermo.psi(); @@ -100,7 +100,6 @@ forAll(Y, i) } const word inertSpecie(chemistry->lookup("inertSpecie")); const label inertIndex(chemistry->species()[inertSpecie]); -chemistry->setEnergyName("ha"); chemistry->updateEnergy(); diff --git a/applications/solvers/dfSprayFoam/createFields.H b/applications/solvers/dfSprayFoam/createFields.H index fde136839..79c9171d1 100644 --- a/applications/solvers/dfSprayFoam/createFields.H +++ b/applications/solvers/dfSprayFoam/createFields.H @@ -1,10 +1,11 @@ #include "readGravitationalAcceleration.H" Info<< "Reading thermophysical properties\n" << endl; + +CanteraMixture::setEnergyName("ha"); // fluidThermo* pThermo = new hePsiThermo(mesh, word::null); fluidThermo* pThermo = new heRhoThermo(mesh, word::null); fluidThermo& thermo = *pThermo; -// thermo.validate(args.executable(), "ha"); SLGThermo slgThermo(mesh, thermo); @@ -107,7 +108,6 @@ dfChemistryModel* chemistry = combustion->chemistry(); PtrList& Y = chemistry->Y(); const word inertSpecie(chemistry->lookup("inertSpecie")); const label inertIndex(chemistry->species()[inertSpecie]); -chemistry->setEnergyName("ha"); chemistry->updateEnergy(); if(combModelName!="ESF" && combModelName!="flareFGM" && combModelName!="DeePFGM" && combModelName!="FSD") diff --git a/src/TurbulenceModels/compressible/Make/files b/src/TurbulenceModels/compressible/Make/files index 4c2d7c9b9..8a1f0b7cc 100644 --- a/src/TurbulenceModels/compressible/Make/files +++ b/src/TurbulenceModels/compressible/Make/files @@ -1,4 +1,4 @@ -workDir = $(SRC_ORIG)/TurbulenceModels/compressible/ +workDir = $(SRC_ORIG)/TurbulenceModels/compressible $(workDir)/compressibleTurbulenceModel.C $(workDir)/turbulentFluidThermoModels/turbulentFluidThermoModels.C @@ -7,14 +7,14 @@ BCs = $(workDir)/turbulentFluidThermoModels/derivedFvPatchFields /*$(BCs)/temperatureCoupledBase/temperatureCoupledBase.C*/ /*$(BCs)/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C*/ /*$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C*/ -/*$(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C*/ +$(BCs)/totalFlowRateAdvectiveDiffusive/totalFlowRateAdvectiveDiffusiveFvPatchScalarField.C /*$(BCs)/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C*/ /*$(BCs)/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C*/ -/*$(BCs)/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C*/ +$(BCs)/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C /*$(BCs)/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C*/ -/*$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C*/ +$(BCs)/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C -$(workDir)turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C -/*turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C*/ +$(BCs)/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +$(BCs)//wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C LIB = $(DF_LIBBIN)/libdfCompressibleTurbulenceModels diff --git a/src/dfCanteraMixture/CanteraMixture.C b/src/dfCanteraMixture/CanteraMixture.C index 0460e2241..e652cbd32 100644 --- a/src/dfCanteraMixture/CanteraMixture.C +++ b/src/dfCanteraMixture/CanteraMixture.C @@ -26,6 +26,8 @@ License #include "CanteraMixture.H" #include "fvMesh.H" +Foam::word Foam::CanteraMixture::energyName_ = "InvalidEnergyName"; + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::CanteraMixture::CanteraMixture @@ -49,8 +51,7 @@ Foam::CanteraMixture::CanteraMixture CanteraMechanismFile_(fileName(CanteraTorchProperties_.lookup("CanteraMechanismFile")).expand()), transportModelName_(CanteraTorchProperties_.lookup("transportModel")), Tref_(mesh.objectRegistry::lookupObject("T")), - pref_(mesh.objectRegistry::lookupObject("p")), - energyName_("energy") + pref_(mesh.objectRegistry::lookupObject("p")) { if(!isFile(CanteraMechanismFile_)) { diff --git a/src/dfCanteraMixture/CanteraMixture.H b/src/dfCanteraMixture/CanteraMixture.H index 87e4b6165..9df7e9815 100644 --- a/src/dfCanteraMixture/CanteraMixture.H +++ b/src/dfCanteraMixture/CanteraMixture.H @@ -75,7 +75,7 @@ class CanteraMixture const volScalarField& Tref_; const volScalarField& pref_; mutable scalarList yTemp_; - word energyName_; + static word energyName_; //- Construct as copy (not implemented) CanteraMixture(const CanteraMixture&); @@ -346,7 +346,7 @@ public: //- Read dictionary void read(const dictionary&); - void setEnergyName(word name){energyName_=name;} + static void setEnergyName(word name){energyName_=name;} }; diff --git a/src/dfChemistryModel/dfChemistryModel.H b/src/dfChemistryModel/dfChemistryModel.H index 097aaa6d0..4e8850e51 100644 --- a/src/dfChemistryModel/dfChemistryModel.H +++ b/src/dfChemistryModel/dfChemistryModel.H @@ -108,7 +108,7 @@ public IOdictionary // species absolute enthalpy, [J/kg] PtrList hai_; // species chemistry enthalpy, [J/kg] - scalarList hc_; + scalarList hc_; // temp mass fraction mutable scalarList yTemp_; // temp mass diffusion coefficients @@ -313,7 +313,7 @@ public: const volScalarField& rhoD(const label i) const {return rhoD_[i];} const volScalarField& hai(const label i) {return hai_[i];} - + const scalar & hci(const label i) {return hc_[i];} // update T, psi, mu, alpha, rhoD, hai (if needed) @@ -323,9 +323,6 @@ public: const CanteraMixture& mixture() {return mixture_;} - void setEnergyName(word name){ - mixture_.setEnergyName(name); - } void updateEnergy() { scalarField& heCells = thermo_.he().primitiveFieldRef();