Welcome

Bvpy is a python library, based on FEniCS and GMSH, to easily implement and study numerically Boundary Value Problems (BVPs) as well as Initial Boundary Value Problems (IBVPs) through the Finite Element Method (FEM).

Initially built up in the context of developmental biology and morphomechanics, Bvpy proposes an intuitive API as close as possible to the formal definition of BVPs. Its purpose is to enable users to quickly and efficiently estimate the behavior of a wide variety of fields (scalars, vectors, tensors) on biologically relevant structures (Riemannian and non-Rieamannian manifolds), inspired by biophysical and biochemical processes (morphogene patterning, active matter mechanics, diffusion-reaction processes, active transports…).

Despite this biological motivation, the Bvpy library has been implemented in an agnostic manner that makes it suitable for many other scientific context.

Installation

You will need conda in order to install bvpy. If you don’t have conda installed, you can download it here.

To install bvpy using conda package manager, follow these steps:

  1. Open a terminal or Conda environment prompt.

  2. Choose one of the following installation methods:

    • Create a New Environment (recommended):

      conda create -n bvpy -c mosaic -c conda-forge bvpy
      conda activate bvpy
      
    • Install into an Existing Environment:

      conda activate <your-environment-name>
      conda install -c mosaic -c conda-forge bvpy
      
  3. Verify the bvpy installation:

    python -c "from bvpy.utils.examples import cantilever_beam; cantilever_beam()"
    

This should produce a Pyvista Plotter showing the displacement field of the cantilever beam. If you see the correctly rendered visualization, the installation and dependencies of bvpy are working as expected.

Note: Replace <your-environment-name> with the name of your existing environment.

Tutorials

We’ve prepared a series of Tutorials that will help you understand and use bvpy effectively:

  1. Explore the tutorials online: Tutorials

  2. Download all tutorials as a ZIP file with the associated data: tutorials.zip

Note: To replay the notebooks, ensure that you have the notebook` package installed in your <your-bvpy-env> environment. You can install it using the following command:

conda install -n <your-bvpy-env> notebook

Support

If you encounter an error or need help, please raise an issue.

Contributing

Bvpy is a is a collaborative project and contributions are welcome. If you want to contribute, please contact the coordinator prior to any merge request and check the gitlab merge request guidelines if needed.

Citation

If you are using Bvpy in a published work, please use this bibtex entry as reference:

@article{Gacon2021,
doi = {10.21105/joss.02831},
url = {https://doi.org/10.21105/joss.02831},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {59},
pages = {2831},
author = {Florian Gacon and Christophe Godin and Olivier Ali},
title = {BVPy: A FEniCS-based Python package to ease the expression and study of boundary value problems in Biology.},
journal = {Journal of Open Source Software}}