Energy Equ. based on temperature

17 views
Skip to first unread message

kumaresh...@gmail.com

unread,
Mar 23, 2022, 8:18:07 AMMar 23
to OpenFOAM
Hello Foamers,
I was working with older version of OpenFOAM 2.1.1. Currently, I shifted to version v2106 for some reason. While working with pyrolysis in OFv2106, the energy equation looks like,
//******************************//
fvScalarMatrix hEqn
(
fvm::ddt(rho_, h_)
- fvm::laplacian(alpha, h_)
+ fvc::laplacian(alpha, h_)
- fvc::laplacian(kappa(), T())
==
chemistryQdot_
+ solidChemistry_->RRsHs()
);
//******************************//
In my case, I want to use temperature directly in Energy equation as follows,
//******************************//
fvScalarMatrix TEqn
(
fvm::ddt(rhoCp, T_)
- fvm::laplacian(K_, T_)
==
chemistryQdot_
);
//******************************//
In older version OF 2.1.1, the temperature implementation is so direct in the equation but not in the case of OFv2106. So, I did little research on how to make this happen.
In basicThermo.C,
//******************************//
// Temperature returns a non-const value
Foam::volScalarField& Foam::basicThermo::T()
{
return T_;
}
//******************************//
So, I initialized T_ as part of constructor in my source file as,
//******************************//
T_
(
IOobject
(
* * "T",
* * * regionMesh().time().timeName(),
* * * regionMesh(),
* * * IOobject::MUST_READ,
* * * IOobject::AUTO_WRITE
),
* * * //regionMesh(),
* * * solidThermo_->T()
* * )
//******************************//
There is no problem with compilation. Before running the case, I fixed a print statement under the energy equation to check the variation of temperature.
Info << "T_from Energy equ:" << T_ << endl;

I can find the variation in temperature in the log file as,
//******************************//
T_from Energy equ:dimensions [0 0 0 1 0 0 0];

internalField nonuniform List<scalar>
14
(
931.685
877.421
824.294
773.017
724.259
678.639
636.723
599.013
565.938
537.856
515.058
497.77
486.156
480.322
)
//******************************//
However, the output changes are nil. NO changes in fuel compositions, temperature and other variables. If I'm not wrong, the energy equation which I've adopted based on temperature is not solved. Can someone share their ideas to sort out this ?
Another question:
What are differences in implementing T or h in Energy equation and their advantages and disadvantages in OpenFOAM ?
Thank you

Reply all
Reply to author
Forward
0 new messages