stadelmanma / netl-ap-map-flow

A fracture flow modeling package utilizing a modified local cubic law approach with OpenFoam and ParaView compatibility.
GNU General Public License v3.0
5 stars 4 forks source link

Refactor OpenFoam related scripts #85

Open stadelmanma opened 7 years ago

stadelmanma commented 7 years ago

I need to rework these because they are just too complex or too specialized to work with. I'll remove the init-case-dir script from standard use and put it with some other misc scripts since it is both overly complex and very specialized.

apm-parallel-mesh-gen just needs it's CLI tweaked a little but in general it is good to go, I think.

open-foam-export needs to be greatly simplified so it works using a standard set of defaults pulling everything it needs from the model input file. This can include commented out directives to set the number of cores, end-time etc. Ideally I could formula a 'general' method to update any parameter using a directive not just ones I expect. A possible formulation in the input file could be something like #system.controlDict.end_time: 750 where the code splits the key based on . and first checks for a file named the same as the given segment or a property on the current OpenFoam object. The last segment is what will get set to the value after the colon.

stadelmanma commented 7 years ago

When I re-factor this I should make the regular block_mesh_dict class private, since the parallel mesh gen class can do all the same work, only better. Additionally, it may be good to just expose some static methods to generate a mesh instead of forcing the direct use of a class. These mesh builders aren't really intended to be passed around as an object unless being used internally by a script.