AbstractSystems
EPHS.AbstractSystems — ModuleThe 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 — TypeAbstractSystem is a supertype of EPHS.Components.Component (for primitive systems) and EPHS.CompositeSystems.CompositeSystem (for systems composed of subsystems).
EPHS.AbstractSystems.EVar — TypeEVar(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 — TypeFVar(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 — TypeThe 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 — TypePortType(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 — TypePortVar is a supertype for port variables. Its concrete subtypes are
EPHS.AbstractSystems.PowerVar — TypePowerVar is a subtype of PortVar. Concrete subtypes of PowerVar are
EPHS.AbstractSystems.Quantity — TypeQuantity(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 — TypeRelation(storage::Dtry{SymExpr}, external::Dtry{Provider})A relation that defines the semantics of a system.
EPHS.AbstractSystems.XVar — TypeXVar(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 — ConstantQuantity representing a real-valued angular momentum
EPHS.AbstractSystems.charge — ConstantQuantity representing an electric charge
EPHS.AbstractSystems.displacement — ConstantQuantity representing a real-valued displacement
EPHS.AbstractSystems.entropy — ConstantQuantity representing an entropy
EPHS.AbstractSystems.magnetic_flux — ConstantQuantity representing a magnetic flux
EPHS.AbstractSystems.momentum — ConstantQuantity representing a real-valued linear momentum
EPHS.AbstractSystems.volume — ConstantQuantity representing a volume
EPHS.AbstractSystems.fillcolor — Methodfillcolor(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 — Methodinterface(system::AbstractSystem) -> InterfaceReturns the Interface of the given system.
EPHS.AbstractSystems.relation — Methodrelation(system::AbstractSystem) -> RelationReturns the Relation that defines the semantics of the system.
EPHS.AbstractSystems.total_energy — Methodtotal_energy(system::AbstractSystem) -> SymExrReturns a symbolic expression for the total energy of the system.
EPHS.AbstractSystems.total_entropy — Methodtotal_entropy(system::AbstractSystem) -> SymExrReturns a symbolic expression for the total entropy of the system.