CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] How to Model STLs with Cavities

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2024, 19:04
Default How to Model STLs with Cavities
  #1
New Member
 
Join Date: Nov 2023
Posts: 4
Rep Power: 2
BrownieBytes is on a distinguished road
Hey all,

TL;DR - I need to make regions out of an STL with a cavity, how can I do that? Please provide tutorials, videos, or advice.

I am trying to find the correct workflow and utilities to model my system correctly. It pulls together a lot of concepts, so please feel free to share any advice you may have. For context, this is for a research project using the nuclear reactor modeling code SERPENT to model the behavior of a nuclear reactor core. The end goal is that OpenFOAM takes care of the density and temperature of the core materials and SERPENT then interprets that data to output the power density at each point. So, if anyone has advice for external couplings, please share.

The current challenge is that I want to use a single STL file to split up my regions. For the sake of simplicity, imagine that the STL is of a closed aluminum can. There are two closed surfaces on this can that create the boundaries between three regions: fluid inside the can, the material that makes up the can, and fluid outside the can. From what I could gather, I need to create a blockMesh, use topoSet to extract the three regions from the STL, use snappyHexMesh to prepare the mesh, and then refine further if wanted. Here is a great opportunity to tell me I am way off and ought to use a different procedure.

When I use surfaceCheck on the STL, it quickly and accurately identifies that the STL is both closed and that it has two parts. It then creates OBJ files for each of the two surfaces if anyone has advice on how I might just use those. It is my understanding that snappyHexMesh will throw away the interior volume if I don't preprocess the model, so how can I use topoSet to achieve a similar effect to surfaceCheck? I would rather not create two separate STLs because all of the relevant information is in the first one. Also, in the format that SolidWorks produces STLs, there is only one region in the STL file, so I can't split the mesh volume using literal STL regions. The three regions would be (blockMesh - externalSTL), (externalSTL - internalSTL), and (internalSTL). So, what tool (if not topoSet) can I use to automatically split the STL into inside and outside and define these regions?

Once this is done, I would like to use the chtMultiRegionSimpleFoam solver to figure out the steady state solution for temperature distribution. Nuclear reactors have a small feedback loop on their operation where essentially power production is temperature dependent. To account for this, I am planning on using the externalCoupledHeater tutorial as a starting point.

I can attach files if that would be helpful, but something tells me that it wouldn't accomplish much if I did. Let me know if you want them though.

Thanks,
BrownieBytes
BrownieBytes is offline   Reply With Quote

Old   January 29, 2024, 03:21
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,098
Rep Power: 26
Yann will become famous soon enough
Hello,

What OpenFOAM version are you using?

Yann
Yann is offline   Reply With Quote

Old   January 29, 2024, 13:19
Default
  #3
New Member
 
Join Date: Nov 2023
Posts: 4
Rep Power: 2
BrownieBytes is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

What OpenFOAM version are you using?

Yann
Hey Yann,

Looks like it's version 2206.

I was able to get my snappyHexMesh to half work (It somewhat accurately determined the external fluid region), but how do I get the other two regions to appear?
BrownieBytes is offline   Reply With Quote

Old   January 30, 2024, 03:13
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,098
Rep Power: 26
Yann will become famous soon enough
Hello BrownieBytes,

For multi region simulations, you can define multiple regions in snappyHexMeshDict thanks to the locationsInMesh (rather than using the usual locationInMesh)

See documentation here: https://doc.openfoam.com/2306/tools/...ocationsInMesh
And an example in the snappyMultiRegionHeater tutorial: https://develop.openfoam.com/Develop...tiRegionHeater

Regards,
Yann
AtoHM likes this.
Yann is offline   Reply With Quote

Reply

Tags
chtmultiregionsimpefoam, external application, snappyhexmesh 3d, toposet


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[IHFOAM] The IHFOAM Thread Phicau OpenFOAM Community Contributions 392 September 8, 2023 18:10
interFoam wave propagation and explosion of Courant number and residuals ChiaraViola OpenFOAM Running, Solving & CFD 1 June 26, 2019 05:36
NEW turbulence TRANSITIONAL model giammy92 OpenFOAM 3 June 30, 2016 09:47
manualInjection model in sprayFoam Mentalo OpenFOAM Running, Solving & CFD 1 April 2, 2014 09:29
Problems bout CFD model of biomass gasification, Downdraft gasifier wanglong FLUENT 2 November 25, 2009 23:27


All times are GMT -4. The time now is 02:52.