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
1 change: 1 addition & 0 deletions src/dfCombustionModels/FGM/baseFGM/baseFGM.C
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ Foam::combustionModels::baseFGM<ReactionThermo>::baseFGM
ZcvarMax_(0.25),
ZcvarMin_(-0.25),
rho_(const_cast<volScalarField&>(this->mesh().objectRegistry::lookupObject<volScalarField>("rho"))),
rho_inRhoThermo_(dynamic_cast<rhoThermo&>(thermo).rho()),
p_(this->thermo().p()),
T_(this->thermo().T()),
U_(this->mesh().objectRegistry::lookupObject<volVectorField>("U")),
Expand Down
2 changes: 2 additions & 0 deletions src/dfCombustionModels/FGM/baseFGM/baseFGM.H
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ class baseFGM

//- fluid density
volScalarField& rho_;
//- fluid density
volScalarField& rho_inRhoThermo_;

//- fluid pressure
const volScalarField& p_;
Expand Down
6 changes: 4 additions & 2 deletions src/dfCombustionModels/FGM/flareFGM/flareFGM.C
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ void Foam::combustionModels::flareFGM<ReactionThermo>::retrieval()
this->T_.max(TMin);
this->T_.min(TMax);

dimensionedScalar R_uniGas("R_uniGas",dimensionSet(1,2,-2,-1,-1,0,0),8.314e3);
this->psi_ = this->Wt_/(R_uniGas*this->T_);

if(this->mesh().time().timeIndex() > 0)
{
dimensionedScalar p_operateDim("p_operateDim", dimensionSet(1,-1,-2,0,0,0,0),this->incompPref_);
Expand All @@ -449,9 +452,8 @@ void Foam::combustionModels::flareFGM<ReactionThermo>::retrieval()
this->rho_ = this->p_*this->psi_;
}
}
this->rho_inRhoThermo_ = this->rho_;

dimensionedScalar R_uniGas("R_uniGas",dimensionSet(1,2,-2,-1,-1,0,0),8.314e3);
this->psi_ = this->Wt_/(R_uniGas*this->T_);
}

// ************************************************************************* //
10 changes: 5 additions & 5 deletions test/corrtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ TEST(corrtest,df0DFoam_H2){
//}

TEST(corrtest,dfLowMachFoam_TGV){
EXPECT_FLOAT_EQ(TGV500,1533.35); // compare the maximum temperature along y direction in 2D TGV after 500 time steps
EXPECT_FLOAT_EQ(TGV400,1298.49); // ..........400 time steps
EXPECT_FLOAT_EQ(TGV300,874.988);
EXPECT_FLOAT_EQ(TGV200,541.233);
EXPECT_FLOAT_EQ(TGV100,363.754);
EXPECT_FLOAT_EQ(TGV500,1532.92); // compare the maximum temperature along y direction in 2D TGV after 500 time steps
EXPECT_FLOAT_EQ(TGV400,1297.64); // ..........400 time steps
EXPECT_FLOAT_EQ(TGV300,871.092);
EXPECT_FLOAT_EQ(TGV200,537.614);
EXPECT_FLOAT_EQ(TGV100,363.504);
}

TEST(corrtest,2DSandia){
Expand Down