CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   foamNewCase: how to use (https://www.cfd-online.com/Forums/openfoam-solving/146654-foamnewcase-how-use.html)

MarcusNHofer January 3, 2015 05:52

foamNewCase: how to use
 
Greetings,

just for the record: I am completely new to CFD, the physics of FD and Open Foam as well. So don't be to surprised if some questions sound a bit funny or I did not find the obvious first hand.

For setting up an OF case the "clean and systematic" way from scratch, I hoped to use foamNewCase. Now the -app parameter seems to be mandatory, and from the listing it requires a /constant and /system directory, i.e. the application must be some existing case directory, where the command must be issued from. Anyway, in my setting the -list option always displays an empty list of applications.

Does anyone use foamNewCase at all, or is it more convenient to just copy other cases and adapt them. Has anyone working examples for foamNewCase?

All the best,
Marcus

wyldckat January 3, 2015 11:02

Greetings Marcus and welcome to the forum!

:eek: I didn't remember about foamNewCase, but now I think I know why:
Code:

$ foamNewCase --help
unknown option: '--help'

Usage: foamNewCase [OPTION]
options:
  -app <name>      specify the application to use
  -case <dir>      specify alternative case directory, default is the cwd
  -list            list the applications available
  -version <ver>    specify an alternative version (default: '2.3.x')

clone initial application settings to the specified case from
    /home/ofuser/.OpenFOAM/appTemplates/{2.3.x,}/<APP>
    /home/ofuser/OpenFOAM/site/appTemplates/{2.3.x,}/<APP>

What happens here is that this script is a useful script for copy-pasting user-made template folders for easily setting up simulations.
The problem is that I'm not aware of such template folders existing already in OpenFOAM itself :(

I think that potentially the objective is to give the users the tools needed to do this, but only at a point where they feel more confident about the settings their using. But they must first work up to that point, hence said template files not existing yet, at least not by default.

The usual work-flow I aware of is either one of two:
  1. Manually copy-paste files/folders from existing tutorials, or previous cases, and manually build on top of that file/folder structure.
  2. Use PyFoam: http://openfoamwiki.net/index.php/Contrib/PyFoam - more specifically... uhm, well, I guess the most likely suspect is the script pyFoamAPoMaFoX.py, but PyFoam provides a lot of scripts that can assist in manipulating the cases a bit more by the way of scripting :D
Best regards,
Bruno

MarcusNHofer January 3, 2015 12:21

Thank you very much Bruno. I should have read the shell script more carefully, it becomes obvious then that also the -list option references this template directory.

Seems that command is not the simple way to set up "fresh" cases, at least when you have no maintained template directory... then it might be useful. Before diging into extensions like PyFoam i want to get familiar with the core and standard methods.

Quote:

  1. Manually copy-paste files/folders from existing tutorials, or previous cases, and manually build on top of that file/folder structure.

I will stick with that for now, I know for sure that this works :-)

All the best,
Marcus


All times are GMT -4. The time now is 08:32.