Previous: Analysis for cell restriction Up: Mesh generation Next: Meshing
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.
OBJ model preparation
- Copy motorBike tutorial:
# cd $FOAM_RUN
# cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/motorBike ./
# cd motorBike% writeFormat ascii; % % writePrecision 7;
- OBJ surface model is copied from directory resources to directory constant/triSurface:
# cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz \
constant/triSurface/ - Extract file using
# gzip -d constant/triSurface/motorBike.obj.gz - View model in paraview:
# paraview - -data=constant/triSurface/motorBike.obj
Figure: OpenFOAM tutorial motorbike, surface model
- OBJ surface model can be checked using utility surfaceCheck:
# cd constant/triSurface
# surfaceCheck motorBike.obj > log.surfaceCheck - It is possible to print out the number of illegal triangles:
# grep 'illegal triangles' log.surfaceCheck
Surface has 60941 illegal triangles.
- OBJ model has 60941 illegal triangles
- Look at the end of file log.surfaceCheck :
# tail -16 log.surfaceCheckNumber of unconnected parts : 4 Splitting surface into parts ... Writing zoning to "zone_motorBike.vtk"... writing part 0 size 326215 to "motorBike_0.obj" writing part 1 size 1866 to "motorBike_1.obj" writing part 2 size 1876 to "motorBike_2.obj" writing part 3 size 1696 to "motorBike_3.obj" Number of zones (connected area with consistent normal) : 132055 More than one normal orientation. End
- Four parts are unconnected
- OpenFOAM supports following file formats:
- Utility surfaceConvert converts formats e.g.:
# surfaceConvert motorBike.obj motorBike.vtk - File format .vtk can be viewed in ParaView
Figure: OpenFOAM tutorial motorbike, vtk surface model
- Utility surfaceConvert with switch -clean removes illegal surfaces (triangulated), e.g.:7.3
# surfaceConvert motorBike.obj motorBike-1.obj -clean > /dev/null
- Check new model file:
# surfaceCheck motorBike-1.obj | grep 'illegal triangles'
Surface has no illegal triangles.
- We can remove the old motor bike model and rename the new model:
# mv motorBike-1.obj motorBike.obj
Previous: Analysis for cell restriction Up: Mesh generation Next: Meshing