How to access nuSgs from pisoFoam.C
Dear Foamers,
my task is to add a passive scalar transport equation to pisoFoam.C. Since this is to be run as LES, the subgrid-scale scalar flux is also required, for which I need nuSgs. I would like to know how to access nuSgs from the modified pisoFoam.C. Compilation of pisoModified.C Code:
... Code:
pisoModified.C:135: error: ´nuSgs´ was not declared in this scope Code:
sgsModel->nuSgs() Code:
pisoModified.C:135: error: ´sgsModel´ was not declared in this scope Marcus |
Use
Code:
turbulence->nuSgs() If I were you, I would also include a Schmidt-number in the laplacian... Cheers, Lieven |
Thank you for your advice, Lieven.
Changing Code:
nuSgs() Code:
turbulence->nuSgs() Code:
pisoModified.C:135: error: ‘class Foam::incompressible::turbulenceModel’ has no member named ‘nuSgs’ Code:
LESModel->nuSgs() Code:
pisoModified.C:135: error: ´LESModel´ was not declared in this scope |
Sorry, my mistake. U should use
Code:
turbulence->nut() Cheers, Lieven |
This works, thank you, Lieven.
Now, probably my final question in this thread, I would like to know how I could have deduced this information by myself. If you are aware of a relevant post or documentation that teaches users how to proceed themselves in such cases, please kindly let me know. Of course, in the end it is a matter of personal OpenFOAM experience. |
Well... it's probably a combination of experience and a lot of reading on this forum/pages found via Google/tutorials/...
e.g. I just saw for example that there is a similar discussion going on here: http://www.cfd-online.com/Forums/ope...lent-flow.html It will probably also help to read a bit about the principles of object oriented programming, and in particular about inheritance and it's implementation in C++ cause OF is simply filled with this. The C++ Source Guide created by Doxygen (http://www.openfoam.org/docs/cpp/) is also a huge aid in understanding the OF source code structure so I advise you to try to familiarize yourself with it (e.g. try to find the solution I gave you using Doxygen). Of course, if you still end up stuck, there is certainly no shame in posting something on this forum ;). Cheers, Lieven |
All times are GMT -4. The time now is 09:45. |