CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   The Energy equation in chtMultiRegionFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/208081-energy-equation-chtmultiregionfoam.html)

ywem October 8, 2018 14:42

The Energy equation in chtMultiRegionFoam
 
Dear Foams,
I am trying to figure out the chtMultiRegionFoam solver and willing to change it on my own. But I have some doubts about the energy equation (EEqn.H) in it.

In the file EEqn.H, the energy equation based on enthalpy [J/kg] is defined as

fvScalarMatrix EEqn
(
fvm::ddt(rho, he) + fvm::div(phi, he)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ (
he.name() == "e"
? fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), U),
p,
"div(phiv,p)"
)
: -dpdt
)
- fvm::laplacian(turb.alphaEff(),
==
rho*(U&g)
+ rad.Sh(thermo, he)
+ fvOptions(rho, he)
);

My doubt concentrate on the terms including "phi" in the second and fourth terms. It is defined in file "createFluidRields.H" and "setRegionFluidFields.H" as

phiFluid.set
(
i,
new surfaceScalarField
(
IOobject
(
"phi",
runTime.timeName(),
fluidRegions[i],
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(rhoFluid[i]*UFluid[i])
& fluidRegions[i].Sf()
)
);

surfaceScalarField& phi = phiFluid[i];

My question is, the dimension of "ddt(rho,he)" is J/(s m^3), while that of the terms including phi (= rho*U*Sf) is J/s. They are not same. I donot know where the problem comes from.

Thank you in advance.

Mehdi3031 October 11, 2018 09:17

Dear Wenming,
when you were dimension analyzing ""ddt(rho,he)", you came up correctly with J/(s m^3) which means you considered that d/dt ads a "s" to denominator!
but you are neglecting grad dimension when calculating the "fvm::div(phi, he)"! divergence adds m^3 to the denominator and like that you are all set.

Hope it is clear enough

ywem October 12, 2018 03:47

Dear Mehdi,
Thank you for your reminding. That' s my fault.
A minor question, my understanding is, the divergence operation should add a dimension of m^-1. I do not know where is the problem.

Mehdi3031 October 12, 2018 11:51

actually you are right about the divergence, I mistakenly thought
\frac{\partial U}{\partial X}*\frac{\partial V}{\partial Y}*\frac{\partial W}{\partial Z}

But it is

\frac{\partial U}{\partial X}+\frac{\partial V}{\partial Y}+\frac{\partial W}{\partial Z}

Now I don't know... Strange!


All times are GMT -4. The time now is 04:15.