Components
Documentation TODO
This page is a work in progress.
Base class for FullFlow components.
Component provides the common setup, registration, and interface used by all FullFlow physics components. Subclasses define their constructor inputs, call self.setup(), and optionally implement state evaluation, iteration variables, residual equations, and transient quantities.
During setup, constructor arguments are converted into component attributes. Numeric values are converted to State objects, existing State objects are preserved, and Composition objects are preserved or safely recreated when used as default constructor arguments.
Parameters
| Name | Type | Description |
|---|---|---|
name | str | Component name |
network | Network | Network that owns this component |
All simulations are comprised of Components, which are modular blocks that represent engineering functions like DischargeCoefficient or DarcyWeisbach. Both of these components are used to calculate mass flow using momentum conservation but use different methodologies. Effectively, these components both represent an incompressible fluid flow through a pipe but are two different engineering methodologies used for different pruposes. DarcyWeisbach explicitly calculates frictional losses in the flow while DischargeCoefficient uses an empirical/experimental correction factor to account for losses.
Components can represent anything from pipes to pumps to combustion chambers to any mathematical equation you want. For example, if you used a simulation to calculate the pressure in a thin-walled cylindrical pressure vessel, you could define a HoopStress component that calculates the circumferential stress in that pressure vessel's wall: