SkillAgentSearch skills...

LevelSetStrandGrid

Three-dimensional strand grid generator in Fortran. Reads in an STL file and builds a level set. The geometry may then be edited or left unchanged. A strand grid mesh is then built.

Install / Use

/learn @musheen/LevelSetStrandGrid
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

levelSetStrandGrid

Three dimensional strand grid generator. Reads a .stl file and creates a signed distance function field using WENO5. Also runs min/max flow on the level set field to smooth the geometry using 2nd order central differencing.

I have included two sample .stl files to get you started. One is a cube, and the other is two cubes with a unit spacing of 10 between them.

The code will output 2 .vti files: signedDistanceFunction.vti, which is the initialized level set field, smoothedDistanceFucntion.vti, which is the level set field after min/max has been run. I suggest ParaView to open these files.

The code will also output a .s3d file. This is a mesh file type for the CFD code Strand3dFC.

Compile using the make file.

Couple of notes:

  • The code is pretty sensitve to the time step.
  • Check the size of the geometry inside the .stl file. Ensure your dx is small or large enough to have at least 10 cells inside the zero level set.
  • Currently has no capability to do moving geometry.
  • Currently in serial.
  • Currently uses uniform grid spacing.
  • If you want to only run the signed distance function part, set the min/max iterations to zero.
  • The .stl files need to be clean. No pierced faces or dirty CAD.
  • Currently uses .stl only right now.
View on GitHub
GitHub Stars7
CategoryDevelopment
Updated1y ago
Forks5

Languages

Fortran

Security Score

70/100

Audited on Mar 4, 2025

No findings