Skip to content

Latest commit

 

History

History
134 lines (103 loc) · 5.42 KB

File metadata and controls

134 lines (103 loc) · 5.42 KB
CurrentModule = SymbolicAWEModels

SymbolicAWEModels.jl

Documentation for SymbolicAWEModels.jl.

What is SymbolicAWEModels.jl?

SymbolicAWEModels.jl is a compiler for mechanical systems, built for Airborne Wind Energy (AWE) modelling. It takes a structural description of a system — defined in Julia code or a YAML file — and compiles it into an efficient ODE solver using ModelingToolkit.jl.

The compilation pipeline works as follows:

 Define Components         Assemble             Compile            Simulate
┌──────────────────┐   ┌──────────────┐    ┌─────────────────┐    ┌────────────┐
│ Point, Segment,  │──▶│ System       │───▶│ SymbolicAWE     │───▶│ init!()    │
│ Wing, Winch, ... │   │ Structure    │    │ Model           │    │ next_step! │
│                  │   │              │    │ (symbolic eqs → │    │ sim!()     │
│ Julia or YAML    │   │ (resolves    │    │  ODEProblem)    │    │            │
│                  │   │  references) │    │                 │    │            │
└──────────────────┘   └──────────────┘    └─────────────────┘    └────────────┘

The first compilation is slow (minutes) as ModelingToolkit generates and simplifies the symbolic equations. The result is cached to a binary file, making subsequent runs fast (seconds).

Quick start

Install Julia using juliaup:

curl -fsSL https://install.julialang.org | sh
juliaup add release
juliaup default release

Create a project and add SymbolicAWEModels:

mkdir my_project && cd my_project
julia --project="."
using Pkg
pkg"add SymbolicAWEModels"

Minimal example (Julia)

using SymbolicAWEModels
using GLMakie

set = Settings("system.yaml")
set.v_wind = 0.0

# Define components using symbolic names
points = [
    Point(:anchor, [0, 0, 0], STATIC),
    Point(:mass, [0, 0, -50], DYNAMIC; extra_mass=1.0),
]
segments = [Segment(:spring, set, :anchor, :mass, BRIDLE)]
transforms = [Transform(:tf, deg2rad(-80), 0.0, 0.0;
    base_pos=[0, 0, 50], base_point=:anchor, rot_point=:mass)]

# Assemble and compile
sys = SystemStructure("pendulum", set; points, segments, transforms)
sam = SymbolicAWEModel(set, sys)
init!(sam)

# Simulate
for _ in 1:100
    next_step!(sam)
end

# Visualize the result
plot(sam.sys_struct)

For the full tutorial, see Building a System using Julia. For YAML-based model definition, see Building a System using YAML.

What can it model?

SymbolicAWEModels provides building blocks for flexible mechanical systems:

  • Point masses — static, dynamic, or quasi-static nodes
  • Segment spring-dampers — with per-unit-length stiffness, damping, and drag
  • Tethers — collections of segments controlled by a winch
  • Winches — torque-controlled motors with Coulomb and viscous friction
  • Pulleys — equal-tension constraints between segments
  • [Wing](@ref AbstractWing)s — rigid body quaternion dynamics with aerodynamic forces from the Vortex Step Method
  • Groups — twist degrees of freedom for aeroelastic coupling
  • Transforms — spherical coordinate positioning of components

These components can be combined to model a wide range of systems, from simple hanging masses to complex kite power systems with multiple tethers, bridles, and wings.

Ecosystem

Key related packages:

Visualisation uses the built-in GLMakie extension (ext/SymbolicAWEModelsMakieExt.jl) — just using GLMakie to enable plotting.

See also

Questions?

If you have questions or problems, please submit an issue or start a discussion. The Julia community is also very helpful: Julia Discourse.

Authors: Bart van de Lint (bart@vandelint.net), Uwe Fechner (uwe.fechner.msc@gmail.com), Jelle Poland