Metadata-Version: 2.5
Name: felupe-studio
Version: 0.8.0
Summary: The Python side of FElupe Studio: the commands of a model, its FElupe script, its results and an MCP server for AI agents
Project-URL: Homepage, https://github.com/adtzlr/felupe-studio
Project-URL: App, https://adtzlr.github.io/felupe-studio/
Project-URL: Documentation, https://github.com/adtzlr/felupe-studio/blob/main/docs/guide.md
Project-URL: Changelog, https://github.com/adtzlr/felupe-studio/blob/main/CHANGELOG.md
Author: Andreas Dutzler
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Keywords: felupe,finite-element-method,hyperelasticity,mcp
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.11
Requires-Dist: felupe>=12.1.1
Requires-Dist: jsonschema>=4.18
Requires-Dist: meshio
Requires-Dist: tensortrax>=0.30.0
Provides-Extra: mcp
Requires-Dist: mcp>=2.3; extra == 'mcp'
Provides-Extra: pardiso
Requires-Dist: pypardiso; extra == 'pardiso'
Provides-Extra: serve
Requires-Dist: starlette>=0.40; extra == 'serve'
Requires-Dist: uvicorn>=0.30; extra == 'serve'
Requires-Dist: websockets>=13; extra == 'serve'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Description-Content-Type: text/markdown

# felupe-studio

A graphical modeling environment for [FElupe](https://github.com/adtzlr/felupe): build, solve and evaluate finite element models of solids, entirely in the browser.

Every node in the GUI is a FElupe object. Every action is a command; the command list is saved as a text-diffable project file and turned into a readable FElupe script, which runs in the browser with [Pyodide](https://pyodide.org) and can be exported.

**Open the app:** <https://adtzlr.github.io/felupe-studio/>

![FElupe Studio with the sample "Hyperelastic block with a rigid plate"](https://raw.githubusercontent.com/adtzlr/felupe-studio/main/docs/images/model.png)

FElupe Studio builds models of solids, hyperelastic (e.g. rubber) or elastic-plastic (e.g. steel), in 3D, in plane strain or axisymmetric, from mesh files, Python scripts or the mesh tools of FElupe, with parameters (also derived ones): cell sets from cell tags, materials (linear elastic for small or large strains; hyperelastic like Neo-Hooke, Mooney-Rivlin, Yeoh, Ogden, Arruda-Boyce, …, also with the Mullins effect; strain-based, also elastic-plastic), sections with the `u`, `u-p-J` or `u-isochoric` formulation (e.g. air as a third medium), point sets (by a plane, at a bound, on a cylinder, on the outer surface, of a section, by picked surfaces or nodes), face sets, boundaries, symmetry planes and load cases, control points, multi-point constraints with rotation points (e.g. a rigid plate glued to a face), rigid planes and cylinders with contacts and friction, point loads and pressures, and steps that ramp several items with their own values, in jobs that may repeat a step for a load cycle. Solve runs in the browser with live results; the results show the deformed shape with contours of the displacement, the strains and the stresses per substep (at the cells or smooth at the points), the equivalent plastic strain and the maximum strain energy density of the Mullins effect, their minimum and maximum, the force-displacement (or moment-rotation) curve with free axes and the displacements and forces of the control points, and play the substeps. The FElupe script, the results (XDMF/VTU/CSV), the meshes and pictures of the view can be exported; a project is saved as a text file or as an archive with its mesh files.

Version 0.8 adds:
- **Your own deployment:** the app under the name of an institute or a company, with its logo, its links, its own samples and optionally Pyodide served with the app for a network without internet access. A brand folder and a release tag of FElupe Studio are enough, without a fork; CI files for GitLab and GitHub build and deploy it, and the wheel of the brand serves it with `felupe-studio serve` ([your own deployment](https://github.com/adtzlr/felupe-studio/blob/main/docs/deployment.md)).
- **Load cycles and the Mullins effect:** a job may repeat a step, e.g. *load*, *unload*, *load*, and the hyperelastic materials have the Mullins effect of filled rubber (Ogden-Roxburgh), which softens the rubber after its first loading, with the contour of the maximum strain energy density. The sample *Bushing with the Mullins effect* shows it.
- **Derived parameters:** a parameter may be an expression of other parameters, e.g. the total height of a spring, defined once.
- An own color per mesh, a toggle of the lines of the constraints in the results, and an app that says when a project is of a newer version.

Version 0.7 added the mesh tools of FElupe in the app, PARDISO with Python on your computer and a fixed link of `felupe-studio serve`. Version 0.6 added expressions of parameters, Python on your computer (`felupe-studio serve`), agents on the open app and single precision. Version 0.5 added plasticity, the strains and stresses at the points, the samples of the engine mount and the metacone, and the MCP server. Version 0.4 added parameters and mesh scripts, 2D models, symmetry planes and contacts with rigid surfaces. See the [changelog](https://github.com/adtzlr/felupe-studio/blob/main/CHANGELOG.md).

![The results of the sample "Bushing with the Mullins effect" back at the start after its first load cycle: the maximum strain energy density that the rubber keeps, and the force-displacement curve of the first loading, the softer unloading and second loading and the loading on to 9 mm](https://raw.githubusercontent.com/adtzlr/felupe-studio/main/docs/images/mullins.png)

![The sample "Bushing made with mesh tools": the revolved mesh of the soft body with its tool and the meshes it is made of in the browser](https://raw.githubusercontent.com/adtzlr/felupe-studio/main/docs/images/mesh-tools.png)

![The results of the sample "Engine mount (FElupe ex07)": the von Mises stress at the points, with air in the cavities of the rubber, and the force-displacement curve of the horizontal shift](https://raw.githubusercontent.com/adtzlr/felupe-studio/main/docs/images/engine-mount.png)

**Python on your computer:** `pip install "felupe-studio[serve]"`, then `felupe-studio serve` opens the same app with the Python of your computer instead of Pyodide: native NumPy and SciPy for large models, and mesh scripts with your own packages ([user guide](https://github.com/adtzlr/felupe-studio/blob/main/docs/guide.md#python-on-your-computer)).

**AI agents:** with `pip install "felupe-studio[serve,mcp]"`, `felupe-studio serve --agent` lets an agent like Claude Code or GitHub Copilot work on the model that is open in your browser. *Help ▸ Connect an agent* connects the tab; you see every change in the history and undo it, and you read a mesh script of the agent before it runs ([agents](https://github.com/adtzlr/felupe-studio/blob/main/docs/agents.md)). Headless, `felupe-studio-mcp` builds, checks and solves models with CPython, and you open the saved project in the app.

![An agent on the open app: it opened a sample, added a parameter and wrote a mesh script, which the user reads before it runs](https://raw.githubusercontent.com/adtzlr/felupe-studio/main/docs/images/agent.png)

**Documentation:** the [user guide](https://github.com/adtzlr/felupe-studio/blob/main/docs/guide.md) with tutorials, the [command reference](https://github.com/adtzlr/felupe-studio/blob/main/docs/reference.md), how the [commands](https://github.com/adtzlr/felupe-studio/blob/main/docs/commands.md) become a FElupe script, the [MCP server](https://github.com/adtzlr/felupe-studio/blob/main/docs/agents.md) for AI agents, [your own deployment](https://github.com/adtzlr/felupe-studio/blob/main/docs/deployment.md) under your own name, the [architecture decision records](https://github.com/adtzlr/felupe-studio/blob/main/docs/adr/), the [changelog](https://github.com/adtzlr/felupe-studio/blob/main/CHANGELOG.md) and the [roadmap](https://github.com/adtzlr/felupe-studio/issues/349).

**Non-goals:** meshing from CAD, contact between deformable bodies (contacts are with rigid planes and cylinders), a server backend (the MCP server and `felupe-studio serve` run on your computer).

## Repository layout

| Path | Content |
| --- | --- |
| `app/` | The web app (TypeScript, Vite) |
| `python/felupe_studio/` | Python package: command list → FElupe script (runs in Pyodide and CPython), the MCP server for AI agents (`mcp.py`, CPython) and the local runtime of the app (`felupe-studio serve`: `serve.py`, `runtime.py`, CPython) |
| `tests/` | Python tests |
| `docs/adr/` | Architecture decision records |
| `docs/` | User guide, command reference (generated by `docs/make_reference.py`), screenshots (`docs/images`, made by `docs/make_screenshots.py`), commands, your own deployment, benchmarks and the [release checklist](https://github.com/adtzlr/felupe-studio/blob/main/docs/release.md) |

## Development

Web app:

```bash
cd app
npm install
npm run dev      # development server
npm test         # unit tests (Vitest)
npm run lint     # ESLint and Prettier
npm run build    # typecheck and production build
```

Python package:

```bash
pip install -e ".[test,mcp,serve]"
pytest            # the app in a browser: pytest -m e2e (Playwright, a built app)
ruff check . && ruff format --check .
```

## License

felupe-studio is licensed under GPL-3.0-or-later, the same license as [FElupe](https://github.com/adtzlr/felupe).
