Skip to main content

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

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

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

▢️ 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