Giter Site home page Giter Site logo

lieeeeee / levelsetfortran Goto Github PK

View Code? Open in Web Editor NEW

This project forked from musheen/levelsetfortran

0.0 0.0 0.0 165 KB

Three-dimensional level set code in Fortran. Reads an STL file and creates a signed distance field using WENO5. Gives you an option to runs min/max flow on the level set field to smooth the geometry.

License: MIT License

Fortran 99.21% Makefile 0.79%

levelsetfortran's Introduction

levelSetFortran

Three dimensional level set methods code. 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. Should be simple to follow. Working on adding a namelist for inputs.

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. Parallel version is in the works.
  • 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.

levelsetfortran's People

Contributors

musheen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.