diff --git a/Project.toml b/Project.toml
index bcbd01c..a5e3562 100644
--- a/Project.toml
+++ b/Project.toml
@@ -4,30 +4,36 @@ authors = [" <>"]
version = "0.1.0"
[deps]
-Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
+BlockComponents = "1ef5d832-be8e-447f-9f2c-8b5d17d15fd3"
+DyadData = "cab12561-e36c-4498-ae70-c9a5e79fef2a"
DyadInterface = "99806f68-afab-45ca-9d8c-ceff6bc61f54"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
+Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
Moshi = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d"
OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
+RotationalComponents = "824fa3ed-d7dc-4365-8bdf-ac77a1ac2011"
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
[compat]
-Markdown = "1"
+BlockComponents = "4.5.1"
+DyadData = "2.0.1"
JSON = "0.21, 1"
+Markdown = "1"
+RotationalComponents = "2.5.4"
TOML = "1"
+[dyad]
+kernel = "3.3.0"
+
[extras]
-DyadEcosystemDependencies = "7bc808db-8006-421e-b546-062440d520b7"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
+DyadEcosystemDependencies = "7bc808db-8006-421e-b546-062440d520b7"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[targets]
-test = ["DyadEcosystemDependencies","CSV","DataFrames","Plots","Test"]
-
-[dyad]
-kernel = "3.3.0"
\ No newline at end of file
+test = ["DyadEcosystemDependencies", "CSV", "DataFrames", "Plots", "Test"]
diff --git a/dyad/engine.dyad b/dyad/engine.dyad
new file mode 100644
index 0000000..fb3c542
--- /dev/null
+++ b/dyad/engine.dyad
@@ -0,0 +1,45 @@
+"Simple single-cylinder race-engine crankshaft model using standard Dyad components."
+test component SingleCylinderRaceCrankshaft
+ "Fixed engine block reference."
+ fixed = RotationalComponents.Components.Fixed()
+ "Lumped crankshaft and flywheel inertia."
+ crank = RotationalComponents.Components.Inertia(J = 0.018)
+ "Ideal combustion torque actuator."
+ combustion = RotationalComponents.Sources.TorqueSource()
+ "Simplified periodic single-cylinder firing torque waveform."
+ firing_torque = BlockComponents.Sources.Sine(amplitude = 25.0, frequency = 100.0, offset = 80.0)
+ "Steady external load torque on the crankshaft."
+ load = RotationalComponents.Sources.ConstantTorque(tau_constant = -55.0)
+ "Viscous rotational loss representing bearings, oil drag, and windage."
+ losses = RotationalComponents.Components.Damper(d = 0.02)
+ "Crank angle sensor."
+ angle = RotationalComponents.Sensors.AngleSensor()
+ "Crank angular-speed sensor."
+ speed = RotationalComponents.Sensors.VelocitySensor()
+relations
+ initial crank.phi = 0.0
+ initial crank.w = 1256.6370614359173
+
+ connect(firing_torque.y, combustion.tau)
+ connect(combustion.spline, crank.spline_a)
+ connect(combustion.support, fixed.spline)
+
+ connect(crank.spline_b, load.spline, losses.spline_a, angle.spline, speed.spline)
+ connect(load.support, fixed.spline)
+ connect(losses.spline_b, fixed.spline)
+metadata {
+ "Dyad": {
+ "tests": {
+ "balanced_idle": {
+ "stop": 0.05,
+ "expect": {"initial": {"crank.phi": 0.0, "crank.w": 1256.6370614359173}}
+ }
+ }
+ }
+}
+end
+
+analysis SingleCylinderRaceCrankshaftTransient
+ extends TransientAnalysis(stop = 0.05)
+ model = SingleCylinderRaceCrankshaft()
+end
diff --git a/generated/definitions.jl b/generated/definitions.jl
index ddf3423..ad0c9dc 100644
--- a/generated/definitions.jl
+++ b/generated/definitions.jl
@@ -16,7 +16,10 @@ if isfile(joinpath((@__DIR__) |> Base.dirname, "dyad", "definitions.jl"))
include(joinpath((@__DIR__) |> Base.dirname, "dyad", "definitions.jl"))
end
+import BlockComponents
+import DyadData
import DyadInterface
+import RotationalComponents
@doc Markdown.doc"""
This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively.
"""
diff --git a/viz_submission/index.html b/viz_submission/index.html
new file mode 100644
index 0000000..27e4ac0
--- /dev/null
+++ b/viz_submission/index.html
@@ -0,0 +1,832 @@
+
+
+
+
+
+ Single-cylinder crankshaft dynamics
+
+
+
+
+
+
+
+
+
+
accent slot 2 · azure · Dyad transient
+
Single-cylinder race crankshaft dynamics
+
A lumped crank/flywheel inertia is driven by a periodic combustion torque, opposed by steady load and viscous rotational losses. The dashboard animates the simulated crank angle, speed, acceleration, and torque.
+
+
+
+
engine speed
+
— rpm
+
t = — ms
+
+
+
+
+
+
+
+
+
Animated crank-slider
+
The piston/rod view is a visual kinematic representation driven by the 1D crankshaft solution.
+
+
running
+
+
+
+
+
+
+
+
torque
+
— N·m
+
input to torque source
+
+
+
crank angle
+
— deg
+
wrapped over two revolutions
+
+
+
angular acceleration
+
— rad/s²
+
from crank inertia state
+
+
+
+
+
+
+
+
+ Combustion torque waveform
+ Primary series uses the assigned accent base.
+
+
+
+ Crankshaft speed ripple
+ Speed response under firing torque, load torque, and damping.
+
+
+
+ Torque vs crank phase
+ Two-revolution phase view with active crank position marker.
+
+
+
+
+
+
+
+
+
+
+