SimWeave
Continuous dynamics and discrete-event simulation.
28 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.
Inputs
| Port | Type | Description |
|---|---|---|
mass | float | Mass in kg (overrides the field), e.g. from Convert Units. Overrides the Mass field when connected. |
damping | float | Damping in N s/m (overrides the field). Overrides the Damping field when connected. |
stiffness | float | Stiffness in N/m (overrides the field). Overrides the Stiffness field when connected. |
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 Dependenceโ
id simweave_arrival_dependence ยท SimWeave / Discrete ยท Python export: yes
Make an Arrival Generator's random draws dependent, using a copula. 'joint': each inter-arrival gap is drawn together with the entity's service time (positive tau: long gaps go with long jobs; negative: short gaps with long jobs). 'serial': consecutive gaps are dependent, giving bursts and lulls while every gap keeps exactly the same distribution. 'fit': learn the dependence (and the distributions) from observed gap / service-time rows. Each family has its own tail: Gumbel pairs the largest values, Clayton the smallest, Gaussian and Frank neither. 'before' gives the drawn service time to the entity arriving after the gap, 'after' to the entity just created. Wire into an Arrival Generator's dependence input; the means on the generator still set the gap and service-time distributions (except in fit mode).
Inputs
| Port | Type | Description |
|---|---|---|
observations | DataFrame | Fit mode only: rows of observed inter-arrival gap and service time. |
Outputs
| Port | Type | Description |
|---|---|---|
dependence | ArrivalDependence | The dependence model โ wire into an Arrival Generator. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Dependence between | select | joint | joint, serial, fit |
| Copula family | select | gumbel | gaussian, gumbel, clayton, frank, student_t |
| Kendall's tau (-1 to 1) | float | 0.5 | |
| Service time belongs to the arrival ... | select | before | before, after |
| Gap column (blank = first numeric) | text | ||
| Service-time column (blank = second numeric) | text |
๐ 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.
Inputs
| Port | Type | Description |
|---|---|---|
dependence | ArrivalDependence | Optional: an Arrival Dependence node, to make the gaps and service times (or successive gaps) statistically dependent via a copula. Leave unwired for independent exponential draws. |
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 |
๐งฎ Queue Statisticsโ
id simweave_queue_statistics ยท SimWeave / Discrete ยท Python export: yes
A table of what happened in a finished simulation, one row per block: entities completed, utilisation, average queue length, average wait in the queue, and (for services) average time in the stage, waiting plus service. Use it to compare runs, for example independent against dependent arrivals with the same average rates.
Inputs
| Port | Type | Description |
|---|---|---|
result | DiscreteRunResult | Output of Run Simulation. |
Outputs
| Port | Type | Description |
|---|---|---|
stats | DataFrame | One row per block with its completed count and queueing measures. |
โถ๏ธ 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 |
SimWeave / Flightโ
๐บ๏ธ Flight Missionโ
id simweave_flight_mission ยท SimWeave / Flight ยท Python export: yes
A take off, hover, figure-8, hover, soft landing mission. Position, velocity and acceleration stay continuous through every join, so the controller can follow it. Wire into Fly.
Outputs
| Port | Type | Description |
|---|---|---|
mission | simweave.Mission | The reference trajectory to fly. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Flight height (m) | float | 3.0 | |
| Figure-8 half-length a (m, along x) | float | 4.0 | |
| Figure-8 half-width b (m, along y) | float | 2.0 | |
| Seconds per lap | float | 20.0 | |
| Laps | float | 1.0 | |
| Height variation across the 8 (m) | float | 0.0 | |
| Yaw | select | fixed | fixed, heading |
๐ Flight to Tableโ
id simweave_flight_to_table ยท SimWeave / Flight ยท Python export: yes
Turn a flight into a table with time, x, y, z, roll, pitch, yaw plus tracking error and mission phase. The default (viewer frame, degrees, 50 rows per second) wires straight into 3D Pose from Series to animate a 3D model with the simulated flight. Choose the world frame for SimWeave's own Z-up axes.
Inputs
| Port | Type | Description |
|---|---|---|
flight | simweave.FlightResult | Output of Fly. |
Outputs
| Port | Type | Description |
|---|---|---|
table | DataFrame | One row per sample: time, x, y, z, roll, pitch, yaw, tracking_error, phase. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Frame (viewer = Y up) | select | viewer | viewer, world |
| Angle unit | select | deg | deg, rad |
| Rows per second (0 = every step) | float | 50.0 |
๐ซ Flyโ
id simweave_fly ยท SimWeave / Flight ยท Python export: yes
Fly a Quadrotor along a Flight Mission with SimWeave's cascaded controller (position, velocity, attitude and body-rate loops, then a mixer), and output the full flight. Wire the result into the plot nodes or Flight to Table. Takes about a second for a typical mission.
Inputs
| Port | Type | Description |
|---|---|---|
vehicle | simweave.Quadrotor | From Quadrotor. |
mission | simweave.Mission | From Flight Mission. |
Outputs
| Port | Type | Description |
|---|---|---|
flight | simweave.FlightResult | States, commands and the reference over time, with metrics (tracking error, energy, touchdown). |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Solver step (s) | float | 0.004 | |
| Controller period (s) | float | 0.008 |
๐ฒ Fly Monte Carloโ
id simweave_fly_monte_carlo ยท SimWeave / Flight ยท Python export: yes
Fly one mission many times, each with a random steady wind (any direction, up to the maximum), seeded turbulence and an unknown payload, and tabulate tracking error, energy, touchdown speed and where the vehicle landed. Each flight takes about a second. Wire into Plot Landing Dispersion.
Inputs
| Port | Type | Description |
|---|---|---|
mission | simweave.Mission | From Flight Mission. |
Outputs
| Port | Type | Description |
|---|---|---|
runs | DataFrame | One row per flight: wind_speed, wind_heading_deg, payload_factor, rms_error, max_error, energy_wh, touchdown_speed, landing_x, landing_y. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Flights | int | 12 | |
| Max steady wind (m/s) | float | 8.0 | |
| Payload factor min | float | 0.9 | |
| Payload factor max | float | 1.3 | |
| Turbulence std dev (m/s) | float | 1.0 | |
| Seed | int | 42 |
๐งญ Plot Flight Path 3Dโ
id simweave_plot_flight_3d ยท SimWeave / Flight ยท Python export: yes
The flown path in 3D, coloured by speed, with the reference trajectory dotted alongside.
Inputs
| Port | Type | Description |
|---|---|---|
flight | simweave.FlightResult | Output of Fly. |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | 3D flight path. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Show the reference | checkbox | true | |
| Colour by speed | checkbox | true |
๐ Plot Flight Summaryโ
id simweave_plot_flight_summary ยท SimWeave / Flight ยท Python export: yes
Four stacked panels over time: tracking error, tilt, rotor thrusts and power, with the mission phases shaded.
Inputs
| Port | Type | Description |
|---|---|---|
flight | simweave.FlightResult | Output of Fly. |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | Error, tilt, thrust and power against time. |
๐ฏ Plot Landing Dispersionโ
id simweave_plot_landing_dispersion ยท SimWeave / Flight ยท Python export: yes
Scatter the landing points of a Fly Monte Carlo run around the target, with circles containing 50% and 95% of the landings.
Inputs
| Port | Type | Description |
|---|---|---|
runs | DataFrame | Output of Fly Monte Carlo (needs landing_x and landing_y columns). |
Outputs
| Port | Type | Description |
|---|---|---|
figure | plotly.Figure | Landing scatter with containment circles. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Target x (m) | float | 0.0 | |
| Target y (m) | float | 0.0 |
๐ Quadrotorโ
id simweave_quadrotor ยท SimWeave / Flight ยท Python export: yes
A quadcopter (16-state rigid body with rotor lag, drag and ground contact). Set its mass, thrust, wind (steady, a gust, or seeded turbulence), an unmodelled payload (the controller keeps believing the nominal mass) and per-rotor effectiveness to rehearse a failing motor. Wire into Fly.
Inputs
| Port | Type | Description |
|---|---|---|
mass | float | Mass in kg (overrides the field), e.g. from Convert Units. Overrides the Mass (kg) field when connected. |
max_thrust | float | Maximum thrust per rotor in N (overrides the field). Overrides the Max thrust per rotor (N) field when connected. |
wind_speed | float | Wind speed in m/s (overrides the field). Overrides the Wind speed (m/s) field when connected. |
Outputs
| Port | Type | Description |
|---|---|---|
vehicle | simweave.Quadrotor | The configured quadrotor. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Mass (kg) | float | 1.2 | |
| Max thrust per rotor (N) | float | 7.0 | |
| Arm length (m) | float | 0.17 | |
| Linear drag (N s/m) | float | 0.1 | |
| Unmodelled payload (x mass) | float | 1.0 | |
| Rotor effectiveness 1-4 (1 = healthy) | text | 1, 1, 1, 1 | |
| Wind | select | none | none, constant, gust, turbulent |
| Wind speed (m/s) | float | 0.0 | |
| Wind blows towards (deg from +x) | float | 0.0 | |
| Gust start (s) | float | 10.0 | |
| Gust duration (s) | float | 5.0 | |
| Turbulence std dev (m/s) | float | 1.0 | |
| Turbulence length (s, held after) | float | 120.0 | |
| Turbulence seed | int | 42 |
SimWeave / Unitsโ
๐ Convert Unitsโ
id simweave_unit_convert ยท SimWeave / Units ยท Python export: yes
Read a quantity in a unit of your choice, as a plain number (or array) that any other node can use: feet to metres, mph to m/s, pounds to kg, kWh to J, Celsius to Kelvin. The unit must be of the same dimension as the quantity; converting a Distance to a Mass is an error. SimWeave's own nodes work in SI units, so use this to feed them values you were given in other units.
Inputs
| Port | Type | Description |
|---|---|---|
quantity | simweave.units.SIUnit | From Quantity or Unit Arithmetic. |
Outputs
| Port | Type | Description |
|---|---|---|
value | float | ndarray | The value(s) in the chosen unit. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Convert to | select | m (Distance) | m (Distance), cm (Distance), mm (Distance), km (Distance), miles (Distance), ft (Distance), in (Distance), s (Time), โฆ |
๐ Quantityโ
id simweave_quantity ยท SimWeave / Units ยท Python export: yes
Give a number, a list or array, or a table column a physical unit. Pick the unit from the dropdown (it names the dimension too: 'ft (Distance)', 'mph (Velocity)', 'kWh (Energy)'); the value is stored in SI base units and carries its dimension through Unit Arithmetic, which catches mistakes such as adding a distance to a time. Type the value in the field, or wire a number, array, Series or DataFrame in (a table uses the named column, or its first numeric one). Convert Units turns a quantity back into a plain number.
Inputs
| Port | Type | Description |
|---|---|---|
value | number | list | ndarray | Series | DataFrame | Optional values to cast (overrides the Value field). Overrides the Value field when connected. |
Outputs
| Port | Type | Description |
|---|---|---|
quantity | simweave.units.SIUnit | The value(s) with their unit and dimension. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Value | float | 1.0 | |
| Unit | select | m (Distance) | m (Distance), cm (Distance), mm (Distance), km (Distance), miles (Distance), ft (Distance), in (Distance), s (Time), โฆ |
| Column (when a table is wired in; blank = first numeric) | text |
๐งฎ Unit Arithmeticโ
id simweave_unit_arithmetic ยท SimWeave / Units ยท Python export: yes
Combine two quantities: a + b, a - b, a * b, a / b, or a ** b. Multiplying and dividing compose the dimensions and name the result (Distance / Time is a Velocity, Mass x Acceleration is a Force, Velocity squared times Mass over two is an Energy); adding or subtracting different dimensions is an error, as is adding two absolute temperatures. Either side can also be a plain number (scale a quantity by 2, or compute 1 / Time). For ** the exponent must be a plain number. The result keeps its SI base units; use Convert Units to read it in another.
Inputs
| Port | Type | Description |
|---|---|---|
a | SIUnit | number | Left operand. |
b | SIUnit | number | Right operand. |
Outputs
| Port | Type | Description |
|---|---|---|
result | simweave.units.SIUnit | The combined quantity, typed by its dimension. |
Fields
| Field | Type | Default | Choices |
|---|---|---|---|
| Operation (a op b) | select | / | +, -, *, /, ** |
| b as a plain number (used when b is not wired) | float | 1.0 |