Determining The Shape of A balloon That is lifting a Mass M.

Introduction

Some things that seem relatively simple can be relatively complicated to analyze. In this paper we ask the simple question what is the shape of a balloon? To deal with this problem we describe the surface with a mesh an apply the principles of dynamics to find the equilibrium state of the balloon. This technique is part of a more general topological concept. The idea is that there are many finite approximation of a surface that are composed of nodes and branches it is possible to construct a sequence of these approximation where in the limiting case the approximation will behave exactly as the original surface. This paper just deals with one of these techniques and this simple technique could be extended to analyze such problems as the stresses on a rotating space station or an inflatable truss.

Theory

The simplest kind of problem we can look at is a balloon that is made out of one material, is uniform in thickness and the shape with the maximum volume and zero strain is a sphere.

To represent a surface in three space we paramaterize each of the three coordinates with two arbitrary parameters. For a given paramaterization i,j there is a corresponding point in three space P(xi,j,yi,j,zi,j).

On a computer we cannot store the infinite number of points that make up a surface. As a consequence we chose a finite set of discrete values. If we are describing a sphere in spherical coordinates, we may choose values of theta that are linearly spaced between 0 and 2*pi and values of phi that are linearly spaced between 0 and pi. (Note r(theta,phi)=Ro for the unstrained shpere).

The Cartesian product:

{theta}x{phi}x{r}={(theta,phi,r)| theta=(i*2*pi/n), phi=(j*pi/n), r=rsphere, i,j=1,2,.....n}

defines all points on the surface and each point is paramterized by the set of indices i,j. To represent all these points, we place each coordinate in a matrix where the value of coordanate that corresponds to i=i1 and j=j1 is found in row i1 and column j1.

Figure 1. This is Matrix representing a single coordinate. To describe the points in three space three of these matrices are used (one for each coordinate). The coordantes for a single point which is paramaterized by i,j are found in the ith row and jth column of each matricies.

It is often convenient when plotting these points to transform them into rectangular coordinates. If phi is the angle between z and the position vector and theta is the rotation of the position vector about the z axis from the x-z plane then we can use the transformations:

(1)
0<2 0

When the computer draws the surface it draws a mesh of three dimensional curves. One way to draw the curves is with line segments. When the computer draws the curve with line segments it connects P(xi,j,yi,j,zi,j) to P(xi+1,j,yi+1,j,zi+1,j) and P(xi,j,yi,j,zi,j) to P(xi,j+1,yi,j+1,zi,j+1). In the matlab code bellow a sphere is defined in spherical coordinates, it is converted to rectangular coordinates and then plotted. (For the program we will describe later the surface was created in a function. This function can be found in appendix A..1)


%Creat Surface
n=20; %Number of points in each angular dirction
Ro=1; %The Intial Radius
theta=zeros(n); %Intialize theta as an nxn array of zeros
phi=zeros(n); %intialize phi
r=Ro*ones(n); %intialize r as an nxn array of Ro

n=n-1
for i=1:n+1
  for j=1:n+1
    theta(i,j)=(2*pi*(i-1))/(n);
    phi(i,j)=(pi*(j-1))/(n);
  end
end
n=n+1

%Transform to Cartesian
x=r.*sin(phi).*cos(theta);
y=r.*sin(phi).*sin(theta);
z=r.*cos(phi);
% Plot Surface
mesh(x,y,z);
% Label axies
xlabel('x axis');
ylabel('y axis');
zlabel('z axis');
title('Figure 3. A Mesh Plot of a Sphere');


Closing Curves constant in theta

In the above code we were carful to close the curves. Curves wich are constant in theta (e.g lines of latitude) can be closed by connecting curves that differ in theta by 180 degrees. This was done by ensuring we included the end points (i.e. phi=0 and phi=pi) for each curve. Connecting curves that are constant in phi can be cone by connecting the end point to the beginning point. This was done by having the first row of the coordinate matricies contain points where theta=0 and the last row contain points where theta=2*pi.

The area Vectors.

The mesh divides the sphere into sections that are approximately rectangular. In the limiting case where the number of mesh points approaches infinity the average deviation from a square shape of these sections will approaches zero. The cross product of a two distinct vectors going from the same mesh point to an adjacent mesh point will give a vector whose area is approximately the area of on of an adjacent section and the direction of the vector will be approximately perpendicular to the surface. The average deviation in the direction of these vectors from a normal vector to the surface will approach zero as the number of mesh points approaches zero.

Examining the surface and using the right-hand rule it is clear that one cross product that will give a vector perpendicular to and pointing away from the surface is {P(xi,j,yi,j,zi,j) to P(xi,j+1,yi,j+1,zi,j+1)} cross {P(xi,j,yi,j,zi,j) to P(xi+1,j,yi+1,j,zi+1,j)}

The matlab function bellow takes a surface given by the three nxn matrices x,y,z and returns the area vectors for the sections gridded off by lines constant in i and lines constant in j.


function [Ax,Ay,Az]=surface_Area(x,y,z,n)
%Input -[(x,y,z)_{i,j}]nxn is a surface paramaterized by i,j
%Output -[(Ax,Ay,Az)] is an area vector of the sections gridded off by i,j
% -which is positioned is at the midpoint of the section
Ax=zeros(n-1);
Ay=zeros(n-1);
Az=zeros(n-1);
for i=1:n-1
  for j=1:n-1
    v1=[x(i,j) y(i,j) z(i,j)]-[x(i,j+1) y(i,j+1) z(i,j+1)];
    v2=[x(i,j) y(i,j) z(i,j)]-[x(i+1,j) y(i+1,j) z(i+1,j)];
    Av=cross(v1,v2);
    Ax(i,j)=Av(1);
    Ay(i,j)=Av(2);
    Az(i,j)=Av(3);
  end
end


The Volume of the Balloon.

We are able to find the volume of the balloon by integrating in spherical coordinates without actually converting to spherical coordinates. The surface of the sphere is divided up into a mesh. We can divide the volume of the sphere up into pyramid's where the apex of the pyramid is at the origin and the base of the pyramid has a mesh point at each corner. Choosing as the base the sections that are on average are approximately square we can find the area of the base as was discussed above. The height of the pyramid is the shortest distance from the apex to a point in the plane of the pyramid's base. This will be the magnitude of: the scalar projection of a vector that runs from the apex of the pyramid to one of the corners of the base of the pyramid onto a vector that is perpendicular to the plane of the base of the pyramid.

If u and v are vectors that run along the base of the pyramid and rx,y,z is a vector that runs from the origin to one of the corners of the base then we can use the following relations:

Volume=(1/3)A*h (2)
A=|uxv| (3)
h=|projuxv rx,y,z| (4)

When uxv points away from the center of the sphere we can use the following relation:

h=compuxv rx,y,z (5)

combining (2) (3) and (5) we get:

(6)

(7)

The following Matlab code computes the volume of each pyramid then sums the volume of all pyramids together to get the total volume.


%Find the midpoint of the aproxmatly square sections
[rmx,rmy,rmz]=surface_GridMidPoints(x,y,z,n);
%Compute The Volume
Vp=(1/3)*(Ax.*rmx+Ay.*rmy+Az.*rmz);
V=sum(sum(Vp));


function [rmx,rmy,rmz]=surface_GridMidPoints(x,y,z,n)
%Input -[(x,y,z)_{i,j}]nxn A surface paramaterized by i,j (rectangular coordiatnes)
%Output -[(rmx,rm,rmz)_{i,j}]n-1xn-1 The midpoint of the gridded sections
rmx=zeros(n-1);
rmy=zeros(n-1);
rmz=zeros(n-1);
for i=1:n-1
  for j=1:n-1
    rmx(i,j)=(x(i,j)+x(i+1,j+1))/2;
    rmy(i,j)=(y(i,j)+y(i+1,j+1))/2;
    rmz(i,j)=(z(i,j)+z(i+1,j+1))/2;
  end
end
(Ax,Ay,Az)i,j is the area vector with parameters i,j.
(rmx,rmy,rmz)i,j is the vector going from the orgin to the midpoint of the surface whose area is given by (Ax,Ay,Az)i,j

With the matlab code above and n=20 The approximation yields a value of: 4.0848 and the actual volume of a sphere with radius 1 is: 4.1887.

The Pressure forces on the Mesh points

For each mesh point we have found the area of an adjacent section by:

{P(xi,j,yi,j,zi,j) to P(xi,j+1,yi,j+1,zi,j+1)} cross {P(xi,j,yi,j,zi,j) to P(xi+1,j,yi+1,j,zi+1,j)}

We recall that this produces an area vector that points away from the surface. The average pressure force in this piece of area will be equal to the area vector multiplied by: the pressure inside the balloon minus the pressure outside the balloon.

(8)

It is more convenient for us to know the pressure force of a section of area for wich a mesh point is at the center. This section will have approximately the same area. As a consequence the magnitude of the average force acting on this section of area will be approximately the same.

However when we consider its direction we must be careful. Because in our matrices the area vector we assigned to the mesh points was from the section in the direction of increasing i and j. If kept the force acing in that direction but changed the line of action so it acted through the mesh point we would end up with a net moment in our system about the center of mass. This would cause an angular acceleration of our sphere. We clearly would not want our approximation of internal forces to result in this side effect.

So the idea is to move the force while keeping the moment about the center of mass the same and the magnitude of the force the same. Let:

ro be the vector from the center of mass to the point where the force on the adjacent area acts.
Fo be the magnitude of the net pressure force acting on the adjacent piece of area.
r1 be the vector from the center of mass to the mesh point.
F1 be the average force of the section of area for wich the mesh point is at the center..

Are Condition that the moments are the same gives

ro x Fo = r1 x F1 <=>
r1 x ( ro x Fo) = r1 x ( r1 x F1) = (r1 o F1) r1 - |r1|2 >F1 <=>
F1=|r1|-2 [r1 x (ro x Fo)] + |r1|-2(r1 o F1) r1 <=>
F1=|r1|-2 [r1 x (ro x Fo)] + [(| F1|/|r1|) cos ()] r1 <=>
F1=|r1|-2 [r1 x (ro x Fo)] + [(| Fo|/|r1|) cos ()] r1 <=>
F1=|r1|-2 [(r1 o Fo) ro - (r1 o ro) Fo] + [(| Fo|/|r1|) cos ()] r1 (9)

Equation (9) with the condition |Fo|=|F1| will not always be solvable in wich case we look for the value a value alpha that will make |Fo| as close to the magnitude of |F1| as possible. We want the solution that points away from the surface. Knowing that vector Fo points away from the surface and F1 acts close by, alpha will be close in value to the angle between ro and Fo. Thus, we look for solutions close to Fo that satisfy (9) and minimize | |Fo|-|F1| |.

In a sphere alpha will be exactly the same. For now we will use this approximation and it is assumed that the nature of the error will be such that any net moment induced by errors in our estimation of the infernal forces will cancel out.

The variation of pressure with Height

The relationship giving the variation of pressure with height is given by (1):

(10)
P=pressure
z=altitude
Po=Initial Pressure
Zo=Initial Altitude
g=acceleration due to gravity
R=the gas constant (for air R=0.2870 kJ/Kg- K for helium R=2.07702 KJ/Kg-k) (2)
T=temperature

The initial pressure inside the balloon is determined by the ideal gas equation.

(11)

rho=the density of the gas
(The other variables are defined above)

In the code bellow the external pressure on bottom of the balloon is given and does not change.
The code computes the pressure force on each mesh point.


function [Pox,Poy,Poz]=balloon_PForce(x,y,z,g,n)

%Input -[(x,y,z)_{i,j}]nxn the paramaterized surface of the balloon
% -g the acceleration due to gravity
% -n the number of mesh points in each angular direction
%Output -[(Pox,Poy,Poz)_{i,j}]n-1xn-1
% the net preasure force at [(x,y,z)_{i,j}]n-1xn-1
%Determine the area vectors
[Ax Ay Az]=surface_Area(x,y,z,n);
%Find the midpoint of the aproxmatly square sections
[rmx,rmy,rmz]=surface_GridMidPoints(x,y,z,n);
%Compute The Volume
Vp=(1/3)*(Ax.*rmx+Ay.*rmy+Az.*rmz);
V=sum(sum(Vp));
%Get the properties of the gass inside and outide the balloon
[Rb,Pb,Tb,Rair,Pair,Tair,m]=balloon_getIntialState_gass(V);
%Calculate the internal preasure ForcesP=mRT/V
minZ=min(min(rmz));
Pint=Pb*exp(-(rmz-minZ)*g/(Rb*Tb)); %The interal preasure force on the aprox.
%square sections
%Calculate the external preasure Force
Pex=Pair*exp(-(rmz-minZ)*g/(Rair*Tair));
%Find the average force over the aproximately square sections
Pmx=Ax.*(Pint-Pex);
Pmy=Ay.*(Pint-Pex);
Pmz=Az.*(Pint-Pex);
%Compute the angle beteen the preasure vecots and the postin vector
%of the point of action
cosalpha=cosvec(rmx,rmy,rmz,Pmx,Pmy,Pmz);
%Find where an equivlanet force through the lattic points would act
rox=x(1:length(x(:,1))-1,1:length(x(1,:))-1);
roy=y(1:length(y(:,1))-1,1:length(y(1,:))-1);
roz=z(1:length(z(:,1))-1,1:length(z(1,:))-1);
[Pox Poy Poz]=force1(Pmx,Pmy,Pmz,rmx,rmy,rmz,rox,roy,roz,cosalpha);


Defining The External Forces

For this paper a relatively simple technique to define the external forces. The forces acted in the vertical direction and was uniformly distributed. The force per area we called P. In retrospect this was a bad name for the variable. The force acted over some solid angle at the bottom of the original sphere. The force on each lattice point was equal to the component of its area vector in the z direction multiplied by the force per area. One the initial external force was found no effort was made to redefined it later. More interest was placed on the qualitative effects of the load then the exact distribution of stress and strains along the boundary where the force was applied.


function [Fex,Fey,Fez]=balloon_getFExternal(x,y,z,Ro,n);
[Ax Ay Az]=surface_Area(x,y,z,n);
theta=10*pi/180; %The maxium angule fromthe negitive z axis for wich the external force acts
P=90000; %preasure (Pa)
[I J]=find(z(1:n-1,1:n-1)<-Ro*cos(theta));
Fex=zeros(n-1);
Fey=zeros(n-1);
Fez=zeros(n-1);
for i=1:length(I)
Fez(I(i),J(i))=P*Az(I(i),J(i));
end

The Elastic Forces

From figure 5 we derive the following:

The code to find the spring constant is shown bellow:



function [ki,kj]=balloon_getSpringConstants(Doi,Doj,n)
E=10e16; %Modulus of Elasticity (Pa)
t=0.001; %The thinkness of the balloon
shift=[2:n-1 1];
Doi_bar=(Doi+Doi(:,shift))/2;
Doj_bar=(Doj+Doj(shift,:))/2;
ki=(E*t)*(Doj_bar./Doi_bar);
kj=(E*t)*(Doi_bar./Doj_bar);


In this code there was some averaging to avoid division by zero. The code to get the elastic forces is shown bellow.


function [Fkx,Fky,Fkz]=balloon_getFElastic(x,y,z,Doi,Doj,Ki,Kj,n)
%Input -[(x,y,z)_{i,j}]nxn a Surface
% -[Doi_{i,j}]nxn The intial displacement between mesh points
% in the direction of increasing i
% -[Doj_{i,j}]nxn similar to Doi
% -[Ki_{i,j}]nxn The spring constanct between adjacent lattice
% points in the direction of increasing i
% -Kj similar to Ki
%Output -[(Fx,Fy,Fz)_{i,j}]nxn the net forces on the mesh points
[D1i D1j dxi dyi dzi dxj dyj dzj]=Surface_Distance(x,y,z,n);
D1i=D1i+(D1i==0)*realmax;
D1j=D1j+(D1j==0)*realmax;
Ti=(D1i-Doi).*Ki;
Tj=(D1j-Doj).*Kj;
shift=[n-1 1:n-2];
Fxi=Ti+dxi./D1i-(Ti(shift,:)+dxi(shift,:)./D1i(shift,:));
Fyi=Ti+dyi./D1i-(Ti(shift,:)+dyi(shift,:)./D1i(shift,:));
Fzi=Ti+dzi./D1i-(Ti(shift,:)+dzi(shift,:)./D1i(shift,:));
shift=[1:n-2];
Fxj=Ti+dxi./D1j;
Fxj(:,2:n-1)=Fxi(:,2:n-1)-(Tj(:,shift)+dxj(:,shift)./D1j(:,shift));
Fyj=Ti+dyi./D1j;
Fyj(:,2:n-1)=Fyj(:,2:n-1)-(Tj(:,shift)+dyj(:,shift)./D1j(:,shift));
Fzj=Ti+dzi./D1j;
Fzj(:,2:n-1)=Fzj(:,2:n-1)-(Tj(:,shift)+dzj(:,shift)./D1j(:,shift));

Fkx=Fxi+Fxj;
Fky=Fyi+Fyj;
Fkz=Fzi+Fzj;


function [Di,Dj,dxi,dyi,dzi,dxj,dyj,dzj]=Surface_Distance(x,y,z,n)
%Input -[(x,y,z)_{i,j}]nxn is a paramaterized surface
%Outut -Di_{i,j} is the distance between (x,y,z)_{i,j} and (x,y,z)_{i+1,j}
% -Dj_{i,j} is the distance between (x,y,j)_{i,j} and (x,y,z)_{i,j+1}
%

dxi=abs(x(1:n-1,1:n-1)-x(2:n,1:n-1));
dyi=abs(y(1:n-1,1:n-1)-y(2:n,1:n-1));
dzi=abs(z(1:n-1,1:n-1)-z(2:n,1:n-1));
dxj=abs(x(1:n-1,1:n-1)-x(1:n-1,2:n));
dyj=abs(y(1:n-1,1:n-1)-y(1:n-1,2:n));
dzj=abs(z(1:n-1,1:n-1)-z(1:n-1,2:n));
Di=sqrt(dxi.^2+dyi.^2+dzi.^2);
Dj=sqrt(dxj.^2+dyj.^2+dzj.^2);


The net Force

The net force was obtained by simply adding up the force vectors. Since some of the matrices elements with different indices contained the same force it was necessary to make sure all forces that acted on these points were summed up. Finally the size of the matrix was expanded to nxn by assuming the forces at the end points were similar to their neighbors.


%Find The Net Force
[Fx,Fy,Fz]=addvec(Pox,Poy,Poz,0,0,F_ml,Fex,Fey,Fez);
%Expand to nxn
[Fx,Fy,Fz]=balloon_ForceTouchUp(Fx,Fy,Fz,n);


function [xn,yn,zn]=addvec(xo,yo,zo,x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,x5,y5,z5)
xn=xo+x1;
yn=yo+y1;
zn=zo+z1;
if nargin>6
  xn=xn+x2;
  yn=yn+y2;
  yn=zn+z2;
  if nargin>9
    xn=xn+x3;
    yn=yn+y3;
    zn=zn+z3;
    if nargin>12
      xn=xn+x4;
      yn=yn+y4;
      zn=zn+z4;
      if nargin>15
        xn=xn+x5;
        yn=yn+y5;
        zn=zn+z5;
      end
    end
  end
end


function [Fx,Fy,Fz]=balloon_ForceTouchUp(Fx,Fy,Fz,n)
Fx(:,1)=sum(Fx(:,1))*ones(n-1,1);
Fx=[Fx Fx(:,n-1)];
Fx=[Fx;Fx(1,:)];
Fy(:,1)=sum(Fy(:,1))*ones(n-1,1);
Fy=[Fy Fy(:,n-1)];
Fy=[Fy;Fy(1,:)];
Fz(:,1)=sum(Fx(:,1))*ones(n-1,1);
Fz=[Fz Fz(:,n-1)];
Fz=[Fz;Fz(1,:)];


The General Algorithm

The general algorithm is shown bellow. First a surface is created representing the balloon. Then we find the force of gravity on the mesh points. The initial displacement between mesh points is found so we can latter determine the strain. The spring constants between mesh points are found by assuming the material is of constant thickness and has a constant modules of elasticity. Then the force on the lattice points are calculated.

The initial velocity is defined. The mesh points are translated parallel to the velocity vector for at time delta t. The coordinates are then recalculated so the center of mass stays at the origin. The velocity of the lattice points is changed over a time delta t by the force. The forces are then recalculated for the balloon and the loop is repeated. The output is shown if figure 6.

%Get the surface (paramaters i,j coordanates (x,y,z)
n=40; %Number of points in each angular dirction
Ro=1; %The Intial Radius
t=0; %Intial Time
delta_t=1e-5; %The incremental change in time (s)
%Get the mesh points representing the balloons surface.
[x y z]=balloon_newSurface(n,Ro);
g=9.8;
%Find the mass of the sections for wich thoese preasure forces act
ml=balloon_getMassMeshPoints(x,y,z,n);
F_ml=-ml*g; %The force due to mass
ml(:,1)=ml(:,2);
ml=[ml ml(:,1)]; ml=[ml; ml(1,:)];
%Calculate The Intial Displacement Between lattice points
[Doi,Doj]=Surface_Distance(x,y,z,n);
%Calculate The Spring Constants
[Ki,Kj]=balloon_getSpringConstants(Doi,Doj,n);
%Find The force acting on the mesh points
[Fx,Fy,Fz]=balloon_getForce(x,y,z,Doi,Doj,Ki,Kj,n,g,Ro,F_ml);
%Define Intial Velocity
Vx=zeros(n); Vy=zeros(n); Vz=zeros(n);
%Calculate New time
DELTA_T=8e-5; %The total change of time
t_final=t+DELTA_T;
while t<t_final
t=t+delta_t;
%Calculate New Postion
x=x+Vx.*delta_t; y=y+Vy.*delta_t; z=z+Vz.*delta_t;
%Make the orgin the center of mass
[x y z]=balloon_resetAxis(x,y,z,ml);
%Calculate New Velociety
Vx=Fx./ml*delta_t; Vy=Fy./ml*delta_t; Vz=Fz./ml*delta_t;
%Find the forces on the center of mass
[Fx,Fy,Fz]=balloon_getForce(x,y,z,Doi,Doj,Ki,Kj,n,g,Ro,F_ml);
%[x,y,z]=balloon_postionTouchUp(x,y,z,n);
mesh(x,y,z)
hold on
end
hold off

Conclusion

The techniques described above produced a plot that qualitatively looked as one would expect a balloon carrying a load to look. The algorithm took over four seconds to produce the plot on a Pentium three processor. This if far to slow for any useful dynamic application but sufficient for static analysis. However even for static applications it makes it time consuming to compare results over several ranges of values.

It is not clear why in the simulation it was unnecessary to introduce damping forces. It is likely in a lot of applications this will not be the case. Even for static analysis it would be desirable to able to watch how the balloon dynamically reaches equilibrium. This might make it easer to spot any fundamental modes of oscillation that may occur in a structure.

To make dynamic observations of the transition to equilibrium possible techniques could be introduced to select the mesh points to apply the laws of dynamics to at random. This would allow for a more gradual transition that could be observed through animation.

Further approximation techniques could be applied to allow the algorithm to iteratively converge on the correct solution. This could be done by further partitioning the surface after an initial approximation in made. To do this a new data structure will be required. This will be dealt with in future papers.

References:

  1. Engineering Fluid Mechanics pg 40
  2. Fundamentals of Classical Thermodynamics by Gordon Van Wylen, Richard Sonntag, Claus Borgnakke 753-754

Apendix A Matlab Functions

Apendix A.1


function [x,y,z]=ballloon_newSurface(n,Ro)
%Input -The number of mesh points in each angular direction
% -Ro the radius of the sphere representing the surface
%Output -[(x,y,z)_{i,j}]nxn A closed spherical surface

n=20; %Number of points in each angular dirction
Ro=1; %The Intial Radius
theta=zeros(n); %Intialize theta as an nxn array of zeros
phi=zeros(n); %intialize phi
r=Ro*ones(n); %intialize r as an nxn array of Ro

n=n-1;
for i=1:n+1
for j=1:n+1
theta(i,j)=(2*pi*(i-1))/(n);
phi(i,j)=(pi*(j-1))/(n);
end
end
n=n+1;

%Transform to Cartesian
x=r.*sin(phi).*cos(theta);
y=r.*sin(phi).*sin(theta);
z=r.*cos(phi);


Appendix B Flow Diagrams


 
 
 
 
 
 
 
 
 
 
 
Hosted by www.Geocities.ws

1