CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

The Energy equation in chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ywem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2018, 15:42
Default The Energy equation in chtMultiRegionFoam
  #1
Member
 
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8
ywem is on a distinguished road
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.
ywem is offline   Reply With Quote

Old   October 11, 2018, 10:17
Default
  #2
Member
 
Mehdi Aminyavari
Join Date: Feb 2016
Location: Milan
Posts: 35
Rep Power: 10
Mehdi3031 is on a distinguished road
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
Mehdi3031 is offline   Reply With Quote

Old   October 12, 2018, 04:47
Default
  #3
Member
 
Wenming Yang
Join Date: Jun 2018
Posts: 42
Rep Power: 8
ywem is on a distinguished road
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 likes this.
ywem is offline   Reply With Quote

Old   October 12, 2018, 12:51
Default
  #4
Member
 
Mehdi Aminyavari
Join Date: Feb 2016
Location: Milan
Posts: 35
Rep Power: 10
Mehdi3031 is on a distinguished road
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!
Mehdi3031 is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, energy equation


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Energy equation for multi-component systems Andrea_85 OpenFOAM 2 September 24, 2018 22:19
Comparing residuals of momentum and energy equation skarma FLUENT 4 November 25, 2017 23:03
Error in computing Energy equation faab OpenFOAM Running, Solving & CFD 0 February 3, 2017 14:04
error message cuteapathy CFX 14 March 20, 2012 07:45
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 07:06


All times are GMT -4. The time now is 13:42.