Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foamToNeko

foamToNeko converts an OpenFOAM mesh to Neko's binary .nmsh format.

Build

Build inside an OpenFOAM environment, for example:

source /path/to/OpenFOAM-v2506/etc/bashrc
wclean
wmake

This produces the foamToNeko executable in the usual OpenFOAM user bin directory.

Basic usage

Run the converter in an OpenFOAM case directory after the mesh has been created:

foamToNeko

This writes mesh.nmsh in the current case directory.

Current scope

  • only pure hexahedral meshes are supported,
  • periodic cyclic patches are exported as periodic Neko zones,
  • ordinary boundary patches are exported as labeled boundary zones.

Cases with non-hex cells such as prisms, wedges, pyramids, tetrahedra, or general polyhedra should be rejected before conversion.

Validation workflow

The repository contains a small validation suite of known-good blockMeshDict files under tests/valid_meshes/. They are intended to be used with the shared OpenFOAM scaffold in tests/case/.

Typical validation flow:

blockMesh -case tests/case -dict tests/valid_meshes/periodicCubeArgon.blockMeshDict
checkMesh -case tests/case -constant
cd tests/case
foamToNeko
mesh_checker mesh.nmsh

Example

examples/tjunction/ contains a runnable Neko example built on a validated OpenFOAM T-junction mesh. It demonstrates the intended workflow:

cd examples/tjunction
blockMesh
foamToNeko
mesh_checker mesh.nmsh
neko tjunction.case'

About

Converter from OpenFOAM's mesh format to Neko's

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages