/HoPyFoam

Python code for High-order Finite Volume Method

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

HoPyFOAM

FOAM like Python code for High-order Finite Volume Method

HoPyFOAM is an OpenFOAM-like Python package written for a high-order finite volume method.
The code is intended to solve solid mechanics problems on 2D and 3D unstructured meshes.
It is based on numpy and petsc4py packages while the coding style and code structure is similar to one from the OpenFOAM library.

Authors

Installation

  1. Clone the directory with git clone git@github.com:iBatistic/HoPyFVM.git
  2. Required python packages:
    1. numpy
    2. petsc4py
    3. matplotlib

License

This toolkit is released under the GNU General Public License (version 3). More details can be found in the LICENSE file.

Disclaimer

This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via (www.openfoam.com)[https://www.openfoam.com/}, and owner of the OPENFOAM® and OpenCFD® trade marks.

Tutorials

  • 1D_LaplacianFoam

    • 1D_heatConduction.py
      Python script for 1D heat conduction with linear temperature profile.

    • __1D_heatConduction_MMS.py __

      Python script for 1D heat conduction with variable source term and analytical solution obtained using MMS.

  • LaplacianFoam

    • example_1 Laplace equation for 2D square domain (1 x 1 m), left and right patches have value of 1, top and bottom patch value of 0.

    • example_2

      • example_2/tet tetrahedral mesh, coarse and fine
      • example_2/hex hexahedral discretisation using blockMesh

      Laplace equation for 2D square domain (1 x 1 m) with analytical solution from "I do like CFD, VOL.1, Katate Masatsuka, edition II" page 222, solution b.