picpic117 / sdfFoam

A simple solver for calculating SDF function on given mesh.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sdfFoam

A simple solver for calculating sign distance function (SDF) on given mesh based on defined patch.

  • Version: Compatible with openfoam7 (WSL2)

Example:

Calculate the distance from the grid to the surface of the square cylinder.

image

image

Usage

1.Download the source code

  • git clone https://github.com/picpic117/sdfFoam.git

2.To use sdfFoam, follow these steps:

  • Set up your OpenFOAM case with mesh.
  • Specify the boundary patch from which you want to calculate the signed distance field. You can do this by setting the wallPatchID variable in the sdfFoam.C

3.Compile the solver:

  • cd sdfFoam
  • wmake

4.On your caseDict, running sdfFoam:

  • sdfFoam

About

A simple solver for calculating SDF function on given mesh.


Languages

Language:C++ 66.4%Language:C 33.6%