|
[Sponsors] |
February 12, 2021, 18:30 |
Add one term to simpleFoam
|
#1 |
New Member
Mattia Fabrizio Ciarlatani
Join Date: May 2020
Posts: 7
Rep Power: 5 |
Good morning foamers!
I have a problem that looks simple but I could use some help in solving it. I need to add a term to simpleFoam. I want to add the term to the U equation, where k is the turbulent kinetic energy, which is computed from the RANS model, while is a symmTensorField which is stored into a file. Adding to simpleFoam is trivial, as I just need to add some lines to createFeields.H similiar to the U declaration so that simpleFoam can read that file. At this point, I think that the declaration for computing should be -fvc::div(k*aij) .However, I don't know how to call the turbulent kinetic energy in simpleFoam from the turbulence model. Does anyone have any suggestion on how to do this? Thanks for your time, Mattia |
|
February 13, 2021, 03:57 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
Have you tried something like this:
Code:
turbulence->k() |
|
February 15, 2021, 12:12 |
|
#3 |
New Member
Mattia Fabrizio Ciarlatani
Join Date: May 2020
Posts: 7
Rep Power: 5 |
Hi mAletto,
thanks for the swift reply. I am able to compile it with the instruction you suggest. I'll let you know if I'm able to run this modified simpleFoam as well. Mattia |
|
February 15, 2021, 17:58 |
|
#4 |
New Member
Mattia Fabrizio Ciarlatani
Join Date: May 2020
Posts: 7
Rep Power: 5 |
Hey Michael,
The solution you suggested seems to work. I had to resort to the same technique to call nu (turbulence->nu()) since in simpleFoam from v1906 there is no readTransportProperties.H. Thank you so much! Mattia |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add a mass source/sink to simpleFoam | palarcon | OpenFOAM Programming & Development | 4 | May 15, 2019 02:33 |
How to add a source term on the nodes of the cells | amina.yacoubi | Fluent UDF and Scheme Programming | 4 | February 19, 2019 18:25 |
How to add species source term through fvOptions | blttkgl | OpenFOAM Running, Solving & CFD | 0 | February 19, 2019 02:49 |
Add source term in alphaEqn.H of interFoam | tayo | OpenFOAM | 1 | October 23, 2013 03:40 |
How to add a summison term in the source code | nakul | OpenFOAM | 6 | November 9, 2010 05:36 |