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

Effective thermal diffusivity formulation (sonicFoam)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree8Likes
  • 1 Post By LuckyTran
  • 7 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 1, 2018, 04:21
Default Effective thermal diffusivity formulation (sonicFoam)
  #1
New Member
 
Join Date: Jan 2017
Posts: 24
Rep Power: 10
er99 is on a distinguished road
Hi,

I would like some help in clarifying the implementation of the energy equation in sonicFoam in OpenFOAM:

fvScalarMatrix EEqn
(
fvm::ddt(rho, e) + fvm::div(phi, e)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)")
- fvm::laplacian(turbulence->alphaEff(), e)
==
fvOptions(rho, e)
);

Specifically, is alphaEff an effective thermal diffusivity which accounts for laminar and turbulent contributions? If so, how is this expressed in an equation?

i.e. alphaEff = alpha_lam + alpha_turb? Or another formulation?

thanks!

Last edited by er99; November 1, 2018 at 07:16.
er99 is offline   Reply With Quote

Old   November 2, 2018, 09:13
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,810
Rep Power: 68
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
To put it simply, yes alphaEff is alpha_laminar + alpha_turbulent.


Eventually thermo.alphaEff will be called which you can find in the appropriate thermophysical source file for your thermophysical model. E.g. /src/thermophysicalModels/basic/heThermo/heThermo.C
lpz456 likes this.
LuckyTran is offline   Reply With Quote

Old   November 2, 2018, 10:19
Default
  #3
New Member
 
Join Date: Jan 2017
Posts: 24
Rep Power: 10
er99 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
To put it simply, yes alphaEff is alpha_laminar + alpha_turbulent.


Eventually thermo.alphaEff will be called which you can find in the appropriate thermophysical source file for your thermophysical model. E.g. /src/thermophysicalModels/basic/heThermo/heThermo.C
Thanks for your answer? What would the answer be if you didn't have to put it simply? Happy to hear the more complicated answer!

I am using sensibleInternalEnthalpy and just found this post that states alphaEff is actually:

alphaEff = cp/cv(alpha_lam + alpha_turb)

alphaEff

Is it right?

Thanks again for your help!
er99 is offline   Reply With Quote

Old   November 2, 2018, 14:02
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,810
Rep Power: 68
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
There is a lot of juggling that happens under-the-hood.


Recall that you're looking at the heat diffusion/conduction term which is divergence of thermal conductivity (kappa in OpenFOAM) times the temperature gradient, which looks very different than laplacian of alphaEff*e.



There isn't a mistake in EEqn.h, but the reason for the Cp/Cv is elusive and I have to dig it up later. I'll probably edit this post when I get around to it.
LuckyTran is offline   Reply With Quote

Old   November 2, 2018, 14:05
Default
  #5
New Member
 
Join Date: Jan 2017
Posts: 24
Rep Power: 10
er99 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
There is a lot of juggling that happens under-the-hood.


Recall that you're looking at the heat diffusion/conduction term which is divergence of thermal conductivity (kappa in OpenFOAM) times the temperature gradient, which looks very different than laplacian of alphaEff*e.



There isn't a mistake in EEqn.h, but the reason for the Cp/Cv is elusive and I have to dig it up later. I'll probably edit this post when I get around to it.
Thanks for your time! Could you reply to this message so I get a notification of when you get back to it? I'm just trying to express alphaEff in terms of the laminar and turb components, and right now this is what I've got for the energy equation in latex format:

\begin{equation}
\frac{\partial }{\partial t}\Big[\rho(e + k)\Big] = -\nabla \cdot \Big[\rho U(e + k)\Big] - \nabla \cdot ({\bf{U}} p) + \frac{c_p}{c_v}\Big[\alpha_{l} + \alpha_{t}\Big]\nabla(e)
\end{equation}

Does that look ok?

Thanks!
er99 is offline   Reply With Quote

Old   November 2, 2018, 16:52
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,810
Rep Power: 68
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Btw I hope you meant sensibleInternalEnergy and not sensibleInternalEnthalpy.

It's not cp/cv but actually a variable called cpBycpv. cpBycpv when not needed is set to 1 (i.e. when using sensibleEnthalpy) but set to cpBycpv = gamma when needed (i.e. in sensibleInternalEnergy).

It turned out to be much simpler than I thought. You have:

de = Cv*dT
and
alpha = kappa / Cp

Hence in order to get something that looks like kappa*T, you ordinarily want kappa * T= alpha*Cp * (e / Cv)

Conveniently when you call thermo.alpha in OpenFOAM, you actually get (not alpha but something else) thermo.alpha = cpBycpv*alpha which is alpha*gamma or alpha*Cp/Cv for sensibleInternalEnergy...

The reason for setting up thermo.alpha in this way is for versatility. Someone might decide to use a sensibleEnthalpy formulation instead of sensibleInternalEnergy formulation.

So finally, alphaEff is indeed alpha_laminar + alpha_turbulent, but the way it is written in OpenFOAM in many places, by shoving this cpBycpv in front of it makes it seem elusive. The trick is to not get fooled by this variable that is labeled alpha/alphaEff in OpenFOAM but doesn't actually return the property alpha/alphaEff.
hwangpo, er99, kamakura and 4 others like this.
LuckyTran is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Effective Thermal Conductivity Merlin CFX 2 July 23, 2015 07:10
1D heat flow through rod with changing thermal diffusivity cjgn44 System Analysis 1 December 7, 2014 20:40
BC wallHeatTransfer, alphaWall: Thermal Diffusivity or Conductivity Johnston81 OpenFOAM Running, Solving & CFD 1 July 25, 2013 14:40
Porous Media Effective Thermal Conductivity Greg Perkins FLUENT 3 August 5, 2001 21:53
Info: Short Course On Thermal Design of Electronic Equipment Arnold Free Main CFD Forum 0 August 10, 1999 10:18


All times are GMT -4. The time now is 03:29.