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

turbulence calculation in programming

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2011, 10:50
Default turbulence calculation in programming
  #1
New Member
 
wenzhongqing
Join Date: Oct 2010
Posts: 10
Rep Power: 15
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
Default
  #2
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
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
Code:
tmp<fvVectorMatrix> UEqn
(
    fvm::ddt(U)
  + 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:
Code:
    surfaceScalarField muEff
    (
        "muEff",
        twoPhaseProperties.muf()
      + 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

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
Turbulence length scale Leonpolou FLUENT 2 January 23, 2013 07: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 06:04.