simphony / simphony-openfoam

The implementation of the SimPhoNy OpenFOAM -wrappers.
GNU General Public License v2.0
2 stars 0 forks source link

IO wrapper boundaries and dictionaries through internal interface #70

Closed khiltunen closed 8 years ago

khiltunen commented 8 years ago

This PR changes the boundary treatment from face LABEL based to list of face uids. Also the IO wrapper data is now transfered totally through internal interface and PyFoam is nomore needed. Additionally couple of bugs on II wrapper mixture model are fixed.

khiltunen commented 8 years ago

@TobiasRasp could you review this PR ?

TobiasRasp commented 8 years ago

@khiltunen I reviewed the new version now. Everything looks great, but maybe a meaningful error message should be given, if the user's boundary labels don't match the preset ones (i.e. inlet, outlet, ...) when using create_quad_mesh. If they do not match, the program stops in foam_mesh at the following block (lines 142-151) with an KeyError, but the user doesn't know about the predetermined labels.

patchTypes = [] for patchName in patchNames: if BC: first_key = BC.keys()[0] if BC[first_key][patchName] == "empty": patchTypes.append("empty") else: patchTypes.append("patch") else: patchTypes.append("patch")

khiltunen commented 8 years ago

@TobiasRasp i added a check for the boundary names. Also some modifications to time treatment were also done for multiple mesh treatment on same instance.

khiltunen commented 8 years ago

@TobiasRasp is this ready to merge ?

TobiasRasp commented 8 years ago

@khiltunen Hi Kai, I found the new check_boundary_names function. However, it is not used, since the program run fails before. Check e.g. the example below with the given input. couple_CFDMD_OF.py.txt test_mesh_dict.py.txt

khiltunen commented 8 years ago

@TobiasRasp I added boundary name check also to mesh classes. Now it should produce correct error message for your example. Try and give feedback.

TobiasRasp commented 8 years ago

@khiltunen Everything is fine now. Ready to merge!