Thursday, June 14, 2012

(06xx2012) Water Leakage Analysis


Purpose:

Since the pressure chamber is suffering from water leakage, it will be useful to analyze the area of the leakage  the purpose of this program is to present an automatic analysis on the severity of leakage.




import java.util.*;
public class flowrate 

{

    public static void main (String[] args)
    {
     
     
     double height, volume, time, diameter, rate, velocity, area;
     
     
     
     Scanner scan = new Scanner (System.in);
     
     int choice;
     
     
     System.out.println("This program will provide calculation for the severity of the leakage around the given parameter: ");
     
     System.out.println("1. Lid: ");
     

     System.out.println("2. Leakage around user defined height: ");
     
     
     choice = scan.nextInt();
     
     
     if (choice == 1)
     {
      
      System.out.println("Please indicate the height of water: ");
      height = scan.nextDouble();
      System.out.println("Please indicate the time it takes to drain the pipe: ");
      time = scan.nextDouble();
      System.out.println("Please indicate the diameter of pipe: ");
      diameter = scan.nextDouble();
      
      
      volume = (diameter / 2) * (diameter / 2) * Math.PI;
      
      rate = volume / time;
      
      
      
      
      velocity = Math.sqrt(2*9.81*height);
      
      
      area = rate / velocity;
      
      
      System.out.println("The area of the leakage is around: " +area +"cm square");
      
      
      
      
      
     } 
     
     
     
     
     
    }
 
 
 





public static void waiting (int n)
{
    
    long t0, t1;

    t0 =  System.currentTimeMillis();

    do{
        t1 = System.currentTimeMillis();
    }
    while (t1 - t0 < n);
}

}



(06xx2012) Testing V

Purpose:

After we have secure a majority of water leakage by applying the inner tube configuration we tested a new pressure sensor. Unfortunately we experienced a structural failure on the lid after achieving 60kPa of pressure. We have recorded the pressure in the following video and graph.


Video:


Figure 1: Pressure vs Time 



Figure 2: Pressure vs Time on different interval




Analysis and Uncertainty


Table 1: Recorded Pressure and Height
Pressure (kPa)
Height (m)
61.5 ± 5
6 ± 0.3




Figure 3: Pressure vs Time with Linear Fitting



We have recorded a maximum pressure of 61.5 kPa and a corresponding height of 6 meter, by the equation:
 P = P0 + ρgh
We should get:
P/h = ρg

Therefore we can compare experimental ρg with theoretical value

Table 2: Comparison of Experimental and Theoretical Data
Experimental ρg (N/m3)
Theoretical ρg (N/m3)
Error (%)
10250 ± 488
9810
4.49%


Uncertainty = Largest value of ρg - smallest value of ρg

Our experimental uncertainty is within the range with the theoretical value. Our experimental value is also within 5% of the theoretical value.

We attribute our errors to the pressure sensor. The pressure sensor that we utilized in this project is design for gas pressure and not for fluid and therefore we believe that the majority of our error can be attributed to the sensor.


A theoretical model is provide below:



from pylab import *
import re

x = arange(0,1,.01)
y = 101325*x/(9810)

plot(x,y)

xlabel('Pressure (atm)')
ylabel('Depth (m)')


title(r'$Pressure(h)$')


show()




Figure 4: Theoretical Height vs. Pressure





(06xx2012) Testing IV


Purpose:

This is a pilot test to examine the integrity and strength of the entire design.




Figure1: Apparatus Configuration


Figure 2: Deformation of Water Pressure


Figure 3: Deformation on the Piping



Figure 4: Perspective of the Deformation


Conclusion:

We discovered that the structural strength of the lid is not able to withstand an addition of one atmosphere.





(06xx2012) Computational Model: Pressure Change

Purpose: 

Due to cohesion and adhesion properties of water, a container of water does not level off at the breaking point between gas and liquid. Instead, it forms a parabolic shape around the breaking point known as meniscus. The small change in height can cause a change in pressure, therefore it is necessary to account for these behaviors.





Figure 1: A view of cohesion properties in water and Mercury



Figure 2: Reading of Meniscus




Solution:


One way of accounting the pressure change is to make a triangle approximation of the change in height. The volume of the parabola would be accounted by using a triangle rotating around z - axis. This will create a larger pressure change, as x*tan15 > x2  for values around zero, and we justify this by arguing that the integrity of a structure should account for at least five percent change around threshold for force and pressure.

Below is a visual representation of the triangle approximation.


from __future__ import division>
from visual import *
from time import clock







tri = Polygon( [(-20,0), (0,0.267949192*20), (0,0)] )




"""

p = paths.circle( pos=(10,4,2), radius=10 )
#tri=shapes.triangle(pos=(0,2), length=4)


extrusion(pos=p, shape=tri, color=color.yellow)


"""

tri = Polygon( [(-3,0), (0,0.267949192*3), (0,0)] )




p = paths.circle( pos=(0,0,-10), radius=10 )
#tri=shapes.triangle(pos=(0,2), length=4)


extrusion(pos=p, shape=tri, color=color.yellow)




Figure 3: Simulated meniscus using triangle rotating around z - axis


Analysis and Uncertainty:

The triangle approximation can be mathematically expressed by :

y = x * tan(θ)
x = the radius of the circle
θ = to the angle of elevation from the lowest point of meniscus to the highest point of meniscus


The theoretical change of height is approximated by a parabola :

y = x4
or
y = x2


The uncertainty for this approximation would therefore be expressed by:

Δy = x * tan(θ) -  x2


% error = {(x * tan(θ) -  x2) / x2} * 100



The uncertainty remain small for small values of x, and our approximation is justified.




Sunday, June 3, 2012

(06xx2012) Meniscus Simulation Attempt



This is a programming attempt to deal with the visual simulation of a meniscus using python xy

Below is the coding:





from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
"""
u = np.linspace(0, 2 * np.pi, 100)
v = np.linspace(0, np.pi, 100)
"""


x = arange(1,2,0.5)
y=2
z=3

ax.plot_surface(x, y, z,  rstride=10, cstride=10, color='b')

plt.show()


"""
x = 0 to r

y = 0 to r

z = sqrt x^2 + Y ^2



x = 10 * np.outer(np.cos(u), np.sin(v))
y = 10 * np.outer(np.sin(u), np.sin(v))
z = 10 * np.outer(np.ones(np.size(u)), np.cos(v))

"""


(05312012) Computation Model: Pressure vs Depth



One of the goal of this project is to provide a computational model that describes the behavior of our apparatus. In this program I have set up the theoretical depth needed to achieve in order to acquire a pressure of 2 atmosphere.The development is relatively simple as I just implement the equation P = P0 + ρgh into the coding.
 


Figure 1: Pressure versus Depth







// Comment
from pylab import *
import re

x = arange(0,10.3,.01)
y = 1+(9810*x/101325)

plot(x,y)

xlabel('Depth (m)')
ylabel('Pressure (atm)')

"""
title(r'$Pressure Depth$')
"""

title(r'$Pressure(h)$')
"""
k = re.sub(r"(\w)([A-Z])", r"\1 \2", "WordWordWord")
title(r'$re.sub(r"(\w)([A-Z])", r"\1 \2", "WordWordWord")$')
"""



show()

(05202012) Blog Formatting Tool

Formatting codes in blogs can be really tedious and confusing as program code syntax differs greatly from daily speech. Therefore I have being trying to resolve this problem since I begin the computational aspect of the project. Fortunately, solutions to resolved the problem has already existed on the internet. I have implemented one of the many solutions provide on the net to perfect the blog, so if anyone would like to contribute to the computational model in the future, please use this page as a reference. All credit goes to craftyfella


http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html



// Comment
public class Testing {
public Testing() {
}
 
public void Method() {
/* Another Comment
on multiple lines */
int x = 9;
}
}

(05xx2012) Construction

Purpose:

We started the lid construction by modifying pvc pipes and sanding off the edges for fitting. We followed the design as displayed below




Figure 1: Modification on the length of pvc

  • First we modified the pvc by cutting the unwanted parts.




Figure 2: Preparation for the modification





Figure 3: Cutting the PVC




Figure 4: PVC modification





Figure 5: Sanding of PVC

  • We sand the pvc to make sure not to obstruct the fitting 



Figure 6: Sanding of PVC to ensure fitting




Figure 7: Lid Assembly

  • We construct the lid  piping by joining the water piping with a joint that connects to a t-shape pvc


Figure 8: Preliminary testing of Pressure Chamber


  • We test the basic function of the assembly and found that the pvc is water tight but the lid is not



Figure 9: Two meter configuration 


Conclusion:

We have started to modifying the pvc pipe and attached it to the lid assembly. We also tested the integrity of the entire system and found that the pvc is water tight.

temp constuction 1


Purpose:

We finalized the design, and beginning testing the concepts and fundamentals of the project.



Figure 1: Finalized design

Figure 2: Finalized design and lid assembly components


Figure 3: Components of Pressure Sensor



Figure 4: Bulk Head fitting

Figure 5: Pressure Sensor testing

Figure 6: Testing on the concepts of the project

Conclusion:

We finalized our design and perform a preliminary test.

Saturday, May 12, 2012

(05132012) Project Construction I


Purpose: 

We have begin the construction of piping by 







(05122012) Contour Plot Testing


One of the problem we are trying to solve in the pressure chamber project is to determine the effect of the adhesion and cohesion property of water on the pressure in the chamber. The ideal case would be uniform pressure inside the chamber, however, as the radius increase the difference of height between the radius and the center of barrel would increase, causing a difference in pressure. This graph is an attempt to account this effect. 



Figure 1: Contour testing 

(05122012) Project Update


pvc piping and fittings.
  • 4 10ft pvc pipes (3/4 in. diameter)
  • 2 elbows
  • 3 couplers
  • 2 caps
  • 2 male adapters with threadings
  • pvc cement and primer
Connecting the pieces:
We found that the pipe is not entirely rigid when 30+ feet of tubing is connected.  It bends significantly.  We will definitely need strong support for the pipes when not able to hold against a tall building.
Testing a vacuum:
We have been informed that placing a cap on the top end of a pipe filled with water would create a sufficient vacuum.  We tested this by capping one end, filling the pipe with water, and then capping the top.  We used teflon tape on the threadings of the end of the pipe that was suppossed to seal a vacuum.  We then removed the cap on the bottom of the pipe and the water came right out.  This repeated a couple times each trying to adjust the integrity of the vacuum.
We proceeded to experiment with a test analogous to a drinking straw, in that we used the palms of our hands to create a seal.  This didn't work either, it also wouldn't lift water out of a small pitcher of water.
Just before, we tried two ways to do this with an actual drinking straw:
  • One way was having one end of the straw submerged under water and placing a thumb over the air exposed top end.  After lifting the straw, the water was "stuck" in the straw as expected.  
  • Method two, closer to our pvc experiment, was to place one finger over the bottom of the straw, fill the straw with water from the top, place a thumb over the top and then release the finger from the bottom - the water remained in the straw.  So, it doesn't matter if the straw end is submerged under water to keep a vacuum (according to the small scale experiment).
Volume of water:
We found that the 3/4 in diamater (although marked as such) measured to be 14/16 in. and is 120.5 inches long.  One piece of tubing is filled with about 1.3 L of water.  That comes out to about 4.4 L of water if the tube is filled to a depth of 34 feet. 
Next Goal:
First phase of the pressure chamber:
  • Complete lid assembly
  • connect piping
  • fill water through top
Second phase:
  • create path for sensor wiring, or
  • determine feasibility of remote signaling
  • create method of users to preserve water in piping and allowing removal of lid**

(05112012) Pressure Sensor




GS-S01 uses a diaphram gauge while the GS-ES02 uses a microchip
GS-S01 Ohm Specs:

0 psi - 3 ohms
14.5 psi - 17 ohms
29 psi - 34 ohms
43.5 psi - 51 ohms
58 psi - 68 ohms
72.5 psi - 85 ohms
87 psi - 102 ohms
101.5 psi - 119 ohms
116 psi - 133 ohms
130.5 psi - 147 ohms
145 psi - 160 ohms

GS-ES02 Ohm Specs:

0 psi - 0.5 ohm V
14.5 psi - 0.9 ohm V
29 psi - 1.3 ohm V
43.5 psi - 1.7 ohm V
58 psi - 2.1 ohm V
72.5 psi - 2.5 ohm V
87 psi - 2.9 ohm V
101.5 psi - 3.3 ohm V
116 psi - 3.7 ohm V
130.5 psi - 4.1 ohm V
145 psi - 4.5 ohm V

(05082012) Project Meeting III





Figure 1: Piping design inside the barrel, and the pressure sensor



Figure 2: Overall analysis of the project



Figure 3:  Overall piping and fitting of the pressure chamber

(05062012) Vacuum Pump Design Idea


In regards to creating a vacuum pump at the top of the pipe, 
  1. Make our own vacuum pump out of pvc pipe (there are how-to videos)
  2. Convert a bicycle tire pump into a vacuum pump (there are how-to videos)
  3. Purchase a vacuum pump
    • would be most accurate, most expensive, but least time consuming
    • I found one for a little less than $40
    • It has a control valve to hold the vacuum in place

(05042012) Project Scheduling


Schedule for constructing the apparatus by next weekend. 
  • Finalize design
  • Make list of of exact pieces of what needs to be purchased
  • Make list of tools we will need to construct the apparatus
  • Start designing and constructing our computational model

(04292012) Project Meeting II


This pressure chamber will be used by the robotics team or, at the very least, serve as a prototype for a more elaborate apparatus to be made.  
So, the following considerations should be made that are relative to this idea:
  • User Case scenario
    • How long does it take to fill and empty the standing pipe?
      • To calculate fill time, we can calculate inward flowrate against increasing opposing pressure
      • To calculate drainage, we can use the volume flow rate
  • Cost Analysis
    • How much volume of water is in the standing pipe?
    • What is the rate of water in LA country?
    • With the above, we can calculate the cost per fill
      • if substantially small, we can present fills per dollar, etc.





Figure 1: Pressure Sensor testing 


(04272012) Project meeting I

  • Project meeting on April 27, 2012


    • Pressure Sensor design finalized
    • Drilling of lid discussed
    • Piping and wiring of PVC tubing designed
    • Cost analysis performed



Figure 1: Pressure Chamber Componenets