#!/usr/bin/env python # coding: utf-8 # # Buckingham $\pi$: Dimensional Analysis # **Mokbel Karam, and Prof. Tony Saad (www.tsaad.net)
Department of Chemical Engineering
University of Utah** #
# In[1]: from IPython.display import Image from IPython.core.display import HTML # In this Jupyter notebook we will execute the code presented in the paper. # # Example 1: Pressure Inside a Bubble # --- # Using mass, length and time as fundamental physical dimensions: # In[2]: from buckinghampy import BuckinghamPi Pressure_In_Bubble = BuckinghamPi() Pressure_In_Bubble.add_variable(name='{\\Delta}p',units='M*L^(-1)*T^(-2)') # pressure Pressure_In_Bubble.add_variable(name='R',units='L') # diameter Pressure_In_Bubble.add_variable(name='\\sigma',units='M*T^(-2)') # surface tension try: Pressure_In_Bubble.generate_pi_terms() Pressure_In_Bubble.print_all() except Exception as e: print(e) # --- # Using force and length as fundamental physical dimensions: # In[3]: from buckinghampy import BuckinghamPi Pressure_In_Bubble = BuckinghamPi() Pressure_In_Bubble.add_variable(name='{\\Delta}p',units='F*L^(-2)') # pressure Pressure_In_Bubble.add_variable(name='R',units='L') # diameter Pressure_In_Bubble.add_variable(name='\\sigma',units='F*L^(-1)') # surface tension Pressure_In_Bubble.generate_pi_terms() Pressure_In_Bubble.print_all() # # Example 2: Pressure Drop in a Pipe # --- # In[4]: from buckinghampy import BuckinghamPi Pressure_Drop = BuckinghamPi() Pressure_Drop.add_variable(name='{\\Delta}p',units='M*L^(-1)*T^(-2)') # pressure drop Pressure_Drop.add_variable(name='R',units='L') # length of the pipe Pressure_Drop.add_variable(name='d',units='L') # diameter of the pipe Pressure_Drop.add_variable(name='\\mu',units='M*L^(-1)*T^(-1)') # viscosity Pressure_Drop.add_variable(name='Q',units='L^(3)*T^(-1)') # volumetic flow rate Pressure_Drop.generate_pi_terms() Pressure_Drop.print_all() # # Example 3: Economic Growth # --- # In[5]: from buckinghampy import BuckinghamPi Economic_Growth = BuckinghamPi() Economic_Growth.add_variable(name='P',units='K',explicit=True) # capital Economic_Growth.add_variable(name='L',units='Q/T') # labor per period of time Economic_Growth.add_variable(name='{\\omega_{L}}',units='K/Q') # wages per labor Economic_Growth.add_variable(name='Y',units='K/T') # profit per period of time Economic_Growth.add_variable(name='r',units='1/T') # rental rate period of time Economic_Growth.add_variable(name='{\\delta}',units='1/T') # depreciation rate Economic_Growth.generate_pi_terms() Economic_Growth.print_all()