Rick's Blog

Font size: +

The Right Tool For the Job

Salome Cover Image

 I have been experimenting with the SwiftBlock addons that simplify the process of taking a mesh in Blender and defining that mesh in OpenFOAM.  There are two versions and both are about at the same level of development.  While they both work as advertised, I have come to the conclusion that neither will be appropriate for complex models.  It was at this point, the little voice in the back of my head said, 'Of course, dummy!  A wise man once said, "Always use the right tool for the job!"' (That little voice loves to quote himself!)  While Blender is great for visualizing the results of numerical analysis, it was not made for creating the meshes used in said numerical analysis.  Luckily, I found something that is the right tool for the job...

Salome, as described by its web site, is an open source integration platform for numerical simulation.  Salome is made up of a base kernel and several modules, including ParaVis (a module based on ParaView) of which I had heard, and several others which I had not.  It supports the creating/import/editing/export of geometry is multiple standard Computer Aided Design (CAD) formats.  It can do the same type of things with meshes typically associated with numerical analysis.  ParaVis allows the user to view/manipulate/extract data from the geometry and mesh.  Finally, there is a YACS module, apparently used for distributed calculations.  All of this was overkill for what I intended to use, but better too much power than not enough, right? (Any Tim Taylor fans?)

​So, it appears I found the right tool for the job.  Can't get any easier than that!  Well, actually, it must get easier, because after a few days of beating my head against the desk, I was sure it couldn't get any ​more ​ difficult!  The learning curve for Salome is fairly steep. However, with a little patience, the included documentation and a plethora of online tutorials, a simple task is manageable.  The included documentation is very good, by the way.  And while some of the online tutorials may not win the Disney-kid-screaming-teen-idol-concert Production Award (known as the DPA, in the biz), they are complete and understandable.

Sample Mesh of NACA Airfoil

Salome has an interactive Python console and the ability to dump a session to a Python file; essentially a macro which duplicates all my GUI actions with the corresponding Python code which I can later view and edit.  This greatly simplifies the process of automating some tasks, especially for those of us who are neither Salome API or Python experts.  Using these Salome tools, I was able to read in a csv file (in this case, one describing a NACA 0012 airfoil) and automatically create the geometry.  Creating the mesh from geometry was fairly simple (with tutorial hand-holding).  The export to OpenFOAM was also straight forward.  That's not to say there isn't ample room for mistakes at each step in the process.  The old saying, 'With great power comes great ability to look up endless error messages', is absolutely true.  A combination of clearly worded error messages and smart people at Stack Exchange got me through it, though. 

Although I did spend several days basking in the glow of my awesomeness after getting through the entire process on my own, I was now back at my original dilemma, what is the right tool for the job?  While I may enjoy flipping through screen shots of ParaVis output, most people deserve something a little more........better.  



This is what I think my workflow will be:

  • Develop a model/environment in Blender
  • Export that model (maybe), or create new (simplifed) geometry in Salome
  • Do the simulation/analysis, likely in OpenFOAM
  • Do analysis/visualization in ParaVis
  • Export the important visualization (e.g., streamline geometry) back to Blender for the real visualization/story telling magic
  • Sit back and receive the accolades of my adoring fans....

We'll see how many revisions that workflow enjoys.  Now it's time to start experimenting! 

Visualizing Streamlines Over Airfoil - Pressure Contours on Airfoil Surface
The SketchFab Learning Curve
Part of Learning is Trying to Teach

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Saturday, 10 June 2023

Captcha Image

Rick's Blog

Font size: +

The Right Tool For the Job

Salome Cover Image

 I have been experimenting with the SwiftBlock addons that simplify the process of taking a mesh in Blender and defining that mesh in OpenFOAM.  There are two versions and both are about at the same level of development.  While they both work as advertised, I have come to the conclusion that neither will be appropriate for complex models.  It was at this point, the little voice in the back of my head said, 'Of course, dummy!  A wise man once said, "Always use the right tool for the job!"' (That little voice loves to quote himself!)  While Blender is great for visualizing the results of numerical analysis, it was not made for creating the meshes used in said numerical analysis.  Luckily, I found something that is the right tool for the job...

Salome, as described by its web site, is an open source integration platform for numerical simulation.  Salome is made up of a base kernel and several modules, including ParaVis (a module based on ParaView) of which I had heard, and several others which I had not.  It supports the creating/import/editing/export of geometry is multiple standard Computer Aided Design (CAD) formats.  It can do the same type of things with meshes typically associated with numerical analysis.  ParaVis allows the user to view/manipulate/extract data from the geometry and mesh.  Finally, there is a YACS module, apparently used for distributed calculations.  All of this was overkill for what I intended to use, but better too much power than not enough, right? (Any Tim Taylor fans?)

​So, it appears I found the right tool for the job.  Can't get any easier than that!  Well, actually, it must get easier, because after a few days of beating my head against the desk, I was sure it couldn't get any ​more ​ difficult!  The learning curve for Salome is fairly steep. However, with a little patience, the included documentation and a plethora of online tutorials, a simple task is manageable.  The included documentation is very good, by the way.  And while some of the online tutorials may not win the Disney-kid-screaming-teen-idol-concert Production Award (known as the DPA, in the biz), they are complete and understandable.

Sample Mesh of NACA Airfoil

Salome has an interactive Python console and the ability to dump a session to a Python file; essentially a macro which duplicates all my GUI actions with the corresponding Python code which I can later view and edit.  This greatly simplifies the process of automating some tasks, especially for those of us who are neither Salome API or Python experts.  Using these Salome tools, I was able to read in a csv file (in this case, one describing a NACA 0012 airfoil) and automatically create the geometry.  Creating the mesh from geometry was fairly simple (with tutorial hand-holding).  The export to OpenFOAM was also straight forward.  That's not to say there isn't ample room for mistakes at each step in the process.  The old saying, 'With great power comes great ability to look up endless error messages', is absolutely true.  A combination of clearly worded error messages and smart people at Stack Exchange got me through it, though. 

Although I did spend several days basking in the glow of my awesomeness after getting through the entire process on my own, I was now back at my original dilemma, what is the right tool for the job?  While I may enjoy flipping through screen shots of ParaVis output, most people deserve something a little more........better.  



This is what I think my workflow will be:

  • Develop a model/environment in Blender
  • Export that model (maybe), or create new (simplifed) geometry in Salome
  • Do the simulation/analysis, likely in OpenFOAM
  • Do analysis/visualization in ParaVis
  • Export the important visualization (e.g., streamline geometry) back to Blender for the real visualization/story telling magic
  • Sit back and receive the accolades of my adoring fans....

We'll see how many revisions that workflow enjoys.  Now it's time to start experimenting! 

Visualizing Streamlines Over Airfoil - Pressure Contours on Airfoil Surface
The SketchFab Learning Curve
Part of Learning is Trying to Teach

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Saturday, 10 June 2023

Captcha Image