CompositeSystems
EPHS.CompositeSystems — Module
The CompositeSystems module defines CompositeSystems and provides the means to assemble them into systems of differential(-algebraic) equations, see DAESystem and assemble.
EPHS.CompositeSystems.CompositeSystem — Method
CompositeSystem{Nothing}(sys::CompositeSystem{Position})Reduce a CompsiteSystem{Position} to a CompositeSystem{Nothing} by forgetting the the positions of junctions and boxes.
EPHS.CompositeSystems.CompositeSystem — Method
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.
EPHS.CompositeSystems.Connection — Type
Connection of an InnerPort to a Junction
EPHS.CompositeSystems.DAEConstraint — Type
DAEConstraint(cvar::CVar, residual::SymExpr)The residual is forced to be zero by the corresponding constraint variable cvar.
EPHS.CompositeSystems.DAEStorage — Type
DAEStorage(xvar::XVar, quantity::Quantity, flow::SymExpr, effort::SymExpr)Fields
xvar: state variablequantity: associated [EPHS.AbstractSystems.Quantity]flow: the time-derivative of the state variableeffort: the differential of the exergy function w.r.t. the state variable
EPHS.CompositeSystems.DAESystem — Type
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.
EPHS.CompositeSystems.FlatSystem — Type
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.
EPHS.CompositeSystems.assemble — Method
assemble(sys::CompositeSystem) -> DAESystemAssemble the system of differential(-algebraic) equations corresponding to the given CompositeSystem.
EPHS.CompositeSystems.update_parameters — Method
update_parameters(dae::DAESystem, ps::Dtry{Float64}) -> DAESystemUpdate 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.
EPHS.MoreBase.flatten — Method
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