|
[Sponsors] |
Implementation of Free-stream Turbulence into SU2 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 31, 2014, 02:04 |
Implementation of Free-stream Turbulence into SU2
|
#1 |
New Member
Lean ("Eric") Fang
Join Date: Jul 2013
Location: USTC, Hefei, P.R.C.
Posts: 15
Rep Power: 13 |
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 |
|
January 1, 2015, 19:13 |
|
#2 |
Super Moderator
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15 |
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 |
|
January 15, 2015, 09:46 |
|
#3 |
New Member
Lean ("Eric") Fang
Join Date: Jul 2013
Location: USTC, Hefei, P.R.C.
Posts: 15
Rep Power: 13 |
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 |
|
January 15, 2015, 13:36 |
|
#4 |
Super Moderator
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for turbulence model implementation | marluc | FLUENT | 1 | July 10, 2017 19:12 |
vary free stream velocity | siddu.pk | ANSYS | 0 | March 21, 2014 02:23 |
Help for the small implementation in turbulence model | shipman | OpenFOAM Programming & Development | 25 | March 19, 2014 11:08 |
implementation of Spalart-Allmaras Turbulence Model | zhengjg | Main CFD Forum | 0 | July 24, 2013 04:43 |
free stream boundary condition | L. Tao | Main CFD Forum | 1 | June 26, 2001 05:40 |