Converting Salome hybrid mesh to OpenFOAM
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...
Has anyone knows a way to convert those mixed-meshes from salome to openfoam?
do you know pythonflu? => SALOME OpenFOAM coupling
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
Have you used to it to export mesh in readable format for openfoam? and what format was it?
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 12:39.|