//balloon flotation example

P_base=101325; // [N/m^2]
air_rho=1.204; // [kg/m^3]
kgtoN=9.81;
air_j=air_rho*kgtoN/P_base;
h_rho=0.0826;
h_j=h_rho*kgtoN/P_base;
he_rho=0.1634;
he_j=he_rho*kgtoN/P_base;

V=1; // [m^3]
H=logspace(-2,2)*1; // [m]
A=V./H; // [m^2]
dP=P_base*(exp(-h_j*H)-exp(-air_j*H));
F=dP.*A;
k=(2*%pi)/sqrt(%pi);
S=2*A+k*H.*sqrt(A);

plot(H,F)
