Saturday, March 23, 2013

Good set of Bounds for Colebrook-White Numerical Solution

The value for fmax from my last post, it turns out, isn't as good as what it could be.  On further investigation, it turns out that for some combinations of roughness values and Reynolds values it still fails.  I found a solution, which is actually more simple, so I'm making this post to describe it.  To begin with, I will keep the expression for the minimum bound I gave in the last post.  The following is rearranged a little bit.

$$ f_{min} = \left( \frac{ 2.51 }{ Re ( 1 - \frac{Rr}{3.7} )   } \right)^2 $$

Now, to find a better expression for fmax, I realized there was a better approach attainable by rearranging the Colebrook-White equation.

$$ \frac{1}{10^{\frac{1}{2 \sqrt{f}} } } = \frac{Rr}{3.7} + \frac{ 2.51 }{ Re \sqrt{f} } $$

The plot:

  • LHS limits to 1
  • RHS limits to Rr/3.7
This looks a little more complicated, but the critical difference is that the left hand side asymptotes to a constant value, just like the right side.  That's helpful, because the fundamental error in my last post was trying to fit a square peg in a round hole by replacing a non-converging function with a converging function.  Here, I don't have to do that.

In order to get an upper-bounded expression for f, the LHS only needs to be replaced with a function that is absolutely lower than itself.  Then not only will that produce a value that is always necessarily larger than the correct solution for f, but it will also be very well bounded, because it's replacing one asymptotic function with another similarly asymptotic function.  The obvious replacement is to replace the LHS with a function of the form of 1-1/sqrt(f), to match the RHS.  The ultimate form I went with was:

$$ \frac{1}{10^{\frac{1}{2 \sqrt{f}} } }  > 1-\frac{ \ln{10} }{ 2 \sqrt{f} } $$

Plugging into the last form of the Colebrook-White equation gives:

$$ 1-\frac{ \ln{10} }{ 2 \sqrt{f} } = \frac{Rr}{3.7} + \frac{ 2.51 }{ Re \sqrt{f} } $$

It follows that the solution to this equation is an absolute upper limit for the equation.  The actual algebra is fairly trivial, and gives:

$$ f_{max} =  \left( \frac{  \frac{2.51}{Re} + \frac{ \ln{10} }{2}   }{  1 - \frac{Rr}{3.7}    } \right)^2 $$

The similarity to the equation for the minimum is obvious.  In fact, this is a fairly elegant solution to the problem of setting bounds.  It turns out to work fairly well.  The edited code is:

Function Colebrook(Rr As Double, Re As Double) As Double
  Dim f_min As Double, f_max As Double, f As Double
  Dim g_lower As Double, g_middle As Double
  Dim n As Integer

  f_min = (2.51 / Re) ^ 2 * (1 - Rr / 3.7) ^ (-2)
  f_max = ((2.51 / Re + Log(10) / 2) / (1 - Rr / 3.7)) ^ 2
  n = 0

    n = n + 1
    f = (f_min + f_max) / 2
    g_middle = -2 / Log(10) * Log(Rr / 3.7 + 2.51 / Re * f ^ (-1 / 2)) - f ^ (-1 / 2)
    g_lower = -2 / Log(10) * Log(Rr / 3.7 + 2.51 / Re * f_min ^ (-1 / 2)) - f_min ^ (-1 / 2)
    If (g_middle = 0 Or (f_max - f_min) / 2 < 0.000001) Then
      Exit Do
      If (g_middle * g_lower > 0) Then
        f_min = f
        f_max = f
      End If
    End If
    Colebrook = f
    If (n > 100) Then
      Colebrook = CVErr(xlErrNA)
      Exit Do
    End If
End Function
This begs one more question.  Could you use this general form to estimate the friction coefficient itself?  Yes, you could.  Notice the only difference between fmin and fmax is only the one constant there.  I wanted to figure out a value of this costant that would approximate the answer, as opposed to setting a minimum or maximum.  To do this, I required that the limit as Reynolds number goes to infinity to approximate the real answer.  This could be used to make a more efficient Newton's method for solution.  I didn't do this, but I will share my expression for the expression.

$$ B = \frac{ 1 - \frac{Rr}{3.7} }{ -\frac{2}{\ln{10}} \ln{\frac{Rr}{3.7} } } \\  f_{max} \approx  \left( \frac{  \frac{2.51}{Re} + B   }{  1 - \frac{Rr}{3.7}    } \right)^2 $$

This isn't a great approximation by the way.  In the transition areas where it really matters, it can easily be off by 60%.  In the laminar and turbulent limits it approaches the correct solution.  Still, that gives it some utility for numerical approaches.

Wednesday, March 20, 2013

A Robust Method for Numerical Solution of the Colebrook-White Equation

Getting the solution to an implicit equation isn't very hard, particularly with any reasonably sophisticated mathematical software, Excel included.  But making a routine that you know will always give the right answer is a little bit more difficult.  In some work I'm doing, this has become necessary for the Colebrook-White equation.  I was thinking of this as I stumbled on another Blogger post claiming to find the best way to solve it.  That method doesn't work in all cases, and while the formula isn't supposed to be valid in the low Reynolds numbers where it doesn't work, it's still tempting to think we could do better.  The formula in question is the following.  This is specific to pipe flow and there are several inceptions of the formula for different flows that have some adjusted coefficients

$$ f^{-1/2} = -2  \text{log}_{10} \left( \frac{Rr}{3.7} + \frac{2.51}{Re} f^{-1/2} \right) $$

If you plot both sides of this, you obtain the following.

Simple bisection method would work just fine to solve this, but there's one detail missing - what do you choose as the bounds. I'll call the lower and upper bounds $f_{min}$ and $f_{max}$.  You could say "for problems I do the friction factor is usually between 0.0wy and 0.0xz", but that's somewhat inelegant, and it risks failing without notice.

Robust lower and upper bounds

My solution is to derive an expression for the lower and upper bound for the friction factor.  I will do this directly from the mathematics.  Refer back to the graph I presented.  The specifics are unimportant.  What's important is the fact that no matter what the values in the equation ($Re$, $Rr$, and so on), the two lines will still be sloping the same way.  This is the way in for me to formulate an inequality for the lower bound and upper bound. 

Lower bound

It is absolutely true that for any value of f that is less than the intersection, the left hand side (LHS) will be greater than the right hand side (RHS).  Echoing the equation with a new variable for the lower bound, $f_{min}$, gives:

$$ f^{-1/2} > -2  \text{log}_{10} \left( \frac{Rr}{3.7} + \frac{2.51}{Re} f^{-1/2} \right) $$

Thus, any expression for $f_{min}$ that satisfies this inequality under all conditions is absolutely satisfactory as a minimum for doing bisection method.  Since any value will do (as long as it meets the condition), we can use some tricks.  Firstly, note that the LHS is positive.  Since any $f$ or $f_{min}$ is positive, one divided by the square root will also be positive.  That means that if we just... set that equal to zero, the inequality is still valid to find a left-bounding value for $f_{min}$.

$$ 0 > -2  \text{log}_{10} \left( \frac{Rr}{3.7} + \frac{2.51}{Re} f^{-1/2} \right) $$

Indeed, if the previous inequality is right, this inequality is more right.  That has utility because now we can solve this.  For the log to be positive, the argument has to be greater than 1.

$$ \frac{2.51}{Re} f_{min}^{-1/2} > 1 - \frac{Rr}{3.7} $$

$$ f_{min}^{-1/2} > \frac{Re}{2.51} \left( 1 - \frac{Rr}{3.7} \right) $$

$$ f_{min} > \left( \frac{2.51}{Re} \right)^2 \left( 1 - \frac{Rr}{3.7} \right)^{-2} $$

The inequality sign is a little confusing here, but what that's really saying is that the value of f must be greater than that expression.  So the expression establishes our lower bound.

Upper bound


A subsequent post supersedes this one:

The solution presented here works but that one is much better.  I will still leave the work here because it goes into much greater depth.

Similarly, by graph inspection we determine that for an upper bound, $f_{max}$, we will seek to satisfy:

$$ f_{max}^{-1/2} < -2  \text{log}_{10} \left( \frac{Rr}{3.7} + \frac{2.51}{Re} f_{max}^{-1/2} \right) $$

I'll use some simple algebra.  I also have a specific form in mind that I'm looking for.  If I can isolate a $\log \left( 1+x \right)$ term, then provided the $x$ is positive, the term will be positive, and in these inequalities, that's a opportunistic point for simplification.

$$ f_{max}^{-1/2} < -2 \text{log}_{10} \frac{Rr}{3.7} -2  \text{log}_{10}  \left( 1 + \frac{3.7}{Rr} \frac{2.51}{Re} f_{max}^{-1/2} \right) $$

This is difficult because we can't use the same approach as the lower bound.  Observe that removing the LHS or the term on the far right in isolation won't be valid.  Doing so would make the inequality no longer universally true.  We're allowed to add more to the LHS or take away more from the RHS, but not the other way around.  My solution is thus the following trick: 

$$ \ln \left( 1 + x \right) < x $$

This is true for all values of x greater than zero (or any real value).  Use this to substitute into the previous inequality in place of the RHS log term.

$$ f_{max}^{-1/2} < -2 \text{log}_{10} \frac{Rr}{3.7} - \frac{2}{\ln{10}}    \frac{3.7}{Rr} \frac{2.51}{Re} f_{max}^{-1/2} $$

Now just do algebra to get to the final form.

$$ \left( 1 + \frac{2 \times 3.7 \times 2.51 }{Rr Re \ln{10}}   \right)  f_{max}^{-1/2} < -2 \text{log}_{10} \frac{Rr}{3.7} $$

The relative roughness really should be less than 1, and we should change the sign to reflect this, particularly dealing with inequalities.

$$ \left( 1 + \frac{2 \times 3.7 \times 2.51 }{Rr Re \ln{10}}   \right)  < 2 \text{log}_{10} \frac{3.7}{Rr}  \sqrt{ f_{max} } $$

$$ \left( \frac{ 1 + \frac{2 \times 3.7 \times 2.51 }{Rr Re \ln{10}} }{2 \text{log}_{10} \frac{3.7}{Rr}  }   \right)  < \sqrt{ f_{max} }$$

$$ f_{max} > \left( \frac{ 1 + \frac{2 \times 3.7 \times 2.51 }{Rr Re \ln{10}} }{2 \text{log}_{10} \frac{3.7}{Rr}  }   \right)^2 $$

Like the last case, what this is really saying is that the true value of f is less than the expression that's been obtained here.

Special case of zero roughness

The Colebrook-White formula is still perfectly valid if the roughness value is actually zero.  Unfortunately, one look shows that this is incompatible with at least one of the formulas above.  If you plug in Rr=0 in the original equation, then you can run through the calculations to get the same thing for fmin, but not fmax.  In this special case of fmax with zero roughness, the inequality we seek to identify is.

$$ f_{max}^{-1/2} < -2  \text{log}_{10} \left( \frac{2.51}{Re} f_{max}^{-1/2} \right) $$

This produces a uniquely different problem.  The same general approach still works.  In the approach I used I made a different substution, utilizing the fact that -1/sqrt(x) < ln(x), which is a slightly different variation on what was used above.  Carrying it through to its conclusion gives the following alternative expression.

$$ f_{max} > \left( \frac{ \ln{10} + 1 }{ 2 \ln{  \frac{Re}{2.51} } } \right)^2 $$

The similarity to the previous fmax is obvious, but here we've avoided any potential hazard of dividing by zero.

Code for VBA

To solve this with a simple bisection method, it's probably best to formulate it as a root-finding problem.  So say that 0 = RHS - LHS.  One small note of caution is that the function log() means natural log in Visual Basic.  In formulas it's base 10 log.  Is this blatantly inconsistent?  Yes.  I often make it my policy to only use natural log in order to avoid confusion, which is hard to do.

$$ g(f) = -2  \text{log}_{10} \left( \frac{Rr}{3.7} + \frac{2.51}{Re} f^{-1/2} \right) - f^{-1/2} $$

When you actually type out the function it looks like -2 / Log(10) * Log(Rr / 3.7 + 2.51 / Re * f ^ (-1 / 2)) - f ^ (-1 / 2).  For argument ordering, I'm using Rr followed by Re, to be consistent with the usual way of writing the equation.  Here is the code, which is in working order in my sheet:

Function Colebrook(Rr As Double, Re As Double) As Double
  Dim f_min As Double, f_max As Double, f As Double
  Dim g_lower As Double, g_middle As Double
  Dim n As Integer

  f_min = (2.51 / Re) ^ 2 * (1 - Rr / 3.7) ^ (-2)
  If (Rr = 0) Then
    f_max = ((Log(10) + 1) / (2 * Log(Re / 2.51))) ^ 2
    f_max = ((1 + 2 * 3.7 * 2.51 / (Rr * Re * Log(10))) / (2 * Log(3.7 / Rr) / Log(10))) ^ 2
  End If
  n = 0
    n = n + 1
    f = (f_min + f_max) / 2
    g_middle = -2 / Log(10) * Log(Rr / 3.7 + 2.51 / Re * f ^ (-1 / 2)) - f ^ (-1 / 2)
    g_lower = -2 / Log(10) * Log(Rr / 3.7 + 2.51 / Re * f_min ^ (-1 / 2)) - f_min ^ (-1 / 2)
    If (g_middle = 0 Or (f_max - f_min) / 2 < 0.000001) Then
      Exit Do
      If (g_middle * g_lower > 0) Then
        f_min = f
        f_max = f
      End If
    End If
    Colebrook = f
    If (n > 100) Then
      Colebrook = CVErr(xlErrNA)
      Exit Do
    End If
End Function
To use this, if you're in Excel 2007, you need to have your workbook saved as the xlsm file type.  Then go to the Developer tab, and click the Visual Basic function.  In the window on the left you need to right-click the VBAProject + other stuff name and Insert.  Then you should be good to paste the code and then start using it in formulas.

The convergence criteria is the 0.000001 number within the code itself, so you can just change that yourself if desired.  I notice that values tend to only be accurate to 10^(-16).  In fact, for large Reynolds numbers, the expression for g(fmax) sometimes gives negative values, even though it should only give positive values (this is the entire point of having fmax).  But it turns out the cause is that fmax functionally is the answer, and any deviation from zero is due to floating point errors.  The root finding routine still gives an answer with Rr up to 3, even though that is mostly unphysical.

For some results, I plugged in a value of Rr of 0.015 and then looked at the output for different Reynolds numbers.  I obtained the following, with fmin and fmax from the equations I gave and then the f value from the function.  You can see how the upper and lower bounds I reported always bound the solution.

In conclusion, I've shown here a way to get bounds for root finding on the Colebrook equation from the mathematics itself.  It also follows that you should be able to count on this method for the full range of inputs, even unphysical ones.  For the case of unphysical roughness in laminar regions it does fail, but that's good, because the equation doesn't have a solution there.  In all other cases, even when the values are really really close to the unphysical region, this method still works.  That's good, because we like things that we can count on working.

Even though it seems like a trivial problem, it's not so easy to get something that won't unexpectedly break, and that's my intention with this approach.


I just noticed the disclaimer on the website:
* is a linkware, free for personal and non-commercial use in exchange to backlink.
I have been using this site extensively.  It's where basically all of my equations are rendered.

Saturday, March 16, 2013

More on Friction Buffers

Calculation of power dissipated from the spinning artificial gravity tubes is important because it sets a clear limit on feasibility.  Here, I will only go into the case of the limit of laminar flow, and the details of the construction required to keep the flow laminar.  As touched on in the introduction, this could be accomplished by a series of concentric sheets around the cylinder.  I found that the total number of sheets needed decreases as you decrease the width of the friction buffer, but the power dissipation increases.  This summarizes the major tradeoff of the method.

This isn't a perfectly correct summation of the situation, because in real life it's likely that anyone building this would take advantage of so much extra space by custom designing stages that use either the transition or turbulent flow regimes.  Doing so would allow one to keep the combination of power requirement and stage numbers lower than the limit described here, but so far this is out of the scope of what I can address.

Classification as a Fluid Flow Problem

The case of spinning artificial gravity tubes within a gravity balloon demonstrate a case of Taylor-Couette flow in the large-limit.  This is basically equivalent of two infinite planes moving relative to each other, which is Couette flow.  This is similar to the case of planar fluid flow, although different.

The definition of Reynolds numbers for any type of flow is at least somewhat arbitrary, since when you require a length scale, you have to pick something to use for that.  In the plane-sliding case of Couette flow, the obvious definition is the distance between plates.  There seems to be a good case that the transition to laminar then happens somewhere around number of 300, and there are even some cool youtube videos of this.  For the intent of keeping the flow laminar, we would require the number be lower than this.  Here, the denominator nu is the kinematic viscosity.

$$Re = \frac{v d }{ \nu} < 300$$

In the case of laminar flow, the sheer stress acting between the plates follows almost from the definition of viscosity itself.  This reference has a good illustration for how to think about it.

$$\tau = \frac{ \mu v }{d}$$

There's an important conclusion that can be draw from the collection of terms here.  Since the fraction has velocity divided by separation distance, that fraction won't be affected by the number of stages.  That implies that, provided the flow is laminar, it doesn't matter how many stages you use.  What that really implies is that you would use the minimum number of stages to make the flow laminar.  Take the number of stages to be N, and the total width of the friction buffer to be D=Nd.  Then, take the relative velocity in a single stage to be v, for which we know v=V/N.  That means that the sheer stress can be stated using the properties for the entire friction buffer, irrespective of number of stages.  Here, μ (mu) is the dynamic viscosity.

$$\tau = \frac{ \mu V }{D} \\ Re = \frac{ V D }{N^2 \nu} \\$$

The only thing missing at this point is relative speed of the entire rotating cylinder.  That's not a single number, since it grows with radius.  In the 2 rotation per minute case, the cylinder is 500 meters in diameter, which gives a good minimum size to use for calculations.  In that case, for 9.8 m/s^2, the edge moves at a speed of about 50 meters per second.  For that case, the following is the number of stages and power dissipation for different buffer widths.

Tradeoff between Number of Stages and
Power Dissipation

This is confusing graph, so I'll highlight some specific data points here.
  •  1 cm total width needs at least 10 stages, has 1 mm between stages, and dissipates 4.3 $\frac{W}{m^2}$
  • 10 cm total width needs at least 32 stages, has 3 mm between stages, and dissipates 0.4 $\frac{W}{m^2}$
  • 1 meter total width needs at least 101 stages, has 1 cm between stages, and dissipates 43 $\frac{mW}{m^2}$
  • 10 meter total width needs at least 320 stages, has 3 cm between stages, and dissipates 4 $\frac{mW}{m^2}$
So, speaking about design point, we would imagine a major cost associated with building 100s of stages or with managing separation distances between stages of less than a centimeter.  A power dissipation of several watts per square meter would still only come out to roughly a light-bulb of power use per person for any reasonably suburban density.  I could be wrong on the cost of any of these points, so I admit this is fairly arbitrary.

Stability of Friction Buffers

None of this would be very useful is the entire thing wasn't build-able in the first place.  There still remain some valid questions in this area.  Since we're talking about generic flow separators in zero gravity, it's possible that it could be made with very little material or careful concern.  I like to imagine a material being used like Saran Wrap.  If it was much more than this, you could imagine making 100 super large cylinders of it could be too costly.  But if we imagine that the flow separators have no particular strength to speak of, then could they be kept from bumping and falling apart?  Firstly, I imagine that a differential pressure would have to be maintained between each stage, so that they maintain their shape.  But even if the stages maintain their shape well, could they be prevented from bumping with a small amount of wobble or disturbance?  I would like to think it could, and I think that even simple demonstrations in a lab could show this, but it's still an open question.  Particularly, with several concentric wheels, the coupling could lead to all kinds of concerns with growing oscillations.

The Effect of Air Pressure

Not just in this area, but in several components of the gravity balloon, adjustment of air pressure can make a major difference in the calculations, and possibly for the better.  Obviously decreasing air pressure will decrease the power dissipated by air friction.  To some extent this may be desirable.

What just what kind of air composition is appropriate?  The Gemini and Apollo missions are frequently cited cases that demonstrates the danger of using a full Oxygen atmosphere.  For large-scale and long-term habitation, I would be worried about this in addition to the biological needs of plants and animals.  In a short-term experiment, it's perfectly obvious that humans and many other species can survive just fine in an altered atmosphere, but the long-term effects are unstudied by their very nature.

There's also the concern that if a high pressure asteroid is used with the intent to scale up, the management of the friction buffer will increase in difficulty.  It also increases with difficulty with larger structures, and here I mostly talked about the easiest case.

Friday, March 15, 2013

How Far Can Light Travel in an Endless Atmosphere?

The answer to this question was fairly easy to find.  What we're really looking for is the attenuation of visible light in atmosphere.  Then we can use this in order to intelligently discuss how far one could realistically transport light in space habitat with an atmosphere that has larger dimensions than Earth's atmosphere.  With the attenuation factors, we can find distances in order for 50%, 99%, or any given fraction of the original intensity to be absorbed.  Of course, there never comes a point when literally all of the light is absorbed.

This reference (pdf)  gives the attenuation factors for visible light in Earth atmosphere for two kinds of absorption - Raleigh scattering and aerosol reflection.

In order to translate this into distances we consider the general exponential form for attenuation:

$$I(d) = I_0 \exp{ - \sigma d}$$


  • d - distance light traveled
  • σ - the scattering coefficient by the reference's definition
  • I0 - original intensity
So to ask "how far before xx % of the light is absorbed", we are querying when I(d)/I_0 is equal to that fraction.  As the reference makes clear, this depends on the composition of the atmosphere, which is a function of height.  We would expect the scattering coefficient to decrease with height just because of decreasing density (there are fewer molecules to scatter off of), but it's clear that aerosols don't just scale with gaseous density.

I eyeballed the above graph to get scattering coefficients at sea-level of about 0.01 1/km for Rayleigh scattering and 0.2 1/km for aerosols.  You can plug these in and solve for d, giving a simple logarithmic expression.  Using these numbers, I plotted the distance light travels for 50% attenuation, 99%, and 99.9%.

We see that a simple answer to the question at hand is that sizes somewhere between 5 km and 100 km lies the limit of what you can transport light without a significant fraction of it being lost to the atmosphere.

Attenuation of the Sunset on Earth

So for this is all rather intangible.  How does this compare to the sunlight transport on Earth?  The sun isn't always shining through the same distance of atmosphere, which complicates the question.  If the sun is directly overhead we can easily find the mass-thickness of air that stands in-between the surface and the sun.  In fact, you can do that with just the pressure at sea-level.

$$P = \mu g \\ \left( \frac{kg}{m^2} \right) \left( \frac{m}{s^2} \right) = \frac{kg}{m-s^2} = Pa$$

This comes out to 10.3 tons per cubic meter, which is also very nearly 10 meters of water weight equivalent I discussed in the introduction post.  We can reformulate the attenuation equation to use this number.  With this approach, it can be easily seen that the sun's light directly overhead has <8% loss to attenuation if shining directly over head under any assumption of only Rayleigh scattering.  This assumption makes sense (for simplified calculations) because aerosols are only significant in a relatively small altitude range near sea-level.

$$\mu = d \rho \\
\exp{ - \sigma d } = \exp{ - \frac{\sigma}{\rho} \mu }$$

For the limit case of sunset/sunrise it's a bit more difficult.  To get a number, I'm using a simplified model where I assume constant density of the atmosphere to get a false "edge" to it.  Then using basic geometry I find the distance from the line of sight to this edge, and then the attenuation at that point can be assessed.

(Earth image licensed Public Domain)

Leads to these calculations:
  • h =  μ/ρ = 8 km
  • d = 323.7 km
  • 1.7 m tall person, distance to horizon edge = 4.6 km
  • total line of sight to end of atmosphere = 328.3 km
This number can then be applied to the prior equations to find that using only the Rayleigh scattering coefficient, only 4% of the light makes it through - this is why you can look directly at the sun at sunset.  However, using the sea-level aerosol scattering coefficient a negligible amount of light makes it through, showing that is a bad assumption.  Indeed, the amount of aerosols in the higher levels of the atmosphere is extremely little in comparison.  In reality, the amount of light in the sunset may be a little less than 4%, but obviously not functionally zero.

Implications for the Gravity Balloon

For the reference sizes I've been discussing so far, it's clear that atmospheric attenuation wouldn't be a deal-breaker, since even the largest size didn't reach 100 km in any given dimension.  The sunset on Earth demonstrates that light can make it through >300 km, although there is a large distortion of the colors in that event.  The "effective" depth of the atmosphere that the sun shines through at noon on the equator is about 9 km.  This would be comparable to the distances we would see in an access tunnel, aside from the fact that light would have to pass through the airlocks as well.  This would be a very difficult engineering task.

The results also indicate that the air composition in a gravity balloon couldn't be identical to sea-level air on Earth and still transmit significant light because of aerosols.  Perhaps aerosol content could be controlled so this wouldn't be a problem.

In a later post I hope to give some mention to how it would actually look to transport light in such large volumes, and what "feel" this would lead to.

Thursday, March 14, 2013

Gravity Balloon Pressure-Volume Curve and Rotation

One complication is that the pressure of a gravity balloon habitat wouldn't be constant as you increase the inner volume by adding more air, or "blowing it up".  That's a reality that would have to be dealt with unless you could add a significant (really significant) amounts of mass to the outer surface.  This is a similar reason to why the the window of usable asteroids is limited in the first place, but it is particularly problematic if you want to start small and get bigger without huge swings in the habitat pressure.  Here, I'm going to talk about some of the basics and how rotation could be used to mitigate this swing.

Non-Rotating Pressure-Volume Relationship

(later EDIT note: early versions of this did have some wrong math, and equations have since been updated to be correct)

With spherical symmetry, even if you have the inside filled with air, the simplifications from spherical symmetry are still there.  To find the internal pressure for a gravity balloon, you would integrate the gravitational field times the density - the same relationship that causes pressure under water to increase with depth on Earth.  The relationship in simple terms is:

$$P = \int_{R}^{R+t} \rho g(r) dr $$

The least obvious part is the function $g(r)$. This is the gravity as a function of radius from the center. It is, in truth, a piecewise function - zero in the middle, non-zero inside the rock walls, and then becomes a conventional $1/r^2$ beyond the surface of the rock walls. The above integral is only concerned with the field inside the rock wall. That is written here.

$$ g(r) = g_{solid}(r) - \frac{\text{missing rock mass due to air}}{R^2} \\ g(r) = \frac{4}{3} \pi G \rho r - G \frac{\frac{4}{3} G \rho R^3 }{r^2} $$

$$ P = \frac{1}{2} \rho \frac{GM}{(R+t)^2} t $$


  • R - inner radius
  • t - thickness of the shell
  • M - shell mass

To run practical scenarios, it gets more complicated than this because the mass of the asteroid is a function of the other variables, the density, inner radius, and outer radius.  Substituting that leads to the cubic that you can see in the result, with more detail here.

I implemented some functions that solve this numerically.  A fun detail is that the shape of the function is the same if you appropriately scale it to the size you're looking at.  That means I can cite the relationship for all gravity balloons (or at least the ones that don't spin) in a single graph.  To do this, I'm using a relative radius and a relative pressure.  The pressure is relative to the pressure in the center of the asteroid before any volume in the center is carved out, and the radius is relative to the outer radius at this point, and a similar reference is used for the volume.

This shows that the pressure actually drops off awfully quickly with volume since it falls (nearly) linearly with radius.  So, let's look at how rotating the asteroid can decrease the initial pressure, and particularly, decrease the ratio of initial pressure to the final pressure.

Rotating Pressure-Volume Relationship

If we imagine as asteroid before we insert any air into the middle, that internal pressure will be affected by the rotation.  This can be argued from the simple fact that rotation itself works as a pseudo gravitational field.  So the gravitational potential that "counts" is the gravitational potential plus the rotational potential.

The important thing to note is that the rotational potential has the opposite sign of gravitational.  That means that it decrease the internal pressure because it decreases the overall "force" that the upper layers can exert on the lower layers.  So, how would this affect things?  I tried to answer this using an extremely simple approximation.  The details of more sophisticated corrections are discussed here, while the complications from non-linear effects were asked about here, although no real conclusions were found.  Without considering the deformation of the shape itself, one will wind up underestimating the effects, so that does need to be kept in mind.  The level of pressure for the 3.5 hour rotation period I'm giving here is actually probably closer to a 2 hour rotation period, which I've seen quoted by NASA as generally the practical limit of what any body could rotate at.

It should also be noted that the shape deformation depends only on the density and rotational speed.  It doesn't depend on size.  This can be confirmed to one's self by noting that the divergence of the gravitational field and the rotational pseudo-field are both constants.  The former has density in it and the latter has rotational speed.  These numbers are certainly inaccurate, but the general relationship is definitely real.

Here, what I've done is to keep the angular momentum of the system constant while increasing the volume of the inner sphere.  That means what you see about is what you'll see if you start it rotating at the stated rate and start inflating the center.  The moment of inertia increases so the rate of rotation decreases, and this is what decreases the slope rate of decrease of pressure?

How would you go about rotating such a large asteroid?  Well, it's likely already rotating.  If you go through the list, you find that even fairly large asteroids tend to cluster below a 10 hour rotation.  This makes sense when you think about the fact that Earth was slowed down over billions of year by tidal forces that these bodies do not see.  So it's possible that some fast-spinning ones would have a fairly flat pressure-volume curve for inflating them without any additional action by us.  But even so, some major fractional drop in pressure looks unavoidable.

Nonetheless, people can actually tolerate a range of pressure, particularly if the gas composition can be intelligently adjusted.  Plus, if a civilization was advanced enough to inflate an asteroid to large internal volumes, they would likely not find it all that difficult to add rotation themselves - giving fine tuning control of pressure.  For modest volumes it wouldn't matter that much in the first place.

Monday, March 11, 2013

Access Tunnel

The most obvious part to be skeptical about with the information thus far is probably the access tunnel.  After all, the first deployment of any gravity balloon would require digging into over 10 km of rock.  That sounds awfully unreasonable, but first we need to consider what makes it unique.

Types of materials

Importantly, there's not only one type of asteroid.  The size that we're talking about is certainly big enough to be held together by gravity - that's the entire point.  But this gravity isn't like moon gravity, it is very very weak.  For the most part, gravity isn't giving much resistance to picking up rocks on the surface and throwing them.  The back-pressure from the asteroid material, however, is still a concern when one gets sufficiently far down.  But the pressure in the center of an asteroid 40 km in diameters isn't any moer than just 10 meters under the ground on Earth.  Given that, it's certainly believable that a hole can be self-supporting, after all, we see that in holes on Earth 10 meters deep.  But there's more to it, particularly when one wants to create a large pressurized volume in the center, and this is where the asteroid material comes into play.  I will vagely categorize the types of structure we could be dealing with from nothing other than my own thinking:
  • Hard material, with some strength to it
  • Soft material, sand-like or liquid-like
  • Porous rock - hard material that's been fractured into many macroscopic pieces
The interesting that about porous rock is that it's not exclusive.  As is a common topic in civil engineering, the large pieces within a matrix can cause certain effects.  We could imagine an asteroid with hard rocks mixed in with soft material.
One of the most interesting questions about porous rocks is if the vacuum permeates, to at least some degree, to the core.  This is certainly of interest for things like rubble piles.  The total gravitational potential is very low, and there's no chance of holding in gases.  I'm not even sure what the character of the "soft" material would be, so I'm not sure if it would have relevance to rubble piles.  Either way, we can address some implications.  Namely:
  • Fully soft material has some risk of tunnel collapse
  • Fully porous to vacuum material can't be relied on as a pressure barrier itself
  • Hard material has to be broken in order to be removed
All of these create at least some drawback.  The real bottom line here, however, is that the approach for a gravity balloon (and particularly for the access tunnel) would be specific to the character of that asteroid.

Pressure Boundary

The next logical question would probably be how things can move into the pressurized volume and back out into space through an access tunnel.  First, however, the pressure boundary needs to be defined well.  Will the pressure of the tunnel be the pressure on the inside, or will it be a vacuum, contiguous with space?  For at least initial steps, keeping a full atmosphere of pressure in the tunnel would be easier because you could use flexible materials to line the tunnel.

However, even simple calculations, using a diameter of 4.5 meters leads to a unfavorable material demands when assuming that the pressure boundary is made of simple polymer material.

An alternative is sought.  Firstly, it's important to realize that the rock surrounding the tunnel has its own pressure.  If the pressure of the tunnel is the same as the surrounding rock, then there's really no need to worry about either cave-in like events or losing the atmosphere through the rock material if it's rigid.

You could try to count on the structural material to hold the tunnel open.  Even so, at minimum there would have to be at least one airlock.  If you're not going to count on the integrity of the asteroid rock, however, it probably makes sense to stagger the pressure boundaries for a different kind of outcome.
Here, the pressure difference between the tunnel and surrounding rock at any point is no more than the pressure drop from one stage to the next.  Presumably, moving an object through the tunnel would entail dropping or raising the pressure while the object is in the comparatively much smaller lock area.  The entire pressure difference likely wouldn't be very much, after all, it's only one atmosphere in total.

This method of operation is basically the same as some ship locks, with air pressure being the analog to water pressure.  There is one important qualifier on that statement, however, which is that the locks would be spaced out almost evenly.  Most ship locks have several locks in one big latter, and that would defeat the purpose here.  Here, the idea is to equalize the pressure of the tunnel with the rock.  It's important to consider the energy that would be required to move something through (into or out of) this tunnel.  I figure it would be:

$$E = N \Delta P V_{lock} = (1 \text{atm}) V_{lock}$$

That is, effectively the same as any ordinary air lock.  It would just take a much, much, longer time to travel the distance.

Returning to the previous illustrations including the wide flow buffer, if the material is favorable, you may be able to spare the effort of providing a pressure boundary around the side of the tunnel.  That's the idea behind the wide flow barrier.  Instead of sealing the entire length of a section (and these are long sections), it's possible that we could use the asteroid for that purpose, but it would depend on the type of material, as I want to illustrate here with porous rock:

Air ingress is the potential hazard of forgoing the materials to surround the tunnel.  Presumably, this air leakage would be very small for some type of rocks and a great deal for other types.  Obviously the approach is completely out of the question if vacuum fully permeates the porous medium.

Digging the tunnel is still generally an unaddressed challenge.  Perhaps you would build these pressure boundaries as you got deep into the dig?  That would create extra complications of removing rock material through the airlock.

No matter how you slice it, no consideration for creating the tunnel brings us to highly futuristic or exotic technology.  Next, I would like to talk about some complications that can come with the pressure distribution in a rigid material.

Sunday, March 10, 2013

Introduction to the Gravity Balloon

Ideation of space habits rests in a strange place between fiction and science.  I believe it's a subject part of a great blue unknown that real researchers won't write in detail about for fear of being taken less serious, or perhaps for their loyalty to the practical.

To sweepingly divide all proposals into two categories, some things have a concrete path with current infrastructure... and some don't.  The tragedy of neglecting the latter is that we may hold back an inspiring vision.  Some imminently possible pictures of the future require a rainbow of imaginary technology.  If done well, this requires suspension of disbelief, not in any physical principle, but that such an infrastructure so different from today will be thought a worthy pursuit by our descendants.

There are two routes for extending human presence into space and they are both completely unattractive for anytime soon.  On one hand, space habitats in empty space don't scale well, and on the other hand, terrestrial environments are inhospitable locations at the end of an inhospitable trip.  Artificial gravity concepts are generally proposed for empty space, although there is the occasional exception of moon hotels.  Popular literature divides these rotating space stations into annular structures, such as the Bernal sphere and O'Neil cylinder, and toroidal structures such as the Stanford torus.  If you think about these from a mechanical engineering standpoint, the load-bearing materials will be found either around the circumference or directly span the diameter.  As it turns out, the material requirements for the two approaches are identical as long as you use sufficient potent materials.

Most of the common discussed ideas probably outright ignore the needs of radiation protection.  In a sense that's not wrong, since we already have people temporarily living in space with only their pressure vessel to provide shielding from radiation.  The problem is that the International Space Station habitation isn't sustainable.  The radiation dose on-board is 100s of times higher than Earth, and the material quantity needed to get parity between those is intimidating.  If you are crediting that radiation shielding is integral to the structure (which almost all proposals do), the idea of a long-term artificial gravity space station is at least somewhat self-defeating.  Either it has very high radiation levels (not so long-term anymore), or you will need a much stronger structure to hold all the shielding in place.  This particular problem is solvable by surrounding the station with shielding that doesn't rotate along with it.  In order to further simplify the structural needs for supporting artificial gravity, one could also use modularized pressurized containers, or the toroidal approach.

Approaches for artificial gravity space station cross-sections:

Now, limiting the discussion to the first of these, an annular space habitat, we can discuss the magnitude of materials needed.  The material strength needed per unit area increases with increasing radius.  This runs contrary to another constraint, minimizing the Coriolis force, which calls for as large of a structure as possible.  Keeping in mind that the requirements scale with radius, we can directly compare the contributions from the three components of load, internal pressure, and radiation shielding.  The "standard ruler" for this is meters of water equivalent, which creates an instant intuition to daily life.  The pressure above us is equivalent to the additional pressure you will experience going underneath 10 meters of water.  That is to say, the mass-thickness of the atmosphere above us is the same as 10 meters of water above us.  That is also the same value that we can thank for shielding from harmful cosmic rays, which is the reason for correspondence between shielding and pressure effective thickness.  Finally, we have the actual stuff that would exist within the space station.  The value for this is inherent subjective, but if you can imagine you and all of your possessions being melted down and coalescing to a constant fluid level on the ground, that's an appropriate interpretation of it's water-equivalent mass-thickness.  In the following image I'm illustrating this as 2 meters, which is quite high, but one needs to keep in mind that any amount of agriculture will require substantial amounts of soil and water, which put together, may be enough for you to drown in.

Wall makeup of the annular habitat:

This shows just how budensome the material requirements of the typical vision of an artifical gravity space habitat are.  In the modular approach to pressure modules, the load is decoupled from the pressure support, but it doesn't fundamentally change anything about the difficultity of these structures for very deep physical reasons.  Any pressure vessel in empty space that we speak of is inherently assumed to be made of rigid materails supporting that pressure.  That isn't completely other-worldly, since you go into a pressure vessel every time you fly commercially.  When a plane rises to 30,000 feet it maintains an internal pressure considerably higher than outside.  In order to do this, however, the plane's body has to be heavily reinforced and sealed well.  Obviously this is even more true for space habitats.  A good question that follows to ask is if we can find some way to make a pressurized volume that reduces the materials needed.  The answer is that we can't.  Consider the equation for material stress in a pressurized sphere.  The specifics aren't important other than the fact that the quantity PV, pressure times volume, is equal to an expression times mass.

Material stress for pressurized sphere

This is an unfortunate physical reality that will not budge for us and fundamentally limits the rate at which space habitats can scale.  In order to expand a space habitat, not only do we have to bring in new material proportional to the volume we want, but we have to process that material into strong structural fiber.  it doesn't matter if you change the shape or add cross-support, the above proportionality remains.  Perhaps the only "good" news is that it still scales better than building skyscrapers, which becomes MORE material intensive the higher it goes.

Breaking the mold

It is argued that space can usher in an age of abundance.  If the economics of self-replicating zero-gravity industrial infrastructure is as good as we hope it can be, then perhaps habitat mass that scales with volume is simply irrelevant, since the advanced civilization could make as much of anything as they need.  I see this as using the "brute force" thinking of the industrial age of oil.  It is better to paint a vision of the future that cleverly works with the laws of nature.  The expensive approach I've described so far for an artificial gravity station is a go-to plot device for many science fiction authors, or at least those who make an attempt at realism.  They have, themselves, perfectly illustrated the problems with the concept by invoking Carbon Nano-tubes to hold together habitats of sufficient sizes to mimic Earth.

Alternative proposals seem hard to come by, but here are two that I know of with some amount of merit.

Trent Waddington is an active space proponent online that has attempted a proposal for colonization inside an asteroid that includes artificial gravity.  He details his observations in his Living Inside An Asteroid post, which calls for tunnels and a circular train track for artificial gravity.  Although left unsaid, I would presume that the tunnels are a full vacuum and the train contains the pressure boundary.  Under the assumption that the asteroid is fully rigid this could make sense.  Most importantly, the force on the tracks would replace the tensile strength in my example of a modular rotating habitat with stationary shielding.

To attack his idea, the friction with the tracks seems to be an unresolved issue.  The absence of gravity and a vacuum environment doesn't change anything about rolling friction.  If anything, it makes it harder because lubrication is no longer a simple thing.  There are ways around this, certainly.  The larger issue is that nothing has been done about the scaling of pressure vessel materials.  Given that's not solved, there's not really an benefit to eliminating the structural materials for the load, remember, tensile strength to create artificial gravity pales in comparison to what's needed to hold internal pressure.  It's hard to see how any track-based approach would be superior to a simple tether, save for the unique case that there is an extremely high premium on reducing Coriolis forces.  Even in that case, the largest spinning radii that are practical to support with a tether is also close to the limit of perfect asteroid rigidity.

Karl Schroeder is a science fiction author that has written several fiction books based in a fantasy world called Virgra, which is mostly stagnant atmosphere contained in a "space balloon".  The volume is extremely large at 5000 miles in diameter and is littered with human presence in the form of rotating habitats.  It is a good president of someone exploring the immensity of an Earth-sized three-dimensional world enabled by zero gravity.  It also highlights how easy certain things become (like transportation) when you eliminate the need for pressure vessels to cope with the environment of space.

Nonetheless, I absolutely can not understand how he possibly thought it was a good idea to claim the balloon was made of carbon nano-tubes, in spite of apparently being directly told by a physicist that self-gravity alone could hold the air in.  When science fiction authors use unrealistic technology to get around a problem, then that's just how things go.  But here we have a case where the author invoked extremely exotic technology when completely ordinary stuff would have worked just fine.  Carbon nano-tubes are cool, but one has to consider the fact that we're specifically talking about employing them for >1,000 years in a high radiation environment with huge thermal stresses as well as ice constantly forms and breaks off the inside.  The world also has a completely unnecessary and unphysical giant sun located in the middle of the thing.  Neither of these things are the biggest problems with Virgra.  One could just imagine replacing them and call what's left physically accurate, if not for....

The spinning structures, for which:
"After all, any one of the smaller rotating structures could still be hundreds of kilometers in diameter."
No, they couldn't.  Even the smallest acceptable radius for Coriolis forces (about 500 meter diameter, 2 rpm) would be subject to hurricane gale force winds in this environment.  Given that the atmosphere is the same that we know on Earth, with plenty of N2 diluting the Oxygen, the speed of sound is also the same, and beyond a diameter of roughly 10 km you find yourself at fully supersonic speeds.  Now you may say "well the air will be dragged along with the tube", and it won't be.  This is a well understood problem if you take it to be a cylinder rotating in open air.  It is in a highly turbulent regime, and the type and amount of turbulence you will see under particular flow conditions is well understood and well studied.  I looked into some papers on this, and with some simple calculations got a general idea of the sheer force that the tube would see, and it's on the order of 80 Watts per square meter.  Multiply that by the entire surface are of the tube, and even for the slender habitats, you're looking at massive power dissipation by the air, which is basically what a hurricane is.

There are plenty of others that seriously do not have any real merit.  Some are mind-blowing by just how inefficient and round-about they are.

The gravity balloon

I argue for an approach of using an asteroid's self-gravity to obtain livable pressure.  This has several challenges associated with it, but I argue that once those can be overcome, extremely favorable scaling is obtained.  Most importantly, a volume can be built that satisfies all the requirements for long-term habitation while keeping all of the flexibility of a small gravity well.  This can all be done with a comparatively small material investment.

In short - start with at an asteroid of a diameter on the order of 20 km to 100 km.  Establish a transport tunnel to the center of the asteroid.  Begin production of useful gases (Oxygen would be nice), and pump it into the center.  Both rigid candidates and rubble piles can be used, but depending on which it is, material will either have to be cut out of the center and transported out in place of the gas, or the sides will simply be allowed to buckle and grow, forced by the pressure of the gas itself.  In that latter case, there is still concern of the Raleigh-Taylor instability, and this would have to be dealt with with basically a liner.

For our efforts, we get a large volume of air with no need for structural materials.

Ultimately, this results in an uphill battle against asteroid differentiation.  Nature "wants" to sort the materials in order of density, and we are going in the other direction by using an outer shell of heavy matter to hold an internal pressure that is amendable to life.  Why do I think this is a solvable problem?  There are several benefits the particular geometry affords us, but one should also keep in mind that many asteroids of this size already are not differentiated.  Also, since gas is so incredibly light compared to gas, the gravitational field at the wall is practically nothing.  Keeping giant boulders from falling off the inner wall would be accomplished by the force of a fly's weight.  More importantly, any membrane that separates gases at all can keep the inner boundary stable.  There are still global concerns against differentiation, you can imagine the danger of the central bubble floating to the top like in a bath tub.  Like the other concerns, however, nature is kind to us in this case.  The field at the center of any body is already zero, and provided you don't deviate far from this position, any small imbalances can be corrected very slowly (by pushing boulders around) without fear of catastrophic failure.  Finally, it's a very quantifiable problem.  The only big unknown missing is the nature of the asteroid material, which we already hope to be gaining a great amount of information about.

The starting point for the minimum asteroid size is illustrated below.  We consider the minimum size the smallest asteroid mass that will have nearly an atmosphere at its center.  In real life, density matters in addition to the mass.  I've assumed 1.3 specific gravity for the purposes of illustration, but the calculations can be done with other densities as well.  As a general rule, higher density buys you higher pressure.

For the reference "large" case, I sought the smallest size that initially has a tolerable internal pressure.  Since the gravity is maintained by self-gravity, the pressure decreases as you add more gas.

The end goal could then be for a very stable habitat for a very large number of people for a very long time.  Alternatively, this can (and would) be used for simple storage of large quantities of gas in deep space, irrelevant of habitation.  But wait, I was just badmouthing the problems with spinning for artifical gravity in an atmosphere.  What about that problem?  Like other problems, it's solvable.  It just needs careful thought.

To begin working at the problem, let's ask the question: what fundamental energetic limits does nature impose on friction?  Well, viscosity turns out to be pretty fundamental.  Imagine the simple situation of Taylor-Couette flow.  In that case, we are speaking about a plane moving at a certain velocity relative to another plane.  In the large radius limit (which is all we're concerned with), the sheer force for laminar flow is:

$$ \tau = \frac{ \mu U }{d} $$

  • U - relative speed between plates
  • d - distance between plates
  • mu - air dynamic viscosity
If you plug in some reasonable-sounding value for the distance between sheets, you wind up with a laminar value for energy loss per unit area of milliwatts per square meter, which is entirely tolerable as long as you have at least a somewhat economically competitive energy source.  But that's not a real thing - this flow isn't laminar so the above equation doesn't apply.  But let's put it another way, can we make the above equation apply?  Signs point to "yes".  You should notice the appearance of U divided by d.  If you insert a sheet between the two boundary sheets that moves at a velocity half way between them, you decrease both variables by the same factor... and at the same time get closer to the laminar cutoff point.

So here's the picture we're building, we can "tame" the flow around a rotating cylinder for artificial gravity by inserting intermediate sheets between the rotating structure and the external air.  For the sake of mathematics, we can simply imagine the final sheet to be fully stationary.

Illustration of laminarization

Scaled up to a practical application around rotating habitats, we're looking at something like the following illustration.  You can't just apply this "friction buffer" around the outside edge, you would have to taper the ends to a pinch so that the relative speed of the sheets is small and can be managed.  One could also imagine the ability to walk "up" this end ramp, which provides access to the bulk zero-gravity gas and back again.

Illustration of rotating habitats with friction buffer

Some questions do remain.  For instance, how do you keep the sheets in place?  That's not entirely clear, but it's possible that a pressure differential could help.  This could be maintained around the end seals or by using sheets that are semi-permeable and allowing air to slowly leak out from the habitat - causing the rotating structure to operate partially like a centrifugal pump.  There's another difficult reality to deal with - if the sheets are no more than a few centimeters apart even a small wobble could cause them to bump and possibly be destroyed.  As it would turn out, water itself seems to offer great promise as a ballast to minimize these wobbles.  Aside from this, one can also image the possibility of intelligently placed counterweights.  These could be in the form of interconnected water towers.

The number of stages needed for the friction buffer would depend on the amount of space allocated to the friction buffer.  For a simple calculation, I find around 200 are needed for a 500 meter diameter tube.  I imagine this would almost certainly be reduced in reality, accepting some losses to turbulence for greater simplicity and less effort.

In the end, it seems that energetic limits might be more challenging than anything related to providing air, gravity, and radiation shielding.  The asteroid belt doesn't even start until further than 2 astronomical units from the sun.  In terms of candidates within the inner solar system, we seem to be limited to Phobos and 433 Eros.  Within the asteroid belt, there are abundant candidates within the size parameters I've entertained - I estimate on the order of 530.

The problem with starting at a distance of 2 AU, however, is that light is attenuated by a factor of 4.  A large array of mirrors would be needed to gather a significant amount of light.  The size where this light can be focused, however, can be pushed pretty small (though not infinitely small).  If sunlight was the primary energy resource, then maybe this isn't the right track to take.  Of course, nuclear power of sorts is still a possibility, which would add a distinct heat source to the volume.  Active removal of heat would become a necessity at some early point, since the 10 to 20 km of asteroid material would be an almost perfect insulator.  The challenge of energy cycling would grow with the size of the volume if we assume some relatively constant number of people per unit volume.  Using the method and the asteroid size range I've discussed so far I calculated the total amount of volume that one could obtain by inflating all of them, and found a number on the order of 1% of the total volume of Earth's atmosphere (would have if it were all at sea level density).  Then, I scaled this to 7 billion people just for fun to get a person-volume density.  The the previously discussed "large" case resolves to roughly 93 million people, which can imply energy needs on the order of 200 GW.  Putting all this together, this is my illustration of the situation.  The rotating habitats are really just provided for scale.  I don't think it would be practical to make any much bigger than the 500 meter diameter.

A few things I thought about including but didn't include pipes for heat removal, transportation facilities, and tethering of the rotating habitats themselves.  It's thinkable that they could just float around.  Interestingly, the period of oscillation only depends on the density of air in there and comes out to something like 2 days.  But drag force would constrain those oscillations to near the center for this size.  I think, however, that with even very simple fan propulsion the habitats could steer themselves.