How to import mesh created with cfdof(cfMesh) into Elmer?

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
KnowledgeWorker
Posts: 5
Joined: Mon Sep 13, 2021 5:29 am

How to import mesh created with cfdof(cfMesh) into Elmer?

Post by KnowledgeWorker »

I want to do FSI analysis in Elmer using the mesh created with cfdof(cfMesh).

The desired mesh was created with cfdof without any problem, and it was possible to visualize it with Paraview through 'pv.foam'.

The problem is that there is no format that Elmer can import when checking 'Save data...' of Paraview.

I tried to export the mesh in unv format in freecad, but no file was created.

How can I solve this problem?

Thanks.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: How to import mesh created with cfdof(cfMesh) into Elmer?

Post by thschrader »

After writing the meshCase folder with FreeCAD-cfdof, copy meshCase folder
into your openfoam-run directory. Start openfoam-terminal.
foamToFluent converts meshcase to msh-mesh
foamToVtk writes vtk-file.
https://www.openfoam.com/documentation/ ... luent.html

I cant check the import to elmer, my elmer gui crashes (?) ;)
convert_mesh.JPG
convert_mesh.JPG (68.43 KiB) Viewed 4940 times
KnowledgeWorker
Posts: 5
Joined: Mon Sep 13, 2021 5:29 am

Re: How to import mesh created with cfdof(cfMesh) into Elmer?

Post by KnowledgeWorker »

I also had the same crash problem.

As a result of searching, it is said that the 'autoclean' function of 'elmergrid' should be used,

and it is being tried.
KnowledgeWorker
Posts: 5
Joined: Mon Sep 13, 2021 5:29 am

Re: How to import mesh created with cfdof(cfMesh) into Elmer?

Post by KnowledgeWorker »

It has not been verified, but I succeeded in importing cfmesh into Elmer.

1) First, create a vtu file with OpenFOAM's 'foamToVTK' function.

2) Then, import the vtu file to Freecad and export it as an unv type.

3) Import the generated unv file into elmer.

I'm not sure if there were any losses or errors during this conversion.

Flow analysis will be carried out with this model.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: How to import mesh created with cfdof(cfMesh) into Elmer?

Post by thschrader »

KnowledgeWorker wrote: Tue Sep 28, 2021 6:05 am It has not been verified, but I succeeded in importing cfmesh into Elmer.
1) First, create a vtu file with OpenFOAM's 'foamToVTK' function.
2) Then, import the vtu file to Freecad and export it as an unv type.
3) Import the generated unv file into elmer.
I'm not sure if there were any losses or errors during this conversion.
Flow analysis will be carried out with this model.
I did the steps 1-3.
When importing the vtk fo FC, the mesh scales down by factor of 1000 (domain is 5x10m, not mm)
Export as unv, import to elmer, dimensions are correct.
However, some elements are missing...
cfmesh_freecad_to_elmer.JPG
cfmesh_freecad_to_elmer.JPG (232.82 KiB) Viewed 4757 times
KnowledgeWorker
Posts: 5
Joined: Mon Sep 13, 2021 5:29 am

Re: How to import mesh created with cfdof(cfMesh) into Elmer?

Post by KnowledgeWorker »

Are the boundaries of this model properly divided?

When a similar model is imported and the dividing surface is set to 90 degrees, too much boundary is created.
Post Reply