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

Implementation of turbulence->divDevReff(U)

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

Like Tree4Likes
  • 1 Post By ChGr
  • 3 Post By kaifu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2016, 16:08
Default Implementation of turbulence->divDevReff(U)
  #1
New Member
 
Join Date: May 2016
Posts: 3
Rep Power: 6
rushs777 is on a distinguished road
Hi,

I am a new user to Open Foam, and I am trying to understand the code in the UEqn.H file in simpleFoam. On line 9, as part of establishing the left-hand side of the U equation, there is the command "+ turbulence->divDevReff(U)". My understand is that the implementation of divDevReff(U) will be selected by the turbulence model choice made in constant/TurbulenceProperties. Several sources (http://openfoamwiki.net/index.php/Bu...DevReff.28U.29, http://www.cfdsupport.com/OpenFOAM-T...t/node209.html), seemed to support this. However, whenever I look in any of the files I have for Open Foam v3.0, I can find no function definition in any of the turbulence models. In fact, the only thing I can find in regards to divDevReff(U) is a series of virtual functions defined in IncompressibleTurbulenceModel.C (http://www.openfoam.com/documentatio...96_source.html). Seeing as how most of the solvers have a line like this, plus the tutorials were working, there is just something about this I'm not getting. Would anyone mind sharing with me how this works, and where the definitions are for divDevReff(U) in the different turbulence classes? Thanks!
rushs777 is offline   Reply With Quote

Old   July 12, 2016, 02:53
Default
  #2
New Member
 
Join Date: Feb 2014
Posts: 17
Rep Power: 8
ChGr is on a distinguished road
Hey,

the definition of divDevReff(U) can be found in the file linearViscousStress.

https://github.com/OpenFOAM/OpenFOAM...iscousStress.C
Michael@UW likes this.
ChGr is offline   Reply With Quote

Old   July 12, 2016, 11:07
Default
  #3
New Member
 
Join Date: May 2016
Posts: 3
Rep Power: 6
rushs777 is on a distinguished road
Thanks for the reply, but that is actually divDevRhoReff, and I am looking for divDevReff. Do you know where that is located?
rushs777 is offline   Reply With Quote

Old   July 12, 2016, 15:24
Default
  #4
New Member
 
Join Date: Feb 2014
Posts: 17
Rep Power: 8
ChGr is on a distinguished road
check here:

https://github.com/OpenFOAM/OpenFOAM...bulenceModel.C
ChGr is offline   Reply With Quote

Old   May 3, 2018, 23:55
Default
  #5
Member
 
Kai
Join Date: May 2010
Location: Shanghai
Posts: 61
Blog Entries: 1
Rep Power: 12
kaifu is on a distinguished road
In OF 5.x
incompressible::turbulenceModel is defied as
Code:
typedef IncompressibleTurbulenceModel<transportModel> turbulenceModel;
the above class is inherit form class template TurbulenceModel
Code:
template<class TransportModel>
class IncompressibleTurbulenceModel
:
    public TurbulenceModel
    <
        geometricOneField,
        geometricOneField,
        incompressibleTurbulenceModel,
        TransportModel
    >
where the class template
TurbulenceModel
<
geometricOneField,
geometricOneField,
incompressibleTurbulenceModel,
TransportModel
>
is inherit from class incompressibleTurbulenceModel, as
Code:
template
<
    class Alpha,
    class Rho,
    class BasicTurbulenceModel,
    class TransportModel
>
class TurbulenceModel
:
    public BasicTurbulenceModel
class incompressibleTurbulenceModel is inherit from class turbulenceModel as
Code:
class incompressibleTurbulenceModel
:
    public turbulenceModel
in solver simpleFoam if we seclect kEpsilon as turbulenceModel
the function divDevRhoReff is interpretted in the following way
Code:
template<class BasicTurbulenceModel>
class kEpsilon
:
    public eddyViscosity<RASModel<BasicTurbulenceModel>>
Code:
template<class BasicTurbulenceModel>
class eddyViscosity
:
    public linearViscousStress<BasicTurbulenceModel>
Code:
template<class BasicTurbulenceModel>
Foam::tmp<Foam::fvVectorMatrix>
Foam::linearViscousStress<BasicTurbulenceModel>::divDevRhoReff
(
    volVectorField& U
) const
{
    return
    (
      - fvc::div((this->alpha_*this->rho_*this->nuEff())*dev2(T(fvc::grad(U))))
      - fvm::laplacian(this->alpha_*this->rho_*this->nuEff(), U)
    );
}
MajidHagh, frobaux and JamesCC like this.
__________________
Kai
kaifu is offline   Reply With Quote

Reply

Tags
divdevreff, turbulence, ueqn.h

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 model implementation errors elbertj OpenFOAM Programming & Development 10 November 29, 2016 08:28
Implementation of Free-stream Turbulence into SU2 ericthefatguy SU2 3 January 15, 2015 12:36
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 09:02
Question on Turbulence Intensity Eric FLUENT 1 March 7, 2012 04:30


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