|
[Sponsors] |
How to Discover Available Options for fvModels (and Other Dictionaries) in OpenFOAM? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Jim Carter
Join Date: Apr 2025
Posts: 4
Rep Power: 2 ![]() |
Hi everyone,
I’m still fairly new to OpenFOAM and have been learning a lot from the tutorial cases — they’re really helpful, but they don’t always cover every possible feature or configuration. For example, when setting up an fvModels file, I understand how to define something like a massSource by specifying keys like type, phase, points, and massFlowRate. However, I’m unsure what other model types are available besides massSource, and what additional parameters each of them might accept. Sometimes, if I enter something incorrectly, the log file throws an error listing the valid options — which is helpful, but I assume there must be a more systematic way to explore available model types and their corresponding dictionary entries. Is there a recommended way to find out: • What values are accepted for keys like type in fvModels or other dictionaries? • What other parameters can or must be included for a given model? • How to understand the required inputs when switching to a different solver (beyond just looking at example tutorials)? Any advice or pointers to documentation or tools would be greatly appreciated! Thanks in advance! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,294
Rep Power: 30 ![]() ![]() |
Hello,
The answer to your question depends on the OpenFOAM version / development branch you are using. The answer which will always work: get familiar with the source code structure, and look at the source to know what is available in your version. You mention fvModels so I'm assuming you are using the OpenFOAM foundation branch (openfoam.org). If you are using a recent version, you should have the foamInfo and foamToC tools to help you. https://cfd.direct/openfoam/v11-useful-tools/ In addition, the documentation/user guide corresponding to the version you are using can be pretty handy for general information. (but it won't cover exhaustively all the models and features) |
|
![]() |
![]() |
![]() |
![]() |
#3 | ||
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 826
Rep Power: 16 ![]() |
Yann's response is spot on - if you plan to use OpenFOAM for the long-term, then ultimately the best way to get to grips with it is to be able to read the code and work out things for yourself. It WILL be daunting to begin with (and will probably require you to brush up on/develop your C++ skills), but with time and effort you will get there.
To flesh out Yann's post, here are a few pointers to some of your questions below: Quote:
Code:
bananaBlock { type banana; } Quote:
https://cpp.openfoam.org/v12/dir_ec4...cc4e3c6a6.html. Hope this helps. |
|||
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Jim Carter
Join Date: Apr 2025
Posts: 4
Rep Power: 2 ![]() |
Hello Yann, thank you for your response.
I was out of office, hence my late response. I was wondering whether I am missing out on smth critical, but now I know that I have to dig deeper into the code. Yes I am using the foundation branch, and I will try to make more use of foamInfo and foamToC as well! Best, Kai |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Jim Carter
Join Date: Apr 2025
Posts: 4
Rep Power: 2 ![]() |
Hello Tobermory,
thanks for your response, yes I have been trying to use the Doxygen docs though I found them a bit difficult to interpret. However they are quite useful! Thanks for the idea with the banana trick! Best, Kai |
|
![]() |
![]() |
![]() |
Tags |
documentation, openfoam 12, utilities |
Thread Tools | Search this Thread |
Display Modes | |
|
|