AbstractSystems
EPHS.AbstractSystems — Module
The AbstractSystems module provides a common basis for the graphical syntax defined in EPHS.Patterns and the semantics defined in EPHS.Components and EPHS.CompositeSystems. Specifically, the module defines system interfaces (see Interface), an abstract type for concrete systems (see AbstractSystem), and port variables (see PortVar).
EPHS.AbstractSystems.AbstractSystem — Type
AbstractSystem is a supertype of EPHS.Components.Component (for primitive systems) and EPHS.CompositeSystems.CompositeSystem (for systems composed of subsystems).
EPHS.AbstractSystems.EVar — Type
EVar(box_path::DtryPath, port_path::DtryPath)An EVar represents an effort variable of a port. See XVar for info about the fields box_path and port_path.
EPHS.AbstractSystems.FVar — Type
FVar(box_path::DtryPath, port_path::DtryPath)A FVar represents a flow variable of a port. See XVar for info about the fields box_path and port_path.
EPHS.AbstractSystems.Interface — Type
The interface of a system is basically a directory (see Dtry) of ports. Hence, each port of an Interface is addressed by its name (i.e. DtryPath) and it has assigned to it a PortType.
EPHS.AbstractSystems.PortType — Type
PortType(quantity::Quantity, power::Bool)Next to its name (i.e. DtryPath, see Interface), a port is defined by its PortType, see also Interface.
Fields
quantity: only ports with the same Quantity can be connectedpower:falsemeans state port,truemeans power port
State ports only have a state variable to share information about the given quantity, e.g. the amount of magnetic flux. Power ports additionally have a flow and an effort variable whose pairing yields the power that is exchanged via the port.
EPHS.AbstractSystems.PortVar — Type
PortVar is a supertype for port variables. Its concrete subtypes are
EPHS.AbstractSystems.PowerVar — Type
PowerVar is a subtype of PortVar. Concrete subtypes of PowerVar are
EPHS.AbstractSystems.Quantity — Type
Quantity(quantity::Symbol, space::Symbol, iseven::Bool)A Quantity represents a physical quantity and is used to define a PortType.
Fields
quantity:Symbolidentifying the quantity, e.g.:momentumspace:Symbolidentifying its state space, e.g.:ℝiseven:falsemeans the quantity has odd parity w.r.t. time reversal transformation
EPHS.AbstractSystems.Relation — Type
Relation(storage::Dtry{SymExpr}, external::Dtry{Provider})A relation that defines the semantics of a system.
EPHS.AbstractSystems.XVar — Type
XVar(box_path::DtryPath, port_path::DtryPath)A XVar represents a state variable of a port.
Fields
box_path: name of theEPHS.Patterns.InnerBoxor system to which the port belongsport_path: name of the port itself relative to the box or system interface
Hence, the full path identifying the port is box_path * port_path. Both parts are stored separately to prevent ambiguities.
EPHS.AbstractSystems.angular_momentum — Constant
Quantity representing a real-valued angular momentum
EPHS.AbstractSystems.charge — Constant
Quantity representing an electric charge
EPHS.AbstractSystems.displacement — Constant
Quantity representing a real-valued displacement
EPHS.AbstractSystems.entropy — Constant
Quantity representing an entropy
EPHS.AbstractSystems.magnetic_flux — Constant
Quantity representing a magnetic flux
EPHS.AbstractSystems.momentum — Constant
Quantity representing a real-valued linear momentum
EPHS.AbstractSystems.volume — Constant
Quantity representing a volume
EPHS.AbstractSystems.fillcolor — Method
fillcolor(system::AbstractSystem) -> StringReturns the fillcolor of an EPHS.Patterns.InnerBox, which is filled by the given system. The returned String is a HTML hex color code.
EPHS.AbstractSystems.interface — Method
interface(system::AbstractSystem) -> InterfaceReturns the Interface of the given system.
EPHS.AbstractSystems.relation — Method
relation(system::AbstractSystem) -> RelationReturns the Relation that defines the semantics of the system.
EPHS.AbstractSystems.total_energy — Method
total_energy(system::AbstractSystem) -> SymExrReturns a symbolic expression for the total energy of the system.
EPHS.AbstractSystems.total_entropy — Method
total_entropy(system::AbstractSystem) -> SymExrReturns a symbolic expression for the total entropy of the system.