CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

RANS Solver Question/Recommendation

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2020, 17:06
Question RANS Solver Question/Recommendation
  #1
New Member
 
J.B.
Join Date: Jun 2020
Posts: 11
Rep Power: 5
Disco_Broccoli is on a distinguished road
Hi CFD community,

I am new to CFD but took some university level classes. I have an beginner understanding on the numerical methods such as how to discretize a simple scheme, validate with MEA, review stability using von Neumann method, also learned about the RK time stepping. However, applying my own 1D/2D solver for FDM and FEM (DGM) in the classes helped most (Isentropic vortex and lid driven cavity).

I am now in a master degree and I am reading about turbulence, inevitably RANS is mentionned in Wilcox and Pope. Except for derivation found in books I have a fundamental problem with it: How does one write a RANS solver?

From my limited background, I have trouble picturing where/how the time-stepping is involved. Mainly, from google images I see results that are not time dependent so if I am correct we can't see the eddies at a given time.

Does anyone know any good books teaching about implementing RANS? Is going into the OpenFOAM source code a good idea?

Thanks!
Disco_Broccoli is offline   Reply With Quote

Old   September 9, 2020, 03:26
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Disco_Broccoli View Post
Hi CFD community,

I am new to CFD but took some university level classes. I have an beginner understanding on the numerical methods such as how to discretize a simple scheme, validate with MEA, review stability using von Neumann method, also learned about the RK time stepping. However, applying my own 1D/2D solver for FDM and FEM (DGM) in the classes helped most (Isentropic vortex and lid driven cavity).

I am now in a master degree and I am reading about turbulence, inevitably RANS is mentionned in Wilcox and Pope. Except for derivation found in books I have a fundamental problem with it: How does one write a RANS solver?

From my limited background, I have trouble picturing where/how the time-stepping is involved. Mainly, from google images I see results that are not time dependent so if I am correct we can't see the eddies at a given time.

Does anyone know any good books teaching about implementing RANS? Is going into the OpenFOAM source code a good idea?

Thanks!

RANS formulation solves the steady state equations, the time derivatives vanish.
The solver is as a same as for a laminar steady flow the difference being in the additional term taking into account the turbulence model.
FMDenaro is offline   Reply With Quote

Old   September 9, 2020, 17:41
Default
  #3
New Member
 
J.B.
Join Date: Jun 2020
Posts: 11
Rep Power: 5
Disco_Broccoli is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
RANS formulation solves the steady state equations, the time derivatives vanish.
The solver is as a same as for a laminar steady flow the difference being in the additional term taking into account the turbulence model.
Thank you for the feedback. Just to clarify, when one talks about laminar steady flow. Are they referring to solving algebraic equations? Also, if the time derivative vanishes does that mean there is no time-stepping?

Thank you!
Disco_Broccoli is offline   Reply With Quote

Old   September 9, 2020, 17:48
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
- You always get a final algebric system to solve.

- The solver can be also time-dependent, you run the simulation until the time derivatives numerical vanish. In case the equations are for the steady state there is not a physical time step, you have only a residual to drive to be under certain threshold.
Disco_Broccoli likes this.
FMDenaro is offline   Reply With Quote

Old   September 9, 2020, 18:25
Default
  #5
New Member
 
J.B.
Join Date: Jun 2020
Posts: 11
Rep Power: 5
Disco_Broccoli is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
- You always get a final algebric system to solve.

- The solver can be also time-dependent, you run the simulation until the time derivatives numerical vanish. In case the equations are for the steady state there is not a physical time step, you have only a residual to drive to be under certain threshold.
Do you have any recommendation for readings on the subject of RANS implementation? Thanks for the fast response!
Disco_Broccoli is offline   Reply With Quote

Old   September 10, 2020, 00:27
Default
  #6
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Disco_Broccoli View Post
Do you have any recommendation for readings on the subject of RANS implementation? Thanks for the fast response!



http://ftp.demec.ufpr.br/disciplinas...sekera_2ed.pdf
Disco_Broccoli likes this.
arjun is offline   Reply With Quote

Old   September 21, 2020, 15:44
Default
  #7
Senior Member
 
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 204
Rep Power: 16
t.teschner is on a distinguished road
There are a few useful books in my opinion which you may want to consult. The book of Pope "Turbulent Flows" and Davidson "Turbulence" may be a good starting point about turbulent flow in general, but probably don't go into that much depth as you would like, especially if you are interested in more RANS modelling. Here is a list of my recommendation, in no particular order:

An Introduction to Computational Fluid Dynamics: The Finite Volume Method by Versteeg and Malalasekera: While this book is more about the general discretisation of the governing equations used in CFD, they have an excellent chapter on Turbulence (its physics but also its modelling). It is relatively compact but gives you all you need to get started.

Statistical Turbulence Modelling For Fluid Dynamics - Demystified: An Introductory Text For Graduate Engineering Students by Michael Leschziner: This is probably the book you want to be reading if you want to understand more about the different RANS models and how they are constructed. It doesn't necessarily give you the discretised equations, but RANS modelling by itself is complicated enough and this book is a welcomed guide that will help you with RANS specific questions.

Turbulence Modeling for CFD by David C. Wilcox: You mentioned this book but have a look in the later chapters, there are specific hints about the implementation, though maybe not as much as you would like. Still it is a useful resource.

Computational Fluid Dynamics by Jiri Blazek: This book basically gives you all the equations in a discretised form which is very helpful when writing your RANS code. This book reads like a manual for the TAU CFD solver (developed by DLR (german aerospace center)) and hence is very close to how the equations are actually discretised. The focus of this book is on unstructured grids, which may help to write a generic solver.

The Finite Volume Method in Computational Fluid Dynamics by Moukalled, F., Mangani, L., Darwish, M.: I have some reservations recommending this book speciffically for turbulence. Don't get me wrong, this is an excellent book and I use it for almost all of my discretisation related questions / reading and I always find something new in there, I just feel that the RANS chapter could have been a bit more thorough to live up to the excellent quality in the rest of the book. Still, it may be very useful to you as they write out the equations exactly as they are discretised, which is probably what you want. I just feel some additional background reading will help you here.

A New Hypothesis on the Anisotropic Reynolds Stress Tensor for Turbulent Flows: Volume I and II by Laszlo Konozsy: This is a relatively new book and mainly concerned with a new anisotropic RANS model (based on the k-w model), however, parts of the book are dedicated for RANS implementation specific issues (and full source codes are provided) which may be yet another useful resource.

Mathematics, Numerics, Derivations and OpenFOAM by Tobias Holzmann: This may not be directly related to your question but a very useful reference in general for the derivation of the scalar turbulence equations, which may be of use for other people stumbling upon this thread. Tobias is a quite active member in this forum and I thought he deserved a shout out, I just bought a copy and find it very useful as a reference (there is also a free version of the book available).

Those are my suggestions, hope these will help to get started
Disco_Broccoli likes this.

Last edited by t.teschner; September 26, 2020 at 06:54.
t.teschner is offline   Reply With Quote

Old   September 21, 2020, 16:02
Default
  #8
New Member
 
J.B.
Join Date: Jun 2020
Posts: 11
Rep Power: 5
Disco_Broccoli is on a distinguished road
Quote:
Originally Posted by t.teschner View Post
There are a few useful books in my opinion which you may want to consult. The book of Pope "Turbulent Flows" and Davidson "Turbulence" may be a good starting point about turbulent flow in general, but probably don't go into that much depth as you would like, especially if you are interested in more RANS modelling. Here is a list of my recommendation, in no particular order:

An Introduction to Computational Fluid Dynamics: The Finite Volume Method by Versteeg and Malalasekera: While this book is more about the general discretisation of the governing equations used in CFD, they have an excellent chapter on Turbulence (its physics but also its modelling). It is relatively compact but gives you all you need to get started.

Statistical Turbulence Modelling For Fluid Dynamics - Demystified: An Introductory Text For Graduate Engineering Students by Michael Leschziner: This is probably the book you want to be reading if you want to understand more about the different RANS models and how they are constructed. It doesn't necessarily give you the discretised equations, but RANS modelling by itself is complicated enough and this book is a welcomed guide that will help you with RANS specific questions.

Turbulence Modeling for CFD by David C. Wilcox: You mentioned this book but have a look in the later chapters, there are specific hints about the implementation, though maybe not as much as you would like. Still it is a useful resource.

Computational Fluid Dynamics by Jiri Blazek: This book basically gives you all the equations in a discretised form which is very helpful when writing your RANS code. This book reads like a manual for the TAU CFD solver (developed by DLR (german aerospace center)) and hence is very close to how the equations are actually discretised. The focus of this book is on unstructured grids, which may help to write a generic solver.

The Finite Volume Method in Computational Fluid Dynamics by Moukalled, F., Mangani, L., Darwish, M.: I have some reservations recommending this book speciffically for turbulence. Don't get me wrong, this is an excellent book and I use it for almost all of my discretisation related questions / reading and I always find something new in there, I just feel that the RANS chapter could have been a bit more thorough to live up to the excellent quality in the rest of the book. Still, it may be very useful to you as they write out the equations exactly as they are discretised, which is probably what you want. I just feel some additional background reading will help you here.

A New Hypothesis on the Anisotropic Reynolds Stress Tensor for Turbulent Flows: Volume I and II by Laszlo Konozsy: This is a relatively new book and mainly concerned with a new anisotropic RANS model (based on the k-w model), however, parts of the book are dedicated for RANS implementation specific issues which may be yet another useful resource.

Those are my suggestions, hope these will help to get started
Thank you for sharing your suggestion. I will take a closer look at each of them!
Disco_Broccoli is offline   Reply With Quote

Old   September 22, 2020, 07:45
Default
  #9
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
A good source of material for a modern FV solver (including its turbulence part) are the Fluent references of the 90s (basically, everything written by Mathur, Murthy, Weiss, Smith, Caraeni and Kim)
sbaffini is offline   Reply With Quote

Old   September 22, 2020, 08:31
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by sbaffini View Post
A good source of material for a modern FV solver (including its turbulence part) are the Fluent references of the 90s (basically, everything written by Mathur, Murthy, Weiss, Smith, Caraeni and Kim)


Send me email if someone wants them :-D

PS: You are right. I learned a lot from them and refer to them still (in 2020).
sbaffini likes this.
arjun is offline   Reply With Quote

Old   September 22, 2020, 11:43
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,771
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
A good source of material for a modern FV solver (including its turbulence part) are the Fluent references of the 90s (basically, everything written by Mathur, Murthy, Weiss, Smith, Caraeni and Kim)



The progress is no longer a progress...
sbaffini likes this.
FMDenaro is offline   Reply With Quote

Old   September 22, 2020, 12:13
Default
  #12
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
The progress is no longer a progress...
Well, there has certainly been progress in some aspects, but for what concerns the solvers and their workflows, the basic schemes and the particular choices that actually lead to a robust implementation, there is nothing really new, at least nothing to be meant as an actual replacement for a solid base recipe useful to novices.

For example, there are still people working on gradients and limiters, but wouldn't consider this material for someone just starting.

In contrast, I think that the Fluent material is among the most useful, self-contained ones, if not the only one at all. And the fact that it is the most used commercial CFD code, I think, adds to the relevance.

Also, if you ever tried to read other CFD manuals, in comparison, they look as black magic (which is bad)
sbaffini is offline   Reply With Quote

Old   September 22, 2020, 12:36
Default
  #13
q__
New Member
 
q
Join Date: Sep 2020
Posts: 19
Rep Power: 5
q__ is on a distinguished road
Of course, there is a great book which perfectly fits to your query as previously mentioned. I think it should serve as a standard textbook at universities for the beginners IMO.


Here it is:


https://www.google.com/url?sa=t&rct=...wzmhnVjH-bmyYm


BR,
Jakub
DeadLee likes this.
q__ is offline   Reply With Quote

Old   September 22, 2020, 12:54
Default
  #14
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
I would love to know what progress that is made in CFD after year 2000 though.



Most of the things that are used published before 2000 and all the major help is in terms of hardware. (GPU etc). Its only now that AI has started to influence the simulation aspects of CFD but that is far far from mainstream.



Off top of my head pressure based coupled solver's development may be something that could be classified that became prominent after 2000.
arjun is offline   Reply With Quote

Old   September 22, 2020, 15:49
Default
  #15
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by arjun View Post
I would love to know what progress that is made in CFD after year 2000 though.



Most of the things that are used published before 2000 and all the major help is in terms of hardware. (GPU etc). Its only now that AI has started to influence the simulation aspects of CFD but that is far far from mainstream.



Off top of my head pressure based coupled solver's development may be something that could be classified that became prominent after 2000.
I was mostly just saying, just for the sake of the argument. However, if we exclude the algebraic solver side (which I don't know), every now and then you can still find people coming out with simple, nice things that fit well.

For example, in my code I use a mixed, Least squares/Green Gauss approach for gradients, where the GG part is based on a 2018 work. Nothing fancy, but it overcomes a serious problem of the classical GG implementation that was unsolved to date.

Also, pressure based coupled solvers are, from what I can see, still in a sort of infancy and new works keep coming out
sbaffini is offline   Reply With Quote

Old   September 22, 2020, 17:01
Default
  #16
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 500
Rep Power: 20
JBeilke is on a distinguished road
Quote:
Originally Posted by arjun View Post
I would love to know what progress that is made in CFD after year 2000 though.

QGD is completely new - at least outside Russia :-)

QGDsolver - OpenFOAM computational framework for fluid flows based on regularized equ
JBeilke is offline   Reply With Quote

Old   September 22, 2020, 23:52
Default
  #17
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by JBeilke View Post

This is indeed very interesting and could be very useful if used properly. The thing is that classic method decouples at very very small time step size and it has been long standing problem of CFD. This could be very useful there.
I would try and see if i understand enough to get it in Wildkatze as an option to the users. So I hope i have understood by first reading but things could be different when actually implemented.

(interestingly at the core is the method that i have been using for gradients in Wildkatze for 3 years now. That is calculating the gradients at the face).




Quote:
Originally Posted by sbaffini View Post
For example, in my code I use a mixed, Least squares/Green Gauss approach for gradients, where the GG part is based on a 2018 work. Nothing fancy, but it overcomes a serious problem of the classical GG implementation that was unsolved to date.

Also, pressure based coupled solvers are, from what I can see, still in a sort of infancy and new works keep coming out

Could you share what problem was that and how it was overcome.

I know that green gauss are affected by skew. So to mitigate it I used to have an option where the least square method was used at the cell face to get the gradient and using this gradient cell face values were computed. This would have taken cared of skew mostly. (this was costly so it is removed and replaced)

Now I provide option to the user to calculate least square gradient from extended stencil so that the skew does not affect the results much.
arjun is offline   Reply With Quote

Old   September 23, 2020, 02:11
Default
  #18
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
This is the work I was referring to:

https://www.researchgate.net/publica...reconstruction

And, instead of using iterstively, I use it after the least squares
sbaffini is offline   Reply With Quote

Old   September 23, 2020, 02:39
Default
  #19
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by sbaffini View Post
This is the work I was referring to:

https://www.researchgate.net/publica...reconstruction

And, instead of using iterstively, I use it after the least squares

Paolo


Thank you very much for pointing to the paper. Looks very interesting work indeed.

I will give it a serious trial very very soon. Most probably will share on linkedin so you could see what comes out of the study.



Arjun
sbaffini likes this.
arjun is offline   Reply With Quote

Old   September 23, 2020, 03:13
Default
  #20
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by arjun View Post
Paolo


Thank you very much for pointing to the paper. Looks very interesting work indeed.

I will give it a serious trial very very soon. Most probably will share on linkedin so you could see what comes out of the study.



Arjun
Also, I now see, there is an additional work on RG citing it that also seems interesting.

So, little pieces but, at least for gradient reconstruction there seems to be stuff in people's pipelines.

I also find interesting several of the works of Nishikawa (which are all post 2000)
sbaffini 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
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 16:08
3d vof Smaras FLUENT 2 February 19, 2013 06:58
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


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