CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Add additional scalar to turbulence model (

john_w April 20, 2010 11:58

Add additional scalar to turbulence model
I am in the process of modifying one of the compressible turbulence models (k-omega SST) to utilize a variable Prandtl number. As Prt is a function of kinematic eddy viscosity and the thermal diffusivity (alphat_), it is first necessary to calculate local values of alphat_. To do this, it is necessary to have access to the scalar temperature.

In order to do this, I have added the following lines to my modified version of the k-Omega SST turbulence model header file

//- Return the temperature
virtual tmp<volScalarField> thermophysicalModel_.T() const
return T_;
However, this addition causes a compilation error -

error: ‘thermophysicalModel_’ declared as a ‘virtual’ field

How should this field be declared?

I have wondered if it is necessary to also add an additional expression to the turbulenceModel.H base class as well? If so, what might that expression be?

Any thoughts here would be much appreciated.

Thanks in advance,


usergk December 23, 2010 13:45


Does anyone know how to implement variable Prandtl number?


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