None Notebook

This notebook contains material from CBE30338; content is available on Github.

< 3.7 Interacting Tanks | Contents | Tag Index | 3.9 Modeling and Control of a Campus Outbreak of Coronavirus COVID-19 >

Open in Colab

Download

3.8 Manometer Models and Dynamics

3.8.1 Summary

This notebook demonstrates the modeling and interactive simulation of a u-tube manometer. This device demonstrates a variety of behaviors exhibited by a linear second order system. An interesting aspect of the problem is the opportunity for passive design of dynamics for a measurement device.

3.8.2 Learning Goals

3.8.3 Initializations

3.8.4 Model 1. Steady State Response to a Pressure Differential

For this first model we will that the ends of the u-tube are exposed to a pressure differential $\Delta P$. How does the level in the tubes change?

The u-tube manometer of cross-sectional area $A$, filled with a liquid of density $\rho$, the total length of the liquid column $L$. When the ends are open and exposed to the same environmental pressure $P$ the liquid levels in the two the legs of the device will reach the same level. We'll measure the levels in the tubes as a deviation $y$ from this equilibrium position.

At steady state the difference in the levels of the tubes will be $h$. The static pressure difference

$$\Delta P = \rho g h$$

or

$$y = \frac{\Delta P}{\rho g}$$

This is simple statics. Notice that neither the cross-sectional area or the length of the liquid column matter. This is the rationale behind the common water level.

https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Schlauchwaage_Schematik.svg/250px-Schlauchwaage_Schematik.svg.png

(By Bd at the German language Wikipedia, CC BY-SA 3.0, Link)

3.8.5 Model 2. Dynamic Response with Negligible Viscosity

The second model for the manometer includes the dynamics associated with moving a mass $m$ of the liquid column held within the manometer. For this model we will chose a different measure of displacem

The net force on the liquid column is due to the applied pressure differential, $A\Delta P$, and the gravitational force due to the difference in liquid levels between the two arms of the manometer, $2 A \rho g$. $A$ is the cross-sectional area. From Newton's law

$$m \frac{d^2y}{dt^2} = A \Delta P - 2 A \rho g y$$

The mass of liquid is $m = \rho L A$ where $L$ is the total length of the liquid column. After canceling a common factor $A$, the result is an inhomogeneous linear second order differential equation

$$ \frac{d^2y}{dt^2} + \frac{2 g}{L} y = \frac{1}{\rho L} \Delta P$$

At steady state this model reduces to the static case outlined in model 1 above. The dynamic case corresponds to an undamped harmonic oscillator with an angular frequency

$$\omega = \sqrt{\frac{2 g}{L}}$$

For numerical solution using the scipy libraries, it is necessary to convert the second order differential equation to a system of first order differential equations.

$$\begin{align*} \frac{dy}{dt} & = v \\ \frac{dv}{dt} & = -\frac{2g}{L} y + \frac{1}{\rho L} \Delta P \end{align*}$$

3.8.6 Model 3. Dynamic Response with Viscous Dissipation

This third model for manometer incorporates the energy loss due to viscous dissipation in fluid motion. The pressure drop due to the laminar flow of incompressible Newtonian fluid in a long pipe with circular cross-section is given by the Hagen-Poiseuille equation

$$\Delta P_{drag} = \frac{32 \mu L v}{d^2}$$

where $\mu$ is the dynamic viscosity and $d$ is pipe diameter. Doing a balance of forces acting on the fluid column

$$\rho AL\frac{d^2y}{dt^2} + \frac{32\mu L A}{d^2}v + 2 A \rho g y = A \Delta P$$

Denoting $\nu = \frac{\mu}{\rho}$ as the kinematic viscosity, substituting for velocity $\frac{dy}{dt} = v$ leaves

$$\frac{d^2y}{dt^2} + \frac{32 \nu }{d^2}\frac{dy}{dt} + \frac{2g}{L} y = \frac{1}{\rho L} \Delta P$$

This can be recast as a pair of first-order linear differential equations

$$\begin{align*} \frac{dy}{dt} & = v \\ \frac{dv}{dt} & = -\frac{2g}{L} y - \frac{32 \nu }{d^2}v + \frac{1}{\rho L} \Delta P \end{align*}$$

3.8.7 Model 4. Second Order System in Standard Form

Standard form of a damped second order system is

$$\tau^2\frac{d^2y}{dt^2} + 2\zeta\tau\frac{dy}{dt} + y = K u(t)$$

Examples include buildings, car suspensions, other structures. Starting with the model equation

$$\frac{d^2y}{dt^2} + \frac{32 \nu }{d^2}\frac{dy}{dt} + \frac{2g}{L} y = \frac{1}{\rho L} \Delta P$$

The first step is to normalize the zeroth order term in $y$ and compare to the second-order model in standard form

$$\underbrace{\frac{L}{2g}}_{\tau^2}\frac{d^2y}{dt^2} + \underbrace{\frac{16 \nu L}{g d^2}}_{2\zeta\tau}\frac{dy}{dt} + y = \underbrace{\frac{1}{2\rho g}}_K \underbrace{\Delta P}_{u(t)}$$

Solving for the coefficients in standard form

$$\begin{align*} K & = \frac{1}{2\rho g}\\ \tau & = \sqrt{\frac{L}{2g}} \\ \zeta & = \frac{8\nu}{d^2}\sqrt{\frac{2L}{g}} \end{align*}$$

3.8.7.1 Undamped ($\zeta = 0$)

3.8.7.2 Underdamped ($\zeta < 1$)

3.8.7.3 Critically damped ($\zeta = 1$)

$$d_\text{critical damping} = \left(\frac{128 \nu^2 L}{g}\right)^\frac{1}{4}$$

3.8.7.4 Overdamped ($\zeta > 1$)

3.8.8 Model 5. Dynamic Response to Sinusoidal Input

$$\frac{d^2y}{dt^2} + \frac{32 \nu }{d^2}\frac{dy}{dt} + \frac{2g}{L} y = \frac{1}{\rho L} \Delta P$$

3.8.9 Model 6. State Space Representation

State space models are widely used in textbooks, software, and the research literature to represent linear systems. It's a generic model that represents a system with inputs and outputs. Here's how to recast out manometer model is time-varying pressure as a state model where the liquid level is the measured output.

Start with the model written as a differential equation

$$\frac{d^2y}{dt^2} + \frac{32\nu}{d^2}\frac{dy}{dt} + \frac{2g}{L} y = \frac{1}{\rho L} \Delta P$$

Assemble the dependent variables in a vector, and rewrite using matrix/vector operations.

$$\begin{align*} \frac{d}{dt} \left[\begin{array}{c}y \\ v\end{array}\right] & = \left[\begin{array}{cc}0 & 1 \\ - \frac{2g}{L} & -\frac{32\nu}{d^2} \end{array}\right] \left[\begin{array}{c}y \\ v\end{array}\right] + \left[\begin{array}{c}0 \\ \frac{1}{\rho L}\end{array}\right] \left[\Delta P\right] \\ \left[y\right] & = \left[\begin{array}{c} 1 & 0\end{array}\right] \left[\begin{array}{c}y \\ v\end{array}\right] + \left[0\right] \left[\Delta P\right] \end{align*} $$

Use standard symbols to label the vectors and matrices.

$$\begin{align*} \frac{d}{dt} \underbrace{\left[\begin{array}{c}y \\ v\end{array}\right]}_{x} & = \underbrace{\left[\begin{array}{cc}0 & 1 \\ - \frac{2g}{L} & -\frac{32\nu}{d^2} \end{array}\right]}_{A} \underbrace{\left[\begin{array}{c}y \\ v\end{array}\right]}_{x} + \underbrace{\left[\begin{array}{c}0 \\ \frac{1}{\rho L}\end{array}\right]}_{B} \underbrace{\left[\Delta P\right]}_{u} \\ \underbrace{\left[y\right]}_{y} & = \underbrace{\left[\begin{array}{c} 1 & 0\end{array}\right]}_{C} \underbrace{\left[\begin{array}{c}y \\ v\end{array}\right]}_{x} + \underbrace{\left[0\right]}_{D} \underbrace{\left[\Delta P\right]}_{u} \end{align*} $$

The result is a model of a linear system in a standard state space representation.

$$\begin{align*} \frac{dx}{dt} & = Ax + Bu \\ y & = Cx + Du \end{align*}$$

< 3.7 Interacting Tanks | Contents | Tag Index | 3.9 Modeling and Control of a Campus Outbreak of Coronavirus COVID-19 >

Open in Colab

Download