Representing controlDict information using OpenFOAM classes
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?
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 ...?!?
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.
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.)
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 23:47.|