Skip to content

Under Development

The myfempy project is under development, updates and code modifications may occur in future versions without prior notice from the developers.

Welcome to myfempy's project

myfempy_logo myfempy_logo

Copyright © Antonio Vinicius G. Campos 2022-2026. Processo INPI BR512022001484-0

Python Documentation Status PyPI conda DOI Quality Gate Status ![Downloads] lics Code style: black


About

myfempy is a python package based on finite element method to multiphysics analysis. The code is open source and intended for educational and scientific purposes only, not recommended to commercial use. The name myfempy is an acronym for MultiphYsics Finite Elements Module to PYthon. You can help us by contributing with the main project, send us a mensage Github Discussions. If you use myfempy in your research, the developers would be grateful if you could cite in your work.

home home

Installation

To install myfempy manually in your directory, following the steps

  1. Clone/ Download the main code latest version from github/myfempy/main
  2. Unzip the pack in your preferred location
  3. In the myfempy folder, open a terminal and enter with the command:
>> python -m pip install --upgrade pip

>> pip install .

Note: is recommend to create a virtual environment previously the installation of myfempy and dependencies packs. You can use the virtualenv or Anaconda

>> python -m pip install --user virtualenv

>> python -m virtualenv venv

>> python -m virtualenv -p 3.14t venv

Python 3.14 & Free-Threaded Support

Starting with version 0.10.0, myfempy introduces full support for Python 3.14, including the new "free-threaded" build (Python 3.14t). All underlying libraries and modules have been optimized to ensure seamless compatibility.

Important Notes for Python 3.14t Users:

  • Automatic Parallelization: When running in a free-threaded environment, the code assembler will automatically run in parallel by default. The Cython modules are compiled specifically for this, requiring no manual configuration.

  • Preview Module limitation: The model preview module is currently disabled under Python 3.14t due to upstream compatibility issues with vtk.

As with any major update, occasional bugs may occur. We strongly recommend always running the latest version of myfempy within an isolated virtual environment.

Dependencies

Myfempy can be used in systems based on Linux and Windows, MacOS (has not been tested), and requires Python 3 and Cython to running. For Windows users, check the installed compiler; see https://visualstudio.microsoft.com/vs/features/cplusplus/

Installation prerequisites, required to build myfempy

You can use either of two python development environments to run myfempy

  • Python 3.11.x - Python is a programming language that lets you work quickly and integrate systems more effectively.
  • Anaconda - Anaconda offers the easiest way to perform Python/R data science and machine learning on a single machine.

Basic python packages required for using myfempy

The following python packages are required to run myfempy. Before to install myfempy, install this packages. Check if they are already installed on your machine

  • numpy - The fundamental package for scientific computing with Python
  • cython - Cython is a language that makes writing C extensions for Python as easy as Python itself
  • scipy - Fundamental algorithms for scientific computing in Python
  • matplotlib - Python plotting package computing in Python
  • art - ASCII Art Library For Python computing in Python

To generate preview graphs of the model, it is necessary to manually install the vedo and vtk libraries separately.

Note: vtk is installed via pre-compiled builds, therefore it is not compatible with the free-threaded build versions of CPython (3.14t). Check your operating system to see if this is possible.

  • vedo - A python module for scientific analysis and visualization of эd objects
  • vtk - VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization

try

>> pip install vedo, vtk

Others prerequisites

  • gmsh/External Generator Mesh - Gmsh is an open source 3D finite element mesh generator with a built-in CAD engine and post-processor. Notes: 1 - Gmsh is NOT part of myfempy projects; 2 - Is Needed install Gmsh manually

  • gmsh API python

try

>> pip install gmsh

Tutorial

An User's Guide is available here.

Many Examples are available here.

Documentation

The myfempy is documented using the Mkdocs under docs folder. The myfempy's web documents can be found here.

Releases/ Versions

The changelog is available here

License

myfempy is published under the GPLv3 license. See the myfempy/LICENSE.

Citing

Have you found this software useful for your research? Star the project and cite it as:

  • APA:
Campos, A. V. G. (2022). myfempy. Zenodo. https://doi.org/10.5281/zenodo.15756128
  • BibTex:
@software{campos_2022_15756128,
  author       = {Campos, Antonio Vinicius Garcia},
  title        = {myfempy},
  month        = jul,
  year         = 2022,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.15756128},
  url          = {https://doi.org/10.5281/zenodo.15756128},
}

References

  • Myfempy - A python package for scientific analysis based on finite element method.

  • FEM - The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling.

  • Solid Mechanics -Solid mechanics, also known as mechanics of solids, is the branch of continuum mechanics that studies the behavior of solid materials, especially their motion and deformation under the action of forces, temperature changes, phase changes, and other external or internal agents.

  • PDE In mathematics, a partial differential equation (PDE) is an equation which imposes relations between the various partial derivatives of a multivariable function.