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

Turbulence injection via fvOptions: addSup, constrain, or correct?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2016, 12:59
Default Turbulence injection via fvOptions: addSup, constrain, or correct?
  #1
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 13
pbachant is on a distinguished road
I'm trying to create a turbulence source to accompany a momentum source (think a bluff body or stalled airfoil). I have some reference values for k and epsilon from a simulation with a body-fitted grid that I am trying to match, but I am having trouble figuring out how to translate those values into source values (or constraints or corrections). Here is the k equation syntax:

Code:
    // Turbulent kinetic energy equation
    tmp<fvScalarMatrix> kEqn
    (
        fvm::ddt(alpha, rho, k_)
      + fvm::div(alphaRhoPhi, k_)
      - fvm::laplacian(alpha*rho*DkEff(), k_)
     ==
        alpha*rho*G
      - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
      - fvm::Sp(alpha*rho*epsilon_/k_, k_)
      + kSource()
      + fvOptions(alpha, rho, k_)
    );

    kEqn.ref().relax();
    fvOptions.constrain(kEqn.ref());
    solve(kEqn);
    fvOptions.correct(k_);
    bound(k_, this->kMin_);
It seems intuitively that `correct` is the method to use to set the values of the field directly, but since the equation has already been solved, does this mean the field won't necessarily be a solution of the equation? Does this matter? When I try to set values using the `correct` method, they seem to end up 100 times larger than they should be.

Is the`addSup` method more correct to use if this is a turbulence source, and if so, how would you go about estimating a rate from a target value?
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   May 22, 2020, 22:48
Default
  #2
Senior Member
 
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6
Tibo99 is on a distinguished road
Did you find a solution about your problem?

I got similar issue.

Regards
Tibo99 is offline   Reply With Quote

Reply


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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Is this understanding of turbulence models correct? 3kha Main CFD Forum 3 January 31, 2011 21:31
pimpleDyMFoam turbulence -> correct josp OpenFOAM Bugs 1 May 8, 2010 05:43
correct turbulence model co2 FLUENT 1 May 7, 2004 14:23
turbulence modeling questions llowen Main CFD Forum 3 September 11, 1998 04:24


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