Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions applications/solvers/df0DFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

Info<< "Reading thermophysical properties\n" << endl;

CanteraMixture::setEnergyName("ha");
// fluidThermo* pThermo = new hePsiThermo<psiThermo, CanteraMixture>(mesh, word::null);
fluidThermo* pThermo = new heRhoThermo<rhoThermo, CanteraMixture>(mesh, word::null);
fluidThermo& thermo = *pThermo;

// thermo.validate(args.executable(), "ha");

volScalarField& p = thermo.p();

IOdictionary CanteraTorchProperties
Expand Down Expand Up @@ -94,7 +93,6 @@ dfChemistryModel<basicThermo> chemistry(thermo);
PtrList<volScalarField>& Y = chemistry.Y();
const word inertSpecie(chemistry.lookup("inertSpecie"));
const label inertIndex(chemistry.species()[inertSpecie]);
chemistry.setEnergyName("ha");
chemistry.updateEnergy();

forAll(Y, i)
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/dfHighSpeedFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ if((ddtSchemes != "RK2SSP") && (ddtSchemes != "RK3SSP"))

Info<< "Reading thermophysical properties\n" << endl;

CanteraMixture::setEnergyName("ea");
// psiThermo* pThermo = new hePsiThermo<psiThermo, CanteraMixture>(mesh, word::null);
// psiThermo& thermo = *pThermo;
rhoThermo* pThermo = new heRhoThermo<rhoThermo, CanteraMixture>(mesh, word::null);
Expand Down Expand Up @@ -234,7 +235,6 @@ dfChemistryModel<basicThermo>* chemistry = combustion->chemistry();
PtrList<volScalarField>& Y = chemistry->Y();
const word inertSpecie(chemistry->lookup("inertSpecie"));
const label inertIndex(chemistry->species()[inertSpecie]);
chemistry->setEnergyName("ea");
chemistry->updateEnergy();

volScalarField& ea = thermo.he();
Expand Down
5 changes: 2 additions & 3 deletions applications/solvers/dfLowMachFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

Info<< "Reading thermophysical properties\n" << endl;

CanteraMixture::setEnergyName("ha");
// fluidThermo* pThermo = new hePsiThermo<psiThermo, CanteraMixture>(mesh, word::null);
fluidThermo* pThermo = new heRhoThermo<rhoThermo, CanteraMixture>(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();
Expand Down Expand Up @@ -100,7 +100,6 @@ forAll(Y, i)
}
const word inertSpecie(chemistry->lookup("inertSpecie"));
const label inertIndex(chemistry->species()[inertSpecie]);
chemistry->setEnergyName("ha");
chemistry->updateEnergy();


Expand Down
4 changes: 2 additions & 2 deletions applications/solvers/dfSprayFoam/createFields.H
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include "readGravitationalAcceleration.H"

Info<< "Reading thermophysical properties\n" << endl;

CanteraMixture::setEnergyName("ha");
// fluidThermo* pThermo = new hePsiThermo<psiThermo, CanteraMixture>(mesh, word::null);
fluidThermo* pThermo = new heRhoThermo<rhoThermo, CanteraMixture>(mesh, word::null);
fluidThermo& thermo = *pThermo;
// thermo.validate(args.executable(), "ha");

SLGThermo slgThermo(mesh, thermo);

Expand Down Expand Up @@ -107,7 +108,6 @@ dfChemistryModel<basicThermo>* chemistry = combustion->chemistry();
PtrList<volScalarField>& 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")
Expand Down
12 changes: 6 additions & 6 deletions src/TurbulenceModels/compressible/Make/files
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
workDir = $(SRC_ORIG)/TurbulenceModels/compressible/
workDir = $(SRC_ORIG)/TurbulenceModels/compressible

$(workDir)/compressibleTurbulenceModel.C
$(workDir)/turbulentFluidThermoModels/turbulentFluidThermoModels.C
Expand All @@ -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
5 changes: 3 additions & 2 deletions src/dfCanteraMixture/CanteraMixture.C
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ License
#include "CanteraMixture.H"
#include "fvMesh.H"

Foam::word Foam::CanteraMixture::energyName_ = "InvalidEnergyName";

// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

Foam::CanteraMixture::CanteraMixture
Expand All @@ -49,8 +51,7 @@ Foam::CanteraMixture::CanteraMixture
CanteraMechanismFile_(fileName(CanteraTorchProperties_.lookup("CanteraMechanismFile")).expand()),
transportModelName_(CanteraTorchProperties_.lookup("transportModel")),
Tref_(mesh.objectRegistry::lookupObject<volScalarField>("T")),
pref_(mesh.objectRegistry::lookupObject<volScalarField>("p")),
energyName_("energy")
pref_(mesh.objectRegistry::lookupObject<volScalarField>("p"))
{
if(!isFile(CanteraMechanismFile_))
{
Expand Down
4 changes: 2 additions & 2 deletions src/dfCanteraMixture/CanteraMixture.H
Original file line number Diff line number Diff line change
Expand Up @@ -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&);
Expand Down Expand Up @@ -346,7 +346,7 @@ public:
//- Read dictionary
void read(const dictionary&);

void setEnergyName(word name){energyName_=name;}
static void setEnergyName(word name){energyName_=name;}
};


Expand Down
7 changes: 2 additions & 5 deletions src/dfChemistryModel/dfChemistryModel.H
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public IOdictionary
// species absolute enthalpy, [J/kg]
PtrList<volScalarField> hai_;
// species chemistry enthalpy, [J/kg]
scalarList hc_;
scalarList hc_;
// temp mass fraction
mutable scalarList yTemp_;
// temp mass diffusion coefficients
Expand Down Expand Up @@ -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)
Expand All @@ -323,9 +323,6 @@ public:

const CanteraMixture& mixture() {return mixture_;}

void setEnergyName(word name){
mixture_.setEnergyName(name);
}
void updateEnergy()
{
scalarField& heCells = thermo_.he().primitiveFieldRef();
Expand Down