CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

turbulence calculation in programming

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

LinkBack Thread Tools Display Modes
Old   September 19, 2011, 10:50
Default turbulence calculation in programming
New Member
Join Date: Oct 2010
Posts: 10
Rep Power: 9
flakid is on a distinguished road
There are several turbulence models and Les model in openFoam.How is the turbulence calculation coupled in the code of the solver? I think it's included in turbulenceModel and transportModel.But where is the interface?addToRunTable?
flakid is offline   Reply With Quote

Old   October 29, 2011, 10:22
Senior Member
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 15
AlmostSurelyRob will become famous soon enough
You have probably answered to your question by now but just in case you didn't: have a look at the code of solvers like pisoFoam or interFoam. They are in OpenFOAM/applications/solvers

In particular look at the UEqn.H file if present. For example

pimpleFoam OF 2.0
tmp<fvVectorMatrix> UEqn
  + fvm::div(phi, U)
  + turbulence->divDevReff(U)
where turbulence was an object created earlier. As I understand divDevReff is the divergence of deviatoric effective stress, physically meaning stress due to unresolved scales of turbulence.

interFoam uses only RAS models so it has to update effective viscosity:
    surfaceScalarField muEff
      + fvc::interpolate(rho*turbulence->nut())

    fvVectorMatrix UEqn
        fvm::ddt(rho, U)
      + fvm::div(rhoPhi, U)
      - fvm::laplacian(muEff, U)
      - (fvc::grad(U) & fvc::grad(muEff))
    //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf()))
AlmostSurelyRob is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turbulence length scale Leonpolou FLUENT 2 January 23, 2013 08:26
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 09:02
Turbulence dampening due to magnetic field in LES and RAS eelcovv OpenFOAM 0 June 8, 2010 11:35
High turbulence intensity wenfengxie FLUENT 1 April 16, 2010 12:00

All times are GMT -4. The time now is 01:22.