AirPipeSimAPI

Index

AirPipeSim Components

Ai4EComponentLib.AirPipeSim.AirSimplePipeMethod
AirSimplePipe(; name, R, T)

Component: a single pipe or a pipe network with only one inlet and one outlet in steady state.

Assumptions

  • The density or pressure of the air doesn't change too fast.
  • Temperature of the pipe (pipe network) doesn't change. Default to 300K.
  • Ideal gas law is avliable.

Function of this component:

\[p_{in}-p_{out}=Rq_m|q_m|\]

Parameters:

  • R: [kg^{-1}⋅m^{-1}] Resistance coefficient of a pipe (or pipe network)
  • T: [K] Approximate temperature of the gas inside pipe.

Connectors:

  • in: Inlet of tank
  • out: Outlet of tank
source
Ai4EComponentLib.AirPipeSim.AirStorageTankMethod
AirStorageTank(; name, V, T, p0)

Component: an air storage tank

Assumptions

  • Ignore the pressure drop between inlet and outlet. The pressure everywhere inside tank equal to the inlet and outlet.
  • Temperature of the tank doesn't change. Default to 300K.
  • Ideal gas law is avliable.

Function of this component:

\[\frac{\mathrm{d}p}{\mathrm{d}t}=\frac{R_gT}{V}\left (q_{m,in}+q_{m,in}\right)\]

Parameters:

  • R_g: [J⋅kg^{-1}⋅K^{-1}] Ideal gas constant. For air is 287.11, which is unchangeable in this component.
  • V: [m^3] Volume of the tank.
  • T: [K] Temperature of the gas inside the tank.

Connectors:

  • in: Inlet of tank
  • out: Outlet of tank

Arguments:

  • p_0: [Pa] Initial value of tank pressure.
source
Ai4EComponentLib.AirPipeSim.FlowPortMethod
FlowPort(; name, T)

A pipe port(inlet or outlet) in an pipe network.

States:

  • p(t): [Pa] The pressure at this port
  • qm(t): [kg/s] The mass flow rate passing through this port

Parameters:

  • T: [K] The temperature of port. It'll be used in future develop.
source
Ai4EComponentLib.AirPipeSim.FlowSourceMethod
FlowSource(; name, qm, T)

Component: a source (or sink) with constant mass flow rate

Parameters:

  • qm: [kg⋅s^{-1}] The mass flow rate this source supply or this sink absorb.
  • T: [K] Temperature of the gas flow out (or into) this source (or sink). Default to 300K.

Connectors:

  • port: a FlowPort type subcomponent.
source
Ai4EComponentLib.AirPipeSim.PressureSourceMethod
PressureSource(; name, p, T)

Component: a source (or sink) with constant pressure

Parameters:

  • p: [Pa] The pressure this source (or sink) supply.
  • T: [K] Temperature of the gas flow out (or into) this source (or sink). Default to 300K.

Connectors:

  • port: a FlowPort type subcomponent.
source
Ai4EComponentLib.AirPipeSim.TransitionPipeMethod
TransitionPipe(
;
    name,
    λ1,
    λ2,
    λ3,
    n,
    f,
    D,
    L,
    T,
    pins,
    pouts
)

Component: a single straight pipe in transition state.

Assumptions

  • Ignore the difference in parameters on the same cross section. The flow inside pipe can be treated an 1-D flow.
  • Temperature of the pipe (pipe network) doesn't change. Default to 300K.
  • Ideal gas law is avliable.

Function of this component:

\[\frac{\partial p}{\partial t}=-\frac{R_{g} T}{A} \frac{\partial q_{m}}{\partial x} \\ \frac{\partial q_{m}}{\partial t}=\left(\frac{R_{g} T}{A} \frac{q_{m}^{2}}{p^{2}}-A\right) \frac{\partial p}{\partial x}-2 \frac{R_{g} T}{A} \frac{q_{m}}{p} \frac{\partial q_{m}}{\partial x}-\frac{f}{2 D} \frac{R_{g} T}{A} \frac{q_{m}\left|q_{m}\right|}{p}\]

Parameters:

Parameters:

  • R_g: [J⋅kg^{-1}⋅K^{-1}] Ideal gas constant. For air is 287.11, which is unchangeable in this component.
  • T: [K] Temperature of the air.
  • f: Friction factor
  • D: [m] Diameter of the pipe
  • L: [m] Length of the pipe

Connectors:

  • in: Inlet of tank
  • out: Outlet of tank

Arguments:

  • λ1, λ2 and λ3: Three coefficient for other use like parameter estimation. They have no influence on simulation, and they are default to 1.
  • n: The number of control volumes that the pipe be divided into equally.
  • pins and pouts: [Pa] The initial pressure at the inlet and outlet of pipe. Simulation will start from the steady state of pipe at the boundary pins and pouts.
source