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

Implementation of turbulent algebraic heat flux model

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 8, 2021, 06:34
Default Implementation of turbulent algebraic heat flux model
  #1
New Member
 
Join Date: Jan 2021
Posts: 10
Rep Power: 5
Fabio1893 is on a distinguished road
Hello dear community.

I want to implement an algebraic heat flux model, based on the one described in the StarCCM+ user guide, called Temperature Flux Model here, in OpenFOAM 8. The model is based on eddy viscosity models and needs to be implemented in a low-Re model. However, I start with an implementation in the standard k-epsilon model of OpenFOAM 8.

In OpenFOAM, if I understand correct, the heat flux is calculated, based on Boussinesq approximation, by:

\overline{q}=- \frac{\mu_t}{Pr_t}\nabla h (1)

In comparison for the Temperature Flux Model, the heat flux is defined as:

\overline{q}=-\kappa \nabla \overline{T} - \rho C_p \overline{v \theta} (2)

with \overline{v\theta} being the turbulent heat flux, which is given as:

\overline{v\theta}=-C_{tu0}\frac{k}{\epsilon}\left(C_{tu2}R *\nabla \overline{T}+C_{tu2} \nabla \overline{v} * \overline{v \theta}+C_{tu3}\beta\overline{\theta ^2}g \right)+C_{tu4}\left(\frac{1}{k}R-\frac{2}{3}I\right)*\overline{v\theta} (3)

In order to calculate the turbulent heat flux \overline{v\theta}, a third transport equation for the temperature variance \theta ^2 needs to be solved. The transport equation for the temperature variance is very similar to the transport equation of the turbulent kinetic energy k and is defined as:

\frac{\partial}{\partial t}\left(\rho \theta ^2\right)+\nabla * \left(\rho\theta^2\overline{v}\right)=\nabla * \left[\left(\mu+\frac{\mu_t}{\sigma_{\theta^2}}\right)\nabla\overline{\theta^2}\right]+G_\theta-\rho\epsilon_\theta (4)


with the production term of the temperature variance:


G_\theta=-\rho\overline{v\theta}*\nabla\overline{T} (5)


Furthermore, the temperature variance dissipation rate \epsilon_\theta is defined via the thermal time scale T_\theta


T_\theta=\frac{\overline{\theta^2}}{2\epsilon_\theta} (6)


and the assumption of a constant turbulent-to-thermal time-scale ratio:


R_T=\frac{T_\theta}{T_t} (7)


I have almost finished the implementation of the transport equation (4). Only the production therm (5) of the temperature variance is missing:


Code:
// Temperature variance equation
    tmp<fvScalarMatrix> theta2Eqn
    (
        fvm::ddt(alpha, rho, theta2_)
      + fvm::div(alphaRhoPhi, theta2_)
      - fvm::laplacian(alpha*rho*Dtheta2Eff(), theta2_)
      ==
          // production of theta2 is missing
      - (alpha()*rho*theta2_)/(2*R_*turbTimeScale()) // epsilonTheta2
      + theta2Source()
      + fvOptions(alpha, rho, theta2_)
    );
My question now is quite simple: How can I get access to the temperature T in my turbulence model?


EDIT:


Access to T:


Code:
const volScalarField& T_ = this->mesh_.objectRegistry::template lookupObject<volScalarField>("T");

Furthermore, I am not sure, how I could implement equation (3). I have already defined model constants, but how can I get the Reynolds stress tensor and the thermal expansion coefficient here?



If any further information is needed, please let me know. Thanks a lot in advance!
Minghao_Li likes this.

Last edited by Fabio1893; January 8, 2021 at 07:38.
Fabio1893 is offline   Reply With Quote

 


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
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 10:00
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
CFX radiatin model wall heat flux imblance cscfx CFX 0 May 21, 2014 03:39
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 02:21
Natural convection - Inlet boundary condition max91 CFX 1 July 29, 2008 20:28


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