Skip to content

iBatistic/HoPyFoam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 and Contributors

Installation

  1. Clone the directory with git clone git@github.com:iBatistic/HoPyFVM.git
  2. Required python are listed in requirements.txt and can be installed easily with venv:
    virtualenv --no-site-packages venv-HoPyFoam
    source venv-HoPyFoam/bin/activate
    pip install -r requirements.txt
    

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 patches are zero gradient.

    • example_2 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 c.

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