CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Hybrid RANS/LES models (https://www.cfd-online.com/Forums/su2/138067-hybrid-rans-les-models.html)

EMolina June 27, 2014 12:24

Hybrid RANS/LES models
 
Developers and users,

I would like to know if someone is working (or already worked) on Hybrid RANS/LES models such DES/DDES with SU2. Is it implemented in the current SU2 3.2 version?

Regards,

Eduardo.

liujmljm June 27, 2014 15:56

Quote:

Originally Posted by EMolina (Post 499002)
Developers and users,

I would like to know if someone is working (or already worked) on Hybrid RANS/LES models such DES/DDES with SU2. Is it implemented in the current SU2 3.2 version?

Regards,

Eduardo.

I think it is very simple to add DES in SU2. In fact, I have added this. Now I am testing the DES with SA model.

EMolina June 27, 2014 16:21

Hi Jianming Liu,

I would appreciate if you can share your modification, I am also interested in DES with SU2.

Regards,

Eduardo.

liujmljm June 27, 2014 19:03

Quote:

Originally Posted by EMolina (Post 499017)
Hi Jianming Liu,

I would appreciate if you can share your modification, I am also interested in DES with SU2.

Regards,

Eduardo.

I just modify ten files in SU2. I will show the modification here.
1. in config_structure.hpp,in class CConfig, add two data members: double Const_DES; bool With_DES;
Const_DES is constant for DES, for SA model it should be equal to 0.65

give two declaration of member function:I use following
double GetConst_DES(void);
bool GetWith_DES(void);

2 in config_structure.inl, add two definition of inline function:
inline double CConfig::GetConst_DES(void) { return Const_DES; }
inline bool CConfig::GetWith_DES(void) { return With_DES; }

3 in dual_grid_structure.hpp, add member in class CPoint

double Turb_Len_Scale_DES; /*!< \brief DES turbulent length scale */
* \brief DES turbulent length scale. JamesLiu Oct12
* \param[in] val_distance - Value of the distance.
*/
void SetTurb_Len_Scale_DES(double val_distance);

/*!
* \brief Get the value of the DES turbulent length scale.
* \return Value of the DES turbulent length scale.
*/
double GetTurb_Len_Scale_DES(void);

4 in dual_grid_structure.inl, add incline function

inline void CPoint::SetTurb_Len_Scale_DES(double val_distance) { Turb_Len_Scale_DES = val_distance; }

inline double CPoint::GetTurb_Len_Scale_DES(void) { return Turb_Len_Scale_DES; }

5 in file: geometry_structure.hpp, add declaration in class CGeometry

virtual void ComputeTurb_Len_Scale_DES(CConfig *config);
in class CPhysicalGeometry add

void ComputeTurb_Len_Scale_DES(CConfig *config);

6 in file: geometry_structure.inl, add the definition
inline void CGeometry::ComputeTurb_Len_Scale_DES(CConfig *config) { }

7 in file: config_structure.cpp, in void CConfig::SetConfig_Options(unsigned short val_iZone, unsigned short val_nZone) add
addDoubleOption("CONST_DES", Const_DES, 0.65);

8 in geometry_structure.cpp, add definition of member function:

void CPhysicalGeometry::ComputeTurb_Len_Scale_DES(CConf ig *config) {

9 in SU2_CFD.cpp add
// JamesLiu for DES turbulent length scale
if ( (config_container[iZone]->GetKind_Solver() == RANS) && config_container[iZone]->GetWith_DES() )
geometry_container[iZone][MESH_0]->ComputeTurb_Len_Scale_DES(config_container[iZone]);

10 in solver_direct_turbulent.cpp change the definition of void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics,
CConfig *config, unsigned short iMesh) {

use Turb_Len_Scale_DES to replace the distance of d.

Here I just show the modification I used for SA model, I think the process for DES SST model is same. I am doing the V&V for the modification. If the developers or other users have done this,
I appreciate for people to discuss this modification.

Jianming

EMolina June 29, 2014 14:13

Hi .

Thank you very much. I will perform your modifications. Did you run any validation case?

Regards,.

Eduardo.

EMolina June 30, 2014 19:45

Hi Jianming,

I have a couple of questions:

a) In step 8, Is missing the way you compute the DES turbluent scale?

b) In step 10, you replace the GetWall_Distance() for GetTurb_Len_Scale_DES()?

c) You implemented the DES97 version or the Delayed-DES version?

Thank you very much

Regards,

Eduardo

liujmljm June 30, 2014 20:10

Quote:

Originally Posted by EMolina (Post 499377)
Hi Jianming,

I have a couple of questions:

a) In step 8, Is missing the way you compute the DES turbluent scale?

b) In step 10, you replace the GetWall_Distance() for GetTurb_Len_Scale_DES()?

c) You implemented the DES97 version or the Delayed-DES version?

Thank you very much

Regards,

Eduardo

I just use DES97, the other manner, such as Delayed-DES version, I will try to add in coming days.
the overall code for the step 8 and 10, I will paste tomorrow.

liujmljm July 1, 2014 11:23

Quote:

Originally Posted by EMolina (Post 499377)
Hi Jianming,

I have a couple of questions:

a) In step 8, Is missing the way you compute the DES turbluent scale?

b) In step 10, you replace the GetWall_Distance() for GetTurb_Len_Scale_DES()?

c) You implemented the DES97 version or the Delayed-DES version?

Thank you very much

Regards,

Eduardo

void CPhysicalGeometry::ComputeTurb_Len_Scale_DES(CConf ig *config) {

double *coord, dist00, dist;
unsigned short iDim, nNeigh,iNeigh; /* JamesLiu Oct12*/
unsigned long iPoint;
unsigned long No_neigh;
double xCoord_neigh;
double cdesljm;

/*--- Loop over all interior mesh nodes and compute the distances to each
of the no-slip boundary nodes. Store the minimum distance to the wall for
each interior mesh node. ---*/
cdesljm=config->GetConst_DES();

for (iPoint = 0; iPoint < GetnPoint(); iPoint++) {
nNeigh = node[iPoint]->GetnPoint();
coord = node[iPoint]->GetCoord();
dist = 1E-20;
for (iNeigh = 0; iNeigh < nNeigh; iNeigh++){
No_neigh = node[iPoint]->GetPoint(iNeigh);
dist00=0.0;
for (iDim = 0; iDim < nDim; iDim++) {
xCoord_neigh = node[No_neigh]->GetCoord(iDim);
dist00 += (coord[iDim]-xCoord_neigh)*(coord[iDim]-xCoord_neigh);
}
dist00=sqrt(dist00)/1.73205080757; /* sqrt(3) for unstructured grid 1.73205080757*/
if(dist00>dist)
dist=dist00;
}
node[iPoint]->SetTurb_Len_Scale_DES(dist*cdesljm);
}
}

liujmljm July 1, 2014 11:27

Quote:

Originally Posted by EMolina (Post 499377)
Hi Jianming,

I have a couple of questions:

a) In step 8, Is missing the way you compute the DES turbluent scale?

b) In step 10, you replace the GetWall_Distance() for GetTurb_Len_Scale_DES()?

c) You implemented the DES97 version or the Delayed-DES version?

Thank you very much

Regards,

Eduardo

in void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics *numerics, CNumerics *second_numerics,
CConfig *config, unsigned short iMesh) {

first give definition for two double variables (dist00,dist00DES), then you should change the distance to the wall like following.


/*--- Set distance to the surface ---*/
// numerics->SetDistance(geometry->node[iPoint]->GetWall_Distance(), 0.0);
//---------------------------------------------

// JamesLiu Oct14
dist00=geometry->node[iPoint]->GetWall_Distance();

if(config->GetWith_DES()) {
dist00DES=geometry->node[iPoint]->GetTurb_Len_Scale_DES();
if(dist00<dist00DES) dist00DES=dist00;
numerics->SetDistance(dist00DES, 0.0);
}
else
numerics->SetDistance(dist00, 0.0);

liujmljm July 1, 2014 11:30

the modification for SA-model + DES97 is developed under SU2V3.2

liujmljm July 2, 2014 11:20

when you run des, you should add the option in the configure file

EMolina July 2, 2014 22:14

Hi

In step 7 I think it is missing:
addBoolOption("WITH_DES", With_DES, false);

I follow your steps and compiled the su2 code succesfully. Once again thank you very much,

Now, I am planning to validate this DES modification using the square cylinder test case. Following this AIAA paper:

http://www.google.com.br/url?sa=t&rc...70138588,d.cWc

I create a very similar grid and now I will run this test case. If you are interested in see the 3D grid I can send you!

Meanwhile, I am seeing how we can implement the DDES version.

Regards.

Eduardo.

liujmljm July 3, 2014 03:44

Quote:

Originally Posted by EMolina (Post 499752)
Hi

In step 7 I think it is missing:
addBoolOption("WITH_DES", With_DES, false);

I follow your steps and compiled the su2 code succesfully. Once again thank you very much,

Now, I am planning to validate this DES modification using the square cylinder test case. Following this AIAA paper:

http://www.google.com.br/url?sa=t&rc...70138588,d.cWc

I create a very similar grid and now I will run this test case. If you are interested in see the 3D grid I can send you!

Meanwhile, I am seeing how we can implement the DDES version.

Regards.

Eduardo.

Yes, you are right, I am sorry I forget: addBoolOption("WITH_DES", With_DES, false);
Could you please send your grid to me. my email is jmliuxznu@163.com
thank you very much

EMolina July 8, 2014 12:17

Hi,

I send you the email.

Did you get it?

Regards.

liujmljm July 8, 2014 14:20

Quote:

Originally Posted by EMolina (Post 500626)
Hi,

I send you the email.

Did you get it?

Regards.

Sorry, I just check my email now. Thank you. I get it.

Jianming

wanjia July 9, 2014 23:07

Hi, I am inspired by your discussion. But I still have one question after reading it. Since DES is a LES-like method which permits the instability fluctuation in it, the second order upwind scheme seems not a good choice. Have you guys checked any other high order central schemes available for viscous terms?

EMolina July 10, 2014 22:17

Hi wanjia

Maybe you are right. I have been working with DES on commercial softwares and they are basically originated from RANS codes as SU2. Some codes are Hybrid (center-scheme in the LES region) and upwind in URANS regions. But Spalart showed in his paper that is possible to get generous LES-content even in a pure second-order upwind code. As he also said: "It is best to avoid blanket statements."

I am testing the DES capabilities with JST and the Roe scheme. When I finished I will share here with the community.

Thank you for your interest.

Regards

Eduardo

vonboett July 11, 2014 05:04

Hybrid URANS/LES
 
I recommedn the LeMoS OpenFOAM extensions for 2.3.x

hlk July 12, 2014 14:34

Hello
Thank you for your interest in su2.
Please feel free to submit a pull request on github for any new capabilities you have developed.

liujmljm July 12, 2014 17:09

Quote:

Originally Posted by hlk (Post 501290)
Hello
Thank you for your interest in su2.
Please feel free to submit a pull request on github for any new capabilities you have developed.

Thank you very much. I will learn how to use github.

EMolina October 26, 2014 12:38

4 Attachment(s)
Dear Jianming Liu and SU2 developers.

Firstly, I would like to thank Jianming Liu for sharing his initial Detached eddy simulation (DES) Implementation.

I would like to share with the community the results of the Delayed Detached Eddy Implementation in the SU2 code. The test case is a High Reynolds Number Flow around a NACA0021 Airfoil in Deep Stall. Please see following links containing the experimental data and results from others solvers.

http://uriah.dedi.melbourne.co.uk/w/index.php/UFR_2-11

http://agarbaruk.professorjournal.ru...=DLFE-6685.pdf

The mesh was generated in order to be similar to the course grid of the NTS partner. Grid size ~ 0.5e6 Nodes, Lz=1c, \deltaZ=0.03c and Y+<1.0 with periodic boundary conditions in the spanwise (z) direction.

This was the first simulation using the DDES approach, so I did not played with the Spatial Discretization options, I used Roe Scheme with 2nd Order Limiter (LIMITER_COEFF= 10.0). As expected, the Upwind scheme damped the high frequency waves so additional modifications should be made to adequate the numerical dissipation levels for a Large Eddy Simulation.

I would like to perform the folowing modifications:
- In order to validate the solver in the LES mode, the simulation of decaying homogenous isotropic turbulence should be done and computed with the experimental resuls of Comte-Bellot, assessing the impact of numerical dissipation on solution accuracy. How can I perform a rapid modification in the code to simulate a periodic cube in 3 directions?
- Anyone implemented the matrix-based artificial dissipation instead of the scalar one in the JST scheme? If no, can someone guide me in the code to perform such modification.
- It is possible to perform a hybrid discretization in SU2(Central Scheme in LES regions and Upwind in RANS regions) as Travin proposed in his article.

If possible I would like to rear this discussion in SU2 Youtube channel.

Best regards,

Eduardo.


Attachment 34609

Attachment 34610

Attachment 34611

Attachment 34612


All times are GMT -4. The time now is 22:40.