Skip to content
View PeriHub's full-sized avatar

Block or report PeriHub

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
PeriHub/README.md

PeriHub

Pipeline Status docs License DOI Docker Image YouTube

PeriHub is a web application for setting up, running and analysing peridynamic simulations. You configure a model in the browser, PeriHub generates the mesh and input deck, and the simulation runs on the PeriLab solver. PeriHub is developed at the German Aerospace Center (DLR).

PeriHub: model setup on the left, simulation results on the right

What you can do

  • Start from a built-in model and adjust its parameters, with a live preview of geometry and blocks.
  • Describe your own models in YAML, or in Python when you need custom logic. See Own models.
  • Run simulations on the bundled PeriLab container or on an external PeriLab server, and follow progress and logs while they run.
  • Analyse results in a 3D viewer, as plots, and with crack analysis.
  • Work in teams: user accounts, projects, and shared models and materials.
  • Automate through the REST API. The interactive API docs are at /docs on the backend.

Quick start

You need Docker with Docker Compose.

git clone https://github.com/PeriHub/PeriHub.git
cd PeriHub
cp .env.example .env
docker compose up

Then open http://localhost:8080.

All settings live in .env. .env.example documents them. The ones you are most likely to change: GUEST_ACCESS (let visitors use PeriHub without an account), DEPLOYMENT_MODE (community or enterprise), DATABASE_URL, and SOLVER_BACKEND. Set SOLVER_BACKEND=external together with EXTERNAL_PERILAB_URL to run simulations on your own PeriLab server instead of the bundled container.

Documentation

Development

PeriHub has a FastAPI backend (backend/) and a SvelteKit frontend (repository root). For development, run both locally and use Docker only for the database and the solver.

Requirements: Python 3.11, Node.js (LTS, for example via nvm) and Docker.

  1. Start the database and the solver:

    docker compose up perihub_db perilab -d
  2. In .env, point the backend at the database:

    DATABASE_URL=postgresql+psycopg://perihub:perihub@localhost:5432/perihub
  3. Install the backend and create the database schema:

    pip install "fastapi[standard]"
    pip install -r backend/requirements.txt -r backend/requirements-dev.txt
    cd backend && alembic upgrade head
  4. Start the backend. It runs at http://localhost:8000, with API docs at http://localhost:8000/docs:

    cd backend/app
    fastapi dev main.py
  5. Start the frontend. It runs at http://localhost:9000 and forwards /api to the backend:

    npm install
    npm run dev

Tests and checks

# Backend (from backend/app)
PYTHONPATH=$(pwd)/../.. python -m pytest tests

# Frontend
npm run lint
npm run check
npm run test:unit
npx playwright test

# Formatting (pre-commit hooks)
pre-commit run --all-files

After changing a backend endpoint, regenerate the typed API client while the backend is running:

npm run client

Citation

If you use PeriHub in your research, please cite it via Zenodo: doi.org/10.5281/zenodo.8159334.

Contact

License

See LICENSE.md for how the content is licensed.

Pinned Loading

  1. PeriHub PeriHub Public

    PeriHub is a platform that provides a numerical implementation of the peridynamic theory. It is an extension of the open source PeriLab software. Peridynamics is a non-local theory that overcomes d…

    Python 19 7

  2. PeriLab.jl PeriLab.jl Public

    Peridynamic Laboratory (PeriLab) is a powerful software solution designed for tackling diverse problems in the field of peridynamics.

    Julia 72 24