  In this master's thesis, we rigorously develop two frameworks of relational
composition of systems using tools from category theory. The first framework
addresses port-Hamiltonian systems, which are dynamical systems whose dynamics
are connected to flows of energy across a boundary. The second framework
addresses thermostatic systems, which are descriptions of equilibria in
physical systems using entropy. We also review necessary subjects to develop
these frameworks from a category-theoretic viewpoint, including inear algebra,
differential geometry, and convex geometry.
