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

Error in turbulentHeatFluxTemperatureFvPatchScalarField v1.6

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2009, 08:06
Default Error in turbulentHeatFluxTemperatureFvPatchScalarField v1.6
  #1
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
I noticed an error in turbulentHeatFluxTemperatureFvPatchScalarField class for temperature gradient calculation:

Code:
00146 void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
00147 {
00148     if (updated())
00149     {
00150         return;
00151     }
00152 
00153     const scalarField& alphaEffp =
00154         patch().lookupPatchField<volScalarField, scalar>(alphaEffName_);
00155 
00156     const scalarField& Cpp =
00157         patch().lookupPatchField<volScalarField, scalar>(CpName_);
00158 
 00159     gradient() = q_/(Cpp*alphaEffp);
00160 
00161     fixedGradientFvPatchScalarField::updateCoeffs();
00162 }
From my point of view and based on Fourier's law heat flux q is calculated as:

q = lambda * grad (T) = alpha * rho * Cp * grad (T)

where
lambda - thermal conductivity
alpha - thermal diffusivity
Cp - cpecific heat capacity
rho - density

Thus temperature gradient should be

grad (T) = q / (alpha * rho * Cp)

Please correct me if I'm wrong!
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at

Last edited by makaveli_lcf; September 17, 2009 at 08:47.
makaveli_lcf is offline   Reply With Quote

Old   September 17, 2009, 02:36
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by makaveli_lcf View Post
I noticed an error in turbulentHeatFluxTemperatureFvPatchScalarField class for temperature gradient calculation:
...
Please correct me if I'm wrong!
Are you speaking of the class in the "compressible" or in the "incompressible" namespace?
They are formulated somewhat differently and the incompressible formulation will obviously not have rho in it.
olesen is offline   Reply With Quote

Old   September 17, 2009, 03:32
Default
  #3
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Mark,
I'm speaking about incompressible namespace.
In any case, if not include density in heat flux calculations, left-hand and right-hand dimensions in that relationship will not meet! That is what I mean in details:

Code:
00053 class turbulentHeatFluxTemperatureFvPatchScalarField
00054 :
00055     public fixedGradientFvPatchScalarField
00056 {
00057 // Private data
00058 
00059     //- Heat flux [W/m2]
00060     scalarField q_;
00061 
00062     //- Name of effective thermal diffusivity field
00063     word alphaEffName_;
00064 
00065     //- Name of specific heat capacity field
00066     word CpName_;
00067

[q]
= W / m^2 = (J / s) / m^2 = (kg m^2 / s^3) / m^2 = kg / s^3
[lambda] = W / (m K)= (kg m^2 / s^3) / (m K) = kg m / (K s^3)
[alpha = lambda / (rho Cp)] = m^2 / s
[Cp] = J / (kg K) = (kg m^2 / s^2 ) / (kg K) = m^2 / (K s^2)
[grad (T)] = K / m

Thus

q = lambda * grad (T) => [LHS] = W / m^2 equal to [RHS] = W / (m K) * K / m = W / m^2

But if we calculate grad (T) as q / (alpha Cp), then we get

grad (T) = q / (alpha Cp) => [LHS] = K / m not equal to! [RHS] = kg / s^3 / (m^2 / s * m^2 / (K s^2)) = kg K / m^4

So we see that dimensions of the left-hand side (LHS) and the right-hand side (RHS) do not meet unless other than traditional units are used for thermal conductivity, thermal diffusivity, specific heat capacity etc.

It is easy to check, that q = (alpha Cp rho ) grad (T) => grad (T) = q / (alpha Cp rho) gives correct result after dimensions analyzis.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at

Last edited by makaveli_lcf; September 17, 2009 at 08:48.
makaveli_lcf is offline   Reply With Quote

Old   September 17, 2009, 09:54
Default
  #4
New Member
 
Yi Wang
Join Date: Mar 2009
Posts: 17
Rep Power: 17
jason_wy is on a distinguished road
Not sure in incompressible solvers. But in compressible solvers, alphaEff and alpha defined in OF are not the same as the alpha [m^2/s] that we typically refer to.

They actually have already included rho in the definition. Basically in OpenFOAM: alpha = lambda/Cp ( not lambda/Cp/rho)

You might want to check the thermoPhysicalModel to find it out.
jason_wy is offline   Reply With Quote

Old   September 17, 2009, 10:28
Default
  #5
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Thank you, Yi!
Following your guidance I found in basicThermo_8H_source.html:

Code:
00077             //- Laminar thermal diffusuvity [kg/m/s]
00078             volScalarField alpha_;
That is why there was ambiguity.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf 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
Forces in V1.6 terrybarnaby OpenFOAM Post-Processing 72 September 2, 2015 16:49
installing v1.6 and keeping v1.5 Gavin OpenFOAM 9 October 23, 2009 04:16
nutRoughWallFunction v1.6 Schag OpenFOAM 2 October 1, 2009 16:28
icoDyMFoam v1.6 shyam OpenFOAM Bugs 1 September 5, 2009 04:22
Postprocessing and uniformDensityHydrostaticPressure in v1.6 Schag OpenFOAM Bugs 2 July 28, 2009 13:41


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