Skip to main content

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

PortTypeDescription
massfloatMass in kg (overrides the field), e.g. from Convert Units. Overrides the Mass field when connected.
dampingfloatDamping in N s/m (overrides the field). Overrides the Damping field when connected.
stiffnessfloatStiffness in N/m (overrides the field). Overrides the Stiffness field when connected.

Outputs

PortTypeDescription
systemsimweave.SystemMass-spring-damper system (states: x, x_dot).

Fields

FieldTypeDefaultChoices
Massfloat1.0
Dampingfloat0.4
Stiffnessfloat4.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

PortTypeDescription
systemsimweave.SystemPendulum system (states: theta, theta_dot).

Fields

FieldTypeDefaultChoices
Lengthfloat1.0
Massfloat1.0
Gravity gfloat9.81
Dampingfloat0.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

PortTypeDescription
resultsimweave.SimulationResultOutput of Simulate.

Outputs

PortTypeDescription
figureplotly.FigurePhase portrait of the chosen states.

Fields

FieldTypeDefaultChoices
x state indexint0
y state indexint1

๐Ÿ“ˆ Plot State Trajectoriesโ€‹

id simweave_plot_state_trajectories ยท SimWeave / Continuous ยท Python export: yes

Plot every state of a simulation against time.

Inputs

PortTypeDescription
resultsimweave.SimulationResultOutput of Simulate.

Outputs

PortTypeDescription
figureplotly.FigureState 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

PortTypeDescription
systemsimweave.SystemQuarter-car suspension system (states: z_s, z_s_dot, z_u, z_u_dot).

Fields

FieldTypeDefaultChoices
m_s sprung mass (kg)float350.0
m_u unsprung mass (kg)float50.0
k_s (N/m)float20000.0
c_s (Ns/m)float1500.0
k_t (N/m)float200000.0

๐Ÿ”Œ RLC Circuitโ€‹

id simweave_rlc ยท SimWeave / Continuous ยท Python export: yes

Series RLC circuit (states: capacitor charge and current). Wire into Simulate.

Outputs

PortTypeDescription
systemsimweave.SystemSeries RLC circuit system (states: charge, current).

Fields

FieldTypeDefaultChoices
Resistance Rfloat1.0
Inductance Lfloat1.0
Capacitance Cfloat0.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

PortTypeDescription
systemsimweave.SystemThe system to simulate (e.g. Mass-Spring-Damper).
x0list[float] | ndarrayInitial state, one value per state (overrides the x0 field). Overrides the x0 (csv) field when connected.

Outputs

PortTypeDescription
resultsimweave.SimulationResultTime grid and state trajectories.

Fields

FieldTypeDefaultChoices
t startfloat0.0
t endfloat12.0
dtfloat0.01
x0 (csv)text1.0,0.0
Methodtextrk4

๐Ÿ”ฅ 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

PortTypeDescription
systemsimweave.SystemTwo-mass thermal system (states: core_temperature, sink_temperature).

Fields

FieldTypeDefaultChoices
C_core (J/K)float50.0
C_sink (J/K)float200.0
k_coreโ†’sink (W/K)float5.0
R_sinkโ†’ambient (K/W)float0.5
T_inf (K)float293.15
T_core,0 (K)float293.15
T_sink,0 (K)float293.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

PortTypeDescription
systemsimweave.SystemThermal RC system (state: temperature, K).

Fields

FieldTypeDefaultChoices
R_th (K/W)float1.0
C_th (J/K)float100.0
T_inf (K)float293.15
T_0 (K)float293.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

PortTypeDescription
observationsDataFrameFit mode only: rows of observed inter-arrival gap and service time.

Outputs

PortTypeDescription
dependenceArrivalDependenceThe dependence model โ€” wire into an Arrival Generator.

Fields

FieldTypeDefaultChoices
Dependence betweenselectjointjoint, serial, fit
Copula familyselectgumbelgaussian, gumbel, clayton, frank, student_t
Kendall's tau (-1 to 1)float0.5
Service time belongs to the arrival ...selectbeforebefore, 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

PortTypeDescription
dependenceArrivalDependenceOptional: 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

PortTypeDescription
flowDiscreteSpecEntity-flow handle โ€” wire into the next block (Service / Sink) or a Run Simulation node.

Fields

FieldTypeDefaultChoices
Block nametextgen
Mean inter-arrival timefloat1.4
Mean entity service-time (used by downstream Service)float1.0
RNG seedint42

๐Ÿ“ˆ 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

PortTypeDescription
resultDiscreteRunResultOutput of Run Simulation.

Outputs

PortTypeDescription
figureplotly.FigureQueue length against time.

Fields

FieldTypeDefaultChoices
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

PortTypeDescription
resultDiscreteRunResultOutput of Run Simulation.

Outputs

PortTypeDescription
figureplotly.FigureService utilisation against time.

Fields

FieldTypeDefaultChoices
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

PortTypeDescription
resultDiscreteRunResultOutput of Run Simulation.

Outputs

PortTypeDescription
statsDataFrameOne 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

PortTypeDescription
terminalDiscreteSpecThe last block of the chain โ€” usually the Sink.

Outputs

PortTypeDescription
resultDiscreteRunResultFinished simulation (blocks + recorders) โ€” wire into the plot nodes.

Fields

FieldTypeDefaultChoices
Tick dtfloat0.05
Simulation endfloat200.0
Skip idle gaps (DEVS-style)checkboxfalse

๐Ÿ› ๏ธ 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

PortTypeDescription
upstreamDiscreteSpecWhere entities come from: an Arrival Generator or another Service.

Outputs

PortTypeDescription
flowDiscreteSpecEntity-flow handle โ€” wire into the next block (Service / Sink) or a Run Simulation node.

Fields

FieldTypeDefaultChoices
Block nametextsvc
Channelsint1
Internal buffer sizeint10000
Default service timefloat1.0
Record queue lengthcheckboxfalse
Record utilisationcheckboxtrue

๐Ÿ—„๏ธ 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

PortTypeDescription
upstreamDiscreteSpecWhere entities come from: a Service or an Arrival Generator.

Outputs

PortTypeDescription
flowDiscreteSpecEntity-flow handle โ€” wire into the next block (Service / Sink) or a Run Simulation node.

Fields

FieldTypeDefaultChoices
Block nametextsink
Max lengthint10000
Record queue lengthcheckboxtrue

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

PortTypeDescription
missionsimweave.MissionThe reference trajectory to fly.

Fields

FieldTypeDefaultChoices
Flight height (m)float3.0
Figure-8 half-length a (m, along x)float4.0
Figure-8 half-width b (m, along y)float2.0
Seconds per lapfloat20.0
Lapsfloat1.0
Height variation across the 8 (m)float0.0
Yawselectfixedfixed, 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

PortTypeDescription
flightsimweave.FlightResultOutput of Fly.

Outputs

PortTypeDescription
tableDataFrameOne row per sample: time, x, y, z, roll, pitch, yaw, tracking_error, phase.

Fields

FieldTypeDefaultChoices
Frame (viewer = Y up)selectviewerviewer, world
Angle unitselectdegdeg, rad
Rows per second (0 = every step)float50.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

PortTypeDescription
vehiclesimweave.QuadrotorFrom Quadrotor.
missionsimweave.MissionFrom Flight Mission.

Outputs

PortTypeDescription
flightsimweave.FlightResultStates, commands and the reference over time, with metrics (tracking error, energy, touchdown).

Fields

FieldTypeDefaultChoices
Solver step (s)float0.004
Controller period (s)float0.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

PortTypeDescription
missionsimweave.MissionFrom Flight Mission.

Outputs

PortTypeDescription
runsDataFrameOne row per flight: wind_speed, wind_heading_deg, payload_factor, rms_error, max_error, energy_wh, touchdown_speed, landing_x, landing_y.

Fields

FieldTypeDefaultChoices
Flightsint12
Max steady wind (m/s)float8.0
Payload factor minfloat0.9
Payload factor maxfloat1.3
Turbulence std dev (m/s)float1.0
Seedint42

๐Ÿงญ 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

PortTypeDescription
flightsimweave.FlightResultOutput of Fly.

Outputs

PortTypeDescription
figureplotly.Figure3D flight path.

Fields

FieldTypeDefaultChoices
Show the referencecheckboxtrue
Colour by speedcheckboxtrue

๐Ÿ“ˆ 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

PortTypeDescription
flightsimweave.FlightResultOutput of Fly.

Outputs

PortTypeDescription
figureplotly.FigureError, 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

PortTypeDescription
runsDataFrameOutput of Fly Monte Carlo (needs landing_x and landing_y columns).

Outputs

PortTypeDescription
figureplotly.FigureLanding scatter with containment circles.

Fields

FieldTypeDefaultChoices
Target x (m)float0.0
Target y (m)float0.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

PortTypeDescription
massfloatMass in kg (overrides the field), e.g. from Convert Units. Overrides the Mass (kg) field when connected.
max_thrustfloatMaximum thrust per rotor in N (overrides the field). Overrides the Max thrust per rotor (N) field when connected.
wind_speedfloatWind speed in m/s (overrides the field). Overrides the Wind speed (m/s) field when connected.

Outputs

PortTypeDescription
vehiclesimweave.QuadrotorThe configured quadrotor.

Fields

FieldTypeDefaultChoices
Mass (kg)float1.2
Max thrust per rotor (N)float7.0
Arm length (m)float0.17
Linear drag (N s/m)float0.1
Unmodelled payload (x mass)float1.0
Rotor effectiveness 1-4 (1 = healthy)text1, 1, 1, 1
Windselectnonenone, constant, gust, turbulent
Wind speed (m/s)float0.0
Wind blows towards (deg from +x)float0.0
Gust start (s)float10.0
Gust duration (s)float5.0
Turbulence std dev (m/s)float1.0
Turbulence length (s, held after)float120.0
Turbulence seedint42

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

PortTypeDescription
quantitysimweave.units.SIUnitFrom Quantity or Unit Arithmetic.

Outputs

PortTypeDescription
valuefloat | ndarrayThe value(s) in the chosen unit.

Fields

FieldTypeDefaultChoices
Convert toselectm (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

PortTypeDescription
valuenumber | list | ndarray | Series | DataFrameOptional values to cast (overrides the Value field). Overrides the Value field when connected.

Outputs

PortTypeDescription
quantitysimweave.units.SIUnitThe value(s) with their unit and dimension.

Fields

FieldTypeDefaultChoices
Valuefloat1.0
Unitselectm (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

PortTypeDescription
aSIUnit | numberLeft operand.
bSIUnit | numberRight operand.

Outputs

PortTypeDescription
resultsimweave.units.SIUnitThe combined quantity, typed by its dimension.

Fields

FieldTypeDefaultChoices
Operation (a op b)select/+, -, *, /, **
b as a plain number (used when b is not wired)float1.0