SimWeave
Continuous dynamics and discrete-event simulation.
15 nodes. Right-click any node in the editor to read this documentation in the app.
SimWeave / Continuousβ
π Mass-Spring-Damperβ
id simweave_msd Β· SimWeave / Continuous Β· Python export: yes
Classic mass-spring-damper: mΒ·x'' + cΒ·x' + kΒ·x = 0. States are position and velocity. Wire into Simulate.
Outputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | Mass-spring-damper system (states: x, x_dot). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Mass | float | 1.0 | |
| Damping | float | 0.4 | |
| Stiffness | float | 4.0 |
πͺ Pendulumβ
id simweave_pendulum Β· SimWeave / Continuous Β· Python export: yes
A simple pendulum with optional damping (states: theta, theta_dot). Non-linear, so try large starting angles. Wire into Simulate.
Outputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | Pendulum system (states: theta, theta_dot). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Length | float | 1.0 | |
| Mass | float | 1.0 | |
| Gravity g | float | 9.81 | |
| Damping | float | 0.0 |
π Plot Phase Portraitβ
id simweave_plot_phase_portrait Β· SimWeave / Continuous Β· Python export: yes
Plot one state against another (default: state 0 against state 1), e.g. position against velocity.
Inputs
| Port | Type | Description |
|---|---|---|
result | simweave.SimulationResult | Output of Simulate. |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | Phase portrait of the chosen states. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| x state index | int | 0 | |
| y state index | int | 1 |
π Plot State Trajectoriesβ
id simweave_plot_state_trajectories Β· SimWeave / Continuous Β· Python export: yes
Plot every state of a simulation against time.
Inputs
| Port | Type | Description |
|---|---|---|
result | simweave.SimulationResult | Output of Simulate. |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | State trajectories against time. |
π Quarter-Carβ
id simweave_quarter_car Β· SimWeave / Continuous Β· Python export: yes
Quarter-car suspension model: sprung and unsprung mass, suspension spring and damper, and tyre stiffness. Four states: sprung and unsprung displacement and velocity (z_s, z_s_dot, z_u, z_u_dot). Wire into Simulate.
Outputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | Quarter-car suspension system (states: z_s, z_s_dot, z_u, z_u_dot). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| m_s sprung mass (kg) | float | 350.0 | |
| m_u unsprung mass (kg) | float | 50.0 | |
| k_s (N/m) | float | 20000.0 | |
| c_s (Ns/m) | float | 1500.0 | |
| k_t (N/m) | float | 200000.0 |
π RLC Circuitβ
id simweave_rlc Β· SimWeave / Continuous Β· Python export: yes
Series RLC circuit (states: capacitor charge and current). Wire into Simulate.
Outputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | Series RLC circuit system (states: charge, current). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Resistance R | float | 1.0 | |
| Inductance L | float | 1.0 | |
| Capacitance C | float | 0.25 |
β±οΈ Simulateβ
id simweave_simulate_continuous Β· SimWeave / Continuous Β· Python export: yes
Integrate a continuous system forward in time from its initial state x0 (rk4 by default) and output the full trajectory. Wire the result into the plot nodes.
Inputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | The system to simulate (e.g. Mass-Spring-Damper). |
x0 | list[float] | ndarray | Initial state, one value per state (overrides the x0 field). Overrides the x0 (csv) field when connected. |
Outputs
| Port | Type | Description |
|---|---|---|
result | simweave.SimulationResult | Time grid and state trajectories. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| t start | float | 0.0 | |
| t end | float | 12.0 | |
| dt | float | 0.01 | |
| x0 (csv) | text | 1.0,0.0 | |
| Method | text | rk4 |
π₯ Thermal (Two-Mass)β
id simweave_thermal_two_mass Β· SimWeave / Continuous Β· Python export: yes
Two-mass thermal model: a core coupled to a heat sink, which in turn loses heat to ambient. Two states: core and sink temperature. Wire into Simulate.
Outputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | Two-mass thermal system (states: core_temperature, sink_temperature). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| C_core (J/K) | float | 50.0 | |
| C_sink (J/K) | float | 200.0 | |
| k_coreβsink (W/K) | float | 5.0 | |
| R_sinkβambient (K/W) | float | 0.5 | |
| T_inf (K) | float | 293.15 | |
| T_core,0 (K) | float | 293.15 | |
| T_sink,0 (K) | float | 293.15 |
π‘οΈ Thermal RCβ
id simweave_thermal_rc Β· SimWeave / Continuous Β· Python export: yes
Single-node thermal model: a thermal mass (capacitance) losing heat to ambient through a thermal resistance. One state: temperature. Wire into Simulate.
Outputs
| Port | Type | Description |
|---|---|---|
system | simweave.System | Thermal RC system (state: temperature, K). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| R_th (K/W) | float | 1.0 | |
| C_th (J/K) | float | 100.0 | |
| T_inf (K) | float | 293.15 | |
| T_0 (K) | float | 293.15 |
SimWeave / Discreteβ
π Arrival Generatorβ
id simweave_arrival_generator Β· SimWeave / Discrete Β· Python export: yes
Source of entities (customers, jobs, packets) arriving at random: inter-arrival times are exponentially distributed with the mean you set, and each entity is given an exponentially distributed service time. Wire its output into a Service or Sink. Nothing is built until a Run Simulation node executes the chain.
Outputs
| Port | Type | Description |
|---|---|---|
flow | DiscreteSpec | Entity-flow handle β wire into the next block (Service / Sink) or a Run Simulation node. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Block name | text | gen | |
| Mean inter-arrival time | float | 1.4 | |
| Mean entity service-time (used by downstream Service) | float | 1.0 | |
| RNG seed | int | 42 |
π Plot Queue Lengthβ
id simweave_plot_queue_length Β· SimWeave / Discrete Β· Python export: yes
Plot how a block's queue length changed over the simulation. Needs 'Record queue length' enabled on the block; leave the name blank to use the first recorded block.
Inputs
| Port | Type | Description |
|---|---|---|
result | DiscreteRunResult | Output of Run Simulation. |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | Queue length against time. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Block name (blank = first queue recorder) | text |
π Plot Utilisationβ
id simweave_plot_service_utilisation Β· SimWeave / Discrete Β· Python export: yes
Plot how busy a Service was over the simulation (fraction of channels in use). Needs 'Record utilisation' enabled on the service; leave the name blank to use the first recorded service.
Inputs
| Port | Type | Description |
|---|---|---|
result | DiscreteRunResult | Output of Run Simulation. |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | Service utilisation against time. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Service name (blank = first utilisation recorder) | text |
βΆοΈ Run Simulationβ
id simweave_discrete_run Β· SimWeave / Discrete Β· Python export: yes
Builds the SimWeave objects for the whole chain of blocks wired into it (sinks first, so every block knows where its output goes), runs the discrete-event simulation to the end time, and shows a per-block summary. Feed the result to the plot nodes.
Inputs
| Port | Type | Description |
|---|---|---|
terminal | DiscreteSpec | The last block of the chain β usually the Sink. |
Outputs
| Port | Type | Description |
|---|---|---|
result | DiscreteRunResult | Finished simulation (blocks + recorders) β wire into the plot nodes. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Tick dt | float | 0.05 | |
| Simulation end | float | 200.0 | |
| Skip idle gaps (DEVS-style) | checkbox | false |
π οΈ Serviceβ
id simweave_service Β· SimWeave / Discrete Β· Python export: yes
A service station with a number of parallel channels and a waiting buffer: entities queue, are served for their service time, then pass downstream. Optionally records queue length and utilisation for the plot nodes.
Inputs
| Port | Type | Description |
|---|---|---|
upstream | DiscreteSpec | Where entities come from: an Arrival Generator or another Service. |
Outputs
| Port | Type | Description |
|---|---|---|
flow | DiscreteSpec | Entity-flow handle β wire into the next block (Service / Sink) or a Run Simulation node. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Block name | text | svc | |
| Channels | int | 1 | |
| Internal buffer size | int | 10000 | |
| Default service time | float | 1.0 | |
| Record queue length | checkbox | false | |
| Record utilisation | checkbox | true |
ποΈ Sinkβ
id simweave_sink Β· SimWeave / Discrete Β· Python export: yes
The end of the entity flow: a queue that collects everything that finishes. Wire it into Run Simulation as the terminal block.
Inputs
| Port | Type | Description |
|---|---|---|
upstream | DiscreteSpec | Where entities come from: a Service or an Arrival Generator. |
Outputs
| Port | Type | Description |
|---|---|---|
flow | DiscreteSpec | Entity-flow handle β wire into the next block (Service / Sink) or a Run Simulation node. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Block name | text | sink | |
| Max length | int | 10000 | |
| Record queue length | checkbox | true |