|
[Sponsors] |
January 25, 2013, 12:45 |
How to access nuSgs from pisoFoam.C
|
#1 |
Member
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 14 |
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:
... turbulence->correct(); solve ( fvm::ddt(s) + fvm::div(phi, s) - fvm::laplacian(nuSgs(), s) == sSource ); runTime.write(); ... 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 |
|
January 25, 2013, 18:01 |
|
#2 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23 |
Use
Code:
turbulence->nuSgs() If I were you, I would also include a Schmidt-number in the laplacian... Cheers, Lieven |
|
January 26, 2013, 10:44 |
|
#3 |
Member
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 14 |
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 |
|
January 26, 2013, 11:50 |
|
#4 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23 |
Sorry, my mistake. U should use
Code:
turbulence->nut() Cheers, Lieven |
|
January 27, 2013, 15:15 |
|
#5 |
Member
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 14 |
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. |
|
January 27, 2013, 15:42 |
|
#6 |
Senior Member
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 23 |
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 |
|
Tags |
large eddy simulation, nusgs, pisofoam, scalar transport |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting access to mesh (fvMesh) via object registry | Chris Lucas | OpenFOAM Programming & Development | 18 | January 15, 2024 03:57 |
[DesignModeler] DesignModeler Scripting: How to get Full Command Access | ANT | ANSYS Meshing & Geometry | 53 | February 16, 2020 16:13 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 18:18 |
Error: access: unbound variable,HELP | sudhakar | FLUENT | 0 | January 16, 2007 00:21 |
Access Density | Allan Walsh | FLUENT | 3 | October 4, 2005 08:55 |