STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
feedtwin.vessels.tank Namespace Reference

Classes

class  UllageCondensed
class  TankState
class  TankRates
class  Tank

Variables

float R_UNIVERSAL = 8.314462618

Detailed Description

A propellant tank: liquid below, pressurant above, coupled at the surface.

This is the component that decides whether a pressure-fed system works, and the
one where the interesting mistakes live. Three of them are structural enough to
be worth stating before any code.

**The ullage is not a fixed volume.** Liquid leaves, so the gas expands, so it
cools, so the pressurant demand is larger than "volume divided by density" says.
:class:`~feedtwin.vessels.volume.GasVolume` assumes a fixed volume and cannot be
reused unmodified; the expansion work term is what this module adds.

**The liquid's state variables are not the gas's.** The ullage is tracked as
``(mass, internal energy)`` because a real gas's energy balance is only exact in
``u``. The liquid is tracked as ``(mass, temperature)`` -- the opposite choice,
for the opposite reason: liquid density is about 180x less sensitive to pressure
than a gas's, so recovering pressure from ``(rho, u)`` amplifies any error in
density by that factor. Each phase gets the state pair its physics is
well-conditioned in. Forcing one convention on both is tidier and wrong.

**Ullage collapse shows up as pressurant demand, not as a pressure drop.** With
a regulator holding tank pressure, heat lost to the liquid is made up by more
gas, which drains the COPV faster, which lowers regulator inlet, which moves the
outlet through the supply-pressure coefficient. Collapse and droop are one loop.
A tank model that reports pressure and not consumption hides the entire effect.

Variable Documentation

◆ R_UNIVERSAL

float feedtwin.vessels.tank.R_UNIVERSAL = 8.314462618

Definition at line 45 of file tank.py.