CompositeSystems

EPHS.CompositeSystems.CompositeSystemMethod
CompositeSystem(junctions::Dtry{Junction{P}}, boxes::Dtry{InnerBox{AbstractSystem,P}}) where {P<:Union{Nothing,Position}}

A CompositeSystem is given by a Pattern, where each InnerBox is filled by a system whose interface matches that of the box.

source
EPHS.CompositeSystems.DAEStorageType
DAEStorage(xvar::XVar, quantity::Quantity, flow::SymExpr, effort::SymExpr)

Fields

  • xvar: state variable
  • quantity: associated [EPHS.AbstractSystems.Quantity]
  • flow: the time-derivative of the state variable
  • effort: the differential of the exergy function w.r.t. the state variable
source
EPHS.CompositeSystems.DAESystemType
DAESystem(storage::Vector{DAEStorage}, constraints::Vector{DAEConstraint})

A DAESystem defines a system of differential(-algebraic) equations.

Fields

  • storage: differential part (evolution of state variables)
  • constraints: algebraic part (residuals forced to be zero by constraint variables)

See DAEStorage and DAEConstraint.

source
EPHS.CompositeSystems.FlatSystemType
FlatSystem(pattern::Pattern, connections::Dtry(Vector(Connection)))

A flat system is a composite system without any hierarchical nesting of (sub-)systems. This struct also controls if each junction has only one provider of effort and state.

source
EPHS.CompositeSystems.assembleMethod
assemble(sys::CompositeSystem) -> DAESystem

Assemble the system of differential(-algebraic) equations corresponding to the given CompositeSystem.

source
EPHS.CompositeSystems.update_parametersMethod
update_parameters(dae::DAESystem, ps::Dtry{Float64}) -> DAESystem

Update the parameters of the given DAESystem according to the directory of parameters ps. Parameters that are not contained in ps remain unchanged. Parameters in ps that are not present in the system are ignored.

source
EPHS.MoreBase.flattenMethod
MoreBase.flatten(sys::CompositeSystem{P}) ->

The function flatten creates a flat system from a nested composite system using recursion.

  • nested subsystems are converted into non-hierarchical systems
  • connections, ports, and junctions are adjusted to assure consistency
source