Skip to content

Setup

What a machine needs before the first analysis, in order, with a check for each step.

Terminal window
pip install "xfea[all]"
Terminal window
xfea version

xfea[all] includes Gmsh meshing, xfea’s mesher:

Terminal window
xfea meshers
• gmsh

Installed on your machine, with its executable on your PATH.

An account on app.xfea.ai with the plugin for your solver, and your API key in a file only you can read:

Terminal window
mkdir -p ~/.xfea && echo "xfea_..." > ~/.xfea/api_key && chmod 600 ~/.xfea/api_key

Solvers explains what is sent to the service and what is not.

Run the cantilever. If it prints a tip deflection of −3.038 mm, everything above works.

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 say
settings.DEFAULT_VIEWER = "browser" # the browser viewer

Basics lists them all.

© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them