Skip to content
Mermaid templates

Stock & Flow (system dynamics)

System-dynamics-style stock-and-flow with rates affecting stocks.

Template previewMermaid
Rendering…

Make it your own.

flowchart LR
    classDef stock fill:#dbeafe,stroke:#1f47f5,stroke-width:2,color:#0f172a
    classDef flow  fill:#fde68a,stroke:#b45309,color:#1f2937,stroke-width:1.5
    classDef aux   fill:#f5f5f4,stroke:#94a3b8,color:#475569

    Pop[Population]:::stock
    Births((Births)):::flow
    Deaths((Deaths)):::flow
    BR[Birth rate]:::aux
    DR[Death rate]:::aux
    Cap[Carrying capacity]:::aux

    Births --> Pop
    Pop --> Deaths
    BR --> Births
    DR --> Deaths
    Pop --> BR
    Pop --> DR
    Cap --> DR