Wolfram Summer School 2018: Build a link between Wolfram Language and OpenFOAM
Author
Jorge Carabali Caicedo
Title
Wolfram Summer School 2018: Build a link between Wolfram Language and OpenFOAM
Description
Wolfram Summer School 2018: Build a link between Wolfram Language and OpenFOAM
Category
Essays, Posts & Presentations
Keywords
Wolfram Summer School 2018
URL
http://www.notebookarchive.org/2018-12-53xj8xn/
DOI
https://notebookarchive.org/2018-12-53xj8xn
Date Added
2018-12-11
Date Last Modified
2018-12-11
File Size
1.61 megabytes
Supplements
Rights
Redistribution rights reserved



WOLFRAM SUMMER SCHOOL 2018
Last modified on: Tuesday, July 10, 2018 at 15:50
Author Info
Name:
Jorge Carabali Caicedo
Mentor:
Markus Van Almsick
Affiliation:
Universidad del Valle
Poster Session Content
Title of project:
Build a link between Wolfram Language and OpenFOAM
Goal of the project:
OpenFOAM stands for Open Field Operation and Manipulation, and is recognized as high level computational fluid dynamics software. The goal of this project is to build a link between Wolfram Language and OpenFOAM allowing to solve fluid mechanics problems within Mathematica.
Add the most representative image of your project here. (We recommend just 1 image, if you add more, we will make a collage of the images.)
Image:
Summary of Results:
The Mathematica mesh is made out of tetrahedron elements and the mesh of the dictionary BlockMesh is made out of hexahedrons , thus increasing the complexity of obtaining geometries translated from Mathematica to OpenFOAM. The mesh obtained so far is a cuboid element discretized inside the Wolfram Language and passed on to a comprehensive OpenFOAM mesh, the second attempt to get a pipe region mesh to OpenFOAM failed due to the increased complexity but gives the opportunity to explore interesting programming, since many factors must keep in account to translate into a OpenFOAM valid mesh, such as ; faces must point outward the surface, when a hexahedron collapses into a tetrahedron the vertices must keep in track in order to keep the mesh consistency and so forth.
Future work:
Explore more complex geometry meshes and develop robust algorithms than can smoothly passed mesh elements into a comprehensive OpenFOAM final product.
Note
: Everything above this bar is your poster.Make sure it fits on a single page. Preview Poster
End of School Presentation Content
In addition to the poster content, include other content to present at the 2 minute presentation for end of school. Use the buttons below to add more sections.
Add Header
Add Text
Add Code or Image
Mesh Result
OpenFOAM and Mathematica have a different approach when generating the mesh, thus increasing complexity. The algorithm developed generates a cuboid mesh inside Mathematica specifying every boundary condition ( inlet, outlet, walls) and processes the tetrahedral mesh into a tetrahedral valid OpenFOAM mesh. 
Fig. 2. Tetrahedron element cell (left) and Cuboid mesh result ( right).
When it goes wrong ?
Using the same algorithm to generate the cuboid the pipe is meshed and all the boundary conditions are specified, the translation into OpenFOAM mesh find some errors related to internal faces and faces pointing inward.
Fig .3 . Pipe Mesh.
Some cool ideas
With a more robust algorithm meshes generated with the power of Mathematica can be simulated inside OpenFOAM.
Fig. 4. Airfoil mesh
Fig 5. Pipe joint mesh.
Note
: Everything above this bar is in your 2 minute presentation. Make sure it fits on 2 slides. Preview Presentation
Detailed Project Notes
Code
Code
In[]:=
Hyperlink["Github repository project code","https://github.com/jorgeluis21/finalproject-WSM18/blob/master/Final-project-WSM18/Carabali-Jorge-Project.nb"]
In[]:=
Hyperlink["OpenFOAM dictionary ","https://github.com/jorgeluis21/finalproject-WSM18/blob/master/Final-project-WSM18/blockMeshDict"]
Out[]=
Conclusions in Detail
Conclusions in Detail
Mathematica counts with a powerful Finite Element Method programming tool that can be used to run fluid flow simulations, after being able to mesh a cuboid element made out of tetrahedron elements into OpenFOAM the results are an open door to explore much more interesting programming and solve the challenges that arrive regarding the neighbours cells counting and the inner faces directions.
All Visualizations
All Visualizations
The Algorithm recognition of boundary faces ( Internal , walls, Inlet and Outlet ), this conditions are passed on to OpenFOAM and with few more cells can run any flow case of interest.




Internal faces ( left ) and walls ( right ) for the mesh.




Inlet and outlet of the cuboid mesh.
Future Directions
Future Directions
Explore the generation of different 3D geometries using other tools inside OpenFOAM as SnappyHexMesh and also finding more robust algorithm to generate BlockMesh dictionaries in order to convert smoothly Mathematica meshes. Above some meshes generated with Mathematica that the algorithm could potentially identify regions and boundary conditions.

Background Info Links/References
Background Info Links/References
In[]:=
Hyperlink["BlockMesh Utility OpenFOAM","https://cfd.direct/openfoam/user-guide/v6-blockMesh/#x25-1810005.3"]
Out[]=
Keywords
Keywords
Provide keywords as items
◼
Aerospace Engineering
◼
OpenFOAM
◼
Mesh
◼
Wolfram Mathematica
◼
Mechanical Engineering


Cite this as: Jorge Carabali Caicedo, "Wolfram Summer School 2018: Build a link between Wolfram Language and OpenFOAM" from the Notebook Archive (2018), https://notebookarchive.org/2018-12-53xj8xn

Download

