Pātuhitia tēnei: Energy-based, geometric, and compositional formulation of fluid and plasma models