Skip to content

freakbeast14/MatSim

Repository files navigation

MatSim

Finite‑element‑powered material and geometry simulation workspace. MatSim lets you upload geometries, configure boundary conditions, run simulations, and compare results across materials and tests in a single UI.

Overview

MatSim Analytics is designed for engineers and material scientists to:

  • Browse a library of engineering materials (Steel, Aluminum, Titanium, Polymers)
  • Visualize material properties with interactive charts (Stress-Strain curves, Thermal expansion)
  • Run simulations to analyze material behavior
  • Compare multiple materials side-by-side
  • Track simulation results with real-time status updates

Usage

  • Run FEA‑style simulations (stress/strain/deformation) from a web UI.
  • Upload/manage materials and geometries (STL/STEP).
  • Compare simulations side‑by‑side with charts and metrics.
  • View mesh outputs and download artifacts.

Website

Architecture

flowchart LR
    A["Client <br>(React + Vite)"] -- REST API --> B["Server<br>(NodeJS + Express)"]
    B -- Updates DB <br>(Postgres) --> C[("Database<br>(Neon)")]
    B -- Access STL, XML, VTU Files <br>(File Storage) --> D[("Meshes/Geometries<br>(Supabase Storage)")]
    B -- Queue Jobs --> E["FEniCS Service <br>(FastAPI)"]
    E -- Stores Mesh/Results<br>(XML/VTU) --> D
    E -- Results<br>(JSON) --> B
Loading

Tech Stack

  • Frontend: React, TypeScript, Vite, Tailwind, Recharts, Plotly
  • Backend: Node.js, Express, Drizzle ORM
  • FEA Service: Python, FastAPI, FEniCS, meshio, gmsh
  • DB: PostgreSQL (Neon)
  • File Storage: Supabase Storage

AI Assistant (OpenAI)

The MatSim assistant uses OpenAI on the server side. Set these env vars:

  • OPENAI_API_KEY (required)
  • OPENAI_MODEL (optional, defaults to gpt-4o-mini)

Local Setup (Brief)

  1. Install dependencies
npm install
  1. Configure env vars
# .env
DATABASE_URL=postgres://...
FENICS_API_URL=http://127.0.0.1:8001
OPENAI_API_KEY=your_openai_key_here
OPENAI_MODEL=gpt-4o-mini
  1. Run the API + client
npm run dev
  1. Run FEniCS service (separate terminal)
cd fenics_service
python -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/uvicorn fenics_service.main:app --host 0.0.0.0 --port 8001

Key User Flows

  • Materials: add/edit/delete materials and compare stress‑strain/thermal curves.
  • Geometries: upload STL/STEP, preview, and reuse in simulations.
  • Simulations: configure BCs, run, view metrics, compare runs.

Notes

  • STL previews are supported in the UI; STEP upload is not yet supported.

Last Updated: December 29, 2025 Version: 1.0.0

About

Finite‑element‑powered material and geometry simulation workspace. MatSim lets you upload geometries, configure boundary conditions, run simulations, and compare results across materials and tests in a single UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors