Difference between revisions of "HowTo Import a fluent mesh with interfaces"

From OpenFOAMWiki
m
m (fixed typo)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Purpose ==
 
== Purpose ==
 
The purpose of this short HowTo is to explain the few steps that are necessary in order to read a fluent mesh that contains interfaces.
 
The purpose of this short HowTo is to explain the few steps that are necessary in order to read a fluent mesh that contains interfaces.
 +
 
{{VersionInfo}}{{Version1.3}}
 
{{VersionInfo}}{{Version1.3}}
  
 
== How is it done ==
 
== How is it done ==
A mesh with an interface is a mesh containing two overlapping surfaces that do not necessary share the same discretization nodes, as seen in Figure 1. [[Image:interface_drg.png|thumbnail|Figure 1 Non-conformal mesh]]
+
A mesh with an interface is a mesh containing two overlapping surfaces that do not necessary share the same discretization nodes, as seen in Figure 1. [[Image:interface_drg.png|thumbnail|Figure 1 - Non-conformal mesh]]
To convert such a mesh, just use fluentMeshToFoam utility. Let consider the current [[Media:test_interface.tgz|case]], where an "inlet", an "outlet" and two interface "interface_coarse" and "interface_fine" boundaries are defined. The rest of the boundaries are defined as walls. Once imported, the mesh consists of actually two separated volumes, by the interface_fine and interface_coarse surfaces.
+
 
The second step is to stitch the meshes by spliting the faces of the two interfaces creating polyhedral cells:
+
To convert such a mesh, just use [[fluentMeshToFoam]] utility. Let consider the current [[Media:test_interface.tgz|case]], where an "inlet", an "outlet" and two interface "interface_coarse" and "interface_fine" boundaries are defined. The rest of the boundaries are considered walls.
stitchMesh ./ test_interfaces interface_fine interface_coarse test_interface/geometry/test_interface.msh
+
<bash>fluentMeshToFoam ./ test_interfaces test_interface/geometry/test_interface.msh</bash>
Now the mesh looks like in Figure 2. [[Image:interface_drg1.png|thumbnail|Figure 2 Stiched mesh]]
+
 
The utility will preserve also the original patches as boundaries, but since they are no longer needed, they can be safely deleted from the polyMesh/boundary file.
+
Once imported, the mesh consists of actually two separated volumes by the interface_fine and interface_coarse surfaces.
 +
The second step is to stitch the meshes by splitting the faces of the two interfaces creating polyhedral cells, so they match each other face to face and node to node:
 +
<bash>stitchMesh ./ test_interfaces interface_fine interface_coarse</bash>
 +
 
 +
Now the mesh looks something like in Figure 2. Note that the post-processor (in this case OpenDX), does not know how to plot polyhedra so all the cells that are not tetrahedra or hexahedra are virtually split into tetrahedra only for visualisation purposes, though the mesh inside OpenFOAM is still containing the polyhedral cells.
 +
 
 +
[[Image:interface_drg1.png|thumbnail|Figure 2 - Stitched mesh]]
 +
The utility will preserve also the original patches as boundaries, but since they are no longer needed, they can be safely deleted from the {{tt|polyMesh/boundary}} file.
 +
 
 
== Download==
 
== Download==
The sources of the test case can be downloaded from: [[http://openfoamwiki.net/images/f/f3/Test_interface.tgz test_interfaces]]
+
The sources of the test case can be downloaded from: [[Media:Test_interface.tgz|test_interfaces]]

Latest revision as of 17:08, 1 March 2015

1 Purpose

The purpose of this short HowTo is to explain the few steps that are necessary in order to read a fluent mesh that contains interfaces.

Valid versions: OF version 13.png

2 How is it done

A mesh with an interface is a mesh containing two overlapping surfaces that do not necessary share the same discretization nodes, as seen in Figure 1.
Figure 1 - Non-conformal mesh

To convert such a mesh, just use fluentMeshToFoam utility. Let consider the current case, where an "inlet", an "outlet" and two interface "interface_coarse" and "interface_fine" boundaries are defined. The rest of the boundaries are considered walls.

fluentMeshToFoam ./ test_interfaces test_interface/geometry/test_interface.msh

Once imported, the mesh consists of actually two separated volumes by the interface_fine and interface_coarse surfaces. The second step is to stitch the meshes by splitting the faces of the two interfaces creating polyhedral cells, so they match each other face to face and node to node:

stitchMesh ./ test_interfaces interface_fine interface_coarse

Now the mesh looks something like in Figure 2. Note that the post-processor (in this case OpenDX), does not know how to plot polyhedra so all the cells that are not tetrahedra or hexahedra are virtually split into tetrahedra only for visualisation purposes, though the mesh inside OpenFOAM is still containing the polyhedral cells.

Figure 2 - Stitched mesh

The utility will preserve also the original patches as boundaries, but since they are no longer needed, they can be safely deleted from the polyMesh/boundary file.

3 Download

The sources of the test case can be downloaded from: test_interfaces