CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Representing controlDict information using OpenFOAM classes (https://www.cfd-online.com/Forums/openfoam-programming-development/74225-representing-controldict-information-using-openfoam-classes.html)

sanatan March 26, 2010 17:11

Representing controlDict information using OpenFOAM classes
 
Hi,

What are the OpenFOAM class/API methods to define the information in the controlDict file under the system folder of the root case structure? I would like to define the simulation control information programmatically using the OpenFOAM API.

Once I have defined all the simulation control information, I can choose to either write it out to the root case structure or feed it to OpeFOAM programmatically (using API calls).

How can I accomplish this?

Thanks.

sega March 26, 2010 17:18

Well, first I have to confess I'm not exactly sure what you want to do!

If you are talking about API as an interface to some kind of your own software, maybe you should get in touch with the guy from http://www.discretizer.org/

He is doing a project called Discretizer::Setup which is feeding the OpenFOAM solver from his meshing software. Maybe this is a hint ...?!?

sanatan March 27, 2010 13:27

OpenFOAM has an extensive API and data structures to reperesent flow simulation information. I just need to know how to represent the information in the controlDict file using OpenFOAM.

If my earlier question is not clear then another way to ask the same question is when OpenFOAM parses a case what are the classes/data structures it uses to load the information in the controlDict file into memory?

The reason for my question is that I want to prepare and run the simulation programmatically instead of using the manual steps.


Thanks,
Sanatan

sega March 27, 2010 14:20

Ok, I have really no idea what you are talking about.
But this is due to tha fact that I don't have that much programming experience.

Maybe you can check the Doxygen and look up the source code of some solver to get a feeling how it will access the dictionaries.
(If that is what you are talking about - which I'm not sure of.)

Good luck.

Linse February 28, 2012 06:46

Though late, but maybe it helps...

Did you already check how the information from groovyBC gets into the simulations? For this you add a line within the controlDict and everything works fine.
Thus, maybe looking for the interconnection groovyBC-controlDict does give any further hints on how to achieve your problem?


All times are GMT -4. The time now is 15:39.