MuleShoe Blog

May 27, 2010

Computer Models Never Prove Anything

Filed under: Climate Change — zdas04 @ 3:20 pm

“Computer models” never prove anything.  They can be useful in helping to point a researcher in a direction for experimentation, but they can’t prove anything.  I know that if I drop an object near the surface of the earth, it will accelerate toward the center of the earth at a fixed rate of acceleration (as long as I disregard the air that it is falling through).  From this fact I can develop equations to tell me how fast it is falling at any given elapsed time, and I can determine its position at that elapsed time.  These equations make up a “mathematical model”.  I can program them into a computer and they are still a mathematical model.
On the other hand if I look at a liquid flowing inside of a pipe, I have equations that relate fluid velocity to the change in pressure down the pipe.  But what causes the pressure change?  The answer to that is “fluid friction”.  I have equations that allow me to predict pressure drop due to fluid friction.  These equations tell me that the faster the liquid is moving; the more pressure-drop will be caused by friction (thus slowing the fluid down).  For a given pipe geometry and fluid properties, friction is a function of velocity.  But for the same conditions, velocity is a function of friction.  This means that you have to solve the problem iteratively.  You guess a velocity and calculate a “friction factor”, then take that factor into the fluid-flow equations to determine a velocity based on your guess.  Then you take the solved velocity back to the friction factor equation and calculate a new friction factor.  Etc.  Continue this until the difference between the velocity used to calculate friction is acceptably close to the velocity calculated from the fluid-flow equation.  That is the sort of problem that you solve with a computer model.  The model divides the problem up into homogenous cells often called “calculation blocks” that can be handled with the same equations over the entire volume of the block.  If the pipe diameter changes, or if some additional flow comes in from another stream then you have to end your block and start another one.  For piping problems, this is pretty easy.  You start a cell with a given pipe diameter and a fixed flow rate, and when either of those changes you start another cell.
Pipeline computer models are very useful for looking back at known data and comparing it to theoretical data.  In this scenario, you can adjust parameters within the model to make the model match measured data.  Once the two match, you can look at the model and see where there are issues with the system (e.g., a pipeline model can show you where there is gas trapped within a liquid pipeline, or where there is standing liquid in a gas pipeline).
A pipeline computer model can also be used to predict the hydraulic performance of pipeline system modifications or to test a new pipeline design.  No pipeline ever built has exactly matched the performance of the model, but they are generally good enough to avoid the worst mistakes.
Computer models are useful in the same way that a hammer is useful.  If you have a problem like driving a nail, a hammer is a really effective tool.  If you have a problem like brain surgery, a hammer is somewhat less effective.  If my problem is to determine the performance of a ship’s mast under dynamic loading then I can make some pretty good predictions of that performance using a Finite Elements Analysis (FEA) computer model.  The model will not “prove” that a given design will outperform another design, but it can give you a good indication which one has the best chance of success.
The other end of the spectrum is “Climate Modeling”.  Local weather predictions are all based on computer climate models.  These models have a fairly dense grid of calculation blocks, reasonably high quality data, and a great deal of built-in experience to determine which of the hundreds of parameters in a weather system generally dominate local weather patterns for a given location.  These “weather models” are right in all regards (i.e., temperature highs and lows, humidity, wind velocity, and precipitation amounts) nearly ¼ of the time.  They are right enough (i.e., they say you need to wear a raincoat to school and you do need to wear a raincoat) more than half the time.  If they say that small craft should avoid open water, conditions are generally inappropriate for small craft to be on open water often enough to take them seriously.
For local weather predictions, computer models do a bit better than you would do flipping a coin, but not wildly better.  Now consider scaling these “OK” weather models up to the globe.  Also consider scaling the time scale from 5-10 days up to 50-100 years.  Now try to gauge the impact of changing a specific gas from 300 parts per million (ppm) to 800 ppm in the year 2100.  Three hundred ppm is 0.03% of the gas in the atmosphere.
The earth is big.  If you draw a line from the center of the earth to sea level, then shift over 1 mile and draw a line back to the center of the earth, the angle of the arc would be 26 seconds (0.007°).  NASA defines the start of space as 50 miles above sea level.  Extending these two lines that are 1 mile apart at sea level to the edge of space would have a separation of 1.00126 miles. Death Valley, California is at 282 ft below sea level, the one mile separation at this elevation is 0.9999987 miles.
If you built a 1 square mile (at sea level) square from lines going to the center of the earth and out to space, and repeated it over the entire earth you would have 2.5 billion (2.5X109) squares.  If you divided the volume above sea level into 1,000 ft high layers it would be 264 layers, so a 1 mi2 X 1,000 ft grid would have 650 billion (6.5 X 1011) grid blocks.
If the computer model requires 500,000 iterations to converge, then it has to do each calculation block (which may have several hundred calculations in it) 3300 trillion times for a single time step. 
The things that make up “climate” are really a collection of a vast number of things called “weather” which is made up of things like temperature, wind velocity, humidity, barometric pressure, cloud cover, etc.  Weather at a particular location on the earth is dominated by day/night, windy/calm, and sunshine/cloudy conditions.  Consequently a time step that is shorter than about 6 hours is pretty worthless.  So, if I want to predict the climate in the year 2060 I need 73,050 time steps from 2010.  To do 3,300 trillion calculation blocks in each of 73,050 time steps is 241 million trillion (2.41X1021) calculation blocks, a number that only has meaning to a computer.
If we assume that the grid block at Death Valley and the grid block at the edge of space are both exactly 1 mile square then we are introducing an error.  What happens if we do a simple operation like squaring each of the two numbers and repeat it 264 times (once for each layer between sea level and space)?  Well, at the 21st iteration the number for “space” is too big for most computer programs to handle (more than 10300 miles) and at the 31st iteration the Death Valley number is zero.  I started with two numbers that were within 0.125% of each other (using space as the denominator) or 80 inches over 50 miles and did a simple operation on each of them 30 times—the error went from a few inches to an incomprehensible “distance”.  The fluid mechanics equations in the climate models are much more subtle than this simple unconstrained demonstration, but the effect is the same.  Infinitesimal data errors introduced into a program that takes those numbers as “given” and applies equations to them 241 million trillion times is bound to magnify those errors in unpredictable ways.
Of course, the climate models currently being used to predict global catastrophe are not nearly this fine a grid.  One model uses 2.5° in latitude and 3.75° in longitude.  This results in a grid square of 173 mi X 259 mi (44,712 sq miles).  So you end up with 4,405 surface grid blocks instead of 650 billion.  While a person could be reasonably confident that the weather within a single square mile will usually be homogenous enough for categorization, I don’t know anyone except “climate scientists” that would claim that the weather in the southwest corner of a 44,712 square mile grid will be exactly the same as the weather in the northeast corner 311 miles away.
Vertical resolution is also much coarser than my example.  Nor are they evenly distributed.  One model has 19 levels over land and 20 levels over the ocean, and it stops its vertical investigation at 18 miles (7 of the levels are above 9 miles).
With 4,405 grid squares, each with 20 vertical layers, then 500,000 iterations requires 44 billion calculation blocks per time step.  Using 73,050 time steps gets the number iterations down to a manageable 3,200 trillion calculation blocks (3.22X1015).
I say “calculation blocks” because each grid cube has a set of defining parameters.  These parameters tell the program what equations to apply to that generalized 44,000 square miles.  It tells the program things like whether the grid block is over the ocean or the desert.  Some of the more sophisticated models accept input on what percentage of the grid is water, what percent is agricultural, what percent is urban, what percent is forested, etc.  The state of Colorado is 104,000 square miles, so this diverse state would be mostly included in a pair of grid blocks.  Both of which would have elevations ranging from under 5,000 ft to over 14,000 ft.  Each of these two blocks would have an average elevation that wasn’t representative of any particular place.
The result of homogenizing grid blocks of this size is that the results have no intrinsic meaning.  As a model builder, I can predict that something like CO2 in the atmosphere will reduce the amount of heat that can radiate into space.  Then I can “tweak” my model to accommodate that hypothesis.  The amount of modification is subtle, but the effect is cumulative so after a few trillion iterations it starts to make a big difference.
To try to add a patina of legitimacy to the process of Climate Modeling, the purveyors of the concept have used a version of historical weather station data to “calibrate” their models.  The concept is that if you know the answer for a period of time, then if the model can predict the known values for a past period then it can certainly extrapolate those values into the future.  This has proven to be an amazingly complex task.  Things change.  Urban centers sprawl far outside their historical boundaries.  Cropland is allowed to go back to forest.  New cropland is reclaimed from the forest.  Researchers found the raw data impossible to match.  Their solution was to “adjust” the raw data to remove “known anomalies”.  In other words they start with raw data, adjust it to fit their preconceptions, and then “prove” that their computer model can predict the future by matching their “adjusted” data.
Don’t get me wrong—I am certain that the climate is changing.  It has always changed.  It will always change.  The reason for the change, the magnitude of the change, and mankind’s ability to predict the change are areas where I have serious problems.  Climate models do not prove anything.  No computer model proves anything.  Ever.  If we could get scientists to stop trying to make public policy and get back to doing un-manipulated science the world would be a much better place to be.

May 29, 2009

Pig Receiver Evaluation Criteria

Filed under: Pipeline Equipment — zdas04 @ 2:55 pm

Pig launchers and receivers are designed to accommodate the removal of liquids and solids from a piping system.  Running pigs results in the possibility of considerable accumulation of both liquids and solids in the vicinity of the pig receiver.  While there is no one design that represents the “only” way to design this equipment, there are characteristics of effective equipment that can be assessed. 

I grade receivers in several categories on a 0-4 scale (i.e., “4” is best in class, “3” is above average, “2” is average, “1” is below average, and “0” is unacceptable).  By breaking each category down with objective criteria it is possible to assess the competence of the design.  The categories I evaluate for receivers are:

1.       Area behind closure:  The area behind the closure is used to stage pigs and lifting equipment.

a.       Best in Class:  There is room behind the closure to extend the barrel for smart pigging, install a removal rack for long/heavy pigs, and to set a crane for lifting a heavy pig.  A pig that is inadvertently launched from the receiver to atmosphere would be unlikely to damage any equipment

b.      Above Average:  There is room behind the closure to extend the barrel for smart pigging, install a removal rack for long/heavy pigs, and to set a crane for lifting a heavy pig.  Some amount of equipment/piping is in the line of fire for a pig that is inadvertently launched out of the receiver.

c.       Average:  Some amount of congestion exists behind the closure, but it is possible to run smart pigs without modifying non-related equipment.

d.      Below Average:  Non-related equipment would have to be removed to retrieve a smart pig.

e.      Unacceptable:  The area behind the receiver cannot be modified to retrieve a smart pig without unacceptable expense/disruption of operations (e.g., a third party compressor set within 20 ft of the closure on a receiver).

2.       Over Pressure Protection:  The receiver can be isolated from the pipeline while full of liquid.  In that case, very high pressures can be reached with a relatively small temperature change.

a.       Best in Class:  Properly designed, tested, and maintained pressure relief valve is installed on the barrel

b.      Above Average:  Properly designed relief valves are installed, but documentation of testing and maintenance is missing

c.       Average:  Reliance on formal, written procedures to prevent over pressurization (e.g., procedures that specify that vent valves will remain open when the barrel is isolated)

d.      Below Average:  Reliance on informal procedures to prevent over-pressurization (e.g., an operator decides to leave a vent open after receiving a pig)

e.      Unacceptable:  No steps in place to protect the barrel from over pressurization.

3.       Design pressure and temperature:  The values that the designer used in specifying required strength of the construction materials

a.       Best in Class:  Receiver design matches the design of the pipeline and all components can be hydrostatically tested to the same test pressure as the pipeline.

b.      Above Average:  Receiver design matches design of the pipeline, but some components cannot be tested.

c.       Average:  Receiver design exceeds the design of the pipeline

d.      Unacceptable:  Receiver design requires the pipeline design pressure/temperature to be reduced.

4.       Closure Tell-Tale:  Does the closure have a method to warn the operator of pressure in the barrel?

a.       Best in Class:  There are multiple tell-tales that are an integral part of the opening mechanism and cannot be skipped.

b.      Above Average:  There is a single tell-tale that is an integral part of the opening mechanism and cannot be skipped.

c.       Average:  There is a pressure tell-tale that is a part of the opening mechanism, but it can be overridden (e.g., some closures have a chain from the fixed part of the closure to the tell-tale operating mechanism, the mechanism must be operated, then removed before the closure can be opened—the chain can be cut without affecting the operation of the closure)

d.      Below Average:  There is a tell-tale, but there is no mechanism to cause it to ever be used.

e.      Unacceptable:  There is no tell-tale

5.       Closure Secondary Capture:  Does the closure have a way to prevent trapped pressure from converting the closure into a projectile?

a.       Best in Class:  A capture mechanism allows the closure to move a small distance to release the seal, but prevents it from coming fully open or swinging fully open.  Best in Class closures will have both a secondary capture method and a hinge.

b.      Above average:  Closure has a hinge to limit travel if forced open under pressure

c.       Average:  Closure has a davit to limit travel if forced open under pressure

d.      Unacceptable:  Closure is free to become a projectile if opened under pressure

6.       Bypass Line Size:  The bypass line is used to redirect flow around the side valve.

a.       Best in Class:  The bypass line is sized to allow the processes upstream of the pig to continue with minimal excess backpressure.

b.      Above Average:  The bypass line requires noticeable increase in the backpressure of the upstream process.

c.       Average:  The bypass line requires considerable increase in the backpressure of the upstream process.

d.      Below Average:  The bypass line requires so much of an increase in the backpressure of the upstream process that some processes fail or go off line.

e.      Unacceptable:  The bypass line requires so much of an increase in the backpressure of the upstream process that most upstream processes fail or go off line.

7.       Bypass Line Position:  The position of the bypass line controls how constant the downstream process can be.

a.       Best in Class:  The bypass line is located far enough into the barrel section to ensure that any pig that could be run in normal operations has exited the throat.

b.      Above Average:  The bypass is located well into the barrel, but many pigs could cover the line, restricting process flow.

c.       Average:  The bypass is located very close to the start of the barrel and most pigs can block flow out the bypass

d.      Below average:  Bypass is located in the throat.

e.      Unacceptable:  Bypass is located at the start of the throat.

8.       Bypass line orientation:  The receiver is there to bring in solids and liquids.  If the bypass is oriented properly, then most of the solids can be captured within the barrel and won’t accumulate in the lines to the next process.

a.       Best in Class:  The bypass valve is located high in the barrel and is above the highest accumulation of solids that could be reasonably introduced.

b.      Above Average:  The bypass is located high in the barrel, but there are credible scenarios that could result in the bypass flowing some amount of solids

c.       Average:  The bypass is located low in the barrel and some distance from the throat and will often ingest solids

d.      Below Average:  The bypass is located low in the barrel and fairly close to the throat and will often ingest considerable solids

e.      Unacceptable:  The bypass is located in the bottom of the throat and will preferentially ingest solids.

9.       Barrel Length:  The length of the barrel between the closure and the reducer

a.       Best in Class:  The barrel is long enough to ensure that any pig that could be run in normal operations has exited the throat and doesn’t reach the bypass.

b.      Above Average:  The barrel is long enough that most pigs that could be run in normal operations have exited the throat and won’t reach the bypass.

c.       Average:  The barrel is short enough that most pigs will have the potential to plug the bypass.

d.      Unacceptable:  There is no place that the pig can lie to allow produced fluids to flow around it.

10.   Extensibility:  Receivers should be designed for proper operation with maintenance pigs, but they should also be able to be extended for unusual conditions.

a.       Best in Class:  The barrel length is extendable without modifying piping (e.g. a set of flanges between the bypass and the closure would allow a pup to be installed to receive very long smart pigs).  The receiver could be used as a launcher without piping modifications

b.      Above Average:  Either the barrel is extendable without modifying piping or the receiver could be used as a launcher without piping modifications.

c.       Average:  Some amount of piping modifications would be required to run a smart pig or to use the receiver as a launcher.

d.      Below average:  Extensive modifications would be required to either run a smart pig or use the receiver as a launcher.

11.   Throat:  The throat section is intended to allow a pig to clear the barrel-isolation valve before it enters the barrel and slows down.  The throat is also used to seat the pig prior to pressurization in a launcher (or in a receiver used in reverse-pigging), a vent near the barrel isolation valve is used to aid the loading of pigs

a.       Best in class:  The throat is long enough to hold the intended maintenance pig without excessive compression of the trapped gas.  There is a vent on the throat near the barrel-isolation valve

b.      Above Average:  The throat is long enough to hold the intended maintenance pig, but some amount of force is required to compress the trapped gas.  There is a vent near the barrel isolation valve.

c.       Average:  The throat is too short to allow the expected maintenance pig to be fully loaded in the throat.  There is no vent in the throat

d.      Below average:  There is no throat; the eccentric reducer connects the barrel-isolation valve and the barrel.

e.      Unacceptable:  There is no throat and the connection between the barrel-isolation valve and the barrel is a concentric reducer.

12.   Pig Signal:  Pig signals are used to indicate that the pig has entered the receiver.

a.       Best in class:  Bi-directional indicator that provides a clear indication of pig passage, fails in a way that makes the failure clearly known to the operator, and does not require manual reset.

b.      Above average:  Bi-directional indicator that provides a clear indication of pig passage, fails in a way that makes the failure clearly known to the operator, and does requires manual reset.

c.       Average:  Uni-directional indicator that provides a clear indication of pig passage.

d.      Below average:  Indicator has unclear indication of pig passage (e.g., one pig sig has an LCD that changes a binary value from its current value to the opposite value unless the operator noted if the starting value was a “0” or a “1” he doesn’t know what the “0” or “1” in the display means)..  A good pig signal will be also be below average if it is installed in the Barrel where it is unlikely that the pig will hit it instead of in the throat.

e.      Unacceptable:  No pig signal.

13.   Vents and drains:  The vents and drains are used to depressurize and purge the barrel.

a.       Best in Class:  Vents and drains are appropriately sized and located for expected operations.  Best in class receivers will have a 2-inch vent located 1 pipe diameter from the flange attaching to the barrel isolation valve (to be used for launching pigs); a 2-inch vent located in the same plane as the bypass valve on the top of the pipe; and a 3-inch drain located in the same plane as the bypass valve on the bottom of the pipe.  Drain line is routed to a place where solids can be isolated.

b.      Above Average:  Has vents and drains per the Best in Class, but vent is located close to the reducer, or the drain is undersized, or the drain goes into a water system.

c.       Average:  Multiple vents in the barrel, no vent in the throat, or drain directed to a location where the solids can do harm.

d.      Below Average:  No drain.

e.      Unacceptable:  No vent or drain.

Scoring.  Each category is assigned a “grade” and the grades are summed, and then averaged.  The results are:

1.       Expert design:  Average is 3.5 or higher and no single category scored below a 3.0.

2.       Better than Competent:  Average is 2.5 or higher and no single category scored below 2.0 or Average is higher than 3.5 and there was at least one category below 3.0.

3.       Competent:  Average 1.5 or higher or Average higher than 2.5 and more than one category below 2.0.

4.       Less than Competent:  Average greater than or equal to 0.5.

5.       Incompetent:  Average less than 0.5.

 

Powered by WordPress