Nothing to install in the browser
A web page loads FEAScript from a URL, so simulations run with no setup, licenses or admin rights. In Node.js, FEAScript is one npm package.
FEAScript enables engineering simulations across both browser-based and server-side environments without the overhead of traditional desktop software.
npm install feascript
Why use FEAScript
FEAScript brings the finite element method to the web. You set up the model, solve it and plot the results in JavaScript, in a browser or in Node.js, and you can build the simulation into your own web pages and applications.
A web page loads FEAScript from a URL, so simulations run with no setup, licenses or admin rights. In Node.js, FEAScript is one npm package.
In current web browsers on desktops, tablets and phones, and in Node.js on Windows, macOS and Linux.
The core library is free to use, change and build on under the MIT license, with no license fees.
How to use FEAScript
Call FEAScript from JavaScript in a web page, in a playground such as CodePen or Scribbler, or in Node.js. The example below solves heat conduction in a 2D fin with a hole, live in this page: move a slider and both the code and the result change. Save the code as an HTML file to run it yourself.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Heat Conduction in a 2D Fin with a Hole</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/plotly.js/2.35.3/plotly.min.js"></script>
</head>
<body>
<div id="resultsCanvas"></div>
<script type="module">
import {
FEAScriptModel,
importGmshMesh,
plotInterpolatedSolution,
} from "https://core.feascript.com/dist/feascript.esm.js";
window.addEventListener("DOMContentLoaded", async () => {
// 1. Create the model and select the physics
const model = new FEAScriptModel();
model.setModelConfig("heatConduction", { solver: { method: "lusolve" } });
// 2. Load the Gmsh mesh (any hosted .msh file works)
const response = await fetch("https://feascript.com/tutorials/rect_with_hole_quad_quadratic.msh");
const meshFile = new File([await response.text()], "rect_with_hole_quad_quadratic.msh");
const mesh = await importGmshMesh(meshFile);
model.setMesh(mesh);
// 3. Apply the boundary conditions, keyed by the names of the Gmsh physical groups
model.addBoundaryCondition("bottom", { type: "constantTemperature", temperature: 200 }); // Bottom
model.addBoundaryCondition("left", { type: "symmetry" }); // Left
model.addBoundaryCondition("top", { type: "convection", h: 1, ambientTemperature: 20 }); // Top
model.addBoundaryCondition("right", { type: "constantTemperature", temperature: 200 }); // Right
model.addBoundaryCondition("hole", { type: "convection", h: 1, ambientTemperature: 20 }); // Hole
// 4. Solve
const result = model.solve();
// 5. Plot the results
plotInterpolatedSolution(model, result, "contour", "resultsCanvas");
});
</script>
</body>
</html>
The simulation runs when this part of the page comes into view.
AI-ready
FEAScript needs no installation, so an AI assistant can write a complete simulation that runs in your browser: just describe the problem. Give ChatGPT, Claude, Copilot or any other assistant llms.txt, a one-file summary of the FEAScript API, so the code it writes uses the actual models and options. Save its answer as an HTML file and open it, or run it on CodePen.
docs.feascript.com/llms.txt
Features
FEAScript currently solves 1D and 2D problems with linear and quadratic elements.
.msh file
format) with quadrilateral and triangular elements (linear and quadratic)
In development FEAScript is in development, and each release adds features. See what's new for the latest release and the roadmap. To contribute code, read the contribution guidelines.
Verification
FEAScript is checked in three ways: against values published for standard problems, against exact solutions, and against other finite element software on the same meshes. Each result links to the test or run that produced it, so you can check it and run it yourself.
18.26 °C
NAFEMS T4 target: 18.3 °C
Exact
At the nodes, to about 15 digits
11 digits
Same meshes, node by node, up to 51,681 nodes
NAFEMS T4 and the Code_Aster cases are reproduced independently. FEAScript is not affiliated with NAFEMS, EDF or the Code_Aster project.
Tutorials
Step-by-step tutorials, each with the full code to run in a web page, on CodePen or in Scribbler. Four to start with, one for each kind of physics:
New to finite elements?
Start with Tri's Lab by FEAScript, where you learn the finite element method through games and block-based missions, with no code to write.
lab.feascript.com
Heat conduction
2D steady-state heat conduction in a cooling fin with mixed boundary conditions including constant temperature, symmetry, and convective cooling
FEAScript in use
Better Building's free Heat Transfer Simulator lets architects and engineers draw a building detail and compute U-values and ψ-values in the browser. For complex and curved geometries, higher-order elements, batch runs and custom web applications, its documentation recommends continuing in FEAScript.
Need a calculator like this for your own product? Work with FEAScript.
FEAScript Studio
FEAScript Studio builds a model from connected blocks, then turns it into a focused application: you choose which inputs users can change and which results they see. The apps run in the browser and can be shared by link or embedded in another website. Any model can be exported as plain FEAScript code.
Resources
The FEAScript documentation covers installation, the physical models and their equations, and the full API reference. Good places to start:
The latest release, 0.4.0 (November 2026), added a triangle mesh generator for polygons with holes, much faster direct solvers, errors that stop a wrong solve and list every input mistake at once, loading from a plain script tag, and the Code_Aster benchmark tests. Every change is in the changelog.
Next, 0.5.0 brings multi-threading, multigrid, units with a dimensional check and multi-block meshes. Follow the plans in the 0.5.0 roadmap.
Support
If you find FEAScript useful, please consider supporting its development with a donation. Your support helps fund new features, performance improvements, documentation and tutorials. Companies can sponsor too, with their logo on the home page. See who already supports FEAScript on the sponsors page.
Stay in the loop
Receive project updates and news.