CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Implementation of Free-stream Turbulence into SU2

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By ericthefatguy
  • 2 Post By fpalacios
  • 1 Post By fpalacios

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 31, 2014, 01:04
Exclamation Implementation of Free-stream Turbulence into SU2
  #1
New Member
 
ericthefatguy's Avatar
 
Lean ("Eric") Fang
Join Date: Jul 2013
Location: USTC, Hefei, P.R.C.
Posts: 15
Rep Power: 12
ericthefatguy is on a distinguished road
Hello everyone,

I am currently working on implementing free-stream turbulence into SU2.

My plan is to add some lines of code to the farfield & inlet boundary-condition source code so that SU2 could initialize the free stream with user specified turbulence intensity & scale.

My question is, where can I find those codes in the source which describe the boundary conditions? I have searched through the src files under SU2_CFD and Common, but I have found nothing helpful so far.

Cheers,
Eric
chliu likes this.
ericthefatguy is offline   Reply With Quote

Old   January 1, 2015, 18:13
Default
  #2
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
Hi,

I think you are looking for solver_direct_turbulent.cpp file. In particular, the class CTurbSASolver contains the flow field initialization:

CTurbSASolver::CTurbSASolver(CGeometry *geometry, CConfig *config, unsigned short iMesh, CFluidModel* FluidModel)

And boundary conditions:

void CTurbSASolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)

void CTurbSASolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker)

Note that the pair solver_direct_turbulent.cpp and variable_direct_turbulent.cpp contain 99% of the turbulence model coding.

Best,

Francisco Palacios
SU2 lead developer
ericthefatguy and Bachduong like this.
fpalacios is offline   Reply With Quote

Old   January 15, 2015, 08:46
Default
  #3
New Member
 
ericthefatguy's Avatar
 
Lean ("Eric") Fang
Join Date: Jul 2013
Location: USTC, Hefei, P.R.C.
Posts: 15
Rep Power: 12
ericthefatguy is on a distinguished road
Hi Francisco,

Firstly, I'd like to say thank you for your reply to my post.

After carefully reading the turbulence model coding you mentioned in your reply, I figured I need to modify the free-stream config coding instead.

In the solver_direct_turbulent.cpp file, the CTurbSASolver uses "Factor_nu_Inf = config->GetNuFactor_FreeStream();" to set turbulent variable at infinity, and the CTurbSSTSolver uses "Intensity = config->GetTurbulenceIntensity_FreeStream(); viscRatio = config->GetTurb2LamViscRatio_FreeStream();", respectively. So it appears that I should keep the turbulence model coding intact and make some minor changes to those turbulence-related GetXXX_FreeStream() functions in the CConfig class.

However, I only found the declaration of those functions in the config_structure.hpp file, but I have not found the definition of them so far.

Could you provide me with the location of the definition of the GetXXX_FreeStream() functions?

Thank you,
Eric
ericthefatguy is offline   Reply With Quote

Old   January 15, 2015, 12:36
Default
  #4
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
Hi Eric,

In fact, you can specify those values in the config file just adding

FREESTREAM_TURB2LAMVISCRATIO= #
FREESTREAM_NU_FACTOR = #

We have deleted those parameters form the config_template to make it short. But in the near future we are planning to expose all that information to the user in a complete section about turbulent models.

In fact, if you search in config_structure.cpp for

addDoubleOption("FREESTREAM_TURB2LAMVISCRATIO", Turb2LamViscRatio_FreeStream, 10.0);

or

addDoubleOption("FREESTREAM_NU_FACTOR", NuFactor_FreeStream, 3.0);

You will see how we add new parameters to the config file (just one line... very easy) and what is the default value of you don't and the tags to your config file 10.0 and 3.0 respectively.

I hope this helps,

Francisco Palacios
SU2 lead developer
ericthefatguy likes this.
fpalacios 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
UDF for turbulence model implementation marluc FLUENT 1 July 10, 2017 18:12
vary free stream velocity siddu.pk ANSYS 0 March 21, 2014 01:23
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
implementation of Spalart-Allmaras Turbulence Model zhengjg Main CFD Forum 0 July 24, 2013 03:43
free stream boundary condition L. Tao Main CFD Forum 1 June 26, 2001 04:40


All times are GMT -4. The time now is 10:52.