simphony / simphony-openfoam

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

Poiseuille example has scalar as Angular Velocity #63

Open kitchoi opened 8 years ago

kitchoi commented 8 years ago

I tried to run the poiseuille example in simphony-openfoam/foam_controlwrapper/examples and found that the CUBA.ANGULAR_VELOCITY in the cells are scalars. However the expected shape of the angular velocity data should be (3), according to simphony.core.keywords.KEYWORDS["ANGULAR_VELOCITY"].shape.

Use case: Because of this, mayavi wasn't able to visualise the mesh data until I manually made the angular velocity = (value, 0, 0). Here is the visualisation result after working around the issue. However, I believe the shape of the data should comply with the KEYWORDS specification rather than relying on work-around. poiseuille-example

I am using a development branch of simphony-mayavi.

khiltunen commented 8 years ago

This comes from the fact the cuba.yml in simphony-common is not containing all the variables (CUBA keywords) needed. To get things working some other CUBA variable is chosen. We could try to choose CUBA variables with the same dimension though, which can be a temporary solution until cuba.yml is complete.

khiltunen commented 8 years ago

Actually this temporary fix is already done on current WIP version (branch migration_OF24). Note that this needs OpenFoam 2.3 (on ubuntu 12.04LTS) or OpenFoam 2.4 (on ubuntu 14.04)

ahashibon commented 8 years ago

Please go ahead and add new cuba in the yaml file, ask for review and make a pull request as usual in other packages. In this way the cuba can grow as needed.

khiltunen commented 8 years ago

Okey. I'll do that.