CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Add additional scalar to turbulence model (http://www.cfd-online.com/Forums/openfoam/75261-add-additional-scalar-turbulence-model.html)

john_w April 20, 2010 12: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,

John

usergk December 23, 2010 13:45

Hi

Does anyone know how to implement variable Prandtl number?

Thanks,
gk


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