CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Converting Salome hybrid mesh to OpenFOAM (https://www.cfd-online.com/Forums/openfoam/82832-converting-salome-hybrid-mesh-openfoam.html)

Arnoldinho December 7, 2010 07:34

Converting Salome hybrid mesh to OpenFOAM
 
Hi all,

I have to convert a combined tetrahedron/hexahedron mesh created in Salome into the OpenFOAM mesh format. For not-mixed meshes, the UNV format can be used as export in Salome and ideasUnvToFoam to convert it for OpenFOAM. For mixed meshes this does not work, as Salome does not save pyramids in their UNV files. Message "During export mesh to UNV pyramid's elements will be missed".

I read about a workaround using the MED format and gmesh with med support, but this is not straight forward at all.

Is there any converter for MED to OpenFOAM mesh? If not, what could be the starting point for me to create such a converter?

Until now I used blockMesh, SHM and snapEdge, but it's not working very well for the quite complex geometries I'm using at the moment. Also, boundary layer generation either using SHM or refineWallLayer is not working as it should...

Best regards,
Arne

thanz March 27, 2012 06:50

Has anyone knows a way to convert those mixed-meshes from salome to openfoam?

elvis March 27, 2012 07:16

Hi,

do you know pythonflu? => SALOME OpenFOAM coupling
In http://www.openfoamworkshop.org/6th_...ord_slides.pdf
on slide 18 & 19 he mentions => direct in-memory Salome to OF (vice versa) mesh writing using pythonFlu and that this way supports arbitary polyhedral meshes (and that ideasUnvToFoam does not support these).

just an idea and my 2 cents

thanz March 27, 2012 12:05

Hi Elvis,

Have you used to it to export mesh in readable format for openfoam? and what format was it?

Thanks

elvis March 28, 2012 10:24

Hi Thanasis,

I have not used it myself (now), but if you take a look at example
you see that they used the Mesh and the BC directly
=> p = volScalarField => solve( UEqn == -fvc.grad( p ) )
=>...mesh, IOobject.NO_READ, IOobject.AUTO_WRITE
=>phi = ( fvc.interpolate( U ) & mesh.Sf() ) + fvc.ddtPhiCorr( rUA, U, phi )

I guess you would like a "not so sophisticated example" that just writes OpenFoam- Files in the corresponding folders and you use/call icoFoam or so to do the calculation! It can be done that way.


All times are GMT -4. The time now is 11:28.