Openfoam Case Manager / Laucher GUI?
Hi,
Having worked with Code_Saturne, I am trying to get starting with Openfoam. I was wondering if there was a case manager GUI such as the Simplefoam one that ships with CAELInux, or the now defunct FoamX? I have a cube in a box model prepared in Salome, meshed it in tetahedrons, named my inlet, outlet, and wall faces, and exported to UNV, but now there are a mariad of folders and files that have to be in place before I even run ideasUnvToFoam or even check the mesh. It looks like OpenFoam can solve a lot of different types of cases, but I don't see a lot of documentation on how to prepare simple scripts, nor do I see firm information on which files must be in place. Some documentation does not even state that certain folders have to be in place at all. I cannot help but think that there must be a easier way to do a simple test, even if it means that a have a .zip/tar/7z of dummy folders and a sample script to edit. It is one thing to give a rundown of all of a program's commands; it is another to give contextual information and some real world examples. I don't know whose idea it was to remove FoamX, but it's a boom for commercial solvers. Any help would be appreciated. |
Quote:
Quote:
After this, open /constant/polyMesh/boundary and use the names listed there to define the boundary conditions in the 0 folder. In the constant folder you set physical properties and in system the numerical and solution settings. Quote:
Quote:
Best, |
I am sorry, but what you stated was not consistent with what ideasUnvToFoam does. As stated elsewhere in multiple threads, as well as my experience, without certain folders in place, ideasUnvToFoam will error out on exit, and not proceed. That's one of the things I have problems with.
Whether or not the process is complicated or not, it is cryptic. What was the "0" folder/directory name was supposed to represent is not clear to me. I do not have money to spend of seminars. I would have hoped that there would be enough documentation available to make the program accessible to all. I have seen amazing results with OpenFoam, but I am still struggling with my first cube-in-a-box test case. I implore OpenFoam to bring back a helper application, such as FoamX or CAE's SimpleFoam unless pre and post processing can be...streamlined : ) |
Hi!
At first you have to be able to run/ compile the cavity tutorial. Understand the structure of a openfoam case folder. Try to re-run the icoFoam/cavity using the official tutorial and take a look of this other tutorial http://web.student.chalmers.se/group...alkThrough.pdf saludos! |
Quote:
Quote:
Quote:
Quote:
Quote:
Best, |
Penn State Tutorial Walkthrough Notes:
The OpenFoam tutorials must be copied over for the tutorial instructions to work as shown in "Getting Started" on www.openfoam.org/download/git.php On page 4, the tutorial paths have changed adding "/incompressible" as in $FOAM_RUN/tutorials/incompressible/icoFOAM/cavity 3.) Apparently, the sourced environment variable $FOAM_RUN will point to ~/OpenFoam/username-2.0.1/run whereas username will be your username and 2.0.1 will be the version of OpenFOAM you are using. On page 6, in paraview/parafoam "accept" has been changed to "Apply" On page 6, I believe to view the same results, the user might click on the Object inspector "Display" tab, and in the "Color" section choose "p" . To turn on the scale click on "Edit Color Map" and then "Color Legend" and then choose "Show Color Legend". To make the base color green as in the tutorial, select "Choose Preset" and then "Blue to Red" HSV and then okay it. [At this point the user might wonder why a high-school drop-out, armed only with a GED, physics lecture videos from MIT and hearsay CFD knowledge from a Ames Research Center retiree, and who struggling to live while in poverty, in the heart of Silicon Valley, is updating class notes for Penn State University professor. Okay, we forge onward....] On page 9, it might be worth suggesting that the student type "ls" to show the directory contents. In that way they will see the directories that are being discussed, or "ls -l" to see if these things are files or directories/folders. On Page 11, it might be worth mentioning who aren't familiar with linux/unix that blockMeshDict is a text file that can be read with more, or gedit if using on Gnome. This also might a good place to mention that OpenFoam deals with SI units, such as Meters, which is why the convertToMeters command is invoked. On page 17, it might also be worth mentioning that controlDict is a text file and not a directory which also can be read, as above. On page 30, Looking for "PBiCG"? I suspect that we are using a different solver now. On page 35, we need to add "incompressible" in the path for copying. For those who don't know, to launch Allrun , we ./Allrun from the command prompt. |
Quote:
I think that the first instruction is only a "precaution" to keep the clean tutorials files. You can copy this file wherever you want and then run it just typing the correct solver name Saludos |
Quote:
|
If anyone could post some practical tutorials on using Openfoam for CFD, that would be appreciated.
For real-world use, after preparing meshes, the pre-processing and directory structure preparation seems formidable without helper utilities. I saw one webpage that dealt with which directories need to be in place to convert invoke proper mesh conversion, but the documentation seems incomplete. What seems missing how to prepare original data for solving. Yes, we have test cases and their invocation, and we also have a library reference, but the stuff information between, such as workflow from .unv-to-solve information seem sparse. OpenFoam is power software, deserving excellent documentation. |
Quote:
0/ constant/ >>polyMesh/ system/ On a side note, I can't stress more how easier it would be if users read the User's guide carefully from the beginning to the end, while trying to put it in practice. I know it is not complete, but it surely contains all users need to know to avoid these mistakes. Best, |
Quote:
Quote:
Quote:
Best, |
As I stated before, the path issue is that the paths where the OpenFoam stores its tutorials data have changed since the tutorial have been written, and that will needlessly frustrate users. The tutorial needs to be updated.
As I have also stated before, if OpenFoam does not have certain folders in place, it will exit out with an error, just as MIT has mentioned in here and someone has mentioned here. Also, as I stated, information on workflow is sparse, and between what you stated and the other two links, you will find dependencies as which files and directories need to be in place, and when. Am I to assume that no less than 11 files and folders need to be in place to run the test? As for a specific problem, I want to make a fresh study of cube in a box. I have a unv. file already exported with the (inner) cubewalls, inlet, outlet, and for the sake brevity we can call the rest of the faces testsection. 1.) Which files and folders must I create before invoking ideasUnvToFoam ? 2.) What else needs to be done before I invoke the solver? 3.) If I want compressible, as in air, does the process change? If OpenFoam is to be useful for academic purposes, should it not have good documentation? If there is a conflict of interest, should that not be resolved? |
Quote:
Case name = backstep Create a folder named backstep, It can be located anywhere you want, but for convenience put it in tutorials/incompressible/simpleFoam This new "backstep" folder should contain this folders: 0/ constant/ system/ and the file name.unv The you have to open a new Terminal and go to this folder, then write ideasUnvToFoam name.unv ( where name is the name of your unv mesh file :eek:) After this process you have to check the "boundary" file inside constant/polymesh and see if the patch name/type are correct. Same for 0/ folder check the BC ( try to work with laminar case first aboiding turbulence bc) If anything is correct just type simpleFoam on the terminal.. Quote:
but all the tutorial files are ready to run. Try to keep it simple, icoFoam/simpleFoam are great to learn how. Try to modify the cavity tutorial blockMesh and put some inlet/outlet and run it like a laminar flow between parallel plates.. Quote:
Sorry about my English I´m doing my best =P Saludos! |
Quote:
The tutorial on the MIT website is correct in explaining the details of mesh conversion. What I am trying to tell you is that you do NOT need to write those configuration files every time you need to set-up a case. The typical procedure to set a case up is the following:
Quote:
For what concerns the sparsity of the information, I agree. However OpenFOAM is open source, and the wiki is always waiting for contributions ;-) Quote:
Quote:
So, you would go to ~/OpenFOAM/OpenFOAM-2.1.x/tutorials/incompressible/pisoFoam/ras/ and copy the cavity test case. Then you rename it to something you like, and the copy your UNV file into the directory. At this point you can run the mesh converter. Quote:
Open finally the files U, p, k, epsilon, and set the boundary conditions, using their name to identify them (see how it is done in the cavity tutorial). You'll have to set the numerics in fvSchemes and fvSolution, and the time stepping / saving information into controlDict. Quote:
Quote:
Best, |
Thank You, I really think that you both are trying to help me.
I just got home late. I will look at it in the morning. Apparently, the controlDict needed to be written before the IdeasToFoam conversion process is done? Code:
brenda@Brenda-DTL:~/OpenFOAM/brenda-2.0.1/run/tutorials/incompressible/simpleFoam/backstep$ ideasUnvToFoam Mesh_1.unv |
Send me your email direction by pm
I will send you a really simple case: flow between parallel plates running on laminar simpleFoam under blockMeshdict then modify it and try to import one unv mesh file. Saludos |
Quote:
Best, |
Greetings to all,
Although I'm coming in rather late to this thread, and since this hasn't been mentioned before on this thread, here's a good link about GUI's for OpenFOAM for future reference: http://openfoamwiki.net/index.php/GUI Best regards, Bruno |
As a new user, I still find OpenFoam's file structure and pre-processing dependencies needlessly confusing and poorly documented.
The tutorials I have found tell you what to do, but do not give me a good sense of what I am doing, so the jump between following the tutorial and creating a new case from scratch is dreadful. Packaging test cases with OpenFoam does not equal documentation. I wish there was enough documentation to re-create the test cases. Even if I am successful, it is laborious to learn something from taking it apart and examining it, rather than having information on why things are they way they are. For instance, if the 0 folder had been named initial or initial_condition or something such as that, I would have known what it was. Or, if the 0 folder was in another folder named "timestep" or "time" it would have meant something to me. [I have been working with computers since 1984, and I have found benefit of having meaningful file and folder names.] Even the gracious people who have helped me in this thread have omitted important steps. The commercial products which employ openfoam are out to the question for students, which leaves 2 open source packages, which mesh and they are interesting, but young. Looking at OpenFoam objectively, I assert that the decision to stop support on helper pre-processing applications for Openfoam was indeed a dubious mistake. Why should parafoam, exist for post processing, and not employ a preprocessing? I feel that it is a logic that is inconsistent. [Sorry, I have been sick for the last few weeks.] |
Quote:
Quote:
Quote:
I could object to your suggestion of putting time-steps in a subfolder because it would add complexity to the structure of the case :D Quote:
Quote:
Quote:
Best, |
Quote:
I'm comfortable with the OpenFOAM structure and I find it easy to work it. Maybe OpenFOAM would be more useful with many GUI tools for some kind of people that likes it, but where is the efficiency there? How many advantages has pre-processing with some graphic user interface? |
alquimista,
To answer your question about GUIs, the advantage with a GUI is that the case can be manipulated in a CAD like manner to specify BC patches, inlet and outlet conditions, movement of objects in the simulation volume, etc. While doing this, it would provide validation of these inputs, visual indications of correctness of the simulation, provide tool tips, and application help. It is inefficient to use config files to run a simulation like this. It is the difference between using a command line interface and a 3D CAD Modeller like FreeCAD to produce a 3D CAD Model. The advantage is that it is easier to see relations between elements of the simulation in a 3D graphic view than it is to try and correlate the numbers from several config file in your head. This makes the simulation more likely to be accurate to the what was intended by the simulation designer. By adding validation, correctness of the simulation is strengthened. Granted this is sort of an open source project run by a company selling services. |
I agree a GUI is helpful, especially when you have different cases to setup quickly. I see a GUI essential for pre-processing (CAD), and post-processing. However, I don't see it as an essential aspect for CFD codes (meaning the crunching number engine), and it actually often represents a limitation in terms of efficiency when you have to perform repetitive work like in parametric studies / uncertainty quantification analysis, because of the quite limited scripting capabilites. Also, specifying BC's in a GUI when you have many might not be exactly fun, while you could user either regular expressions, or script the setup once for all if you have a file-based setup.
Data validation is what I would find more useful, however this could be implemented at the level of the solver. It is partially there already for keywords, and it's not terribly hard to add it to inputs (I did this for some of my own solvers). In short, ideally, both aspects, GUI and text-based setup, could be combined to leverage their advantages based on the specific use-case. |
All times are GMT -4. The time now is 08:23. |