Setup
What a machine needs before the first analysis, in order, with a check for each step.
1. xfea
Section titled “1. xfea”pip install "xfea[all]"xfea version2. A mesher
Section titled “2. A mesher”xfea[all] includes Gmsh meshing, xfea’s mesher:
xfea meshers • gmsh3. The solver
Section titled “3. The solver”Installed on your machine, with its executable on your PATH.
4. The conversion service
Section titled “4. The conversion service”An account on app.xfea.ai with the plugin for your solver, and your API key in a file only you can read:
mkdir -p ~/.xfea && echo "xfea_..." > ~/.xfea/api_key && chmod 600 ~/.xfea/api_keySolvers explains what is sent to the service and what is not.
5. A first run
Section titled “5. A first run”Run the cantilever. If it prints a tip deflection of −3.038 mm, everything above works.
Optional: settings
Section titled “Optional: settings”Settings are kept in ~/.xfea/config.json and set from Python:
from xfea import settings
settings.SOLVER_THREADS = 4 # threads per solve when a run does not saysettings.DEFAULT_VIEWER = "browser" # the browser viewerBasics lists them all.
© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them