Showing posts with label Energy. Show all posts
Showing posts with label Energy. Show all posts

Saturday, February 8, 2020

Fun with numbers for February 8, 2020

Some collected twitterage and other nerditude from the interwebs.

Converting California to EVs: we're going to need a bigger boat grid


I like how silent electric vehicles are, but if California is to convert a significant number of FF cars to electric (50-80%), its grid will need to deliver 11-18% more energy (we already import around 1/3 of that energy and our grid is not exactly underutilized).




Playing around with diffusion models to avoid thinking about coronavirus


Playing around with some diffusion models of infection, not really sophisticated enough to deal with the topological complexities of coronavirus given air travel but better than people who believe you get that virus from drinking too much Corona beer… 🤯




Better choose winners of the past or the new thing?


Based on the following tweet by TJIC, author of Prometheus Award winning hard scifi books (first, second) about homesteading the Moon, with uplifted (genetically engineered, intelligent) Dogs and sentient AI,


I decided to create a simple model and just run with it. For laughs only.

We need to have some sort of metric of quality, $x$, and we'll assume that since people can stop reading a novel if it's too bad, $x \ge 0$. We also know Sturgeon's law, that 90% of everything is dross, so we'll need a distribution with a long left tail. For now we're okay with the exponential distribution $f_X(x) = \lambda \exp(-\lambda x)$, and we'll go with a $\lambda = 1$ to start.

Instead of changing the average quality of the novels for different years, we'll change the sample size from which the winners are chosen; what we're interested in is, therefore, $M(x)_N = E\left[\max\{x_1,\ldots,x_N\}\right]$ for different $N$, the number of novels. Assuming that $10 < N < 100000$, we can use a simple simulation to find those $M(x)_N$:


The results are

$M(x)_{10} = 2.899432$
$M(x)_{100} = 5.230011$
$M(x)_{1000} = 7.512119$
$M(x)_{10000} =  9.750539$
$M(x)_{100000} =   12.122326$

Let's say there are between 100 and 1000 scifi novels worthy of that name in any given year of the last 100 years. So, unless the new novels have on average between 5.2 and 7.5 times the average quality of those in the previous 100 years, one is better off picking a winner at random from those 100 years than a random new novel.

(Yes, there's a lot of nonsense in this model, but the idea is just to show that when there's a long left tail, which comes from Sturgeon's law --- and this one isn't even that steep --- randomly picking past winners is a better choice than randomly picking new novels even if the quality improved a bit relative to the past.)



No numbers, just Bay Area seamanship





Live long and prosper.

Thursday, January 30, 2020

Fun with numbers for January 30, 2020

Some collected numerical fun I had on twitter since the last post.

Science illustration fail: meteor tails in outer space



Why oh why do these representations always put meteor tails on objects far off the exosphere? That tail extends past 3000 km altitude, with the fireball center at around 1400 km. Little atmosphere there, fellas…

Also, that meteor (assuming it's the darker circle inside the fireball) is well over 300 km in diameter; even losing a big chunk of its mass in the atmosphere, it would reach the ground much larger than the 7 km the article says.

Source: https://www.cnet.com/g00/news/asteroid-that-smashed-earth-2-229-billion-years-ago-may-have-thawed-the-planet/



Star Trek: Picard nonsense: solar panels on/over the Golden Gate Bridge



I got this image, from the new show Star Trek: Picard, requiring unattainable suspension of disbelief — as if there was ever fluid traffic, let alone no traffic, on the GGB.

Oh, and also, solar roadways?! Really?!

I assume the Picard writers are from Hell-A, since anyone from the Bay Area would know that the GGB is fogged-in most days, so putting solar panels on it would be even stupider than on other roads, and that's saying something...

Okay, some have suggested panels are above the road. At 100% efficiency, 4 kWh/(m$^2$ * day) San Francisco insolation, and 75,000 m$^2$ deck area for the GGB, that's a 12.5 MW (average power) generator, and for that we cover one of the best views of the city?! In the 24th Century?!

Anyone who drives East on the Bay Bridge gets the transition from claustrophobic (West of Yerba Buena Island) to open space (East of YBI). Covering the GGB, especially as a pedestrian park, would be a terrible decision, more so for a puny 12.5 MW power rating.



Corona virus causes an epidemic of bad economics


What is it about supply and demand that is difficult to understand for otherwise intelligent people?


Two of many reasons why raising prices in these circumstances is good:

Some of the people who are reminded of the need for N95 masks, hand sanitizer, and disposable gloves during an emergency might realize that they shouldn't be unprepared in the future; if there's no enforced rationing (terrible thing to do, rationing) and the prices don't rise, these people may buy more than they need now, to address their previous failure to prepare. Therefore, raising the price will deal with some of this behavior, making supplies available to more people.

Expedited delivery (to the retailer) costs more than regular delivery. Some of these deliveries were made with an assortment of goods, many of which were high-margin (say bottles of 30-year-old scotch) that absorbed most of the cost of the delivery. Delivering truckloads of low-margin items like sanitizer and N95 masks alone (no expensive items to share the cost of the delivery) means the cost per unit is much higher.



California electrical consumption in nuclear explosions per year


Impressing people who have trouble with division, for emotional responses. (Not me.)

There's a video circulating on Twitter (not linking to it, for reasons that will become obvious) that describes the effect of AGW in terms of nuclear explosions per day. This is an excerpt of a much longer Thunderf00t video, which includes his customary numerical errors and bombast, but more importantly, and worse for a purported scientist, uses the imagery of nuclear destruction to create emotional responses to serious issues that demand cold analysis.

To show how ridiculous the imagery is, I calculated the equivalent of California's 2018 electricity consumption* in nuclear (fission and fusion) explosion units:


The point, which might escape some of the audience for that video, is that energy is energy and power is power; 45 Hiroshima-like nuclear explosions per day is just another way of saying 33 GW. Using such imagery is an appeal to emotion, not something a scientist should do.

Draw your own conclusions.

- - - -
* AEMO (Australian Energy Market Operator) has near real-time data, California, land of high-tech, releases information for a given year in late-June the following year.



Live long and prosper.

Thursday, December 26, 2019

Fun With Numbers for Boxing Day, 2019

Some collected numerical fun from twitter to end the year.


As an amuse-bouche, if you're going to mock other people for their lack of intelligence, perhaps don't make trivial arithmetic errors…


(In accordance with my recent resolution to be more positive by not posting negative content, I didn't post this to twitter and I obscured the author.)



Geometry and trigonometry to the rescue


Scott Manley likes For All Mankind, but would like the producers to get the science right a bit more often:


Trust but verify, as they said in the Soviet Union:


In case the trigonometry isn't obvious, the angle (call it $\alpha$) is important to translate the horizontal measurements (say $l_1$ measured at $h_1$) into vertical distance via the magic of tangents: $\tan(\alpha/2) = l_1/(2 h_1)$ from where we get $h_1 = l_1/(2 \tan(\alpha/2))$.


The calculation above is actually for a FoV of 60° (camera), not 120° (eyes) as said in the text, because I used a hand calculator and post-its and transcribed the result from the wrong post-it; this result is about twice the correct result; for more accuracy, here are the different altitudes calculated [using a spreadsheet, like a proper responsible adult] as a function of what the angle taken by the big ship (around 50 m linear dimension) is:


(There are many approximations and precision trade-offs in the measurement, but SM's point holds: these are clearly different orbits and no one in the production or writing team seems to have noticed.)



It's only the equivalent of one to five .50-cal bullets...


The Hacksmith made one of those "how much dangerous nonsense can we post before YouTube throttles our channel" videos:


and I checked their Physics:


They replied on twitter that the maximum speed was over 2000 RPM, at which point I calculated that the kinetic energy was close to that of five .50-cal bullets.

What could go wrong, amirite?

(I like how the producers of Nikita [with Maggie Q, not La Femme Nikita with Peta Wilson] thought that the Styer HS .50 was an appropriate rifle for a shot through a window across a city street. Spoiler alert: it isn't; it's too much gun, in the words of Mike Ermentraut. The rifle looks gigantic next to Maggie Q, which is probably why they chose that caliber instead of something in .223 or .308 either of which would be more appropriate --- he said with all his marksmanship expertise acquired on the training fields of the xbox.)



Et tu, Arthur C. Clarke?


Usually A.C. Clarke's science is spot-on (excerpt from The Songs of Distant Earth),


 but in this case, no:


(We could say that it's the captain of the Magellan that's wrong, perhaps exaggerating for effect, not A.C. Clarke, but that's a cop-out.)

Here's an example of A.C. Clarke getting much harder science right, from Rendezvouz with Rama (an old tweet, from the era when I wasn't blogging):


(I mean, what kind of nerd does numerical integration to check on the feasibility of a scifi author's solution to a minor plot point just to post it on twitter? This guy! 🤓 [Pointing both thumbs at self.])



Tidal turbines and bad interpretation of statistics


Real Engineering had an interesting video about tidal turbines:


But I had an issue with the conclusions from the impact study, because they repeat a common error: mistaking statistical significance (or lack thereof) for effect size. This point deserves a better treatment, but for now here's a simple example:


The energy density of the ocean, like other renewables, is still a bit on the low side. Compared to Canadian actinides, it's certainly lacking:




Carbon capture wonky accounting


The XPrize has a video on "Everyday Products Made Out of Thin Air":



I like the Xprize and the ideas behind it, but most of these 'carbon capture products' are complete nonsense. The CO2 footprint for the processes that make and market the product is much larger than captured CO2. In other words, these products harm the environment by increasing the total CO2 output.

(Yes, I've covered this before, on one of the rare occasions I agreed with Thunderf00t.)

If you create say 1000 tonnes of CO2 building a factory to make a product that captures 100 g of carbon per unit, you need to make over 2.7 million units just to capture the CO2 created by building the factory alone! (If the product has 100 g of carbon, that came from 44/12*100 = 367 g of CO2.) Not counting the footprint of packaging, delivery, etc.

(This is the same accounting problem that people have comparing the CO2 footprints in production of wind turbines and gas turbines. If the gas turbines already exist and the wind turbines don't, the CO2 footprint of building them has to enter the calculation [but never does…].)

Note also that the products aren't made of 100% carbon, so the correct accounting for how much CO2 they capture would necessitate accounting for the CO2 footprint of the other components and their delivery — usually to a net creation of CO2 by these 'capture' products just in this manner.

Let us not forget delivery; even if we just consider local delivery with a city van (like those that are always blocking traffic in San Francisco by being double-parked in awkward places, not that traffic moves in San Francisco, vans or no vans), the numbers aren't encouraging:

A Ford Transit cargo van is rated for 25 MPG in the city. Assuming that gasoline is 100% trimethylpentane for simplicity, burning 1 kg of gasoline yields 3.1 kg of CO2. One gallon of gasoline is 2.86 kg (3.79 l * 0.755 kg/l) so 100 miles of delivery route has a 35.5 kg CO2 footprint. If each product unit has 100 g of carbon captured (367 g of CO2), it takes 97 units in that delivery route just to make up for the delivery itself.

Here are some real carbon capture products: first some really big ones a little bit south of the Bay Area


More: https://www.flickr.com/photos/josecamoessilva/albums/72157629918640442

and one of the same species that sprang from a seed taken to the Moon (story)


More: https://www.flickr.com/photos/josecamoessilva/albums/72157687657575895

I like trees.


Sunday, December 1, 2019

Fun with Numbers for December 1, 2019

007: GoldenEye gets an orbit right


I was reading the book 007: GoldenEye and noticed that Xenia Onatopp's description doesn't match Famke Janssen's looks; oh, and also this:


At first glance, the book appears to be playing fast and loose with orbits; after all, the ISS, which orbits around 400 km, is also on a roughly 90-minute orbit. So, let us check the numbers.

The first step is computing the acceleration of gravity $g_{100}$ at 100 km altitude. Using Newton's formula we can compute it from first principles (radius and mass of the Earth, gravitational constant... too many things to look up), or we can use the precomputed $g=$ 9.8 m/s$^2$ and solve for the altitude using a ratio of two Newton's formulas at different radii (using 6370 km as the radius of the Earth):

$ g_{100} = 9.8 \times \left(\frac{6370}{6470}\right)^2 = 9.5$ m/s$^2$

This acceleration has to match the centripetal acceleration of a circle with radius 6470 km, $a = v^2/r = g_{100}$, yielding a orbital speed of 7.84 km/s.

The circumference of a great circle at 100 km altitude is $2 \times \pi \times 6470$ km = 40,652 km, giving a total orbit time of 5180 s, or 1 hour, 26 minutes, and 19 seconds. So close enough to ninety minutes for a general.

So, yes, GoldenEye's orbit makes sense (-ish). Even though it's much lower than that of the ISS, which also has around 90 minute orbital period (92 minutes, and it's on a very mildly elliptical orbit).

On the other hand, a 100 km orbit would graze the atmosphere (it's inside the thermosphere layer, near the bottom) and therefore lose energy over time, so not a great orbit to place an orbital weapon masquerading as a piece of space debris, because you can't boost up "space debris."

Here are the circular orbital times for different altitudes; because of the approximation of $g=9.8$ m/s$^2$ and radius of the Earth as 6370 km, there are increasing errors with altitude, which are obvious for the GEO orbit (in yellow), still not bad since GEO shows that errors will be less than 2 minutes 38 seconds on all the other orbits:




There's no True(x) function for the internet (or anywhere else)



(Ignore the bad grammar, it was a long day.)

What happens if we feed the [putative social media lie-detector] function $\mathrm{TRUE}(x)$ the statement $x=$"the set of all sets that don't contain themselves contains itself"?

Let's take a short detour to the beginning of the last century...

Most sets one encounters in everyday math don't contain themselves: the set of real numbers $\mathbb{R}$ doesn't contain itself, neither does the set $\{$chocolate, Graham cracker, marshmallow$\}$, for example. So one could collect all these sets that don't contain themselves into a set $S$, the set of all sets that don't contain themselves. So far so good, until we ask whether $S$ contains itself.

Well, one would reason, let's say $S$ doesn't contain itself; then $S$ is a set that doesn't contain itself, which means it's one of the sets in $S$. Oops.

Maybe if we start from the other side: say $S$ contains itself; but in that case $S$ is a set that contains itself, and doesn't belong in $S$.

This is Russell's set paradox and it shows that there are propositions for which there is no possible truth value.



On the price of micro-SD cards


Browsing Amazon for Black Friday deals (I saved 100% on Black Friday with coupon code #DontBuyUnnecessaryStuff and you can too), I saw these micro-SD cards:


Instead of buying them, I decided to analyze their prices, first computing the average cost per GB (as seen above) and then realizing that there's a fixed component to the price apart from the cost per GB, which a simple linear model captures:




All the electricity California needs is about 6 kilos of antimatter


I was reading a report on how much it costs to decommission (properly) a wind farm and realized that if we just had some antimatter lying around (!), California energy needs would be met with small quantities.


Okay, antimatter is a bit dangerous, so how about we develop that cold fusion people keep talking about? Here:


(Divide that by an efficiency factor if you feel like it.)



Relativity misconceptions and the reason I restarted blogging


I was listening to a podcast with Hans G Schantz, author of the The Hidden Truth trilogy (so far… fans eagerly await the fourth installment; highly recommended) and he had to correct the podcast host on what I've noticed is a very common misconception: that "near" the speed of light relativistic effects are very large.

Which is true, for an appropriate understanding of "near."

Time dilation, space contraction, and mass increase are all regulated by a function $\gamma(v) = (1 -(v/c)^2)^{-1/2}$, a very non-linear function. For the type of effects that people typically think about, like tenfold increases, we're talking about speeds near $0.995 c$; for the type of effect that would be noticeable in  small objects or short durations, one needs to go significantly above that:


Interestingly, the decision to restart blogging (first under the new name "Fun with numbers," then back to the admonition to keep one's thoughts to oneself by Boetius) was due to a number of calculations I had been tweeting regarding relativistic effects in the Torchship trilogy by Karl K Gallagher (highly recommended as well). Here are some examples, from Twitter:



And it's always heartwarming to see an author who keeps the science fiction human: that in a universe with mass-to-energy converters, wormhole travel, rampaging artificial intelligences, and AI-made trans-Oganesson-118 elements, there's a place for the problem-solving power of a wrench:





Computerphile has a simple data analysis course on YouTube using R



Link to the playlist here.
Download RStudio here.



Another promising lab rig that I hope will become a product at scale



The Phys.org article is here and the actual Science Advances paper is here.

Strictly speaking, what the paper describes is a successful laboratory test rig, but let's be generous and consider it a successful tech demo, also known in the low-tech world as a proof-of-concept. Note that though not all successful lab test rigs become successful tech demos, the ratio is much higher than the number of lab rigs (successful and otherwise) that become tech demos, so it's not that big a leap in the technology development process.

Saturday, November 9, 2019

Fun with numbers for November 9, 2019

Science illustrations made by people without quantitative sensibility


From a tweet I saw retweeted by someone I follow (lost the reference), this is supposed to be a depiction of the Chicxulub impact:


My first impression (soon confirmed by minor geometry) was that that impact was too big; yes, the meteor was big for a meteor (ask the dinosaurs…), but the Earth is really really big compared to meteors. Something that created such a large explosion on impact wouldn't just kill 75% of the species on Earth, it would probably kill everything on the planet down to the last replicating protein structure, boil the oceans, and poison the atmosphere for millions of years.

Think Vorlon planet-killer, not Centauri mass driver. ðŸ¤“

Using a graphical estimation method (fit a circle over that segment of the Earth to get the radius in pixels, so that we can translate pixels into kilometers), we can see that this is an overestimation of at least 6-fold in linear dimensions (the actual crater diameter is ~150km):


6-fold increase in linear dimensions implies 216-fold increase in volume (and therefore mass); using the estimated energy of the actual impact from the Wikipedia, the energy of the impact above would be between $2.81 \times 10^{26}$ and $1.25 \times 10^{28}$ J or up to around 22 billion times the explosive power of the largest H-bomb ever detonated, the Tsar Bomba.

The area of the Earth is 510.1 million square kilometers, so that's 43 Tsar Bombas per square kilometer --- which is a lot, considering that the one Tsar Bomba that was detonated had a complete destruction radius in excess of 60 km (or an area of 11,310 square kilometers) and partial destruction (of weaker structures) at distances beyond 100 km (or an area of 31,416 square kilometers). And, again, that's 43 of those per square kilometer; so, yeah, that would probably have been the end of all life as we know it on Earth, and I wouldn't be here blogging about it.

A more accurate measurement, using a bit of trigonometry (though still using Eye 1.0 for the tangents):


Because of the eye-based estimation, it's a good idea to do some sensitivity analysis:



(Results are slightly different for the measured case because of full-precision calculation as opposed to dropped digits in the original, hand-calculator and sticky notes-based calculation.)

It gets worse. In some depictions we see the meteor, and it's rendered at the size of a planetoid (using the graphical method here too, because it's quick and accurate enough):


To be clear on the scale, that image is 442 pixels wide, the actual Chicxulub meteor at the same scale as the Earth would be 1-7 pixels wide, which is smaller than the dots in the dotted lines.

For additional context, the diameter of the Moon is 3,474 km, so the meteor in the image above is almost 1/3 the diameter of the Moon (28% to be more accurate) and that impact crater is over 1/2 the diameter of the Moon (60% to be more accurate).



Solar energy density in context



2 square kilometers for 100 MW nameplate capacity… and they're in the shade in that photo, so not producing anything at the moment.

Capacity factor for solar is [for obvious reasons] hard bound at 50%. For California, our solar CF is 26%; let's give Peter Mayle's Provence slightly better CF at 30%, and those 2 square km of non-dispatchable capacity become about 1/20 of a single Siemens SGT-9000H (fits in 1200 square meters with a lot of space to spare for admin offices and break room, works 24/7).




Nano-review of R Programming Compiler for the iPad



Basics: Available on the iOS app store; uses a remote server to run the code, so must have a net connection. Free for the baseline but seven dollars for plots and to use packages, which I paid. The extended keyboard is very helpful considering the limitations of the iPad keyboard. (Also runs on the iPhone and the iPod touch, though I haven't used it on them yet.)

I wouldn't use it to develop code or even to run serious models, but if there's a need to do a quick simulation or analysis (or even as a matrix calculator), it's better than Numbers. Can also be used offline to browse (and edit) code, though not to run it.

The programmer-joke code snippet in the above screen capture run instantly over a free lobby internet in a hotel conference center, so the service is pretty efficient for these small tasks, which are the things I'd be using this for.



Some retailers plan to eat the losses from tariffs


From Bain and Company on Twitter:


My comment (on twitter): Yeah, these are well-behaved cost and demand functions so when a tariff is added to the cost, typically the quantity drops and the price rises, unless there's some specific strategic reason to incur short-term opportunity costs.

Rationale (from any Econ 101 course, but I felt like drawing my own, just for fun):


Note that Bain's breakpoint at 50% of the tariff is the solution to the problem under linear demand with constant marginal cost, but other shapes of demand can make that number much bigger, for example, this exponential leads to 74% (numbers rounded in the diagram but not in the computation):


The demand function is nothing awkward or surprising, just a nice decreasing exponential:


On the other hand, if the marginal cost decreases with quantity, particularly if marginal cost is strongly convex, there's a chance the actual price increase from a tariff is higher than the tariff, even with linear demand:



Note that this is different from lazy markup pricing. Lazy markup pricing always raises the price by more than the tariff, so in places where such outdated pricing practices [cough Portugal /cough] are common, tariffs have a disproportionate negative impact on the economy and general welfare.



Late non-numerical entry: Another news item based on not understanding the life cycle of technologies

From Bloomberg (among many others) we learn that there's a new solar energy accumulator technology, and as usual the news write it up as if product deployment at scale is right around the corner, whereas what we have here is a lab testing rig… that's a lot of steps before there's a product at scale. And many of those steps are covered with oubliettes.