BlockComponents is a component library developed with Dyad modeling language. This library provides a rich collection of pre-built, continuous-time, mathematical and signal block components.
- Install the Dyad language and VS Code extension.
- Add this package to the working environment via Julia's package manager. Execute the following code in Julia:
using Pkg
Pkg.add("BlockComponents")
Demonstration of a signal adder with blocks in BlockComponents:
component IntegratorSystem
signal = BlockComponents.Constant(k=2)
integrator = BlockComponents.Integrator()
relations
connect(signal.y, integrator.u)
end
using BlockComponents
using DyadInterface
using ModelingToolkit
using Plots
@mtkbuild model = IntegratorSystem()
res = TransientAnalysis(; model, stop = 4)
plot(
res, idxs = [model.signal.y, model.integrator.y],
title = "Integrator System",
labels = ["Constant Signal" "Integrator Output"]
)
We welcome contributions to the BlockComponents library. See CONTRIBUTING.md for details.
This library is released under the BSD 3-Clause License. See the LICENSE.md for more details.