Skip to content

Commit 1b2ad64

Browse files
authored
Merge pull request #260 from wengzf20/update-rho-in-FGM
Update rho_ in rhoThermo from flareFGM
2 parents eadf316 + 887222e commit 1b2ad64

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

src/dfCombustionModels/FGM/baseFGM/baseFGM.C

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ Foam::combustionModels::baseFGM<ReactionThermo>::baseFGM
283283
ZcvarMax_(0.25),
284284
ZcvarMin_(-0.25),
285285
rho_(const_cast<volScalarField&>(this->mesh().objectRegistry::lookupObject<volScalarField>("rho"))),
286+
rho_inRhoThermo_(dynamic_cast<rhoThermo&>(thermo).rho()),
286287
p_(this->thermo().p()),
287288
T_(this->thermo().T()),
288289
U_(this->mesh().objectRegistry::lookupObject<volVectorField>("U")),

src/dfCombustionModels/FGM/baseFGM/baseFGM.H

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ class baseFGM
185185

186186
//- fluid density
187187
volScalarField& rho_;
188+
//- fluid density
189+
volScalarField& rho_inRhoThermo_;
188190

189191
//- fluid pressure
190192
const volScalarField& p_;

src/dfCombustionModels/FGM/flareFGM/flareFGM.C

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ void Foam::combustionModels::flareFGM<ReactionThermo>::retrieval()
436436
this->T_.max(TMin);
437437
this->T_.min(TMax);
438438

439+
dimensionedScalar R_uniGas("R_uniGas",dimensionSet(1,2,-2,-1,-1,0,0),8.314e3);
440+
this->psi_ = this->Wt_/(R_uniGas*this->T_);
441+
439442
if(this->mesh().time().timeIndex() > 0)
440443
{
441444
dimensionedScalar p_operateDim("p_operateDim", dimensionSet(1,-1,-2,0,0,0,0),this->incompPref_);
@@ -449,9 +452,8 @@ void Foam::combustionModels::flareFGM<ReactionThermo>::retrieval()
449452
this->rho_ = this->p_*this->psi_;
450453
}
451454
}
455+
this->rho_inRhoThermo_ = this->rho_;
452456

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

457459
// ************************************************************************* //

test/corrtest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ TEST(corrtest,df0DFoam_H2){
5656
//}
5757

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

6666
TEST(corrtest,2DSandia){

0 commit comments

Comments
 (0)