|
[Sponsors] |
kEpsilon: correctNut() and eddyViscosity::correct() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 22, 2018, 11:04 |
kEpsilon: correctNut() and eddyViscosity::correct()
|
#1 | ||
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
Could someone tell me what these featured lines do? Quote:
Quote:
|
|||
November 22, 2018, 20:58 |
|
#2 |
Senior Member
Join Date: Mar 2018
Posts: 115
Rep Power: 8 |
I think you can find the answer in this link:
https://pingpong.chalmers.se/public/...o?item=3855255 |
|
November 23, 2018, 06:56 |
|
#3 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi Linda,
I got to read this file, but he did not answer my questions. It says that part of the code: eddyViscosity<RASModel<BasicTurbulenceModel>>::cor rect();, "...that it first calls the correct() function of the base class, in case there are some general things to be done.", what general things? ...and about: BasicTurbulenceModel::correctNut();, ...he does not say anything. |
|
November 25, 2018, 06:20 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
For the second question: if (!this->turbulence_) //Is it necessary? Yes, it is. turbulence_ is a switch from the RASModel<BasicTurbulenceModel>. This is the switch in the RASDict. This is usually on. But if you turn it off, you just skip this part of the code (return from the function), since you turned the turbulence off. eddyViscosity<RASModel<BasicTurbulenceModel>>::cor rect(); Honestly I have no idea what basic things he talking about. If you check the code: Code:
template<class BasicTurbulenceModel> void Foam::eddyViscosity<BasicTurbulenceModel>::correct() { BasicTurbulenceModel::correct(); } Maybe this is for further developments. So if you have to add something to all turbulence models when you call the correct() function, you can add it in the base class. I hope i understood the code correctly and I'm right. |
|
Tags |
kepsilon, openfoam 5.0, program development |
|
|