FCOFFS is a 1D fluid simulation code that enables us to capture the behaviour of the rocket propellant feed system.
User should import the following packages into a fresh .py
code.
from FCOFFS.utilities.utilities import *
from FCOFFS.utilities.units import *
from FCOFFS.components.componentClass import *
from FCOFFS.interfaces.interface import *
from FCOFFS.pressureSystem.PressureSystem import *
The file should be saved immediately outside of the FCOFFS
package.
See example.py
for a sample use case.
A pressure system object includes a list of interfaces and components:
- Interfaces stores the state and properties of the fluids at the interfacial location between the two components connected to it.
- Component contains equations that prescribe the behaviour of such component. This behaviour is translated into a function that evaluates the residual based on the two boundary interface states.
Each interface state can be represented by
each representing density, velocity, and pressure. These are the building blocks of all other intrinsic and extrinsic properties of the fluid; temperature, viscosity, mass flow, etc can all be computed based on
Each component then produces a function
where
For instance, an imaginary component with no loss might expect identical inlet and outlet states (i.e.
In this case,
For a case with Residual
value is the RMS of the residual vector. The solver boils down to finding the root of the function
Both the behaviour of all components and the boundary conditions are all represented by the function
Sample Problem: PressureInlet - Pipe - Interface1 - Injector - PressureOutlet
Mathematical Description:
- Inlet:
$w_i = \begin{bmatrix} \rho_i \\ u_i \\ p_i \end{bmatrix}$ - Interface1:
$w_n = \begin{bmatrix} \rho_n \\ u_n \\ p_n \end{bmatrix}$ - Outlet:
$w_o = \begin{bmatrix} \rho_o \\ u_o \\ p_o \end{bmatrix}$ - Pipe:
$f_P(w_i,w_n)=r_P$ - Injector:
$f_I(w_n,w_o)=r_I$ - Known BC:
$p_i, T_i, p_o$
Pipe: There are established empirical equations to compute downstream state
Injector: Relations exist to compute mass flux based on
Solver: We apply root finding algorithm on
The function input is a list of primitives 2
While the output is the list of residuals
A solution
- Expand possible boundary conditions. (Possible BCs: Static Pressure, Total Pressure, Mass Flow, Wall, Vent; not all are critical to the core functionality)
- Add pseudo-equilibrium explicit time marching capability.
$\frac{dw}{dt}$ term not considered within each time step, rather a time variable is stored and component behaviour can change with time progression. - Apply state limiter to improve stability. (i.e. pressure and temperature should be limited to within a reasonable range)
- Change inlets/outlets to be components, not interfaces. Standardize interfaces.
- Describe more components in the
ComponentClass
. Two-phase tank, pressurant tank, and flow controller (including regulator, critical orifice, venturi, etc.) should be the first ones to add. - Should also allow component behaviours to be described by charts in addition to equations.
- More robust input checks.
- More human-readable output.
- More unit options. (i.e. choice of using Pa vs PSI)
- Text inputs (c.f. create the pressuresystem in script)
- Better illustration of the created system using graphics
- Support of parallel branches
- Add implicit time marching scheme
- Add fully transient capability, i.e.
$w$ and$w'$ should both be tracked. - Using physics driven method to solve steady-state case, instead of brute-force root finding
- Combine 4,5,6 for a full dual-time-stepping (DTT) implicit transient solver
- Connect this to Project DarkMatter to provide better flow rate/pressure estimations