Skip to content

DyadLang/BlockComponents

Repository files navigation

BlockComponents

Introduction

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.

Usage

using Pkg
Pkg.add("BlockComponents")

Examples

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"]
)

Contributing

We welcome contributions to the BlockComponents library. See CONTRIBUTING.md for details.

License

This library is released under the BSD 3-Clause License. See the LICENSE.md for more details.

About

A library of block components for Dyad

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published