Difference between revisions of "Fluent3DMeshToFoam"

From OpenFOAMWiki
m (repaired link)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
==Name==
 +
<tt>fluent3DMeshToFoam</tt> - Converts a Fluent mesh (in ASCII format) to foam format
 +
 +
{{VersionInfo}}{{Version2.1}}
 +
 +
==Synopsis==
 +
fluent3DMeshToFoam [OPTIONS] FLUENT_MESH
 +
 +
==Description==
 +
Convert a mesh file FLUENT_MESH from Fluent format to foam format.
 +
 +
'''-scale''' ''factor''
 +
:Scale the mesh geometry by ''factor''. If not provided, use 1
 +
 +
'''-case''' ''DIR''
 +
:Execute the command on the case directory ''DIR''. If not provided, use the current directory
 +
'''-noFunctionObjects'''
 +
:Skip the execution of the [[functionObjects]]
 +
'''-help'''
 +
:Display the help and exit
 +
 +
==Comparison between [[fluentMeshToFoam]] and fluent3DMeshToFoam==
 +
 +
From the release notes for [http://openfoam.org/release/1-4-1/ OpenFOAM 1.4.1]:
 +
 +
  New fluent3DMeshToFoam converter for 3D meshes from Fluent format to OpenFOAM format including full support for all BCs, zones etc.;
 +
 +
Comparing the source code for [[fluentMeshToFoam]] and {{tt|fluent3DMeshToFoam}} in OpenFOAM 1.4.1 and 1.5, the following main differences can be found:
 +
 +
* [[fluentMeshToFoam]] supports 2D and 3D Fluent meshes, while {{tt|fluent3DMeshToFoam}} only supports 3D.
 +
* {{tt|fluent3DMeshToFoam}} deals with hanging nodes.
 +
* [[fluentMeshToFoam]] has the options to write sets and zones, while {{tt|fluent3DMeshToFoam}} has the option to ignore a cell groups and face groups.
 +
* [[fluentMeshToFoam]] can only handle the following 3D cell types: tet, hex, pyramid, prism
 +
* {{tt|fluent3DMeshToFoam}} can handle internal walls/patches, or at least it looks like it does. [[fluentMeshToFoam]] requires a workaround: [[Howto importing fluent mesh with internal walls]]
 +
 +
 +
==Step by step example==
 +
 
Convert a mesh generated by Fluent/Gambit to OpenFOAM.  
 
Convert a mesh generated by Fluent/Gambit to OpenFOAM.  
  
1. Save the file in Fluent/Gambit in ASCII format (uncheck the "Write Binary Files" option). If the .msh file was generated in Windows then ''dos2unix'' command should be used, after before proceeding further.  
+
1. Save the file in Fluent/Gambit in ASCII format (uncheck the "Write Binary Files" option).  
 +
 
 +
If the .msh file was generated in Windows then ''dos2unix'' command should be used, before proceeding further.  
 
     '' dos2unix fluent.msh ''
 
     '' dos2unix fluent.msh ''
  
 
2. Create a new case (e.g. Beispiel) for OpenFOAM (easy option: copy the following files from a comparable tutorial, e.g. icoFoam)
 
2. Create a new case (e.g. Beispiel) for OpenFOAM (easy option: copy the following files from a comparable tutorial, e.g. icoFoam)
 
   a. Create case directory: ''mkdir Beispiel''
 
   a. Create case directory: ''mkdir Beispiel''
   b. Create the following directories inside ''Beispiel'' folder (or copy from the icoFoam tutorial)
+
   b. Create the following directories inside ''Beispiel'' folder (or copy the directories from the icoFoam or another appropriate tutorial)
 
     ''mkdir Beispiel/system''
 
     ''mkdir Beispiel/system''
 
     ''mkdir Beispiel/constant''
 
     ''mkdir Beispiel/constant''
Line 19: Line 59:
 
3. Copy the ''fluent.msh'' file into ''Beispiel'' folder.
 
3. Copy the ''fluent.msh'' file into ''Beispiel'' folder.
  
4. Run the fluent3DMeshtoFoam converter (within the ''Beispiel'' folder)
+
4. Run the fluent3DMeshToFoam converter (within the ''Beispiel'' folder)
 
   without scaling:   
 
   without scaling:   
                   ''fluent3DMeshtoFoam fluent.msh''  
+
                   ''fluent3DMeshToFoam fluent.msh''  
 
   OR
 
   OR
   with appropriate scaling if required (e.g. from meters to millimeters):
+
   with appropriate scaling if required (e.g. from millimeters to meters):
                   ''fluent3DMeshtoFoam fluent.msh -scale 0.001''  
+
                   ''fluent3DMeshToFoam fluent.msh -scale 0.001''  
  
  
Line 43: Line 83:
 
     or
 
     or
 
     ''foamJob icoFoam ''
 
     ''foamJob icoFoam ''
 +
 +
[[Category:Mesh conversion utilities]]

Latest revision as of 13:35, 20 August 2016

1 Name

fluent3DMeshToFoam - Converts a Fluent mesh (in ASCII format) to foam format

Valid versions: OF Version 21.png

2 Synopsis

fluent3DMeshToFoam [OPTIONS] FLUENT_MESH

3 Description

Convert a mesh file FLUENT_MESH from Fluent format to foam format.

-scale factor

Scale the mesh geometry by factor. If not provided, use 1

-case DIR

Execute the command on the case directory DIR. If not provided, use the current directory

-noFunctionObjects

Skip the execution of the functionObjects

-help

Display the help and exit

4 Comparison between fluentMeshToFoam and fluent3DMeshToFoam

From the release notes for OpenFOAM 1.4.1:

 New fluent3DMeshToFoam converter for 3D meshes from Fluent format to OpenFOAM format including full support for all BCs, zones etc.;

Comparing the source code for fluentMeshToFoam and fluent3DMeshToFoam in OpenFOAM 1.4.1 and 1.5, the following main differences can be found:


5 Step by step example

Convert a mesh generated by Fluent/Gambit to OpenFOAM.

1. Save the file in Fluent/Gambit in ASCII format (uncheck the "Write Binary Files" option).

If the .msh file was generated in Windows then dos2unix command should be used, before proceeding further.

     dos2unix fluent.msh 

2. Create a new case (e.g. Beispiel) for OpenFOAM (easy option: copy the following files from a comparable tutorial, e.g. icoFoam)

 a. Create case directory: mkdir Beispiel
 b. Create the following directories inside Beispiel folder (or copy the directories from the icoFoam or another appropriate tutorial)
    mkdir Beispiel/system
    mkdir Beispiel/constant
    mkdir Beispiel/constant/polymesh
    mkdir Beispiel/0
 c. Create the following files: (or copy from icoFoam tutorial)
    Beispiel/system/controlDict
    Beispiel/system/fvScheme
    Beispiel/system/fvSolution
    Beispiel/constant/transportProperties

3. Copy the fluent.msh file into Beispiel folder.

4. Run the fluent3DMeshToFoam converter (within the Beispiel folder)

  without scaling:  
                  fluent3DMeshToFoam fluent.msh 
  OR
  with appropriate scaling if required (e.g. from millimeters to meters):
                  fluent3DMeshToFoam fluent.msh -scale 0.001 


4. Edit the Beispiel/constant/polyMesh/boundary file and set proper names. Typically every surface might be a wall. If one needs inlet, outlet, etc as boundary condition, change wall to patch.

5. Run checkMesh(from Beispiel root folder) to check if the mesh has been converted properly.

  checkMesh 
  OR 
  checkMesh -fullTopology 

6. Copy the initial/boundary condition files into Beispiel/0 folder and edit them appropriately.

  e.g. Beispiel/0/U and Beispiel/0/p from icoFoam tutorial.

7. Make further appropriate changes (e.g. nu in Beispiel/constant/transportProperties )

8. The case is ready to run (from Beispiel root folder):

   icoFoam
   or
   foamJob icoFoam