<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.0">Jekyll</generator><link href="https://brelje.net/feed.xml" rel="self" type="application/atom+xml" /><link href="https://brelje.net/" rel="alternate" type="text/html" /><updated>2021-09-23T12:10:03+00:00</updated><id>https://brelje.net/feed.xml</id><title type="html">Optimized</title><subtitle>Ben Brelje's personal research blog on the topics of electric flight, scientific computing, and multidisciplinary design optimization.</subtitle><entry><title type="html">DevOps for Research and High-Performance Computing</title><link href="https://brelje.net/blog/devops-scientific-computing/" rel="alternate" type="text/html" title="DevOps for Research and High-Performance Computing" /><published>2020-03-18T00:00:00+00:00</published><updated>2020-03-18T00:00:00+00:00</updated><id>https://brelje.net/blog/devops-scientific-computing</id><content type="html" xml:base="https://brelje.net/blog/devops-scientific-computing/">&lt;p&gt;Software produced in research has a bad rap.
“Researchy” codes might have very powerful capabilities, but be plagued by the following issues:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Buggy (untrusted results)&lt;/li&gt;
  &lt;li&gt;Poorly-documented&lt;/li&gt;
  &lt;li&gt;Hard to build or run on your computer&lt;/li&gt;
  &lt;li&gt;Fragile to code changes or environment changes&lt;/li&gt;
  &lt;li&gt;Slow or non-existent updates and patches&lt;/li&gt;
  &lt;li&gt;Insecure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Part of this is because researchers are usually &lt;strong&gt;scientists first and coders second&lt;/strong&gt; (or fifth…).
There is an incentive to make progress quickly, finish the paper, and then move on to the next, novel topic.
The net result is a huge supply of software that consumed thousands of hours but never gets used again.
You think social science has a replication crisis? 
Good luck trying to replicate a paper involving most research codes.&lt;/p&gt;

&lt;p&gt;Another problem is that academic labs have a lot of turnover.
Students are constanly entering the lab without much software development experience, then graduating and leaving a few years later.
This leads to a loss of institutional memory about why parts of the codebase are the way they are.&lt;/p&gt;

&lt;p&gt;You know who else deals with similar issues?
&lt;strong&gt;The entire tech industry.&lt;/strong&gt;
Various software engineering methodologies (agile, spiral, extreme programming, etc.) have been proposed over the years to solve these issues.
It’s an industry for authors and consultants, but there are some valuable practices to be found here as well.
&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;A paradigm that has been particularly influential in the past few years is &lt;a href=&quot;https://aws.amazon.com/devops/what-is-devops/&quot;&gt;&lt;strong&gt;DevOps&lt;/strong&gt;&lt;/a&gt;.
It can be a catch-all term, but I think of it as a set of best-practices which attempt to bridge the chasm between software development and production use of the software.
Most people would associate these practices with DevOps:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Version Control&lt;/strong&gt; - All code is kept under version control&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Continuous Integration&lt;/strong&gt; - Frequently merging code changes to a central repository (e.g. daily)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Automated Testing&lt;/strong&gt; - Testing code changes regularly in order to find bugs early&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Continuous Delivery&lt;/strong&gt; - Automatically preparing production-ready builds of the code once tests pass&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Infrastructure as Code&lt;/strong&gt; - Rigorously defining (and source-controlling) the conditions under which the software will run in production, including external dependencies and OS settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As researchers, “production” looks very different for us than it does for Facebook or Google.
We are not serving billions of users. 
However, when we publish results based on software, we have an obligation to make sure that the code is of high quality.
We also want to minimize the pain and suffering associated with software development, maximizing the ratio of time spent doing science / time spent dealing with IT issues. 
Adopting DevOps practices could help do that, especially in large labs.&lt;/p&gt;

&lt;p&gt;Why can’t we just use tech’s DevOps best practices as-is?
There are two main reasons.
First, &lt;strong&gt;research often depends on high-performance computing&lt;/strong&gt; (HPC). 
Supercomputing clusters are unique resources, and off-the-shelf DevOps tools don’t work for them.
Second, &lt;strong&gt;research codes often use exotic dependencies&lt;/strong&gt; that most of the tech industry isn’t focused on.
For example, massively parallel applications almost invariably rely on MPI libraries to handle communication. 
Existing DevOps tools aren’t generally set up to serve these dependencies out of the box.&lt;/p&gt;

&lt;p&gt;Since most of the literature on source control and CI is applicable to research, I will focus on the aspects that require special accomodations: infrastructure, testing, and deployment.&lt;/p&gt;

&lt;h2 id=&quot;docker-for-defining-environments&quot;&gt;Docker for Defining Environments&lt;/h2&gt;

&lt;p&gt;Managing the &lt;em&gt;environment&lt;/em&gt; into which a code is installed is a major challenge in research computing.
Scientific computing applications often depend on specific versions of other research codes.
For example, many applications rely on the PETSc library to solve systems of equations.
These codes generally do not come with standard OS distributions, nor do they usually have a package manager installation available.
It’s up to the user to build them from scratch, correctly.&lt;/p&gt;

&lt;p&gt;Unfortunately, when this doesn’t happen, the top-level application can fail to compile or run correctly, sometimes in very non-intuitive ways.
This can make it very difficult for end-users who aren’t computing experts themselves.
Furthermore, we don’t always &lt;em&gt;know&lt;/em&gt; that we have version-specific dependencies because we might only be testing against one version of the underlying dependency (if at all).
Fortunately, we now have a better option for controlling infrastructure - &lt;strong&gt;containers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A container is conceptually similar to a virtual machine, though with less isolation and less overhead. 
&lt;a href=&quot;https://www.docker.com/&quot;&gt;&lt;strong&gt;Docker&lt;/strong&gt;&lt;/a&gt; is the de-facto industry standard for containerization.
Developers build a Docker &lt;em&gt;image&lt;/em&gt; as a composition of build steps (such as downloading a package, running an installer, or setting an environment variable).
These build steps are captured in a Dockerfile, which is plain text and can be version controlled just like source code.
Then, the image can be deployed to Docker Hub, and users can download the image to use on their own machines.
The container runs its own operating system and has its own file system.&lt;/p&gt;

&lt;p&gt;We use Docker images for automated testing of our research codes.
Each of our major repos has automated tests that trigger when a user makes a pull request or a change is pushed to master.
These tests run on Travis CI (e.g. &lt;a href=&quot;https://travis-ci.com/github/mdolab/adflow&quot;&gt;here&lt;/a&gt; for our ADflow repo). 
The purpose of these tests is to ensure that changes in a code don’t affect that code’s behavior&lt;/p&gt;

&lt;p&gt;We also have a nightly build process which builds a Docker image from scratch.
It inherits from multiple base images (with different versions of all our external dependencies pre-built), checks out our latest source, compiles the source, and runs automated tests.
The main purpose of this nightly test is to make sure that changes in one code don’t break any of the &lt;em&gt;other codes&lt;/em&gt; since some of them depend on each other.&lt;/p&gt;

&lt;p&gt;If the tests pass, an image with our software pre-installed is pushed to Docker hub. 
Users can check out that image and have ready access to all of our open source codes in pre-built form, greatly reducing the learning curve and potential for frustration.&lt;/p&gt;

&lt;p&gt;Here’s an example of the utility of this approach.
A few weeks ago, a research scientist in our lab gave a CFD tutorial.
The course was only a few hours long, but it started with pulling an image with the pre-built software and environment from Docker hub.
Users on all flavors of Linux, Mac, and even Windows could then start from a known, working environment with everything set up correctly.
It enabled the tutorial to be hands-on instead of a lecture.&lt;/p&gt;

&lt;p&gt;It was quite a bit of work (on the order of days) to get the Docker build process set up correctly, but that’s only because our build process wasn’t as formalized or well-understood as we would like to think.&lt;/p&gt;

&lt;h2 id=&quot;singularity-for-executing-workflows-on-hpc&quot;&gt;Singularity for Executing Workflows on HPC&lt;/h2&gt;

&lt;p&gt;Docker by itself is fine for executing code on a workstation or laptop. 
However, we often need to use HPC clusters for running more demanding tasks, and this demands additional tools.
HPC resources are shared and users almost invariably do not have root acces; therefore, Docker is not available on these systems.
The high-speed interconnects on these systems also use specific versions of (sometimes) proprietary drivers, and the container image needs to have matching drivers in order for parallel processes to talk to each other correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://sylabs.io/guides/3.3/user-guide/index.html#&quot;&gt;&lt;strong&gt;Singularity&lt;/strong&gt;&lt;/a&gt; addresses the permissions issue.
Singularity is a container engine designed specifically for use on HPC systems.
Developers can create images in Singularity’s native definition format, similar to a Dockerfile.
Alternatively, Singularity can pull Docker images and run them without root permission!
The Texas Advanced Computing Center (TACC) has an &lt;a href=&quot;https://containers-at-tacc.readthedocs.io/en/latest/singularity/01.singularity_basics.html&quot;&gt;excellent tutorial&lt;/a&gt; on the basics of using Singularity.&lt;/p&gt;

&lt;p&gt;Singularity supports MPI.
On the host, the user invokes “mpirun singularity ……”
Singularity passes the MPI communicator information on to each container, which runs as a separate process.
Inside the container, your application relies on the same MPI libraries that it would use outside the container.&lt;/p&gt;

&lt;p&gt;Processor and communication performance are both critical to massively parallel applications, and in order to use containers on HPC, we need to ensure that no compromise is made here.
Several papers and presentations (e.g. &lt;a href=&quot;https://insidehpc.com/2019/06/benchmarking-mpi-applications-in-singularity-containers-on-traditional-hpc-and-cloud-infrastructures/&quot;&gt;this&lt;/a&gt; one from ETH Zurich and &lt;a href=&quot;https://sc19.supercomputing.org/proceedings/tech_poster/poster_files/rpost227s2-file3.pdf&quot;&gt;this&lt;/a&gt; one from Los Alamos) have claimed that the overhead associated with a properly-configured Singularity container is basically nonexistent, but I wanted to verify this claim myself.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1TvPRFqoEadfxvq-ujDjwf1oQdMAzQa7r&quot; alt=&quot;&quot; class=&quot;img-responsive&quot; style=&quot;width: 100%&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;NASA CRM mesh for benchmark case - 3.1M cells&lt;/p&gt;

&lt;p&gt;I set up two tests to compare a container against “bare metal” (no container). 
The first was Intel’s MPI benchmark suite, IMB-MPI1, which is distributed with Intel MPI 2018 and later.
This tests the communication bandwidth.
The second test was a CFD analysis using my lab’s &lt;a href=&quot;https://github.com/mdolab/adflow&quot;&gt;ADflow&lt;/a&gt; solver.
The test case is the NASA Common Research Model (CRM) wing, which is an open model similar to the Boeing 777.
The mesh has 3.1M cells. 
I ensured that the same compilers, compiler flags, and dependency libraries were used in both cases to make sure the test is ‘apples to apples’.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1nOb0GmuWfLVlQvKLDr5V1-o2laVxJsgL&quot; alt=&quot;&quot; class=&quot;img-responsive&quot; style=&quot;width: 100%&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;Intel IMB-MPI1 benchmark suite on 96 Skylake cores (Stampede2 cluster)&lt;/p&gt;

&lt;p&gt;Using 96 Intel Skylake cores on two physical machines, the MPI benchmarks showed &lt;strong&gt;no communication overhead&lt;/strong&gt; when run in a container compared to bare metal!
Averaged CFD benchmark timings were equal to within 0.4% run time (inside the noise of the test). 
For all intents and purposes, this confirms what other researchers are seeing - there is basically no performance penalty associated with using containers on HPC.&lt;/p&gt;

&lt;p&gt;There is a &lt;em&gt;big catch&lt;/em&gt; - the container’s MPI needs to be configured to match the MPI on the host system.
In particular, the Infiniband or Omnipath drivers inside the container need to match the host.
Otherwise, the MPI processes won’t be able to communicate with each other over the high speed interconnects.
This definitely limits portability of the containers.&lt;/p&gt;

&lt;p&gt;Some HPC administrators (including TACC) provide base images with pre-installed MPI.
The developer can then inherit the base image and build everything else on top.
However, this is not a universal practice yet.&lt;/p&gt;

&lt;p&gt;I found that there was no pre-configured image that would run on &lt;em&gt;both&lt;/em&gt; a desktop &lt;em&gt;and&lt;/em&gt; the OmniPath HPC system at TACC, so I created my own base image using Intel MPI.
I think Intel MPI is probably the way to go for portability.
Using libfabric, Intel MPI allows the user to change which interconnect driver is being used at run time.
For example, it uses a shared memory driver when I run the container on my desktop, but on TACC’s Stampede2 cluster, it uses the PSM2 driver to communicate over OmniPath.&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/bbrelje/4b17c29e9bd1c0afb6f1979ee0c9d113.js&quot;&gt;&lt;/script&gt;

&lt;p&gt;In practical terms, this means that &lt;strong&gt;your base Docker image should inherit from an image with pre-installed MPI&lt;/strong&gt;.
That way, your workflow can build on top of all the cluster-specific stuff.
Users who need to run on HPC can select the right base image and build the rest on top.
Docker build processes should also be able to take extra compiler flags as input, since many clusters support extra vectorization instruction sets that desktop processors do not (e.g. the AVX-512 instruction set on Skylake and Knight’s Landing processors at TACC).&lt;/p&gt;

&lt;p&gt;The Glotzer Lab at the University of Michigan is probably the gold standard for this approach right now.
Their Docker build process is &lt;a href=&quot;https://github.com/glotzerlab/software&quot;&gt;available on Github&lt;/a&gt;.
It uses a Python script and Jinja templates to automatically generate a unique docker file for each cluster.
While the base image and MPI drivers are unique to each cluster, the rest of the build process is common.
We have adopted a similar convention for our lab.&lt;/p&gt;</content><author><name>Ben Brelje</name></author><category term="optimization" /><category term="computing" /><category term="HPC" /><category term="docker" /><category term="computing" /><category term="testing" /><category term="deployment" /><category term="CI/CD" /><summary type="html">Software produced in research has a bad rap. “Researchy” codes might have very powerful capabilities, but be plagued by the following issues: Buggy (untrusted results) Poorly-documented Hard to build or run on your computer Fragile to code changes or environment changes Slow or non-existent updates and patches Insecure Part of this is because researchers are usually scientists first and coders second (or fifth…). There is an incentive to make progress quickly, finish the paper, and then move on to the next, novel topic. The net result is a huge supply of software that consumed thousands of hours but never gets used again. You think social science has a replication crisis? Good luck trying to replicate a paper involving most research codes. Another problem is that academic labs have a lot of turnover. Students are constanly entering the lab without much software development experience, then graduating and leaving a few years later. This leads to a loss of institutional memory about why parts of the codebase are the way they are. You know who else deals with similar issues? The entire tech industry. Various software engineering methodologies (agile, spiral, extreme programming, etc.) have been proposed over the years to solve these issues. It’s an industry for authors and consultants, but there are some valuable practices to be found here as well.</summary></entry><entry><title type="html">Breaking bad habits and forming good ones: a review of Atomic Habits</title><link href="https://brelje.net/blog/breaking-bad-habits-forming-good-ones-review-atomic-habits/" rel="alternate" type="text/html" title="Breaking bad habits and forming good ones: a review of Atomic Habits" /><published>2020-01-28T00:00:00+00:00</published><updated>2020-01-28T00:00:00+00:00</updated><id>https://brelje.net/blog/breaking-bad-habits-atomic</id><content type="html" xml:base="https://brelje.net/blog/breaking-bad-habits-forming-good-ones-review-atomic-habits/">&lt;p&gt;I am keenly aware of several of my notable bad habits and I really want to break them. To name a few:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Playing on my phone instead of getting out of bed in the morning&lt;/li&gt;
  &lt;li&gt;Letting emails fester in my inbox for weeks until it’s too awkward to respond&lt;/li&gt;
  &lt;li&gt;Getting distracted on social media (in particular, Twitter) during the day when I should be working on my dissertation research&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My PhD advisor mentioned the book &lt;em&gt;Atomic Habits&lt;/em&gt; by &lt;a href=&quot;https://jamesclear.com/&quot;&gt;James Clear&lt;/a&gt; on a number of occasions lately so I figured I would give it a try.&lt;/p&gt;

&lt;p&gt;Overall, &lt;em&gt;Atomic Habits&lt;/em&gt; is a worthwhile read and I think some of the tools will marginally improve my life. Hopefully, over time, that marginal improvement will compound into something significant.&lt;/p&gt;

&lt;p&gt;In this article, I’ll attempt to summarize the actionable parts of the book. I will start by giving an overview of the major arguments of the book, then close by describing some of the more tangible tools and techniques that the author recommends.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h2 id=&quot;general-insights&quot;&gt;General Insights&lt;/h2&gt;

&lt;h3 id=&quot;compound-interest-wins&quot;&gt;Compound interest wins&lt;/h3&gt;

&lt;p&gt;The core motivation of the book is cumulative advantage. Imagine doing one extra task per day (say, an extra 1%). Not only did you accomplish 1% more work, but you had 1% more learning which makes you more efficient the next day, so your 101% turns into, say, 101.5%. Over a period of years, getting one percent better every day results in massive gains.&lt;/p&gt;

&lt;p&gt;Good habits are so important because they give us those 1% productivity gains on a daily basis, making them extra powerful in terms of compound interest.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Productivity compounds&lt;/li&gt;
  &lt;li&gt;Knowledge compounds&lt;/li&gt;
  &lt;li&gt;Relationships compound&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;He argues that consistent, deliberate practice is more important than seeking breakthrough gains. In fact, you have more opportunities to find a breakthrough gain by consistently and deliberately practicing.&lt;/p&gt;

&lt;h3 id=&quot;keep-your-identity-small&quot;&gt;Keep your identity “small”&lt;/h3&gt;

&lt;p&gt;Clear argues that good habits begin with understanding ones’ core values. He suggests that too many of us construct identities that are very specific (e.g. “I am a multidisciplinary design optimization researcher”) which makes it hard for us to adapt to changing circumstances. We are happiest when we are living in congruence with our identity, so by keeping our identity “small” and focused on core values (e.g. “I am the kind of person that enjoys learning”) we maximize our chances of remaining happy over the long term.&lt;/p&gt;

&lt;h3 id=&quot;focus-on-systems-not-goals&quot;&gt;Focus on systems, not goals&lt;/h3&gt;

&lt;p&gt;Everybody wants to be a winner, but most of us end up losing. Clear argues that the difference is a combination of luck and having a “system”. A person’s system consists of their beliefs, their environment, their habits (basically, anything within one’s control).&lt;/p&gt;

&lt;p&gt;Nobody wins with a bad system. We can’t control luck, so the best we can do is optimize our system. This is why it is important to systematically cultivate habits that are designed to maximize my chances of reaching my goals. Being goal-oriented can also hamper happiness by narrowly defining what success looks like.&lt;/p&gt;

&lt;h3 id=&quot;a-habit-is-a-four-step-cycle&quot;&gt;A habit is a four-step cycle&lt;/h3&gt;

&lt;p&gt;Clear suggests that the &lt;strong&gt;habit loop&lt;/strong&gt; is a four-step process consisting of:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Cue&lt;/li&gt;
  &lt;li&gt;Craving&lt;/li&gt;
  &lt;li&gt;Response&lt;/li&gt;
  &lt;li&gt;Reward&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;cue&lt;/strong&gt; is a time, place, emotional state, person, or activity which precedes a habit. For example, if my habit is drinking coffee, the cue is waking up in the morning and feeling tired.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;craving&lt;/strong&gt; is prompted by the cue. It’s what we are seeking from the habit. When I crave drinking coffee, I want to feel alert. The &lt;strong&gt;response&lt;/strong&gt; is our action prompted by the craving - e.g., drinking coffee.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;reward&lt;/strong&gt; is the outcome of the action that reinforces the habit. I suppose that the reward of drinking coffee is a relatively complex neurological process, but I think it tastes good and it definitely makes me feel alert.&lt;/p&gt;

&lt;p&gt;The main thesis of the book is that we can target each step in the habit loop with interventions designed to break bad habits or form good ones. I’ll address the specific interventions later on.&lt;/p&gt;

&lt;h3 id=&quot;efficiency-is-not-the-same-as-effectiveness&quot;&gt;Efficiency is not the same as effectiveness&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Atomic Habits&lt;/em&gt; stresses that productivity for productivity’s sake is not necessarily good. We don’t want to just be efficient, we want to be &lt;strong&gt;effective&lt;/strong&gt; (doing the “right” priorities, efficiently).&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The most dangerous items on your to-do list are the ones that look like opportunities, but are actually distractions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On the other hand, it is also possible to be too focused on prioritizing that we don’t actually do anything. Clear uses an anecdote from a photography class. The instructor told half the class that he would assign their grade for the semester based only on one submitted photo. These students needed to produce one “perfect” photo. The other half would be graded on the quantity of “good” photos they could produce.&lt;/p&gt;

&lt;p&gt;The teacher found that the best photos of the “quantity” group were actually better than the “quality” group’s best effort. Instead of overthinking how to create a perfect photo, they were practicing different ideas and accumulating opportunities to capture a great one.&lt;/p&gt;

&lt;p&gt;This insight really resonates with me. I have a tendency to be avoid duplicating others’ efforts at all costs. This can be a good thing, but I probably spend too much time trying to coordinate and literature search and too little time actually doing research, blind to the possibility that someone else might be working on a similar idea.&lt;/p&gt;

&lt;h3 id=&quot;discounting-and-delayed-gratification&quot;&gt;Discounting and delayed gratification&lt;/h3&gt;

&lt;p&gt;Our brains tend to value the present more than the future. Clear suggests that the most addictive bad habits are the ones that provide immediate reward but delayed punishment (e.g. procrastination, Netflix auto-play).&lt;/p&gt;

&lt;h2 id=&quot;strategies-and-tools&quot;&gt;Strategies and Tools&lt;/h2&gt;

&lt;h3 id=&quot;reframe-your-identity&quot;&gt;Reframe your identity&lt;/h3&gt;

&lt;p&gt;Clear suggests starting from core values and identity when attempting to improve habits. Instead of saying “I should exercise more”, say “I am an athlete”.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Decide the type of person you want to be, then prove it to yourself with small wins&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The example Clear uses (from his personal experience) is writing. He decided that he wanted to be a writer, so he started a habit of writing an article twice a week on his personal website. Eventually, he wrote prolifically and developed a major following. Along the way, he &lt;em&gt;became&lt;/em&gt; a writer.&lt;/p&gt;

&lt;p&gt;An example for someone who wants to be a “researcher” might be publishing a technical blog post, then a conference paper, then a journal paper, then a dissertation. A dissertation seems like a huge undertaking so it is important to find ways to create small wins along the way.&lt;/p&gt;

&lt;h3 id=&quot;forming-a-good-habit&quot;&gt;Forming a good habit&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;“Make It Obvious”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Be extremely specific when intending a new habit. You can use the form &lt;strong&gt;“I will (behavior) at (time) in (location)”&lt;/strong&gt;. Instead of saying “I shouldn’t play on my phone in the morning” say “When I wake up in the morning, I will get out of bed right away”&lt;/p&gt;

&lt;p&gt;Use &lt;strong&gt;habit stacking&lt;/strong&gt; which means starting a new habit after an existing one. For example, “After I walk in the door, I will put my shoes away immediately”. This provides a regular cue.&lt;/p&gt;

&lt;p&gt;Change your environment so that your cues are obvious and regular. For example, I have a sticky note on my monitor that says “Wouldn’t you rather be outside?” as a reminder not to waste time while I’m on the computer at home.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Make It Attractive”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Temptation bundling&lt;/strong&gt; means placing a habit you like or want after a habit you need to create. For example, “after I work out, I will surf Twitter for 10 minutes.” Clear claims that this can harness the “dopamine hit” that comes with a desireable reward to motivate a difficult habit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Make It Easy”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I think this is the most important part of the book. &lt;strong&gt;Developing a good habit requires making the habit as easy and low friction as possible.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Simplify the habit to the minimum number of steps&lt;/li&gt;
  &lt;li&gt;Set up (or &lt;strong&gt;prime&lt;/strong&gt;) your environment in advance (e.g. go to bed in your gym clothes if you want to work out in the morning)&lt;/li&gt;
  &lt;li&gt;Start a new habit in a minimal way so that it takes no longer than two minutes (the &lt;strong&gt;two-minute rule&lt;/strong&gt;). If you want to read more, start by reading one page before bed but doing it regularly.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;Standardize before you optimize. You cant optimize a habit that doesn’t exist&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;“Make It Satisfying”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Find ways to create immediate reward instead or in addition to delayed gratification.&lt;/p&gt;

&lt;p&gt;A &lt;a href=&quot;https://jamesclear.com/habit-tracker&quot;&gt;&lt;strong&gt;habit tracker&lt;/strong&gt;&lt;/a&gt; is a way to create immediate satisfaction while starting a new habit. You can create a calendar tracking a daily habit. Another example from the book was a salesman who started the day with a jar containing 120 paper clips. After each sales call, he would move a clip from one jar to another until the next jar was full. It creates visible progress in the present time.&lt;/p&gt;

&lt;p&gt;Clear also states that creating habit “streaks” is inherently satisfying. Even if your effort on a given day is poor, at least do &lt;em&gt;something&lt;/em&gt;. He suggests trying hard not to miss a day, and avoid missing two at all costs.&lt;/p&gt;

&lt;h3 id=&quot;breaking-a-bad-habit&quot;&gt;Breaking a bad habit&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;Make the cue invisible. Avoid tempting situations, change your environment if needed.&lt;/li&gt;
  &lt;li&gt;Make the craving unattractive. Say the benefits of breaking the habit out loud.&lt;/li&gt;
  &lt;li&gt;Make the habit difficult by increasing “friction”&lt;/li&gt;
  &lt;li&gt;Use a “commitment device” or an accountability partner&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I want to highlight the last two because I think they are the most useful.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Increasing friction&lt;/strong&gt; - Humans are fundamentally lazy and we will avoid using energy when we can. It is important to increase the barrier to repeating a bad habit. For example, if I play on my phone when I get up, I should locate my phone away from my bed so I have to get out of bed in order to turn my alarm off.&lt;/p&gt;

&lt;p&gt;A great tip I found (outside the book) to help reduce phone distraction: I moved Twitter, Facebook, and YouTube into a “MindlessGarbage” folder on the third page of iOS. This reminds me of the opportunity cost and adds friction to mindless browsing.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;commitment device&lt;/strong&gt; is a technology or procedure which restricts our future choices. Some examples from the book:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Anyone can voluntarily add themselves to a “do not admit” list at a casino to prevent themselves from gambling.&lt;/li&gt;
  &lt;li&gt;Using an outlet timer to turn off WiFi when it’s time to go to bed.&lt;/li&gt;
  &lt;li&gt;Have another person change your social media passwords during the work week and reset them at the weekend&lt;/li&gt;
  &lt;li&gt;An entrepreneur wanted to start waking up earlier. He created a twitter bot which automatically tweeted: “It’s 6:10 and I’m not up because I’m lazy! Reply to this for $5 via PayPal (limit 5)”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Having another person to answer to can also be a powerful technique in breaking a bad habit. He calls this an &lt;strong&gt;accountability partner&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 id=&quot;automate-good-habits-when-you-can&quot;&gt;Automate good habits when you can&lt;/h3&gt;
&lt;p&gt;The best way to build a good habit is to eliminate the need for any thought. There are certain one-time decisions which pay off indefinitely. Some examples:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Put your bills on autopay&lt;/li&gt;
  &lt;li&gt;Buy a better bed for better sleep&lt;/li&gt;
  &lt;li&gt;Unsubscribe from email&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;james-clear-on-procrastination&quot;&gt;James Clear on Procrastination&lt;/h3&gt;
&lt;p&gt;It’s not a focus of the book per se, but James Clear’s website has a comprehensive section on &lt;a href=&quot;https://jamesclear.com/procrastination&quot;&gt;procrastination&lt;/a&gt;. A PhD is especially prone to procrastination because the reward of defending a dissertation is very far away and other temptations have much shorter reward horizons.&lt;/p&gt;

&lt;h3 id=&quot;other-tools&quot;&gt;Other Tools&lt;/h3&gt;

&lt;p&gt;James Clear is a big journaling proponent. He suggests writing a one-line  daily journal which balances the time invested and the benefits of reflecting on each day.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://jamesclear.com/eisenhower-box&quot;&gt;&lt;strong&gt;Eisenhower Box&lt;/strong&gt;&lt;/a&gt; helps prioritize important and urgent activities, improving effectiveness. I plan to create an Eisenhower Box each day in my journal going forward.&lt;/p&gt;

&lt;p&gt;Clear also advocates looking retrospectively for feedback on your system’s effectiveness. Whenever you make a big decision, he advocates writing down the reason and expected outcome in a &lt;strong&gt;decision journal&lt;/strong&gt;. In a month or longer, you can revisit the decision and examine whether the outcome was what you expected.&lt;/p&gt;

&lt;p&gt;On a longer timescale, his &lt;a href=&quot;https://jamesclear.com/annual-review&quot;&gt;&lt;strong&gt;Annual Review&lt;/strong&gt;&lt;/a&gt; asks:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;What went well this year?&lt;/li&gt;
  &lt;li&gt;What didn’t go so well?&lt;/li&gt;
  &lt;li&gt;What am I working toward?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;He also suggests doing an &lt;a href=&quot;https://jamesclear.com/integrity&quot;&gt;&lt;strong&gt;Integrity Report&lt;/strong&gt;&lt;/a&gt; each year focusing on how well your year mapped to your core values.&lt;/p&gt;

&lt;p&gt;I plan to start doing these. I really admire that James Clear posts these publicly on his website, which is a sort of accountability partner and commitment device.&lt;/p&gt;

&lt;h2 id=&quot;case-study-1-exercising&quot;&gt;Case Study 1: Exercising&lt;/h2&gt;

&lt;p&gt;I think one habit I do well is staying fit. I am a trail runner, cyclist, and cross-country skier. I think part of the reason is that I have a good system.&lt;/p&gt;

&lt;p&gt;I have chosen to live within the perfect distance of my lab. It takes about 10 minutes by bike but is too far to walk. However, with traffic and parking, it is actually faster to bike than any other method. This is a very time-efficient setup, as I have a short commute that doubles as a workout!&lt;/p&gt;

&lt;p&gt;As a &lt;em&gt;commitment device&lt;/em&gt; I do not own a parking sticker, so even if I want to drive, I can’t. I also invested in a relatively good bike, warm and dry cycling clothing, and waterproof saddle bags, which makes my ride satisfying and comfortable in all kinds of weather. This minimizes the friction and maximizes the reward of bike commuting. This is much more compelling than the long-term benefit of saving money on fuel and maintenance on my car.&lt;/p&gt;

&lt;p&gt;Apart from bike commuting, it can be difficult to get enough cardio in the winter. Jogging to the gym in the cold sucks. Therefore, to minimize friction, I own a stationary bike trainer which lets me get an 800+ calorie/hr workout in front of my computer while I read papers or watch a movie.&lt;/p&gt;

&lt;p&gt;I used to struggle with motivation to strength train and my upper body used to be weak. Then, I joined the cross-country ski team here at Michigan, which has group strength training workouts. I had motivation to get into the gym in order to get better at skiing, something I enjoyed.&lt;/p&gt;

&lt;p&gt;I also enjoyed spending time with my teammates at the gym, and was accountable to them for showing up. This year, I even volunteered to lead the workouts, meaning I &lt;em&gt;cannot&lt;/em&gt; skip them even if I don’t feel like going. I am now much stronger than I was two years ago.&lt;/p&gt;

&lt;p&gt;Once I developed the habits of exercising, I started optimizing the workouts (e.g. with heart-rate data) and being more deliberate about the exercise science.&lt;/p&gt;

&lt;h2 id=&quot;case-study-2-too-much-twitter&quot;&gt;Case Study 2: Too much Twitter&lt;/h2&gt;

&lt;p&gt;I definitely need to reduce my use of Twitter, as it is addictive and detracts from getting actual work done during the day.
I have tried website blockers but they don’t work on Linux and are too easy to defeat using the Task Manager in Windows.&lt;/p&gt;

&lt;p&gt;Using the Habit Loop model to analyze this habit:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Cue&lt;/strong&gt; - I tend to surf Twitter whenever I take a lunch break at my desk but I have trouble stopping after I’m done eating. I also surf on my phone when there is downtime.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Craving&lt;/strong&gt; - Why do I surf Twitter? Starting with identity, I am a person who enjoys learning new things. I follow smart people on Twitter so my feed is a constant stream of new and interesting facts.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Response&lt;/strong&gt; - It is basically frictionless to get on my phone or browser and scroll down for as much time as exists during the day.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Reward&lt;/strong&gt; - I get immediate satisfaction in the form of new facts (when reading) and likes / retweets (when posting)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are the strategies I plan to use to break this habit.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Replace bad habit with good&lt;/strong&gt; - To fulfill the craving of learning new info, I will read more papers and books.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Eliminate cue&lt;/strong&gt; - I will not surf during lunch and will instead read a paper or book until I’m finished eating, or eat with other people.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;“Two-minute” rule&lt;/strong&gt; - I will start small and block out 15 minutes of the work day where I will not use social media. I will add 15 minutes per work day until I do not use it at all during working hours.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Habit tracking&lt;/strong&gt; - I will use a progress bar in my journal and physically black out each new 15-minute interval until the day is blacked out. I will track compliance using a daily checkbox in my journal.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Accountability partner 1&lt;/strong&gt; - I will show my habit tracker at the weekly lab meeting whether or not I have kept the streak.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Accountability partner 2&lt;/strong&gt; - I will update this post to reflect my success or failure in breaking this habit.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Increased friction 1&lt;/strong&gt; - I moved my nightstand four feet further from my bed so I cannot reach my phone in the morning, unless I physically get up.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Increased friction 2&lt;/strong&gt; - I moved the Twitter app to the last page of iOS and put it in a folder marked “Mindless Garbage”.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I think using these steps will probably lead to the results I want.&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;While I am generally skeptical of self-help productivity books, I actually thought &lt;em&gt;Atomic Habits&lt;/em&gt; was a reasonably actionable and useful book. I’d recommend it - it’s available for a discounted price if you visit James Clear’s website and download the first chapter for free.&lt;/p&gt;

&lt;h4 id=&quot;sidenote&quot;&gt;Sidenote&lt;/h4&gt;
&lt;p&gt;I want to write more on this site, but I tend to overthink things and it takes me way too much time to produce something. This article took me 1:58 to create, start to finish, much less than my previous article. If I can get even faster, then I will want to write more often and the experience will compound!&lt;/p&gt;</content><author><name>Ben Brelje</name></author><category term="optimization" /><category term="productivity" /><category term="productivity" /><category term="life" /><category term="optimization" /><category term="academia" /><summary type="html">I am keenly aware of several of my notable bad habits and I really want to break them. To name a few: Playing on my phone instead of getting out of bed in the morning Letting emails fester in my inbox for weeks until it’s too awkward to respond Getting distracted on social media (in particular, Twitter) during the day when I should be working on my dissertation research My PhD advisor mentioned the book Atomic Habits by James Clear on a number of occasions lately so I figured I would give it a try. Overall, Atomic Habits is a worthwhile read and I think some of the tools will marginally improve my life. Hopefully, over time, that marginal improvement will compound into something significant. In this article, I’ll attempt to summarize the actionable parts of the book. I will start by giving an overview of the major arguments of the book, then close by describing some of the more tangible tools and techniques that the author recommends.</summary></entry><entry><title type="html">New Year’s Resolution: Play to Win</title><link href="https://brelje.net/blog/new-years-resolution-high-variance-strategies" rel="alternate" type="text/html" title="New Year’s Resolution: Play to Win" /><published>2020-01-02T00:00:00+00:00</published><updated>2020-01-02T00:00:00+00:00</updated><id>https://brelje.net/blog/new-years-high-variance-strategies</id><content type="html" xml:base="https://brelje.net/blog/new-years-resolution-high-variance-strategies">&lt;p&gt;As an optimization engineer and researcher, I am always thinking about how to optimize my life.
Lately, I have been thinking particularly about the value of &lt;strong&gt;&lt;em&gt;high-variance strategies&lt;/em&gt;&lt;/strong&gt;.
I am a pretty risk-averse person, generally preferring a known, acceptable option to the prospect of an unknown but potentially great (or terrible) option.
One of my resolutions for 2020 is to be more thoughtful about situations that warrant taking bigger risks, and to be mindful about my biases which push me towards low-variance strategies even when they aren’t the best choice.&lt;/p&gt;

&lt;!--more--&gt;
&lt;h3 id=&quot;playing-to-win&quot;&gt;Playing to Win&lt;/h3&gt;
&lt;p&gt;Over the Christmas break, I probably played 20 hours of various card and table games.
&lt;strong&gt;Pinochle&lt;/strong&gt; (a trick-taking card game) is my family’s favorite, probably because it involves just the right mix of skill and luck.
You will win consistently if you are good, but there’s enough randomness that a truly beautiful hand can happen to anyone.
Another game I would throw into this category is Settlers of Catan.&lt;/p&gt;

&lt;p&gt;I found that I was consistently placing around second place in Pinochle, but rarely winning, and I wondered why?
I think the answer was that I was playing it safe, pursuing a &lt;strong&gt;low-variance strategy&lt;/strong&gt;.
At the beginning of each hand, each player has the opportunity to “bid” for the privilege of naming trump.
Calling trump generally means you have a better chance of scoring a lot of points in the hand.&lt;/p&gt;

&lt;p&gt;However, if you bid aggressively and don’t take enough tricks, you take a huge penalty which basically knocks you out of the running for the game (each game is four hands).
The game also involves social pressure.
If you overbid and lose, your partner also loses.&lt;/p&gt;

&lt;p&gt;Since it is embarrassing to overbid and lose, I generally bid more safely than my opponents.
However, this means I miss out on a lot of upside potential, and rarely win huge hands.
I rarely get blown out, but I rarely win.&lt;/p&gt;

&lt;h3 id=&quot;a-bit-of-theory&quot;&gt;A Bit of Theory&lt;/h3&gt;
&lt;p&gt;Winning strategies depend on the reward system.
Some games reward everyone who crosses a certain objective threshold (e.g. blackjack)
Other games only reward players based on their performance compared to other players (e.g. poker).
Generally, games that reward a single winner favor high-variance strategies, while games that reward in proportion to the outcome favor a low-variance approach.&lt;/p&gt;

&lt;p&gt;Let’s use probability to explore winning strategies for different kinds of games.
Throughout the following derivations, we will assume that mean and variance are totally decoupled (i.e., there is no built-in risk premium).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;n.b. - I am not a mathematician, statistician, or game theorist, so please feel free to correct me&lt;/em&gt;&lt;/p&gt;

&lt;h3 id=&quot;utility-functions-and-loss-aversion&quot;&gt;Utility Functions and Loss Aversion&lt;/h3&gt;
&lt;p&gt;First, we have to understand the rules of the game and how rewards are allocated to performance.
We can do this by creating a &lt;strong&gt;utility function&lt;/strong&gt; \(u(x)\) which captures the &lt;strong&gt;value&lt;/strong&gt; of each possible outcome to the player.&lt;/p&gt;

&lt;p&gt;In a &lt;strong&gt;winner-take-all&lt;/strong&gt; situation, \(u(X_0)=0\) unless \(X_0 \geq \text{max}(X_1,..X_N)\) where \(X_0\) is your outcome and \((X_1,..X_N)\) are the other player’s outcomes.
Therefore, for a rational actor, utility is maximized when the probability of winning first place, \(X_0 \geq \text{max}(X_1,..X_N)\), is maximized.&lt;/p&gt;

&lt;p&gt;Different situations might reward the top \(N\) results, or reward the best combined score across a series of events (e.g. the FIS World Cup race series).
In these situations, \(u(X_0)\) can be a complicated function.
Generally, a rational actor should maximize &lt;strong&gt;expected utility&lt;/strong&gt;, that is:&lt;/p&gt;

\[\text{maximize}(\sum_{i=1}^n P_i u_i)\]

&lt;p&gt;where \(i\) is one of \(N\) possible outcomes, \(P_i\) is the probability of the \(i\)th possible outcome, and \(u_i\) is the utility of the \(i\)th possible outcome.&lt;/p&gt;

&lt;p&gt;However, human psychology can sometimes get in the way.
Phenomena such as loss aversion can generate negative utility for especially poor outcomes.
Malcolm Gladwell explored this on an &lt;a href=&quot;http://revisionisthistory.com/episodes/27-malcolm-gladwell-s-12-rules-for-life&quot;&gt;episode&lt;/a&gt; of the Revisionist History podcast where he highlighted the &lt;a href=&quot;https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3132563&quot;&gt;whitepaper&lt;/a&gt; by Cliff Asness and Aaron Brown called &lt;em&gt;Pulling the Goalie&lt;/em&gt;.
Coaches hate getting blown out in losses, so they take fewer risks than they probably should if they were trying to maximize the probability of winning the game.
Or maybe the coach’s utility function, not getting fired, is maximized by avoiding blowout losses.
In any case, somewhere, there is a psychological hangup getting the way of the outcome fans and owners say they want.&lt;/p&gt;

&lt;h3 id=&quot;strategies-against-a-fixed-standard&quot;&gt;Strategies Against a Fixed Standard&lt;/h3&gt;
&lt;p&gt;Consider a scenario where you receive a fixed reward for meeting or exceeding a standard.
An example might be an exam with a fixed passing score.
The utility function will be \(u(X)=K\) for \(X \geq t\), where \(t\) is some threshold value, and zero otherwise.
Therefore, maximizing utility is equivalent to maximizing \(P(X&amp;gt;t)\).&lt;/p&gt;

&lt;p&gt;For an agent with mean performance \(\mu\) and variance \(\sigma^2\),&lt;/p&gt;

\[P(X&amp;gt;t)=1-\Phi(\frac{t-\mu}{\sigma})\]

&lt;p&gt;where \(\Phi\) is the cumulative distribution function of a standardized distribution (such as the normal distribution) [&lt;a href=&quot;https://www.drmaciver.com/2014/11/another-take-on-high-variance-strategies/&quot;&gt;1&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;What should a person do to maximize their chance of getting rewarded in this scenario?
Let’s compute the gradient of \(P\) and locally maximize.
Since \(\Phi\) is monotonically increasing, maximizing \(P\) is equivalent to maximizing \(g=\frac{\mu-t}{\sigma}\).&lt;/p&gt;

\[\frac{\partial P}{\partial \mu} \propto \frac{1}{\sigma}\]

&lt;p&gt;Since \(\sigma\) is always positive, this expression is also always positive.
In other words, improving mean performance is always good.
What about the effect of variance?&lt;/p&gt;

\[\frac{\partial P}{\partial \sigma} \propto \frac{t-\mu}{\sigma^2}\]

&lt;p&gt;This expression is positive only when \(t &amp;gt; \mu\).
Put another way, &lt;strong&gt;variability is bad when your average performance is already good enough to meet the standard&lt;/strong&gt;.
But variability helps the underdog.&lt;/p&gt;

&lt;p&gt;If you could choose to only increase mean or variance, which should you pick?
This is equivalent to asking under what conditions the following holds:&lt;/p&gt;

\[\frac{\partial P}{\partial \sigma} &amp;gt; \frac{\partial P}{\partial \mu}\]

&lt;p&gt;Working through the algebra, increasing variability is better when \(t &amp;gt; \mu + \sigma\).
In other words, against a fixed standard, &lt;strong&gt;if you are an underdog by more than a standard deviation, a high-variance strategy is utility-maximizing&lt;/strong&gt;.&lt;/p&gt;

&lt;h3 id=&quot;strategies-against-a-single-opponent&quot;&gt;Strategies against a Single Opponent&lt;/h3&gt;
&lt;p&gt;Consider a game where two players compete head-to-head.
Rewards are only given to the player with the higher score.
An example might be a college football game.&lt;/p&gt;

&lt;p&gt;Let your performance be a random variable \(X\) and your opponent’s be a random variable \(Y\).
Let’s assume that \(X\) and \(Y\) are independent, normally-distributed random variables with mean \(\mu_x\), \(\mu_y\), and standard deviation \(\sigma_x\), \(\sigma_y\).&lt;/p&gt;

&lt;p&gt;Your utility function is \(u(X)=K\) for \(X&amp;gt;Y\) and zero otherwise, so maximizing expected utility is equivalent to maximizing \(P(X&amp;gt;Y)\).
We can easily subtract \(Y\) from \(X\) and obtain:&lt;/p&gt;

\[P(X-Y&amp;gt;0) = 1 - \Phi\Big(\frac{\mu_y-\mu_x}{\sqrt{\sigma_x^2+\sigma_y^2}}\Big)\]

&lt;p&gt;where \(\Phi\) is the CDF of the normal distribution.&lt;/p&gt;

&lt;p&gt;Obviously increasing your expected score \(\mu_x\) is a winning strategy.
What about increasing \(\sigma_x\)?
Let’s do a similar exercise as before:&lt;/p&gt;

\[\frac{\partial P}{\partial \sigma_x} \propto \frac{\sigma_x(\mu_y-\mu_x)}{(\sigma_x^2+\sigma_y^2)^{3/2}}\]

&lt;p&gt;Again, the underdog benefits from a higher-variance strategy, while the favorite should strive to minimize variance.
When should the underdog &lt;em&gt;focus&lt;/em&gt; on variance?&lt;/p&gt;

\[\frac{\partial P}{\partial \sigma} &amp;gt; \frac{\partial P}{\partial \mu}\]

&lt;p&gt;This occurs when \(\mu_y &amp;gt; \mu_x + \frac{\sigma_x^2+\sigma_y^2}{\sigma_x}\), which is similar to the expression we found against a fixed standard, but with a kind of weighted average of both variances.
As before, the high-variance strategy shines for heavy underdogs.&lt;/p&gt;

&lt;h3 id=&quot;strategies-against-many-opponents&quot;&gt;Strategies against Many Opponents&lt;/h3&gt;
&lt;p&gt;Now, consider a scenario where there are many competitors but only one prize, awarded to the top scorer.
There are lots of important examples of this type of reward system: Nobel prizes, billion-dollar startups, and (most importantly) the game of Pinochle.&lt;/p&gt;

&lt;p&gt;Let there be \(N\) competitors not including yourself.
Their performances can be modeled as random distributions \(X_i\) for \(i=1..N\).
Let’s assume for simplicity that your opponents share parameters \(\mu\) and \(\sigma\).
Your performance is a random variable \(X_0\) with parameters \(\mu_0\) and \(\sigma_0\).&lt;/p&gt;

&lt;p&gt;The utility function \(u(X_0, X_1, ... X_N)=K\) if \(X_0 \geq \text{max}(X_1, X_2, ... X_N)\) and zero otherwise.
Therefore, maximizing \(P(X_0 \geq \text{max}(X_1,...X_N))\) is optimal strategy.&lt;/p&gt;

&lt;p&gt;We might be tempted to multiply the expression we found above for \(P(X&amp;gt;Y)\) a bunch of times.
This would be incorrect, because \(P(X_0&amp;gt;X_i)\) is not independent of the other \(i\)s.
When \(X_0\) is large, all the other probabilities have a better chance of being true.
We have to resort to a slightly more complicated approach using conditional probability.&lt;/p&gt;

&lt;p&gt;First, let’s find the conditional probability that \(X_0&amp;gt;\text{max}(X_{1..N})\) assuming that we know the value of \(X_0\).&lt;/p&gt;

\[P(X_0 \geq \text{max}(X_{1..N}) | X_0=\alpha) = \prod_{i=1}^N P(X_i \leq \alpha | X_0=\alpha) = [\Phi(\frac{\alpha-\mu}{\sigma})]^N\]

&lt;p&gt;where \(\Phi\) is the cumulative distribution of your standardized function (in this case, we can assume normal).
Now we need to generate the unconditional probability as follows:&lt;/p&gt;

\[P(X_0 \geq \text{max}(X_{1..N}) = \int_{-\infty}^{\infty} P(X_0 \geq \text{max}(X_{1..N}) | X_0=\alpha) P(X_0=\alpha) \, d\alpha\]

\[= \int_{-\infty}^{\infty} [\Phi(\frac{\alpha-\mu}{\sigma})]^N \phi(\frac{\alpha-\mu_0}{\sigma_0}) \, d\alpha\]

&lt;p&gt;where \(\phi\) is the probability density function of your own performance.
There’s no closed form expression for this, but we can evaluate it numerically [&lt;a href=&quot;https://stats.stackexchange.com/questions/43685/which-is-largest-of-a-bunch-of-normally-distributed-random-variables&quot;&gt;2&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;Let’s accept the things we cannot change (namely, our opponents’ skill and variability) and examine what we can change.
Now, we numerically evaluate the win probability at a variety of combinations of our skill and our variability and plot it as contours of win probability.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1X6gipi6l-smgOSBDOfGv1LB5oBAHywwO&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; style=&quot;width: 76%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Across the board, win probability increases with more skill.
Similar to the single-opponent case, increasing variance improves the chances of a win for an underdog and hurts a heavy favorite.
&lt;em&gt;Except&lt;/em&gt; this time, unlike the single-opponent case, the breakeven point isn’t at opponent parity (\(\mu_0 = \mu\)) - it’s a lot higher.&lt;/p&gt;

&lt;p&gt;How skillful do you need to be in a multi-agent, winner-take-all situation to justify using a low-variance strategy?
The answer depends on the number of opponents \(N\) and their variance \(\sigma\).
A low-variance approach is favored when \(\frac{\partial P(\text{win})}{\partial \sigma_0} &amp;lt; 0\).
Differentiating the integral expression above, and using Leibniz’s integral rule for the definite integral with constant limits, we have:&lt;/p&gt;

\[\frac{\partial P(\text{win})}{\partial \sigma_0} = \int_{-\infty}^{\infty} [\Phi(\frac{\alpha-\mu}{\sigma})]^N \frac{\partial}{\partial \sigma_0} \phi(\frac{\alpha-\mu_0}{\sigma_0}) \, d\alpha\]

&lt;p&gt;Let’s plot a contour of the breakeven point where \(\frac{\partial P(\text{win})}{\partial \sigma_0} = 0\) .
Above the line, you have so much skill that you can afford to play it safe, even against many opponents.
Below the line, you will need to take risk in order to have a chance of outperforming the crowd.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1A3EU3h-4TTVi5HM-Ckvg0A6n54C0epx4&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; style=&quot;width: 76%&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With more than one opponent, unless you are several standard deviations better than average, you still should use a high-variance strategy.&lt;/strong&gt;
The number of opponents, their skill, and their variance, all require you to have even higher skill in order to justify taking the safe approach.
Because of the power in the integral expression I can’t say for certain what happens for infinite players using numerical integration, but the curve sure looks logarithmic to me.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1yHyODrVzkFHSZGQVinAbLrxQ13A9VSzo&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; style=&quot;width: 76%&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;reward-systems&quot;&gt;Reward Systems&lt;/h3&gt;
&lt;p&gt;We live in a society with reward systems, rules, and uncertainty.
For example, budding musicians and artists struggle while they dream of their big break.
In tech, founders are striving after a billion-dollar valuation.&lt;/p&gt;

&lt;p&gt;I have been involved in two industries, both with their own reward systems.
In academia, many PhD students strive for a tenured professorship (hopefully at a good university).
Tenured professors are striving for endowed professorships, consulting gigs, or maybe even a Nobel!
In engineering, new college grads hone their skills in hopes of earning a promotion, maybe to management or as a chief engineer.&lt;/p&gt;

&lt;p&gt;Most of these rewards depend in part on the skill of the individual, and in part on luck, but they all have different rules.
The Nobel committee rewards researchers for a single, impactful achievement.
On the other hand, professorships and lifetime achievement awards reward consistent good performance over time (e.g. publication count) - though clearly, winning a Nobel would go a long way toward a tenure packet.
I’m willing to go out on a limb and say that founding a billion-dollar “unicorn” startup is more than 50% luck - indeed, the founders of these companies often find that they are their own worst enemies in the long run (e.g. Travis Kalanick at Uber).&lt;/p&gt;

&lt;p&gt;The strategies that guide how we live our lives depend on:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;The specific rewards we want, or penalties we want to avoid (our \(u(x)\))&lt;/li&gt;
  &lt;li&gt;The “rules of the game” (winner-take-all, fixed standard, etc.)&lt;/li&gt;
  &lt;li&gt;Our assessment of our own ability&lt;/li&gt;
  &lt;li&gt;Our assessment of the abilities of others&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When setting up reward systems, we should choose a system that incentivizes the type of behavior that we want.
We need to ask: “what’s the worst thing that can happen?”
If that outcome is unacceptable, then we should not use winner-take-all incentive structures.
It’s probably OK to award Nobels on a winner-take-all basis because the worst thing that can happen is failed research.
It’s probably not OK to reward surgeons on a winner-take-all basis using the number of surgeries they performed in a given year.&lt;/p&gt;

&lt;h3 id=&quot;application-to-design-optimization&quot;&gt;Application to Design Optimization&lt;/h3&gt;

&lt;p&gt;In optimization, we usually neglect uncertainty altogether.
Let’s imagine that we are optimizing an unmanned aircraft to win a 3-on-1 dogfight against a given opponent.
Naively, we might try to maximize the expected aircraft performance, \(\mu_0\).
This is probably a good strategy if we expect the opponent aircraft to have much worse performance than ours on average.&lt;/p&gt;

&lt;p&gt;However, if the opponent’s mean performance is not that much worse than us, or if the opponent’s performance is highly &lt;em&gt;variable&lt;/em&gt; (e.g. performs superbly in narrow conditions), we might want to have a swarm of UAS with different properties so we can maximize \(\sigma_0\) instead, &lt;em&gt;and&lt;/em&gt; increase the number of chances we have to win.
This might maximize the probability of winning the entire fight on a winner-take-all basis.&lt;/p&gt;

&lt;p&gt;Uncertainty comes from:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Uncertainty in the modeling&lt;/li&gt;
  &lt;li&gt;Uncertainty in real-world model inputs&lt;/li&gt;
  &lt;li&gt;Dependence of the objective function on future conditions (e.g. conditions of the fight)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s imperative that the optimization community develop more robust mathematics to handle optimization under uncertainty.&lt;/p&gt;

&lt;h3 id=&quot;my-resolution&quot;&gt;My Resolution&lt;/h3&gt;

&lt;p&gt;In 2020, I will be on the lookout for situations where there are many competitors and the “worst thing that can happen” is not a big deal.
For example, I will try to pace my upcoming ski races in a more aggressive way.
Sometimes I will probably run out of steam and finish poorly, but I will also have a better chance at a great time.
I will also spend a higher portion of my research time on potentially-impactful topics where I have no assurance of success.&lt;/p&gt;

&lt;h3 id=&quot;appendix&quot;&gt;Appendix&lt;/h3&gt;
&lt;p&gt;The code I used to make the plots and do the numerical integration can be found &lt;a href=&quot;https://gist.github.com/bbrelje/2451ea9ec921e7a0ef7e4210df6328a7&quot;&gt;here&lt;/a&gt;:
&lt;script src=&quot;https://gist.github.com/bbrelje/2451ea9ec921e7a0ef7e4210df6328a7.js&quot;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cover image by Wikimedia Commons user &lt;a href=&quot;https://commons.wikimedia.org/wiki/File:Empty_net_goal_(3376907373).jpg&quot;&gt;mark6mauno&lt;/a&gt;, CC 2.0 license&lt;/em&gt;&lt;/p&gt;</content><author><name>Ben Brelje</name></author><category term="optimization" /><category term="code" /><category term="statistics" /><category term="life" /><category term="optimization" /><category term="uncertainty" /><category term="game theory" /><summary type="html">As an optimization engineer and researcher, I am always thinking about how to optimize my life. Lately, I have been thinking particularly about the value of high-variance strategies. I am a pretty risk-averse person, generally preferring a known, acceptable option to the prospect of an unknown but potentially great (or terrible) option. One of my resolutions for 2020 is to be more thoughtful about situations that warrant taking bigger risks, and to be mindful about my biases which push me towards low-variance strategies even when they aren’t the best choice.</summary></entry><entry><title type="html">Visualizing CFD data using plotly</title><link href="https://brelje.net/blog/visualizing-cfd-data-plotly/" rel="alternate" type="text/html" title="Visualizing CFD data using plotly" /><published>2019-12-20T00:00:00+00:00</published><updated>2019-12-20T00:00:00+00:00</updated><id>https://brelje.net/blog/plotly-cfd</id><content type="html" xml:base="https://brelje.net/blog/visualizing-cfd-data-plotly/">&lt;p&gt;Computational fluid dynamics (CFD) is an indispensable tool in aerospace engineering.
These expensive simulations produce a large amount of three-dimensional flow data, and in order to gain understanding from the results we employ interactive visualization.
We generally use purpose-built desktop applications such as Tecplot or Ensight to do this.
However, the software is expensive and this makes it difficult to share results (other than in simple 2D renderings).
In this post, I will demonstrate how to create web-based, interactive, 3D visualizations of surface pressure data using a free and open-source software stack.&lt;/p&gt;

&lt;p&gt;Check out this example result from one of my earlier research papers! (&lt;em&gt;&lt;a href=&quot;https://arc.aiaa.org/doi/abs/10.2514/6.2019-2355&quot;&gt;Flexible Formulation of Spatial Integration Constraints in Aerodynamic Shape Optimization
&lt;/a&gt;&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;&lt;button class=&quot;btn btn-lg btn-hidden-viz center-block&quot; data-plotly-src=&quot;/assets/viz/cfdexample.js&quot; data-plotly-uid=&quot;d58f9b77-df41-4618-b6d2-baa7fb02b0a6&quot; data-height=&quot;100%&quot; data-width=&quot;100%&quot;&gt;
Click to load
&lt;/button&gt;
&lt;!--more--&gt;&lt;/p&gt;

&lt;h3 id=&quot;intro-to-plotly&quot;&gt;Intro to Plotly&lt;/h3&gt;
&lt;p&gt;I’m very impressed with the &lt;a href=&quot;https://plot.ly/python/&quot;&gt;plotly&lt;/a&gt; graphing library for Python.
Previously, I’ve mostly used the matplotlib package for static visualization, and &lt;a href=&quot;https://docs.bokeh.org/en/latest/index.html&quot;&gt;bokeh&lt;/a&gt; for interactive charts.
In my view, plotly is now the best available free tool for creating interactive charts in Python.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Plotly Express&lt;/strong&gt; API makes it trivially easy to create and animate simple charts (like scatters and bars).
If you need more detailed control over your figures, there is a lower-level &lt;em&gt;graph object&lt;/em&gt; API which is what we will be using today.&lt;/p&gt;

&lt;p&gt;To install Plotly, I recommend starting from the &lt;a href=&quot;https://www.anaconda.com/distribution/&quot;&gt;Anaconda&lt;/a&gt; Python 3 distribution.
Once you have a working Anaconda installation, from your command line, type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;conda install plotly&lt;/code&gt; and you should be all set.
Check out the examples and tutorials available on the &lt;a href=&quot;https://plot.ly/python/&quot;&gt;plotly Python reference page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We will be using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mesh3d&lt;/code&gt; graph object today.
To familiarize yourself, check out the &lt;a href=&quot;https://plot.ly/python/3d-mesh/&quot;&gt;Mesh3d examples&lt;/a&gt; page.
The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mesh3d&lt;/code&gt; trace takes a triangulated surface and renders it in 3D, complete with lighting effects and shading.
I’ll briefly cover the format plotly expects to see.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mesh3d&lt;/code&gt; constructor takes several arguments, including the following geometry data:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;x, y, z&lt;/strong&gt; - Lists of coordinates of the vertices of your surface (all \(N_v\) by \(1\) numpy arrays, where \(N_v\) is the number of vertices)&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;intensity&lt;/strong&gt; - The quantity to plot at each vertex point using a color scale. For example, \(C_p\). It should be the same dimensions as x, y, z since each value corresponds to a point, not a face.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;i, j, k&lt;/strong&gt; - Lists of vertex indices which comprise the triangles of your surface (all \(N_t\) by \(1\) numpy integer arrays, where \(N_t\) is the number of triangles). The maximum value of the entries of i, j, k should be \(N_v\).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alternatively, you can provide a point cloud (x, y, z only) and plotly can try to construct a Delaunay triangulation of the object, and the plotly &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Mesh3d&lt;/code&gt; example page provides an example of this. However, I don’t recommend this approach if you have CFD data since you already know the structure of the mesh.&lt;/p&gt;

&lt;h3 id=&quot;exporting-cfd-data-from-tecplot&quot;&gt;Exporting CFD Data from Tecplot&lt;/h3&gt;
&lt;p&gt;Our lab’s workflow generates surface pressure distributions as .cgns files which we postprocess in &lt;a href=&quot;https://www.tecplot.com/products/tecplot-360/&quot;&gt;Tecplot 360&lt;/a&gt;.
It is highly capable software, but it’s also very expensive.
We would like to be able to show interactive, volume-rendered CFD data to the general public without the need for a local Tecplot installation.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Open your surface pressure distribution file in Tecplot and ensure the data field you want to plot is available.
In this case, we’ll be plotting surface pressure coefficient, \(C_p\).&lt;/li&gt;
  &lt;li&gt;Create a new variable by selecting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Data-Alter-Specify Equations&lt;/code&gt;. In the pop-up window, input &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{p3D}={myvarname}&lt;/code&gt; where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;myvarname&lt;/code&gt; is the parameter you want to plot. Select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;New var location&lt;/code&gt; to be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Node&lt;/code&gt;. Then click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Compute&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Export the data by selecting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;File-Write Data&lt;/code&gt;. In the pop-up window, choose a file name, keeping the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.dat&lt;/code&gt; file extension and click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Save&lt;/code&gt;. In the next dialog, select &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;X&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Y&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Z&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p3d&lt;/code&gt; in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Variable(s)&lt;/code&gt; section (&lt;em&gt;in that order&lt;/em&gt;). Choose the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Zone(s)&lt;/code&gt; you want to plot (one or more is OK). Choose &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;point&lt;/code&gt; for the format (&lt;em&gt;important&lt;/em&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should see a four-column output format like this:
&lt;img src=&quot;https://drive.google.com/uc?id=1KtzUbYC7BfM5Q_hGYA7dtuJNhgH4vo01&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; style=&quot;width: 80%&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;converting-tecplot-data-into-plotlys-format&quot;&gt;Converting Tecplot data into Plotly’s format&lt;/h3&gt;
&lt;p&gt;If you have &lt;strong&gt;structured&lt;/strong&gt; CFD data exported from Tecplot in the process described above, the following conversion process applies to you.
You can tell if your data is structured because the header of your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.dat&lt;/code&gt; file will read something like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; I=7, J=7, K=1, ZONETYPE=Ordered
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you have &lt;strong&gt;unstructured&lt;/strong&gt; data you can use this script as inspiration but you’ll have to write your own parser.&lt;/p&gt;

&lt;p&gt;I wrote a Python script to convert a structured Tecplot &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.dat&lt;/code&gt; file into the x, y, z, i, j, k, intensity format.
The main challenge is that structured surface mesh data usually consists of quadrilaterals, whereas plotly wants triangles.
Therefore we have to triangulate each quad, which is trivial (you just bisect it corner to corner).
I ensured that the triangle normal vectors are pointing in a consistent direction which helps plotly render correctly.
Note that Tecplot saves its output so that i changes fastest, then j, then k (though for surface data k should always be 1).&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;re&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;parse_tecplot_structured&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'r'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readlines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;close&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;z&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;n_prev_tris&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;delimiters&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;=&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;,&quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;regexPattern&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;'|'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;delimiters&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;first_zone&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lines&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# skip until &quot;zone_t&quot;
&lt;/span&gt;        &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;vals&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]))&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;tri_count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;new_zone&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;ValueError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'No new ijk indices parsed for this zone'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;ZONE T&quot;&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;c1&quot;&gt;# new zone.
&lt;/span&gt;                &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;first_zone&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;n_prev_tris&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nj&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tri_count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
                        &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;ValueError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'Not enough vertices parsed'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;new_zone&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;first_zone&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;tri_count&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;I=&quot;&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;nijk&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;re&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;regexPattern&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;isdigit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()]&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nijk&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;nj&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nijk&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'Zone: ni='&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;' nj='&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;new_zone&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;j&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nj&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
                    &lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;n_prev_tris&lt;/span&gt;
                    &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;range&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                        &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ni&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;joffset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;z&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;generating-the-plotly-visualization&quot;&gt;Generating the plotly visualization&lt;/h3&gt;
&lt;p&gt;Now that we have CFD data in the proper format, we can plot it easily using plotly.
We use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.io&lt;/code&gt; API to generate output in HTML format.
The bulk of the chart data is actually stored as Javascript.
The plotly rendering engine itself is loaded as a huge Javascript file called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.js&lt;/code&gt;.
We use the option &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;include_plotlyjs='cdn'&lt;/code&gt;, which will automatically download &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.js&lt;/code&gt; from the internet instead of bundling it with the HTML file (which greatly increases its size).&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;sys&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;re&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;plotly.graph_objects&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;go&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;plotly.io&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pio&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;generate_plotly_cfd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# parse the tecplot structured data file into plotly format
&lt;/span&gt;    &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;parse_tecplot_structured&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;go&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Figure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;go&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Mesh3d&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;z&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;colorbar_title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'Cp'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;colorscale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'viridis'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;# Intensity of each vertex, which will be interpolated and color-coded
&lt;/span&gt;            &lt;span class=&quot;n&quot;&gt;intensity&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;# i, j and k give the vertices of triangles
&lt;/span&gt;            &lt;span class=&quot;c1&quot;&gt;# here we represent the 4 triangles of the tetrahedron surface
&lt;/span&gt;            &lt;span class=&quot;n&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vert1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vert2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;k&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;vert3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;#flatshading=True,
&lt;/span&gt;            &lt;span class=&quot;c1&quot;&gt;#lighting=dict(diffuse=0.9),
&lt;/span&gt;            &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'y'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;showscale&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;update_layout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scene_aspectmode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'data'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;pio&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;write_html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;'cfdoutput.html'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;include_plotlyjs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;'cdn'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;include_mathjax&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;auto_open&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If everything went well, we should have a working visualization open in the browser!
You can now redistribute this HTML file to anybody with a modern browser and they should be able to open it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1cUx8mwn1UpXDIOiLc6lGXJuHS9jIfZ_X&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; style=&quot;width: 80%&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;embedding-cfd-results-in-a-web-page&quot;&gt;Embedding CFD results in a web page&lt;/h3&gt;
&lt;p&gt;There is an easy way to embed plotly results, and an elegant way.
The easy way is to simply use an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;iframe&lt;/code&gt; element to directly embed the plotly HTML file in your site.
However, since the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.js&lt;/code&gt; file is so huge (3 MB), this will slow down your page load.&lt;/p&gt;

&lt;p&gt;A better way is to load the visualization on demand!
This requires a little bit of web frontend work using Javascript and CSS.
We want to create a button which, once clicked, loads the huge plotly Javascript files and then creates space for the visualization.&lt;/p&gt;

&lt;p&gt;First, open the HTML file from the previous step.
You should see a line similar to this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;div id=&quot;d58f9b77-df41-4618-b6d2-baa7fb02b0a6&quot; class=&quot;plotly-graph-div&quot; style=&quot;height:100%; width:100%;&quot;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The unique identifier, height, and width information will come in handy later.
Below this line you should see a big &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;script&amp;gt;&lt;/code&gt; element with your plot data.
Save the interior of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;script&amp;gt;&lt;/code&gt; element (without the actual &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags) as a separate Javascript file with a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.js&lt;/code&gt; extension.
Make sure your site can serve it as a static file.&lt;/p&gt;

&lt;p&gt;Next, we create a button in our web page and tag it with some CSS classes to style it.
I use Bootstrap 3 so the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;btn&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;btn-lg&lt;/code&gt; classes apply colors and some effects.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;button class=&quot;btn btn-lg&quot;&amp;gt;Click to load&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now we need to add some HTML5 data to the button so we know some information about the visualization for this interaction.
Let’s add the following attributes:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;data-plotly-uid&lt;/strong&gt; - Plotly assigns a unique identifier to each visualization generated using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.io&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;data-plotly-src&lt;/strong&gt; - Path to the Javascript file that holds the visualization data. This is the contents of the HTML file from the previous step (enclosed by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;data-height&lt;/strong&gt; - Height of the visualization (can be found in the HTML file). Expressed like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;900px&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;100%&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;data-width&lt;/strong&gt; - Width of the visualization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s also tag it with a new CSS class called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;btn-hidden-viz&lt;/code&gt;.
The HTML code for our button now looks like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;button class=&quot;btn btn-lg btn-hidden-viz&quot;
data-plotly-src=&quot;/assets/viz/cfdexample.js&quot;
data-plotly-uid=&quot;d58f9b77-df41-4618-b6d2-baa7fb02b0a6&quot;
data-height=&quot;100%&quot;
data-width=&quot;100%&quot;&amp;gt;
Click to load
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, I want to create a click handler which loads &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.js&lt;/code&gt; from a CDN, then loads my visualization, and finally inserts it into the page and disappears.
I use jQuery’s click handler to apply the interaction to all buttons with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;btn-hidden-viz&lt;/code&gt; class.
I use jQuery &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ajax&lt;/code&gt;  to ensure that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plotly.js&lt;/code&gt; file is loaded before the visualization is opened.
I also set a 10 second timeout in case the user is on a slow connection or has lost connection to the CDN.&lt;/p&gt;

&lt;p&gt;This snippet does the trick.
You’ll want to add it to your site’s Javascript preload file.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-javascript&quot; data-lang=&quot;javascript&quot;&gt;&lt;span class=&quot;c1&quot;&gt;//Function to load plotly.js on demand and show a visualization&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;.btn-hidden-viz&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;thebutton&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;plotlyuid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;plotlyUid&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;plotlysrc&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;plotlySrc&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;spinnerid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;plotlyuid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;concat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;-spinner&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;div id=&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;concat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;plotlyuid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot; class=&quot;plotly-graph-div&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;insertBefore&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;thebutton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;PlotlyConfig&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;MathJaxConfig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;local&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;};&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ajax&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;https://cdn.plot.ly/plotly-latest.min.js&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;dataType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;cache&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// or get new, fresh copy on every page load&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;beforeSend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;here&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;thebutton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;lt;span id=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;concat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;spinnerid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;&amp;gt;&amp;lt;/span&amp;gt; Loading&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
          &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;concat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;spinnerid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;glyphicon glyphicon-refresh glyphicon-refresh-animate&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;success&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// Callback&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;PLOTLYENV&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;window&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;PLOTLYENV&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{};&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ajax&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;plotlysrc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;dataType&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;cache&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// or get new, fresh copy on every page load&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;success&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;c1&quot;&gt;// Callback&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;concat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;plotlyuid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;attr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;height:&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;concat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;; width:&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;));&lt;/span&gt;
            &lt;span class=&quot;nx&quot;&gt;thebutton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
              &lt;span class=&quot;nx&quot;&gt;thebutton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;error loading visualization&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
          &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
         &lt;span class=&quot;nx&quot;&gt;thebutton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;error loading visualization&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;});})&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Finally, let’s add a spinner effect while the visualization is loading.
I did this by adding a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;span&amp;gt;&lt;/code&gt; element with these classes to the button during the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ajax&lt;/code&gt; calls:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;glyphicon glyphicon-refresh glyphicon-refresh-animate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We include the following snippet (which I swiped from a CSS showcase somewhere) in our site’s CSS to get the animation to work properly:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-css&quot; data-lang=&quot;css&quot;&gt; &lt;span class=&quot;nc&quot;&gt;.glyphicon-refresh-animate&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;py&quot;&gt;-animation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spin&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;.7s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;infinite&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;-webkit-animation&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spin2&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;.7s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;infinite&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;linear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;@-webkit-keyframes&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spin2&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;-webkit-transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;-webkit-transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;360deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;@keyframes&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;spin&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;360deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;And there you have it!
The final product looks like this:&lt;/p&gt;

&lt;p&gt;&lt;button class=&quot;btn btn-lg btn-hidden-viz&quot; data-plotly-src=&quot;/assets/viz/cfdexample.js&quot; data-plotly-uid=&quot;d58f9b77-df41-4618-b6d2-baa7fb02b0a6&quot; data-height=&quot;100%&quot; data-width=&quot;100%&quot;&gt;
Click to load
&lt;/button&gt;&lt;/p&gt;

&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;
&lt;p&gt;Plotly is the best way I have found so far to render CFD results interactively on the internet for free.
You can find the code I used for this example and a sample Tecplot &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.dat&lt;/code&gt; file &lt;a href=&quot;https://gist.github.com/bbrelje/91c8acdfc6c852fd979d24b586e68357&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</content><author><name>Ben Brelje</name></author><category term="optimization" /><category term="code" /><category term="visualization" /><category term="plotly" /><category term="python" /><category term="javascript" /><category term="code" /><category term="cfd" /><summary type="html">Computational fluid dynamics (CFD) is an indispensable tool in aerospace engineering. These expensive simulations produce a large amount of three-dimensional flow data, and in order to gain understanding from the results we employ interactive visualization. We generally use purpose-built desktop applications such as Tecplot or Ensight to do this. However, the software is expensive and this makes it difficult to share results (other than in simple 2D renderings). In this post, I will demonstrate how to create web-based, interactive, 3D visualizations of surface pressure data using a free and open-source software stack. Check out this example result from one of my earlier research papers! (Flexible Formulation of Spatial Integration Constraints in Aerodynamic Shape Optimization ) Click to load</summary></entry><entry><title type="html">Hydrogen-powered aviation part 1: a history</title><link href="https://brelje.net/blog/hydrogen-powered-aviation-part-one-history/" rel="alternate" type="text/html" title="Hydrogen-powered aviation part 1: a history" /><published>2019-12-18T00:00:00+00:00</published><updated>2019-12-18T00:00:00+00:00</updated><id>https://brelje.net/blog/hydrogen-part-one</id><content type="html" xml:base="https://brelje.net/blog/hydrogen-powered-aviation-part-one-history/">&lt;p&gt;Hydrogen fuel for aircraft, while seemingly a recent idea, is almost as historic as jet aviation itself.
This post, the start of a series on hydrogen power for aviation applications, will dive into the history of hydrogen-powered flight, from the secretive days of the Cold War to the clean power demonstrator projects of the present day.&lt;/p&gt;

&lt;h3 id=&quot;theoretical-background&quot;&gt;Theoretical background&lt;/h3&gt;
&lt;p&gt;Hydrogen has long seemed attractive to aircraft designers as a fuel source because it has desirable physical properties. Compared to kerosene jet fuel, it holds tremendous energy per unit weight: hydrogen measures as high as &lt;strong&gt;142 MJ/kg&lt;/strong&gt;, while jet fuel holds about 42 MJ/kg. This promises longer range.
Per the Breguet range equation:&lt;/p&gt;

\[R=\frac{\eta H_v}{g}\frac{L}{D}ln\Big(\frac{W_{init}}{W_{final}}\Big)\]

&lt;p&gt;where \(H_v\) is the fuel heating value (a.k.a. specific energy), \(\eta\) is the propulsive and thermodynamic combined efficiency, \(g\) is the gravitational constant, \(L/D\) is the lift to drag ratio, and \(W\) is the weight.&lt;/p&gt;

&lt;p&gt;We see that the range is, to first order, linear with specific energy of the fuel. In this simple analysis, hydrogen looks about three times better than kerosene on range!
Hydrogen also burns very easily, which improves engine operability at the corners of the operating envelope (especially at high altitude).&lt;/p&gt;

&lt;p&gt;Hydrogen also burns cleanly, producing only water vapor and heat (when burned very lean - NOx is a concern otherwise). When used in a fuel cell, no carbon emissions are produced. In the modern era, the environmental benefits of hydrogen fuel could be its greatest selling point (assuming that it can be generated in a sustainable way).&lt;/p&gt;

&lt;p&gt;In reality, the range benefit is greatly reduced due to the low density of hydrogen, which causes the airframe to grow (increasing weight and drag). I will discuss these tradeoffs in the next post.
&lt;!--more--&gt;&lt;/p&gt;

&lt;h3 id=&quot;nacas-project-bee&quot;&gt;NACA’s Project Bee&lt;/h3&gt;

&lt;p&gt;An early German turbojet experiment ran using gaseous hydrogen as early as 1937. Following the war, engineers at NACA began studying hydrogen fuels for strategic missile applications [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch5-1.htm&quot;&gt;1&lt;/a&gt;]. Liquid hydrogen for rockets was first produced in the early 1950s.&lt;/p&gt;

&lt;p&gt;By 1954, NACA’s Lewis Field laboratories were actively studying hydrogen for aircraft applications where &lt;strong&gt;high altitude&lt;/strong&gt; was a mission requirement [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch6-2.htm&quot;&gt;2&lt;/a&gt;]. At high altitude, the low density of hydrogen was less of a penalty (as the high altitude necessitates a larger wing and fuselage anyway). Preliminary trade studies included a subsonic reconnaissance  airplane designed to fly at high altitude (it’s unclear to me whether the authors at NACA were aware of the existence of the U-2).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1EjA6RdTBHqwG0wTXzMonWLQLGrY1FokZ&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;High-altitude reconnaissance airplane with liquid hydrogen fuel (NACA concept by Abe Silverstein and Eldon Hall) [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch6-3.htm&quot;&gt;3&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;As a proof of concept for liquid hydrogen airbreathing propulsion, NACA modified a Martin B-57 bomber to run one engine on hydrogen - &lt;em&gt;the world’s first hydrogen-powered airplane&lt;/em&gt; (as far as I can tell). Known as “Project Bee”, the aircraft first switched to hydrogen fuel in flight in 1957, eventually making 38 transitions from jet fuel to hydrogen and back.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=12Xw92aaVYBGsG7UxkuMr8uPzYlX7uGFT&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;NACA’s converted B-57 hydrogen testbed - the world’s first airplane to run (partially) on hydrogen fuel [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch6-4.htm&quot;&gt;4&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;The tests validated the feasibility of using hydrogen as an aviation fuel and noted several other findings:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Conversion of turbojet engines from JP-4 to hydrogen is not very difficult&lt;/li&gt;
  &lt;li&gt;The fast flame speed of hydrogen enables engines to be built more compactly&lt;/li&gt;
  &lt;li&gt;It is possible to handle LH2 safely during ground operations&lt;/li&gt;
&lt;/ul&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; class=&quot;center-block&quot; src=&quot;https://www.youtube.com/embed/Icy7W2qOTOE?controls=0&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h3 id=&quot;cl-400-suntan&quot;&gt;CL-400 Suntan&lt;/h3&gt;
&lt;p&gt;In the late 1950s, a few proposals for hydrogen-powered military aircraft circulated, but one stands above all the rest in scope and cost: the Lockheed CL-400 “Suntan”. Jealous of the CIA’s success with the U-2 program, the Air Force wanted a high-speed, high-altitude reconnaissance airplane, and they wanted it fast.&lt;/p&gt;

&lt;p&gt;In 1956, Lockheed’s legendary Skunk Works director and aircraft design chief Kelly Johnson developed a proposal for two prototypes designed to fly at Mach 2.5 at 90,000+ feet. The Air Force was enthusiastic and the project moved ahead in secrecy (full access was restricted to only 25 people!) Lockheed was the prime and Pratt and Whitney was to be the engine contractor.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1dlVBhlgMuYRK8gsmUl0to7ZMMmySyGuc&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;Concept drawing of the CL-400 Suntan reconnaissance aircraft [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch8-3.htm&quot;&gt;5&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;The strange dimensions of the airplane are attributable to the low volumetric density of hydrogen. While hydrogen has extremely high energy per unit mass, it has relatively low energy per unit &lt;em&gt;volume&lt;/em&gt;. This results in oversized fuselage tanks, a problem compounded by the need to insulate the cryogenic liquid fuel from the extreme skin temperatures at supersonic speeds.&lt;/p&gt;

&lt;p&gt;For the Suntan program, Lockheed developed an industrial-scale liquid hydrogen infrastructure in the United States from scratch and demonstrated that it is possible to work with hydrogen without extreme accident risk at Fort Robertson, near Burbank, CA.&lt;/p&gt;

&lt;p&gt;Meanwhile, on the propulsion side, Pratt and Whitney evaluated several ideas for the engine. A 1957 patent shows what may be Pratt and Whitney’s first concept for a geared turbofan engine. This concept morphed into the model 304 engine for the CL400 program which was tested in 1957 and 1958. The performance of the engine was promising.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1oaH38DLURvoCKsbvkXvyM38MFOu75sRP&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;Pratt and Whitney patent for a hydrogen-powered geared turbofan engine concept [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch8-7.htm&quot;&gt;6&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;In the modern era, Pratt and Whitney’s kerosene-powered GTF engines have resulted in huge noise and fuel burn reductions for the A320neo and Bombardier C-series programs. It is interesting to think that the roots for this innovation reach back to the early days of the Cold War!&lt;/p&gt;

&lt;p&gt;Unfortunately, the range specification at the airplane level began to look less and less favorable to the Air Force, and by the end, even Kelly Johnson was advocating for the program to be cancelled. While the Suntan never flew, the innovations in liquid hydrogen production, handling, and lightweight tankage contributed to the space program. The program was still amazingly expensive in 1957 dollars: up to $250 million! [&lt;a href=&quot;https://history.nasa.gov/SP-4404/ch8-13.htm&quot;&gt;7&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;For a more personal perspective on the Suntan program, be sure to read Ben Rich’s book &lt;em&gt;Skunk Works&lt;/em&gt; which devotes a chapter to the topic.&lt;/p&gt;

&lt;h3 id=&quot;hydrogen-power-in-the-modern-era&quot;&gt;Hydrogen power in the modern era&lt;/h3&gt;
&lt;p&gt;After the problem of high-altitude propulsion was eventually solved without using hydrogen fuel, there was little further research in the area until the oil crisis and environmental movements provided a boost.&lt;/p&gt;

&lt;p&gt;The Soviet Union, with growing nuclear generating capacity and limited (at the time) petroleum resources, was interested in producing hydrogen as aviation fuel for economic reasons. As a proof of concept, a Tu-154 airliner was heavily modified so that the right engine would run on \(LH_2\). The project was similar in scope to NACA’s Project Bee thirty years earlier.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1sAXIs2yDh5U6qiGpmsSw8ZlQRV2KSkY9&quot; alt=&quot;&quot; class=&quot;img-responsive center-block&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;Tu-155 cryogenic fuels demonstrator [&lt;a href=&quot;https://web.archive.org/web/20130218231656/http://www.tupolev.ru/English/Show.asp?SectionID=82&quot;&gt;9&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;The Tu-155 demonstrator first flew using partial hydrogen fuel in 1988 - the first “passenger” aircraft to do so, though clearly it was not a practical passenger aircraft in that form [&lt;a href=&quot;https://www.nytimes.com/1988/05/24/science/clean-hydrogen-beckons-aviation-engineers.html&quot;&gt;10&lt;/a&gt;]. The aircraft’s aft fuselage was entirely consumed by a huge cryotank. As more natural gas production came online in Russia, the aircraft was modified to run on liquid natural gas instead of hydrogen!&lt;/p&gt;

&lt;p&gt;As far as I can tell, no other hydrogen-powered manned aircraft flew again for about twenty years. In the meantime, public awareness of climate change rose, and car manufacturers started experimenting with zero-emission fuel cell vehicles. While fuel cell technology had been known for decades, space power applications helped mature the technology to the point that terrestrial applications became feasible.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;NASA/Aerovironment Helios&lt;/strong&gt; HALE program (1999-2003) was designed to use a hydrogen fuel cell system as a means of storing energy during the night. Solar cells provide excess power during the day which can be used to generate hydrogen through electrolysis. However, it seems that the aircraft never actually used this capability before it broke apart in 2003 [&lt;a href=&quot;https://arc.aiaa.org/doi/10.2514/1.42234&quot;&gt;11&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;Two other large UAS have flown using liquid hydrogen fuel: the &lt;strong&gt;Aerovironment Global Observer&lt;/strong&gt; in 2011 (which used  fuel cells in a distributed architecture) and the &lt;strong&gt;Boeing Phantom Eye&lt;/strong&gt; in 2012 (which used a turbocharged internal combustion engine) [&lt;a href=&quot;https://www.boeing.com/defense/phantom-eye/&quot;&gt;12&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1m7veVzNxKp_1OGRatHtzCPyJSvki7JFf&quot; alt=&quot;&quot; class=&quot;img-responsive&quot; style=&quot;width: 100%&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;The Boeing Phantom Eye long-endurance demonstrator [&lt;a href=&quot;https://www.boeing.com/defense/phantom-eye/&quot;&gt;12&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;The first manned aircraft powered by fuel cells was the &lt;strong&gt;Boeing Fuel Cell Demonstrator&lt;/strong&gt;, a modified Diamond HK36 motor glider built by Boeing Research and Technology Europe. The aircraft, which flew in 2008, used a 75kW (peak) motor and 24 kW fuel cell system consuming &lt;em&gt;gaseous&lt;/em&gt; hydrogen, supplementing with battery power on takeoff and climb. The fuel cell alone was sufficient for level cruise flight. The demonstrator identified several challenges for future tech development:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Weight of the hybrid power system (in particular, “balance of plant” - the supporting systems for the fuel cells, which were not flight-optimized)&lt;/li&gt;
  &lt;li&gt;Thermal management of motor and fuel cell waste heat&lt;/li&gt;
  &lt;li&gt;Weight and cost increase of mitigating hydrogen hazards&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1TlWnG9ravpGEiPRhZjr5SBvJ-jY8PyKe&quot; alt=&quot;&quot; class=&quot;img-responsive&quot; style=&quot;width: 100%&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;Internal configuration of the Boeing Fuel Cell demonstrator [&lt;a href=&quot;https://arc.aiaa.org/doi/10.2514/1.42234&quot;&gt;11&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;The team estimated that the hybrid propulsion system added about 150kg weight compared to the conventional internal combustion engine. For a small aircraft, that is a huge weight increase, consuming most of the aircraft’s useful load. However, the authors note that newly-available, improved fuel cell systems with specific power 0.5-1.0 kW/kg would have reduced the weight penalty substantially [&lt;a href=&quot;https://arc.aiaa.org/doi/10.2514/1.42234&quot;&gt;11&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;Two similar motorglider conversions projects were completed in Europe. The &lt;strong&gt;DLR H2&lt;/strong&gt; (2009) is the first 100% hydrogen-powered manned aircraft. A converted Antares 20E, its 33kW fuel cell system provides sufficient power for takeoff without using batteries. DLR claims the aircraft can stay aloft for five hours, but because the base airframe is a sailplane, that figure might depend on using soaring techniques. [&lt;a href=&quot;https://www.dlr.de/tt/en/Portaldata/41/Resources/dokumente/ec/Antares-DinA5-V6_E_WEB.pdf&quot;&gt;13&lt;/a&gt;] [&lt;a href=&quot;https://www.dlr.de/content/en/articles/aeronautics/research-fleet-infrastructure/dlr-research-aircraft/antares-dlr-h2-out-of-operation.html&quot;&gt;14&lt;/a&gt;]&lt;/p&gt;

&lt;iframe width=&quot;560&quot; class=&quot;center-block&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/B46iDZUya3s?controls=0&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;The &lt;strong&gt;DLR HY4&lt;/strong&gt; (2016) is a striking four-seat twin-fuselage configuration which claims to be the first hydrogen-powered “passenger airplane.” It has &lt;strong&gt;80kW&lt;/strong&gt; fuel cell power, by far the most of any existing aircraft. It is a converted Pipistrel Taurus G4 [&lt;a href=&quot;https://www.aerospace-technology.com/projects/hy4-aircraft/&quot;&gt;15&lt;/a&gt;]. The the same airframe won the NASA Green Flight challenge.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://drive.google.com/uc?id=1PBm6stN8n0C28YIxGLxv8abvbS4Swvkm&quot; alt=&quot;&quot; class=&quot;img-responsive&quot; style=&quot;width: 100%&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;caption&quot;&gt;DLR HY4 demonstrator on its maiden flight in 2016 [&lt;a href=&quot;https://www.aerospace-technology.com/projects/hy4-aircraft/&quot;&gt;15&lt;/a&gt;]&lt;/p&gt;

&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;

&lt;p&gt;While battery-electric propulsion has been highly visible in the press, hydrogen-based aircraft propulsion has a longer history and, depending on the mission objectives, arguably more practical in the current state. In my next post, I will compare the rate of progress of hydrogen fuel cells and all-electric systems and identify key performance measures which are currently limiting the potential usefulness of hydrogen for aircraft.&lt;/p&gt;</content><author><name></name></author><category term="electric flight" /><category term="hydrogen" /><category term="NASA" /><category term="pipistrel" /><category term="dlr" /><category term="fuel cell" /><summary type="html">Hydrogen fuel for aircraft, while seemingly a recent idea, is almost as historic as jet aviation itself. This post, the start of a series on hydrogen power for aviation applications, will dive into the history of hydrogen-powered flight, from the secretive days of the Cold War to the clean power demonstrator projects of the present day. Theoretical background Hydrogen has long seemed attractive to aircraft designers as a fuel source because it has desirable physical properties. Compared to kerosene jet fuel, it holds tremendous energy per unit weight: hydrogen measures as high as 142 MJ/kg, while jet fuel holds about 42 MJ/kg. This promises longer range. Per the Breguet range equation: \[R=\frac{\eta H_v}{g}\frac{L}{D}ln\Big(\frac{W_{init}}{W_{final}}\Big)\] where \(H_v\) is the fuel heating value (a.k.a. specific energy), \(\eta\) is the propulsive and thermodynamic combined efficiency, \(g\) is the gravitational constant, \(L/D\) is the lift to drag ratio, and \(W\) is the weight. We see that the range is, to first order, linear with specific energy of the fuel. In this simple analysis, hydrogen looks about three times better than kerosene on range! Hydrogen also burns very easily, which improves engine operability at the corners of the operating envelope (especially at high altitude). Hydrogen also burns cleanly, producing only water vapor and heat (when burned very lean - NOx is a concern otherwise). When used in a fuel cell, no carbon emissions are produced. In the modern era, the environmental benefits of hydrogen fuel could be its greatest selling point (assuming that it can be generated in a sustainable way). In reality, the range benefit is greatly reduced due to the low density of hydrogen, which causes the airframe to grow (increasing weight and drag). I will discuss these tradeoffs in the next post.</summary></entry><entry><title type="html">A quick look at the proposed EASA eVTOL rule</title><link href="https://brelje.net/blog/quick-look-proposed-easa-evtol-rule/" rel="alternate" type="text/html" title="A quick look at the proposed EASA eVTOL rule" /><published>2018-10-16T00:00:00+00:00</published><updated>2018-10-16T00:00:00+00:00</updated><id>https://brelje.net/blog/easa-evtol-sc</id><content type="html" xml:base="https://brelje.net/blog/quick-look-proposed-easa-evtol-rule/">&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;EASA &lt;a href=&quot;https://www.easa.europa.eu/newsroom-and-events/press-releases/easa-paves-way-enable-safe-air-travel-urban-air-mobility-and-air&quot;&gt;dropped big news&lt;/a&gt; on Monday, announcing a proposed &lt;a href=&quot;https://www.easa.europa.eu/sites/default/files/dfu/SC-VTOL-01%20proposed.pdf&quot;&gt;special condition&lt;/a&gt; under which electric VTOL aircraft under 2000kg may be certified in the European Union. This is the most concrete pathway to certification from a major western regulator and is sure to be followed closely by the FAA (which tends to keep regulations in sync with Europe for the most part, and vice versa). I&amp;#x27;ll take a quick look at the updated rule and identify the novel issues raised. Several of the points are sure to be contentious, and I expect the public comment period to be quite lively.&lt;/p&gt;&lt;/div&gt;

&lt;!--more--&gt;

&lt;div class=&quot;rich-text&quot;&gt;&lt;h2&gt;Background: eVTOL and the existing rules&lt;/h2&gt;&lt;p&gt;The rule departs from the latest revision of Europe&amp;#x27;s general aviation design regulations, known as CS-23 Amendment 5. This latest revision introduced major flexibility for manufacturers, which may now use industry consensus standards (such as those maintained by ASTM) to show compliance to &lt;i&gt;performance-based standards&lt;/i&gt;. The old method involved showing compliance to prescriptive design rules, which were intended to &lt;i&gt;result&lt;/i&gt; in the desired level of performance, but may not be the &lt;i&gt;only&lt;/i&gt; way to meet performance goals. The CS-23 rewrite parallels the U.S. rewrite of the 14 CFR 23 general aviation rules.&lt;/p&gt;&lt;p&gt;However, as pointed out by the FAA and EASA, CS-23 / 14 CFR 23 do not contain enough material to assure the safety of electric VTOL vehicles. Notably, eVTOL aircraft rely on powered rotors for lift, but because they don&amp;#x27;t have a large main rotor, they are generally not capable of autorotating safely to the ground. Alternatively, in VTOL mode, they may not be able to glide to an forced landing on aerodynamic wing lift. Nevertheless, they may have redundancy sufficient to assure safety in the event of a system failure (e.g. a rotor/prop failure or a motor failure). Therefore, some additional requirements need to be added to the existing Part 23 rules.&lt;/p&gt;&lt;p&gt;Furthermore, eVTOL are potentially unique in that they may soon carry a very large volume of passengers on commercial flights. In the US and Europe, 14 CFR 25 / CS-25 govern the vast majority of passenger trips flown in commercial service, since economics favors using fewer, larger aircraft. Part 23 airplanes &lt;i&gt;do&lt;/i&gt; carry commercial passengers, but generally not in large volumes. They are also frequently used in more sparsely populated areas -- think Cessna Caravans shuttling around people from village to village in Alaska.&lt;/p&gt;&lt;p&gt;The problem is that Part 23&amp;#x27;s system reliability requirements for small aircraft (1-6 passengers) are much less stringent than for Part 25 commercial transport aircraft. We see a much higher accident rate in the general aviation fleet. If we transfer those accident rates to hundreds of thousands of urban air mobility vehicles flying over urban areas, people on the ground are likely to get hurt, and public confidence in the eVTOL project will falter. Therefore, even though eVTOLs are small by weight and passenger count, a strong argument can be made that they deserve a higher level of design assurance than a typical Cessna.&lt;/p&gt;&lt;h2&gt;The new special condition&lt;/h2&gt;&lt;p&gt;The eVTOL Special Condition does a great job of addressing these shortcomings in the existing rules. It is basically a copy and paste of CS-23, and EASA was kind enough to highlight any changes. The vast majority of rules are left unchanged, or are changed except for minor terminology issues. However, there are some large changes to report.&lt;/p&gt;&lt;h3&gt;Fundamentals&lt;/h3&gt;&lt;p&gt;This rule applies to non-helicopter VTOL aircraft with MTOW &amp;lt; 2,000kg and carrying up to 5 passengers. Aircraft under this rule must be certified as one of the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Category &lt;b&gt;Basic&lt;/b&gt; (up to 5 passengers,&lt;b&gt; no commercial operations,&lt;/b&gt; not designed for operation over congested areas)&lt;/li&gt;&lt;li&gt;Category &lt;b&gt;Enhanced&lt;/b&gt; (up to 5 passengers, commercial air transport operations and / or flight over congested areas)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;EASA defines two key terms.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Congested area&lt;/b&gt; means &amp;quot;in relation to a city, town or settlement, any area which is substantially used for residential, commercial or recreational purposes.&amp;quot;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Commercial air transport (CAT)&lt;/b&gt; means &amp;quot;aircraft operation to transport passengers, cargo or mail for remuneration or other valuable consideration.&amp;quot;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Both of these definitions are quite expansive (at least, by their plain wording). The definition of commercial air transport, in particular, is broad enough to almost certainly encompass any foreseeable Uber-style UAM system. It may not be broad enough to include a private owner renting out their personal aircraft for pay as long as they aren&amp;#x27;t doing the flying.&lt;/p&gt;&lt;p&gt;There are important differences in the rules between the Basic and Enhanced categories.&lt;/p&gt;&lt;h3&gt;What the new rule isn&amp;#x27;t&lt;/h3&gt;&lt;p&gt;This proposed special condition is &lt;i&gt;not&lt;/i&gt; a set of certification standards to allow unpiloted/autonomous manned aircraft. It is &lt;i&gt;not&lt;/i&gt; the operational plan for getting hundreds or thousands of these aircraft to avoid each other in dense urban environments. The rule governs the design of the aircraft and its associated systems (except autonomy systems). As EASA says, this proposed rule is merely a first step on the roadmap towards UAM.&lt;/p&gt;&lt;h3&gt;System safety requirements&lt;/h3&gt;&lt;p&gt;The change that stuck out to me the most is the table with system failure rate requirements versus passenger count (AMC VTOL.2510). I&amp;#x27;ve copied the table below for reference. A summarized definition of the terms is:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Catastrophic -&lt;/b&gt; A failure condition which results in multiple fatalities (usually loss of the aircraft)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Hazardous&lt;/b&gt; - A failure condition which results in very reduced safety margins, greatly increased crew workload, or a serious injury / fatality to a few passengers&lt;/li&gt;&lt;li&gt;&lt;b&gt;Major&lt;/b&gt; - Flight crew discomfort, significantly reduced safety margin, injury or distress to passengers&lt;/li&gt;&lt;li&gt;&lt;b&gt;Minor&lt;/b&gt; - Slight reduction in safety margin or increased crew workload that is well within their capability to manage&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;

&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm2.staticflickr.com/1963/44646989574_287d37673e_b.jpg&quot; class=&quot;img-responsive&quot; /&gt;&lt;/div&gt;

&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;The current CS-23/14 CFR 23.1510 safety standards use the same probability vs. consequence table, but with different cutoff points for passenger count. ASTM F3061 and F3230 (the consensus standards in question) sets category breaks at 0 to 1, 2 to 6, 7 to 9, and 10 to 19 passengers and depends on whether the aircraft in question uses a single reciprocating engine, multiple engines, or turbine engines. The &lt;i&gt;previous&lt;/i&gt; amendment level of the FAA rules had a weight-based breakdown as well.&lt;/p&gt;&lt;p&gt;Do you find that confusing? So did I, so I made this helpful chart for you making a direct comparison between the proposed special condition and the existing Part 23 rules.&lt;/p&gt;&lt;/div&gt;

&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm2.staticflickr.com/1933/30434688477_0463acc8ba_b.jpg&quot; class=&quot;img-responsive&quot; /&gt;&lt;/div&gt;

&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;b&gt;The big news here is that commercial eVTOLs carrying just 1 passenger will need to meet the same level of safety as commuter airliners carrying 19 passengers.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;I expect a lot of pushback from the startups about this in particular. On the other hand, if we have hundreds of thousands or millions of these things flying around in big cities, they need a high level of safety assurance to prevent a big risk to the public on the ground.&lt;/p&gt;&lt;p&gt;The good news for people interested in purchasing an eVTOL for personal use is that the barrier is a lot lower. A basic category vehicle needs a level of safety equivalent to a Cirrus. More safety is great, but it comes at a cost in both development and equipment capability that owners may not need. The bad news is that these aircraft won&amp;#x27;t normally be allowed to operate in congested areas, which rules out a lot of important use cases.&lt;/p&gt;&lt;h3&gt;Fire protection&lt;/h3&gt;&lt;p&gt;One of the biggest potential pitfalls in certifying electric aircraft is the as-yet poorly understood failure characteristics of battery packs. The well-publicized X-57 battery pack thermal runaway illustrates that even technically sophisticated teams can get the pack design wrong. The safety analysis for the X-57 includes battery fire as a critical hazard requiring mitigation since it may be unrecoverable for the pilot.&lt;/p&gt;&lt;p&gt;The proposed special condition requires designating &amp;quot;fire zones&amp;quot; and incorporating fire protection systems to ensure that a fire does not preclude a controlled emergency landing. Above and beyond the specific design requirements for fire prevention / suppression, the top-level probability of a catastrophic failure needs to consider thermal runaway as part of the chain of possible events.&lt;/p&gt;&lt;p&gt;Extinguishing lithium ion battery fires is notoriously difficult and has already (almost certainly) downed two freighter aircraft. Designing compliant aircraft with appropriate safety performance, especially commercial aircraft, will be extremely challenging. Even estimating the probability of thermal runaway per flight hour will be very challenging by itself.&lt;/p&gt;&lt;p&gt;Another requirement (2430a1) demands that fire in one battery (or any other component) not result in the release of stored energy in some other component. In other words, the battery packs need to be redundant electrically &lt;i&gt;and&lt;/i&gt; physically separated enough that there is very little chance of a fire in one spreading to the other.&lt;/p&gt;&lt;h3&gt;Foreign object threats&lt;/h3&gt;&lt;p&gt;The special condition requires propulsion systems to account for &amp;quot;foreign object threats&amp;quot; specifically. I have often wondered about what will happen when a multirotor aircraft flies through a flock of birds. This type of &lt;i&gt;common-cause&lt;/i&gt; failure sometimes produces failure conditions that are far outside the bounds of what the designers intended. For example, the Miracle on the Hudson involved an extremely rare dual engine failure as a result of a bird strike. Like fire protection, aircraft designers will need to incorporate this threat into their safety analysis, and the challenge will be much greater for Enhanced aircraft.&lt;/p&gt;&lt;h3&gt;Additional requirements for Enhanced category&lt;/h3&gt;&lt;p&gt;In addition to the most stringent top-level safety requirements, Enhanced (commercial / urban) category aircraft will need to demonstrate &lt;b&gt;continued safe flight and landing&lt;/b&gt; after a &amp;quot;critical malfunction&amp;quot; of thrust / lift. Continued safe flight and landing is defined explicitly here and requires landing at an &amp;quot;operating site&amp;quot;. In other words, a forced landing away from an operational vertiport is probably not good enough. This also means that ballistic recovery parachutes are &lt;i&gt;not&lt;/i&gt; a sufficient design feature to comply with CSFL in the event of a critical failure. &amp;quot;Critical malfunction&amp;quot; wasn&amp;#x27;t previously a regulatory term I&amp;#x27;m familiar with , but from the context we can occur that it is one or more &amp;quot;hazardous&amp;quot; failure scenarios of the propulsion system.&lt;/p&gt;&lt;p&gt;Enhanced aircraft will need some additional handbook data to be calculated (e.g. takeoff performance considering critical malfunction) as well as procedures / systems for monitoring structural health and system reliability. Bird strike protection is only required for Enhanced, but since the speeds will be fairly slow I don&amp;#x27;t think this will be a terribly difficult challenge.&lt;/p&gt;&lt;h3&gt;Autonomy&lt;/h3&gt;&lt;p&gt;The special condition is written to allow for forward compatibility with autonomy. Any design requirements specifically relating to the crew will be interpreted as not applicable if the crew is not part of the aircraft&amp;#x27;s intended operation.&lt;/p&gt;&lt;h3&gt;Software&lt;/h3&gt;&lt;p&gt;In the safety table from the proposed special condition, there are a number of references to FDAL (functional development assurance level). This refers to a specific set of software quality assurance procedures used by EASA and the FAA to ensure that there are as few errors as possible in flight critical software. The most stringent level, FDAL A, requires independent reviewers to confirm that software meets certain procedural and functional requirements. I&amp;#x27;m not a software guy, but my understanding is that &lt;b&gt;FDAL A is a lot more expensive&lt;/b&gt; than FDAL D and there&amp;#x27;s something of a continuum between them. It may not even be possible, with methods we know today, to certify black-box machine learning algorithms with these processes.&lt;/p&gt;&lt;h3&gt;Requirements relaxed from CS-23&lt;/h3&gt;&lt;p&gt;There are a few odds and ends missing from the special condition that simply don&amp;#x27;t apply to eVTOL aircraft, such as buffeting constraints and certain stall characteristics.&lt;/p&gt;&lt;h2&gt;What Comes Next&lt;/h2&gt;&lt;p&gt;This is &amp;quot;just&amp;quot; a proposal, and EASA is currently seeking public input. After the first round of public comment, EASA may propose a revised version for further comment, or the rule may become final. I am not an expert in EASA procedures, but for more information &lt;a href=&quot;http://jdasolutions.aero/blog/easa-starts-path-vtol-certification/&quot;&gt;this&lt;/a&gt; is a good source on what comes next for this particular measure. It may be a long time before the final rule is published, but this is an important first step, and at the point where a regulator proposes a new rule, they&amp;#x27;re not likely to just drop it altogether based on public comment.&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;This proposed Special Condition is a big step forward toward eVTOL certification. I think the safety requirements will help ensure that the high level of safety that consumers have come to expect from commercial aviation will be maintained in the urban air mobility space. However, I wouldn&amp;#x27;t be surprised to see a lot of pushback, particularly on the stringent requirements for small, 0-2 passenger aircraft operated for profit or over congested areas. I&amp;#x27;m not sure it&amp;#x27;s even possible at this point for &lt;i&gt;any&lt;/i&gt; electric aircraft to meet the Enhanced safety requirements, since we know so little about how to design absolutely reliable battery packs. In the few thousand hours of total electric flight time so far, we have one fatal hull loss and several near misses.&lt;/p&gt;&lt;p&gt;The heavy emphasis on quantitative safety analysis will demand new and innovative simulation and analysis tools to help engineers keep track of all of the potential hazards, and how they might interact in complex ways. Even though the top-level performance requirements are rigorous, developers have a great deal of freedom to meet those requirements in the way they see fit. The design space in eVTOL is huge, and there&amp;#x27;s nothing (to my eye) in the proposed special condition that limits that creativity unnecessarily.&lt;/p&gt;&lt;/div&gt;</content><author><name>Ben Brelje</name></author><category term="electric flight" /><category term="regulation" /><category term="EASA" /><category term="E-VTOL" /><category term="electric propulsion" /><summary type="html">EASA dropped big news on Monday, announcing a proposed special condition under which electric VTOL aircraft under 2000kg may be certified in the European Union. This is the most concrete pathway to certification from a major western regulator and is sure to be followed closely by the FAA (which tends to keep regulations in sync with Europe for the most part, and vice versa). I&amp;#x27;ll take a quick look at the updated rule and identify the novel issues raised. Several of the points are sure to be contentious, and I expect the public comment period to be quite lively.</summary></entry><entry><title type="html">Aerodynamics of the Winter Olympics - Part One (Speed Skating)</title><link href="https://brelje.net/blog/aerodynamics-winter-olympics-part-one-speed-skating/" rel="alternate" type="text/html" title="Aerodynamics of the Winter Olympics - Part One (Speed Skating)" /><published>2018-01-29T00:00:00+00:00</published><updated>2018-01-29T00:00:00+00:00</updated><id>https://brelje.net/blog/aerodynamics-winter-olympics-part-one</id><content type="html" xml:base="https://brelje.net/blog/aerodynamics-winter-olympics-part-one-speed-skating/">&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;The Olympics are about both training the human body to its highest potential &lt;i&gt;and &lt;/i&gt;harnessing creative engineering to gain a competitive edge. At the Winter Olympics in particular, technology plays a key role in athletes' competitiveness. As I have time, I hope to write a quick post on how aerospace engineering principles apply to athletic performance at Winter Olympic sports. Today's topic: speed skating.&lt;/p&gt;&lt;p&gt;&lt;i&gt;Full disclosure: I'm an aerodynamicist and a cyclist but I can barely skate. &lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;Speed skating is both a sprint and endurance sport, with events from 500m to 10km. Because of the extremely low friction of the skates on the ice, the primary force reducing an athlete's speed is aerodynamic drag. Reducing drag is, therefore, a paramount consideration in achieving a spot on the podium. &lt;/p&gt;&lt;p&gt;Streamlined shapes are usually much longer than they are wide. When air or water flows over a streamlined shape (like a fish, or an airplane), it remains attached over almost the entire length. Streamlined shapes usually have very modest curvature, and they generally come to a point on the downwind / trailing side. Swimmers do a great job of streamlining, as seen by Michael Phelps in the video below. Skeleton and luge athletes do the same thing. Generally, streamlined shapes have the lowest drag. &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;

&lt;!--more--&gt;

&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/hvbGrfpCsjo?rel=0&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;On the other hand, speed skaters stand upright in order to stay balanced and transfer power. Any shape that is much wider than it is long, or any shape that ends abruptly in a flat surface (such as a runner or a semi truck) is called a&lt;i&gt; blunt body&lt;/i&gt;. Flow does not stay smoothly attached to a blunt body like it does on a streamlined body: it tends to separate and form a low-pressure void on the leeward side. This separation-induced pocket of low pressure causes what is known as &lt;i&gt;pressure drag, &lt;/i&gt;and it is by far the largest source of drag for speed skaters and many other athletes.&lt;/p&gt;&lt;p&gt;This great video by MAN Trucks illustrates the flow characteristics of streamlined and blunt shapes. At the 0:25 mark, you can see the massively separated flow behind the truck. Blue indicates low pressure.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/_NPNiyR5cWo?rel=0&amp;amp;start=14&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;A similar phenomenon occurs behind speed skaters, as illustrated by this short-track skater from Olympic trials. I like this picture because it's a side view, and because her ponytail serves as a kind of flow visualization!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;script data-pagespeed-no-defer=&quot;&quot;&gt;//&lt;![CDATA[
(function(){for(var g=&quot;function&quot;==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError(&quot;ES3 does not support getters and setters.&quot;);b!=Array.prototype&amp;&amp;b!=Object.prototype&amp;&amp;(b[c]=a.value)},h=&quot;undefined&quot;!=typeof window&amp;&amp;window===this?this:&quot;undefined&quot;!=typeof global&amp;&amp;null!=global?global:this,k=[&quot;String&quot;,&quot;prototype&quot;,&quot;repeat&quot;],l=0;l&lt;k.length-1;l++){var m=k[l];m in h||(h[m]={});h=h[m]}var n=k[k.length-1],p=h[n],q=p?p:function(b){var c;if(null==this)throw new TypeError(&quot;The 'this' value for String.prototype.repeat must not be null or undefined&quot;);c=this+&quot;&quot;;if(0&gt;b||1342177279&lt;b)throw new RangeError(&quot;Invalid count value&quot;);b|=0;for(var a=&quot;&quot;;b;)if(b&amp;1&amp;&amp;(a+=c),b&gt;&gt;&gt;=1)c+=c;return a};q!=p&amp;&amp;null!=q&amp;&amp;g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split(&quot;.&quot;),d=t;a[0]in d||!d.execScript||d.execScript(&quot;var &quot;+a[0]);for(var e;a.length&amp;&amp;(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0&lt;c){for(var a=Array(c),d=0;d&lt;c;d++)a[d]=b[d];return a}return[]};function w(b){var c=window;if(c.addEventListener)c.addEventListener(&quot;load&quot;,b,!1);else if(c.attachEvent)c.attachEvent(&quot;onload&quot;,b);else{var a=c.onload;c.onload=function(){b.call(this);a&amp;&amp;a.call(this)}}};var x;function y(b,c,a,d,e){this.h=b;this.j=c;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=d;this.b={};this.a=[];this.c={}}function z(b,c){var a,d,e=c.getAttribute(&quot;data-pagespeed-url-hash&quot;);if(a=e&amp;&amp;!(e in b.c))if(0&gt;=c.offsetWidth&amp;&amp;0&gt;=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;a=d.top+(&quot;pageYOffset&quot;in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+(&quot;pageXOffset&quot;in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+&quot;,&quot;+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a&lt;=b.g.height&amp;&amp;d&lt;=b.g.width)}a&amp;&amp;(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&amp;&amp;z(this,b)};u(&quot;pagespeed.CriticalImages.checkImageForCriticality&quot;,function(b){x.checkImageForCriticality(b)});u(&quot;pagespeed.CriticalImages.checkCriticalImages&quot;,function(){A(x)});function A(b){b.b={};for(var c=[&quot;IMG&quot;,&quot;INPUT&quot;],a=[],d=0;d&lt;c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&amp;&amp;a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a=&quot;oh=&quot;+b.l;b.f&amp;&amp;(a+=&quot;&amp;n=&quot;+b.f);if(c=!!b.a.length)for(a+=&quot;&amp;ci=&quot;+encodeURIComponent(b.a[0]),d=1;d&lt;b.a.length;++d){var e=&quot;,&quot;+encodeURIComponent(b.a[d]);131072&gt;=a.length+e.length&amp;&amp;(a+=e)}b.i&amp;&amp;(e=&quot;&amp;rd=&quot;+encodeURIComponent(JSON.stringify(B())),131072&gt;=a.length+e.length&amp;&amp;(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;)}catch(r){try{f=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)}catch(D){}}f&amp;&amp;(f.open(&quot;POST&quot;,d+(-1==d.indexOf(&quot;?&quot;)?&quot;?&quot;:&quot;&amp;&quot;)+&quot;url=&quot;+encodeURIComponent(b)),f.setRequestHeader(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName(&quot;IMG&quot;);if(!c.length)return{};var a=c[0];if(!(&quot;naturalWidth&quot;in a&amp;&amp;&quot;naturalHeight&quot;in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute(&quot;data-pagespeed-url-hash&quot;);e&amp;&amp;(!(e in b)&amp;&amp;0&lt;a.width&amp;&amp;0&lt;a.height&amp;&amp;0&lt;a.naturalWidth&amp;&amp;0&lt;a.naturalHeight||e in b&amp;&amp;a.width&gt;=b[e].o&amp;&amp;a.height&gt;=b[e].m)&amp;&amp;(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C=&quot;&quot;;u(&quot;pagespeed.CriticalImages.getBeaconData&quot;,function(){return C});u(&quot;pagespeed.CriticalImages.Run&quot;,function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&amp;&amp;w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','https://brelje.net/blog/aerodynamics-winter-olympics-part-one-speed-skating/','8Xxa2XQLv9',true,false,'v53w5Ybeiok');
//]]&gt;&lt;/script&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4766/28180194689_a1d705331f_o.jpg&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;290598636&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Source: US Speedskating&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The athlete is in a nice, low aero position. Her upper body is nearly parallel to the ice (and to the flow), meaning that her head and upper body will be streamlined and the flow should stay nicely attached. Her ponytail is not flapping in the wind, indicating that the flow is indeed attached in that region. Her left arm seems to be tucked in next to the body and streamlined. &lt;/p&gt;&lt;p&gt;It's another story in the region of the lower back. Based on aerodynamic simulations of cyclists in a similar, tucked position [2], I expect there is flow separation because of the abrupt change in angle at the bend in the waist. The flow behind this area is going to be massively separated and result in pressure drag pretty much no matter what we do.&lt;/p&gt;&lt;p&gt;The legs and right arm are a middle ground. Arms and legs are pretty much circular in cross section. Circular cylinders are very commonly studied blunt body shapes in aerodynamics. We expect separation behind these regions as well, but not as extensively as the area behind the waist.&lt;/p&gt;&lt;p&gt;We've examined the speed skater from a pressure drag perspective. Another cause of drag is called &lt;i&gt;skin friction drag&lt;/i&gt;: that's the force of air &quot;sticking&quot; to the athlete as the athlete passes through. This is not a big consideration for land-based athletes, but it could be very important for swimmers, since water is a much &quot;thicker&quot; substance.&lt;/p&gt;&lt;p&gt;So we've identified a  few options for reducing aerodynamic drag in speed skaters:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Reduce the frontal area (skaters do this by crouching, and keeping arms and legs in line with each other when possible)&lt;/li&gt;&lt;li&gt;Reduce the viscous drag (not a big contributor to drag in this case)&lt;/li&gt;&lt;li&gt;Draft in the low-pressure separated flow behind the competition!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Reduce pressure drag by decreasing the amount of flow separation around the arms and legs&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is the focus of Under Armour's recently revealed uniform for the U.S. Speedskating Team, as seen in the video below:&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/DHABdq0Qzf0?rel=0&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;Under Armour claims that the dimpled texture of the fabric will reduce aerodynamic drag. But how? The answer lies in the concept of &lt;i&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Laminar%E2%80%93turbulent_transition&quot;&gt;laminar to turbulent transition&lt;/a&gt;. &lt;/i&gt;At speed-skating air velocities (around 15 m/s), air naturally wants to flow very smoothly and steadily along the athlete. This is known as laminar flow. At higher speeds (such as on an airplane's wing), flow near a surface tends to fluctuate randomly (turbulent flow). Generally, turbulent flow causes higher skin friction drag than laminar flow; therefore, aircraft designers usually &lt;a href=&quot;http://www.aviation-history.com/theory/lam-flow.htm&quot;&gt;try to achieve as much laminar flow as possible&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;It's exactly the opposite goal for speed skating. Fluid dynamics researchers discovered very early that laminar flow separates from a circular cylinder much more readily than turbulent flow. &lt;b&gt;Turbulent flow resists separation. &lt;/b&gt;Therefore, if we can &lt;i&gt;artificially induce &lt;/i&gt;turbulent flow around the arms and legs of the athlete, we can potentially reduce separation and pressure drag. The process is illustrated in the schematic below. But how can we engineer a premature transition to turbulent flow at speeds much lower than airplanes?&lt;/p&gt;&lt;p&gt;Manufacturers of early, smooth golf balls discovered the answer by accident, when their customers realized that their old, beat up balls flew further than brand-new ones. Surface dimpling is actually an effective way to induce turbulent flow. The now-turbulent flow around the golf ball greatly reduced separation and pressure drag. Dimples have been a design feature of golf balls ever since. &lt;/p&gt;&lt;p&gt;Under Armour is using the same approach to reduce drag over the arms and legs of the speed skater. They developed a special dimpled fabric, which should be at least slightly effective in reducing drag over the arms and legs.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4694/39070358775_6222b00269_o.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;1168045660&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;But how big should the dimples be? This depends on the speed of the skater. Results from a 1957 experiment [1] give us an equation for this: $$k \approx \frac{120 \nu}{U}$$&lt;/p&gt;&lt;p&gt;Where:&lt;/p&gt;&lt;p&gt;k - height of the surface roughness (m)&lt;/p&gt;&lt;p&gt;U - flow speed (m/s)&lt;/p&gt;&lt;p&gt;ν - kinematic viscosity of air (m^2/s)&lt;/p&gt;&lt;p&gt;If we plug in typical speed-skating numbers, we get surface roughness on the order of 0.2mm-1mm, which visually matches what Under Armour's pictures are showing. It's more roughness than we'd expect from a regular textile.&lt;/p&gt;&lt;p&gt;A recent journal article [2] on cycling aerodynamics (similar speeds and posture to speed skating) confirmed that a properly designed skinsuit could save up to 4% drag. The recommended design strategies were:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Induce turbulent flow to prevent separation over the arms and legs&lt;/li&gt;&lt;li&gt;In areas of attached flow (such as the upper torso and helmet), use smooth fabric to reduce viscous drag&lt;/li&gt;&lt;li&gt;In areas of completely separated flow (such as the lower back), the fabric has a negligible effect&lt;/li&gt;&lt;li&gt;Use tight fit, smooth out wrinkles, and eliminate seams to reduce drag generally&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It looks like Under Armour used those strategies exactly. According to &lt;a href=&quot;https://www.wired.com/story/under-armour-olympic-speed-skating-suit/&quot;&gt;Wired Magazine&lt;/a&gt;, the Under Armour team spent a significant amount of time collecting experimental data in a wind tunnel. They also most likely used &lt;i&gt;computational fluid dynamics &lt;/i&gt; to better understand the flow patters around speed skaters. CFD is a major component of my PhD research.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Based on my engineering analysis, it looks like our speed skaters will have a nearly optimal aerodynamic skinsuit for the 2018 Olympics! &lt;/b&gt;If they want to use aerodynamics to maximum advantage, they'll need to keep an optimal aerodynamic stance, and use the low-pressure wake left by their opponents to draft and conserve energy. Until they break away for the win, of course!&lt;/p&gt;&lt;p&gt;&lt;i&gt;Citations:&lt;/i&gt;&lt;/p&gt;&lt;p&gt;[1] Feindt, E. G. 1957 Untersuchungen uber die Abhangigkeit des Umschlages Laminarturbulent von der Oberflachenrauhigkeit und der Druckverteilung. Jb. Schiffbautech. Ges. 50, 180.&lt;/p&gt;&lt;p&gt;[2] Crouch, T. Burton, D. LaBry, Z. Blair, K. 2017 Riding against the wind: a review of competition cycling
aerodynamics. &lt;i&gt;Sports Eng &lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ben Brelje</name></author><category term="design optimization" /><category term="optimization" /><category term="aerodynamics" /><category term="athletics" /><summary type="html">The Olympics are about both training the human body to its highest potential and harnessing creative engineering to gain a competitive edge. At the Winter Olympics in particular, technology plays a key role in athletes' competitiveness. As I have time, I hope to write a quick post on how aerospace engineering principles apply to athletic performance at Winter Olympic sports. Today's topic: speed skating.Full disclosure: I'm an aerodynamicist and a cyclist but I can barely skate. Speed skating is both a sprint and endurance sport, with events from 500m to 10km. Because of the extremely low friction of the skates on the ice, the primary force reducing an athlete's speed is aerodynamic drag. Reducing drag is, therefore, a paramount consideration in achieving a spot on the podium. Streamlined shapes are usually much longer than they are wide. When air or water flows over a streamlined shape (like a fish, or an airplane), it remains attached over almost the entire length. Streamlined shapes usually have very modest curvature, and they generally come to a point on the downwind / trailing side. Swimmers do a great job of streamlining, as seen by Michael Phelps in the video below. Skeleton and luge athletes do the same thing. Generally, streamlined shapes have the lowest drag.</summary></entry><entry><title type="html">E-flight Roundup: New Flight Tests, New Entrants, and New Hype</title><link href="https://brelje.net/blog/e-flight-roundup-new-flight-tests-new-entrants-and-new-hype/" rel="alternate" type="text/html" title="E-flight Roundup: New Flight Tests, New Entrants, and New Hype" /><published>2018-01-20T00:00:00+00:00</published><updated>2018-01-20T00:00:00+00:00</updated><id>https://brelje.net/blog/eflight-roundup</id><content type="html" xml:base="https://brelje.net/blog/e-flight-roundup-new-flight-tests-new-entrants-and-new-hype/">&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;Two months of eVTOL developments in one post!&lt;/p&gt;&lt;p&gt;&lt;b&gt;Launches/reveals&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Erik Lindbergh (yes, that Lindbergh) launches VerdeGo&lt;/li&gt;&lt;li&gt;Bell Helicopter shows cabin mockup&lt;/li&gt;&lt;li&gt;Hopflyt goes public with eVTOL craft based on Custer Channelwing concept&lt;/li&gt;&lt;li&gt;Detroit Aircraft shows mockup at Detroit auto show&lt;/li&gt;&lt;li&gt;Vimana, the worst eVTOL concept yet (now with BLOCKCHAIN and 100% NATURAL AUTO-STABILIZATION!)&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Test flights&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Vahana (apparently) misses targeted 2017 first flight&lt;/li&gt;&lt;li&gt;Workhorse Surefly accomplishes tethered flight at Consumer Electronics Show&lt;/li&gt;&lt;li&gt;Boeing reveals multirotor, heavy-lift cargo drone&lt;/li&gt;&lt;li&gt;Zee Aero shows some old flight test footage on CNN&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;b&gt;Industry developments&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Uber makes strange request of City of LA government&lt;/li&gt;&lt;li&gt;Uber hires away Tesla's top battery expert&lt;/li&gt;&lt;li&gt;AHS holds sold-out eVTOL technical meeting in San Francisco&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;

&lt;!--more--&gt;

&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;There's been a flurry of activity since Thanksgiving; I will address only vertical lift applications in this update and discuss fixed wing developments in a separate post.&lt;/p&gt;&lt;h3&gt;Reveals / New info&lt;/h3&gt;&lt;p&gt;&lt;b&gt;VerdeGo goes public&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Erik Lindbergh, grandson of aviation pioneer Charles Lindbergh, has stepped into the eVTOL fray with partners Pat Anderson (of Embry Riddle) and Eric Bartsch (electric transportation entrepreneur) (&lt;a href=&quot;http://aviationweek.com/vertical-flight/lindbergh-flies-electric-vtol-air-taxi-market&quot;&gt;AvWeek&lt;/a&gt;). Their proposed &lt;a href=&quot;https://www.verdegoaero.com/&quot;&gt;PAT200&lt;/a&gt; personal air taxi looks very similar to Airbus Vahana. The design is a series hybrid rather than all-electric, which will help with range and possibly weight, but not with cost or noise. Bartsch describes the drivetrain as &quot;electron-agnostic&quot;, meaning it is forward-compatible with better future batteries; this is a similar argument to what Zunum Aero is saying in the fixed wing domain. First scale model flights are planned for 2018.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;script data-pagespeed-no-defer=&quot;&quot;&gt;//&lt;![CDATA[
(function(){for(var g=&quot;function&quot;==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError(&quot;ES3 does not support getters and setters.&quot;);b!=Array.prototype&amp;&amp;b!=Object.prototype&amp;&amp;(b[c]=a.value)},h=&quot;undefined&quot;!=typeof window&amp;&amp;window===this?this:&quot;undefined&quot;!=typeof global&amp;&amp;null!=global?global:this,k=[&quot;String&quot;,&quot;prototype&quot;,&quot;repeat&quot;],l=0;l&lt;k.length-1;l++){var m=k[l];m in h||(h[m]={});h=h[m]}var n=k[k.length-1],p=h[n],q=p?p:function(b){var c;if(null==this)throw new TypeError(&quot;The 'this' value for String.prototype.repeat must not be null or undefined&quot;);c=this+&quot;&quot;;if(0&gt;b||1342177279&lt;b)throw new RangeError(&quot;Invalid count value&quot;);b|=0;for(var a=&quot;&quot;;b;)if(b&amp;1&amp;&amp;(a+=c),b&gt;&gt;&gt;=1)c+=c;return a};q!=p&amp;&amp;null!=q&amp;&amp;g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split(&quot;.&quot;),d=t;a[0]in d||!d.execScript||d.execScript(&quot;var &quot;+a[0]);for(var e;a.length&amp;&amp;(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0&lt;c){for(var a=Array(c),d=0;d&lt;c;d++)a[d]=b[d];return a}return[]};function w(b){var c=window;if(c.addEventListener)c.addEventListener(&quot;load&quot;,b,!1);else if(c.attachEvent)c.attachEvent(&quot;onload&quot;,b);else{var a=c.onload;c.onload=function(){b.call(this);a&amp;&amp;a.call(this)}}};var x;function y(b,c,a,d,e){this.h=b;this.j=c;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=d;this.b={};this.a=[];this.c={}}function z(b,c){var a,d,e=c.getAttribute(&quot;data-pagespeed-url-hash&quot;);if(a=e&amp;&amp;!(e in b.c))if(0&gt;=c.offsetWidth&amp;&amp;0&gt;=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;a=d.top+(&quot;pageYOffset&quot;in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+(&quot;pageXOffset&quot;in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+&quot;,&quot;+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a&lt;=b.g.height&amp;&amp;d&lt;=b.g.width)}a&amp;&amp;(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&amp;&amp;z(this,b)};u(&quot;pagespeed.CriticalImages.checkImageForCriticality&quot;,function(b){x.checkImageForCriticality(b)});u(&quot;pagespeed.CriticalImages.checkCriticalImages&quot;,function(){A(x)});function A(b){b.b={};for(var c=[&quot;IMG&quot;,&quot;INPUT&quot;],a=[],d=0;d&lt;c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&amp;&amp;a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a=&quot;oh=&quot;+b.l;b.f&amp;&amp;(a+=&quot;&amp;n=&quot;+b.f);if(c=!!b.a.length)for(a+=&quot;&amp;ci=&quot;+encodeURIComponent(b.a[0]),d=1;d&lt;b.a.length;++d){var e=&quot;,&quot;+encodeURIComponent(b.a[d]);131072&gt;=a.length+e.length&amp;&amp;(a+=e)}b.i&amp;&amp;(e=&quot;&amp;rd=&quot;+encodeURIComponent(JSON.stringify(B())),131072&gt;=a.length+e.length&amp;&amp;(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;)}catch(r){try{f=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)}catch(D){}}f&amp;&amp;(f.open(&quot;POST&quot;,d+(-1==d.indexOf(&quot;?&quot;)?&quot;?&quot;:&quot;&amp;&quot;)+&quot;url=&quot;+encodeURIComponent(b)),f.setRequestHeader(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName(&quot;IMG&quot;);if(!c.length)return{};var a=c[0];if(!(&quot;naturalWidth&quot;in a&amp;&amp;&quot;naturalHeight&quot;in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute(&quot;data-pagespeed-url-hash&quot;);e&amp;&amp;(!(e in b)&amp;&amp;0&lt;a.width&amp;&amp;0&lt;a.height&amp;&amp;0&lt;a.naturalWidth&amp;&amp;0&lt;a.naturalHeight||e in b&amp;&amp;a.width&gt;=b[e].o&amp;&amp;a.height&gt;=b[e].m)&amp;&amp;(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C=&quot;&quot;;u(&quot;pagespeed.CriticalImages.getBeaconData&quot;,function(){return C});u(&quot;pagespeed.CriticalImages.Run&quot;,function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&amp;&amp;w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','https://brelje.net/blog/e-flight-roundup-new-flight-tests-new-entrants-and-new-hype/','8Xxa2XQLv9',true,false,'c6IPekAK1FI');
//]]&gt;&lt;/script&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4700/39087672654_8230ec02ce_o.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;3890716257&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Credit: VerdeGo&lt;/i&gt;&lt;/p&gt;&lt;p&gt;I don't see any technical showstoppers at first glance (compared with other eVTOL proposals), but without an announced major investor, I wonder how long their funding runway is.  Pat Anderson was a good selection for the leadership team; the ecoEagle electric aircraft project at Embry Riddle had a challenging set of requirements and was one of only a handful of aircraft to fly in the NASA Green Flight Challenge. ecoEagle used a parallel hybrid drivetrain with 105kW maximum total power.&lt;/p&gt;&lt;p&gt;It can't be harder than flying across the Atlantic solo for the first time. Can it?&lt;/p&gt;&lt;p&gt;&lt;b&gt;Bell Helicopter cabin teaser&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Textron subsidiary Bell Helicopter announced at the 2017 Uber Elevate summit that they would be developing an urban air taxi. Until now, we haven't had a glimpse of what they've been up to in Fort Worth. Well, now we have a little teaser. Bell built a cabin mockup (with no hints at the propulsion architecture) and &lt;a href=&quot;https://www.theverge.com/2018/1/8/16865404/bell-helicopter-electric-air-taxi-uber-ces-2018&quot;&gt;displayed&lt;/a&gt; it at the Consumer Electronics Show (CES) in Vegas this month. Sure looks slick!&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4662/39087672844_4777b14180_o.jpg&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;950035637&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Credit: Bell Helicopter&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;The Custer channelwing lives again&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Way back in 1929, Willard Custer patented a semi-circular ducted propeller installation with claimed short takeoff or landing (STOL) capabilities. A series of &lt;a href=&quot;https://en.wikipedia.org/wiki/Custer_Channel_Wing&quot;&gt;prototypes&lt;/a&gt; followed from the 1940s to 1960s. In the 1950s, Taylorcraft was the first manufacturer to announce plans for a production model (see awesome archived Flight magazine article &lt;a href=&quot;https://www.flightglobal.com/pdfarchive/view/1952/1952%20-%200044.html&quot;&gt;here&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;The channelwing idea is to use a pusher propeller on the trailing edge of the wing to generate low pressures on the top surface of the wing and favorable pressure gradients to keep flow attached at high lift coefficient. By reshaping the wing into a semicircular duct, the propeller sucks in air only from the top surface of the wing rather than from the top and bottom (as a typical pusher installation would). The Custer prototypes demonstrated good low speed performance but suffered greatly from high drag and weight; economically, they could never compete with conventional propeller aircraft, even for STOL missions.&lt;/p&gt;&lt;p&gt;Well, the HopFlyt company has been working on a tilt/channelwing concept since the Uber Elevate summit and they recently &lt;a href=&quot;http://aviationweek.com/commercial-aviation/week-technology-jan-8-12-2018&quot;&gt;announced&lt;/a&gt; that they've been seeing encouraging results from scale model flights.  The leadership team is mostly pilots and test engineers.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4620/39087672764_e9ebe67d35_o.jpg&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;2561965364&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Credit: HopFlyt&lt;/i&gt;&lt;/p&gt;&lt;p&gt;It's unclear to me why the channelwing concept makes sense for a tilt-wing vehicle, which can already take off vertically. I suppose it is possible that it is slightly more efficient to generate blown lift over a wing than to generate direct lift using the same propellers, but that seems like a free lunch from an aerodynamics perspective. For all other phases of flight, the airplane will suffer weight and drag penalties just like the Custer prototypes did. One interesting possibility is that the channelwing isn't so much for aerodynamic performance as it is for &lt;i&gt;noise&lt;/i&gt;. Structural shielding is generally the best option for reducing noise signature, and the channelwing shrouds the contra-rotating propellers from an observer on the ground from nearly every direction.&lt;/p&gt;&lt;p&gt;&lt;b&gt;AirspaceX at the North American International Auto Show&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Yet another Uber Elevate competitor is AirspaceX (not to be confused with SpaceX) based in Detroit, MI. As a Michigan native, I'm rooting for these guys. Rotor and Wing &lt;a href=&quot;http://www.rotorandwing.com/2018/01/16/urban-mobility-vtol-model-unveiled-detroit-car-show#.WmNLHainEUE&quot;&gt;reports&lt;/a&gt; that AirspaceX showed a mockup of their &quot;MOBi-ONE&quot; concept at Detroit's major auto show. AirspaceX announced at the Uber Elevate summit that they are receiving funding from an auto OEM, but they haven't yet named which one(s) are backing them.&lt;/p&gt;&lt;p&gt;The first iteration, &lt;a href=&quot;http://airspacex.com/news/detroits-airspacex-has-answer-to-gridlock-a-flying-taxi-by-m-lapham-on-01-17-2018/&quot;&gt;MOBi-ONE&lt;/a&gt;, appears to be an all-electric design with Uber Elevate mission capabilities (short range, modest speed). It is a single tilt-wing configuration most similar to the Joby S2, with vertically-oriented fans along the tail boom. It looks just as feasible as the other tilt-wings. AirspaceX's &quot;planned&quot; first flight is 2020.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4766/39087672714_72d3cb4b66_o.jpg&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;4100272722&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Credit: AirspaceX&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The next iteration, &quot;MOBi 2025&quot; is even less conventional, with a tilt-wing frame and detachable passenger/cargo/utility pods. This is more similar to the modular approach taken by CityAirbus and (presumably) Bell Helicopter.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/85BeP_VwcsQ&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;b&gt;Cynical Vimana project: will it take investor money and run?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Some eVTOL projects are ill-conceived or unviable ideas promoted by true believers. I can't fault them for trying. But &lt;b&gt;I have a new least favorite eVTOL company&lt;/b&gt;: &lt;a href=&quot;http://vimana.global/index.html&quot;&gt;Vimana Global&lt;/a&gt;. &lt;a href=&quot;http://www.itp.net/615675-new-four-seat-flying-taxi-proposed-for-dubai?tab=article&quot;&gt;Revealed&lt;/a&gt; at the Arab Future Cities Summit, the concept appears to be a loosely-defined hybrid-electric tiltwing. Based on the renderings I've seen, it's completely unrealistic as a vehicle (way too slender structurally and for systems integration, ultra-high disk loading). &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4666/38898832145_cf61b437ac_o.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;986096887&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Credit: Vimana&lt;/i&gt;&lt;/p&gt;&lt;p&gt;What really has me steamed is how CEO Evgeni Borisov appears to be using the current blockchain mania to drive investment in his project. The Vimana &quot;distributed blockhain-based control system&quot; is a truly stupid idea, which appears to be:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;A kind of SEO to drive clicks to his site&lt;/li&gt;&lt;li&gt;A buzzword to get backing from technologically unsophisticated major investors&lt;/li&gt;&lt;li&gt;A transparent ploy to have a bogus &quot;&lt;a href=&quot;https://www.menaherald.com/en/business/transport-logistics/blockchain-airspace-air-taxi-creator-vimana-announces-token-generation&quot;&gt;initial coin offering&lt;/a&gt;&quot; to take money from retail investors&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;It is not necessary or desirable to have a trustless system for peer-to-peer collaborative aircraft guidance.&lt;/b&gt; It &lt;b&gt;is &lt;/b&gt;necessary to transmit telemetry data at very low latencies, something that blockchain systems do horribly. Blockchain was designed for the very narrow technical problem of avoiding double spending, which is not an issue for aircraft collaboration.&lt;p&gt;&lt;/p&gt;&lt;p&gt;The buzzword count is truly remarkable: “Completely autonomous, #blockchain-based and regulated #airspace #ecosystem with 100% natural auto-stabilization during the flight&quot;. What a joke. &lt;b&gt;&lt;i&gt;Do NOT invest in Vimana's ICO&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;h3&gt;&lt;b&gt;Flight test progress&lt;/b&gt;&lt;/h3&gt;&lt;p&gt;&lt;b&gt;Workhorse Surefly flies manned, tethered at CES&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Workhorse, a company mainly known for electric trucks, has flown a manned, series-hybrid electric demonstrator. This is an impressive feat, as the company only announced its entry into the market in mid-2017 and has not previously produced aerospace products. The prototype took off very briefly on the tarmac of the Las Vegas airport during the CES. &lt;/p&gt;&lt;p&gt;There were several media mentions of the planned flight, including in &lt;a href=&quot;http://aviationweek.com/commercial-aviation/week-technology-jan-8-12-2018&quot;&gt;Aviation Week&lt;/a&gt;. However, media coverage following the flight has been nonexistent. The company didn't even update its site with video or a press release. Third-party &lt;a href=&quot;https://youtu.be/8gIBujk7cAE&quot;&gt;video&lt;/a&gt; of the short flight raises some questions (sorry, no embed). The craft appears to have issues with control, evidenced by apparently asymmetric thrust. The noise quality is similar to a general aviation propeller plane (kind of annoying, certainly not quiet). I suspect this noise is due to high disk loading and contra-rotating propellers, not the engine. Hopefully the company resolves issues soon and we'll be treated to more test flight video.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Vahana apparently misses self-imposed first flight goal&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Back in November, Airbus released a &lt;a href=&quot;https://vahana.aero/our-journey-to-pendleton-ab6c79e9fb12&quot;&gt;blog post&lt;/a&gt; detailing the Vahana team's move to their new test site in Pendleton, OR. Several media outlets reported that Airbus planned to make the first flight by the end of the year (&lt;a href=&quot;http://aviationweek.com/awincommercial/airbus-vahana-readied-oregon-flight&quot;&gt;AvWeek&lt;/a&gt;, &lt;a href=&quot;https://www.theverge.com/2017/11/13/16633392/airbus-vahana-flying-car-a-cubed-photos&quot;&gt;source&lt;/a&gt;, &lt;a href=&quot;http://www.ubergizmo.com/2017/11/airbus-flying-car-tested-by-end-2017/&quot;&gt;source&lt;/a&gt;). By all accounts, the aircraft made it to Pendleton unscathed.&lt;/p&gt;&lt;p&gt;Well, we rang in the new year and I can find no evidence of a first flight, manned or unmanned. Vahana has not been an especially secretive project, so I would be very surprised if it did fly and no press release or blog post came out about it. Curiously, the original Vahana blog post now appears to have no references to a 2017 flight test goal (which was originally announced at EAA AirVenture back in August). I can't be certain, but I suspect the blog post has been updated to remove the goal, since media coverage in November did not reference the August announcement separately. &lt;/p&gt;&lt;p&gt;If the weeks continue to go by with no news, it's a clear indication than an unexpected problem was uncovered during ground testing. These schedule slides are very common though. It simply shows that the Vahana team is mortal after all.&lt;/p&gt;&lt;p&gt;&lt;b&gt;A peek of Zee Aero flight testing&lt;/b&gt;&lt;/p&gt;&lt;p&gt;AvWeb &lt;a href=&quot;https://www.avweb.com/avwebflash/news/Zee-Aero-Flies-A-New-VTOL-230125-1.html&quot;&gt;noted&lt;/a&gt; that a recent CNN interview with Sebastian Thrun, CEO of Google/Larry Page-affiliated startup Kitty Hawk, included some B-roll footage of sister company Zee Aero's prototype in flight. Zee Aero later confirmed the authenticity of the video and dated it to 2014. &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/PPaESFlSXVw?start=120&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;It's a unique configuration with no tilt mechanisms. Several lift fans initiate vertical flight, then pusher propellers provide forward motion. The lift fans are later turned off for cruise. Because this footage dates to 2014, it is easy to imagine that Zee Aero has made significant technical progress since then and is likely the industry leader at this point in terms of maturity and flight test experience. Zee Aero has typically been among the most secretive of the eVTOL competitors. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Boeing reveals flight-tested, multirotor cargo UAS&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Rotor and Wing has the &lt;a href=&quot;http://www.rotorandwing.com/2018/01/11/boeing-unveils-vtol-drone-cargo-transport/#.WmNdNainEUE&quot;&gt;story&lt;/a&gt;. Presented without technical comments per my editorial policy. Way to go, Boeing HorizonX team!&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/uluR-dNUPvI&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;h3&gt;Industry Developments&lt;/h3&gt;&lt;p&gt;&lt;b&gt;Uber Elevate asks L.A. mayor to vouch for safety of its eVTOL vehicles&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://motherboard.vice.com/en_us/article/wjzg75/uber-asked-la-mayor-to-vouch-for-the-safety-of-its-still-hypothetical-flying-taxis&quot;&gt;Vice&lt;/a&gt; reports that Uber provided talking points to L.A. Mayor Eric Garcetti which made some unsubstantiated claims about eVTOL safety. On November 8, Uber and the L.A. city government announced a partnership to test urban air taxis in the city. Uber's communications folks tried to shape the mayor's messaging, including providing the following talking point:&lt;/p&gt;&lt;p&gt;&lt;i&gt;How safe is an eVTOL vehicle?&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&quot;For Uber, safety is a top priority. eVTOL aircrafts [sic] need to be much safer than driving a car on a fatalities-per-passenger-mile basis. eVTOL designs will be markedly safer than today's helicopters because they will not be dependent on any single part to stay airborne (e.g. a single rotor) and will ultimately use autonomy technology to significantly reduce operator error.&quot;&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;This is a logical but unsubstantiated claim, especially the comparison between eVTOL and helicopters. The mayor doesn't seem to have repeated this claim in public messaging, but we should keep in mind that eVTOL developers may be shaping government messaging on this topic. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Uber hires away Tesla's top battery expert&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The Verge &lt;a href=&quot;https://www.theverge.com/2018/1/8/16862750/uber-elevate-flying-car-hire-tesla-battery-expert&quot;&gt;reports&lt;/a&gt; that Celina Mikolajczak, senior manager for battery pack development at Tesla, has moved to the Uber Elevate team, where her new title will be &quot;Director of Engineering and Energy Storage Systems&quot;. I'm not sure how big of a deal this is for Tesla, but on the Uber side it could be an indication that the company will be getting more involved in the nuts-and-bolts of engineering design of these vehicles; perhaps even developing an aircraft of their own (although that is pure speculation). At the Uber Elevate summit, Uber indicated that it would &lt;i&gt;not &lt;/i&gt;be seeking to enter the business of aircraft design and manufacturing. If I were an eVTOL developer working with Uber, I would be very careful about sharing any technical data beyond what is absolutely necessary. Mikolajczak joins Mark Moore, NASA Langley's former electric aircraft design guru, at Uber Elevate. &lt;/p&gt;&lt;p&gt;&lt;b&gt;American Helicopter Society hosts eVTOL aerosciences meeting&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The AHS held a sold-out eVTOL technical meeting in San Francisco. The proceedings aren't available just yet (and they won't be free) but you can see the schedule &lt;a href=&quot;https://vtol.org/aeromechanics&quot;&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ben Brelje</name></author><category term="electric flight" /><category term="uber" /><category term="surefly" /><category term="zee aero" /><category term="boeing" /><category term="E-VTOL" /><category term="bell" /><category term="blockchain" /><category term="workhorse" /><category term="detroit aircraft" /><category term="uber elevate" /><category term="hopflyt" /><category term="vimana" /><category term="airspacex" /><category term="vahana" /><category term="airbus" /><category term="verdego" /><summary type="html">Two months of eVTOL developments in one post!Launches/revealsErik Lindbergh (yes, that Lindbergh) launches VerdeGoBell Helicopter shows cabin mockupHopflyt goes public with eVTOL craft based on Custer Channelwing conceptDetroit Aircraft shows mockup at Detroit auto showVimana, the worst eVTOL concept yet (now with BLOCKCHAIN and 100% NATURAL AUTO-STABILIZATION!)Test flightsVahana (apparently) misses targeted 2017 first flightWorkhorse Surefly accomplishes tethered flight at Consumer Electronics ShowBoeing reveals multirotor, heavy-lift cargo droneZee Aero shows some old flight test footage on CNNIndustry developmentsUber makes strange request of City of LA governmentUber hires away Tesla's top battery expertAHS holds sold-out eVTOL technical meeting in San Francisco</summary></entry><entry><title type="html">E-Flight Roundup: Airbus internal competition heating up</title><link href="https://brelje.net/blog/e-flight-roundup-airbus-internal-competition-heating/" rel="alternate" type="text/html" title="E-Flight Roundup: Airbus internal competition heating up" /><published>2017-11-18T00:00:00+00:00</published><updated>2017-11-18T00:00:00+00:00</updated><id>https://brelje.net/blog/eflight-roundup</id><content type="html" xml:base="https://brelje.net/blog/e-flight-roundup-airbus-internal-competition-heating/">&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;ul&gt;&lt;li&gt;The CityAirbus eVTOL demonstrator completes propulsion system ground testing in preparation for first flight in 2018&lt;/li&gt;&lt;li&gt;XTI Trifan announces a major redesign and 60% scale flight test demonstrator&lt;/li&gt;&lt;li&gt;Aurora Flight Sciences joins The Boeing Company&lt;/li&gt;&lt;li&gt;STARC-ABL rev B to be externally assessed by Aurora&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;

&lt;!--more--&gt;

&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;h3&gt;Airbus eVTOL demonstrators making progress&lt;/h3&gt;&lt;p&gt;Airbus is funding two competing urban air mobility concepts concurrently - the CityAirbus by Airbus Helicopters, and Vahana, by Airbus's A3 venture in California. Both seem to be making significant progress.&lt;/p&gt;&lt;p&gt;Graham Warwick in &lt;i&gt;Aviation Week &lt;/i&gt; &lt;a href=&quot;http://aviationweek.com/technology/week-technology-oct-9-13-2017&quot;&gt;reports&lt;/a&gt; that the CityAirbus has completed subsystem testing of two of its ducted fans and motors. Airbus is using Siemens 100 kW motors and fixed-pitch propellers. I believe this is a low risk approach, as Siemens has already flown motors more than twice as powerful in the &lt;a href=&quot;https://www.flyingmag.com/extra-unveils-electric-330le&quot;&gt;Extra 330LE&lt;/a&gt; demonstrator. Remotely-piloted test flights are scheduled for late 2018. I'll be looking for range and endurance data as well as demonstrated safety. &lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;script data-pagespeed-no-defer=&quot;&quot;&gt;//&lt;![CDATA[
(function(){for(var g=&quot;function&quot;==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError(&quot;ES3 does not support getters and setters.&quot;);b!=Array.prototype&amp;&amp;b!=Object.prototype&amp;&amp;(b[c]=a.value)},h=&quot;undefined&quot;!=typeof window&amp;&amp;window===this?this:&quot;undefined&quot;!=typeof global&amp;&amp;null!=global?global:this,k=[&quot;String&quot;,&quot;prototype&quot;,&quot;repeat&quot;],l=0;l&lt;k.length-1;l++){var m=k[l];m in h||(h[m]={});h=h[m]}var n=k[k.length-1],p=h[n],q=p?p:function(b){var c;if(null==this)throw new TypeError(&quot;The 'this' value for String.prototype.repeat must not be null or undefined&quot;);c=this+&quot;&quot;;if(0&gt;b||1342177279&lt;b)throw new RangeError(&quot;Invalid count value&quot;);b|=0;for(var a=&quot;&quot;;b;)if(b&amp;1&amp;&amp;(a+=c),b&gt;&gt;&gt;=1)c+=c;return a};q!=p&amp;&amp;null!=q&amp;&amp;g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split(&quot;.&quot;),d=t;a[0]in d||!d.execScript||d.execScript(&quot;var &quot;+a[0]);for(var e;a.length&amp;&amp;(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0&lt;c){for(var a=Array(c),d=0;d&lt;c;d++)a[d]=b[d];return a}return[]};function w(b){var c=window;if(c.addEventListener)c.addEventListener(&quot;load&quot;,b,!1);else if(c.attachEvent)c.attachEvent(&quot;onload&quot;,b);else{var a=c.onload;c.onload=function(){b.call(this);a&amp;&amp;a.call(this)}}};var x;function y(b,c,a,d,e){this.h=b;this.j=c;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=d;this.b={};this.a=[];this.c={}}function z(b,c){var a,d,e=c.getAttribute(&quot;data-pagespeed-url-hash&quot;);if(a=e&amp;&amp;!(e in b.c))if(0&gt;=c.offsetWidth&amp;&amp;0&gt;=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;a=d.top+(&quot;pageYOffset&quot;in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+(&quot;pageXOffset&quot;in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+&quot;,&quot;+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a&lt;=b.g.height&amp;&amp;d&lt;=b.g.width)}a&amp;&amp;(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&amp;&amp;z(this,b)};u(&quot;pagespeed.CriticalImages.checkImageForCriticality&quot;,function(b){x.checkImageForCriticality(b)});u(&quot;pagespeed.CriticalImages.checkCriticalImages&quot;,function(){A(x)});function A(b){b.b={};for(var c=[&quot;IMG&quot;,&quot;INPUT&quot;],a=[],d=0;d&lt;c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&amp;&amp;a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a=&quot;oh=&quot;+b.l;b.f&amp;&amp;(a+=&quot;&amp;n=&quot;+b.f);if(c=!!b.a.length)for(a+=&quot;&amp;ci=&quot;+encodeURIComponent(b.a[0]),d=1;d&lt;b.a.length;++d){var e=&quot;,&quot;+encodeURIComponent(b.a[d]);131072&gt;=a.length+e.length&amp;&amp;(a+=e)}b.i&amp;&amp;(e=&quot;&amp;rd=&quot;+encodeURIComponent(JSON.stringify(B())),131072&gt;=a.length+e.length&amp;&amp;(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;)}catch(r){try{f=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)}catch(D){}}f&amp;&amp;(f.open(&quot;POST&quot;,d+(-1==d.indexOf(&quot;?&quot;)?&quot;?&quot;:&quot;&amp;&quot;)+&quot;url=&quot;+encodeURIComponent(b)),f.setRequestHeader(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName(&quot;IMG&quot;);if(!c.length)return{};var a=c[0];if(!(&quot;naturalWidth&quot;in a&amp;&amp;&quot;naturalHeight&quot;in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute(&quot;data-pagespeed-url-hash&quot;);e&amp;&amp;(!(e in b)&amp;&amp;0&lt;a.width&amp;&amp;0&lt;a.height&amp;&amp;0&lt;a.naturalWidth&amp;&amp;0&lt;a.naturalHeight||e in b&amp;&amp;a.width&gt;=b[e].o&amp;&amp;a.height&gt;=b[e].m)&amp;&amp;(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C=&quot;&quot;;u(&quot;pagespeed.CriticalImages.getBeaconData&quot;,function(){return C});u(&quot;pagespeed.CriticalImages.Run&quot;,function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&amp;&amp;w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','http://brelje.net/blog/e-flight-roundup-airbus-internal-competition-heating/','8Xxa2XQLv9',true,false,'RyHBznDaRGE');
//]]&gt;&lt;/script&gt;&lt;img src=&quot;https://airbus-h.assetsadobe2.com/is/image/content/dam/stock-and-creative/infographic/Infographic-CityAirbus-Oct2017.jpg&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;2588334959&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;CityAirbus&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;An issue with multirotor concepts is that they do not autorotate to a safe landing like helicopters following a loss of power. &lt;/b&gt;On first glance, the CityAirbus appears to only have 4 fans, meaning the failure of any one would render the craft uncontrollable. In reality, the fans are all coaxial and independently driven by a total of 8 motors. This should introduce enough redundancy to enable a safe landing in the event of one &lt;i&gt;motor&lt;/i&gt; failure. However, the failure of one &lt;i&gt;fan&lt;/i&gt; is likely to damage the second fan in the same duct, which would be catastrophic without a backup ballistic parachute - &lt;b&gt;I'll be watching for a successful parachute test.&lt;/b&gt; If the craft has any tendency to &quot;flip&quot; after power loss, this might be not be straightforward.&lt;/p&gt;&lt;p&gt;I may be being too demanding here, as we don't expect helicopters to survive loss of a rotor blade. Ducted fans fall somewhere in between propellers (which we &lt;a href=&quot;https://www.faa.gov/documentLibrary/media/Advisory_Circular/AC_20-37e.pdf&quot;&gt;expect to fail&lt;/a&gt;) and helicopter rotors (which we don't). I wouldn't be surprised if the FAA or EASA requires a test to show that at least one fan in each duct would survive a single fan failure.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Meanwhile, the A3 Vahana prototype &lt;a href=&quot;https://www.theverge.com/2017/11/13/16633392/airbus-vahana-flying-car-a-cubed-photos&quot;&gt;has been moved&lt;/a&gt; to its test facility in Pendleton, Oregon. I like Vahana's design better overall. Since it has wings, it should be covered by Part 23 certification rules instead of the helicopter rules. I also like that the fans aren't ducted together for redundancy reasons. The tilt mechanism introduces complexity and risk compared to CityAirbus, but it should be manageable. I bet the wing tilt mechanism will be designed like &lt;a href=&quot;http://www.british-caledonian.com/images/BCal%20A320%20Manual_0007%20copy.jpg&quot;&gt;commercial jet flap actuation systems&lt;/a&gt;, using a single torque tube to avoid asymmetry. &lt;/p&gt;&lt;p&gt;Bottom line, &lt;b&gt;I will certainly be waiting for many years of service experience before I fly one of these multirotors.&lt;/b&gt; &lt;/p&gt;&lt;h3&gt;Major redesign of the XTI Trifan&lt;/h3&gt;&lt;p&gt;Meanwhile, the XTI Trifan is also close to a flight demonstration. Rotor and Wing &lt;a href=&quot;http://www.rotorandwing.com/2017/10/13/xti-aims-fly-60-scale-trifan-600-within-year/&quot;&gt;reports&lt;/a&gt; that a 60% scale prototype will fly within the next 11 months. This is exciting enough, but buried in the story is larger news. &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4545/38488527212_f0e6013083_o.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;1988634042&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;A major architectural change has placed the Trifan firmly in the camp of electric propulsion. The original design called for using twoHoneywell &lt;a href=&quot;https://aerospace.honeywell.com/en/products/engines/hts900-turboshaft-engine&quot;&gt;HTS900&lt;/a&gt; turboshaft engines, presumably driving a mechanical power-split box similar to the V-22 in order to provide redundant power to all three fans. The diagram below illustrates this design, which has major weight and cost disadvantages.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4540/37810303934_7748ff7b6c_o.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;464219368&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;The old XTI Trifan 600 propulsion architecture (my own work)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;The new design &lt;b&gt;replaces the mechanical power-split box with a turboelectric design and eliminates one engine&lt;/b&gt;. I have filled in some of the blanks in the diagram below with speculation as to how the system may be designed, but we know for sure that there are six 250KW motors, two generators, and one &lt;a href=&quot;https://aerospace.honeywell.com/en/products/engines/hts900-turboshaft-engine&quot;&gt;HTS900&lt;/a&gt; turboshaft (rated at about 600kW takeoff power). In order to provide backup for the turboshaft, there must be a battery sized to allow at least a direct emergency descent and landing. &lt;/p&gt;&lt;p&gt;With this design, the aircraft can continue flight following the loss of one generator, one rectifier, one DC bus, or one motor on the same side. Cross-feeding the generators into both rectifiers would add some additional redundancy. The aircraft can also pursue emergency descent following the loss of the turboshaft engine. Depending on the size of the battery, there may be a little bit of emergency range as well.&lt;/p&gt;&lt;p&gt;There is far more motor power installed (1.5 MW) than available from the engine (600kW), indicating that the extra motors are for redundancy only, not takeoff performance. I also suspect that some or all of the power electronics will need to be liquid cooled (Siemens is liquid cooling their 260kW motor) but that's not certain.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://farm5.staticflickr.com/4538/38494300832_3873c9ff2c_o.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;789002292&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;The new turboelectric architecture (my own work)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;It is unclear to me whether the demonstrator is only an aerodynamic / control demonstrator, or whether it will also have a scaled version of the new turboelectric drivetrain. At full scale, the &lt;b&gt;Trifan will have the most powerful electrical system of any of the new entrants with short-term flight test plans&lt;/b&gt;, only outclassed by the Boeing 787 among types in service now. Zunum will be in a similar tier at about 1MW.&lt;/p&gt;&lt;p&gt;XTI claims that &lt;b&gt;the turboelectric design saves 3000 lb&lt;/b&gt; gross weight - 35%! If true, that is a remarkable finding and illustrates that cost savings due to electric propulsion are more from airplane-level effects (in this case, meeting safety requirements more cheaply) than from direct fuel burn reductions. There will also be major cost savings from eliminating one of the two engines and the gearbox. The engines are very expensive to purchase (around half a million USD) and maintain. Eliminating the gearbox carries the same cost benefits &lt;i&gt;and &lt;/i&gt;eliminates a major up front engineering cost and source of program risk (as the gearbox would have been a custom design). &lt;/p&gt;&lt;p&gt;I was skeptical of the Trifan at first due to the complex gearbox required, but with the latest redesign it becomes much more plausible to me. Importantly, it is targeting an new upscale market, not attempting to reduce operating costs in a commercial market. I can imagine quite a few wealthy individuals willing to pay a premium for fast VTOL capability with better redundancy than a single-engine helicopter. Other industry players should follow closely.&lt;/p&gt;&lt;h3&gt;Aurora Flight Sciences acquired by Boeing&lt;/h3&gt;&lt;p&gt;One of my favorite companies, Aurora Flight Sciences, &lt;a href=&quot;http://aviationweek.com/technology/aurora-ceo-boeing-will-help-turn-innovations-products&quot;&gt;was acquired&lt;/a&gt; for an undisclosed amount by Boeing. Aurora has been very successful in winning government design/build contracts for unmanned demonstrators; however, by Aurora CEO John Langford's own admission, the company had struggled to fully realize the commercial benefits of their innovative designs. The acquisition means that Boeing now controls &lt;a href=&quot;http://aviationweek.com/aircraft-design/closer-look-nasa-s-options-large-scale-x-planes&quot;&gt;3 of the 4&lt;/a&gt; NASA X-Plane design studies: Boeing's Transonic Truss-Braced Wing and BWB, and Aurora's D8 double-bubble design with boundary layer ingestion. &lt;/p&gt;&lt;p&gt;Unfortunately, in keeping with my &lt;a href=&quot;http://brelje.net/about/&quot;&gt;editorial policy&lt;/a&gt;, this means I can't comment on their designs anymore which makes me sad, but I'm happy that Boeing and AFS have teamed up.&lt;/p&gt;&lt;h3&gt;STARC-ABL moving ahead&lt;/h3&gt;&lt;p&gt;It's no secret that my favorite electric propulsion concept for commercial airplanes right now is the STARC-ABL turboelectric single aisle. I like that it doesn't depend on superconductors or high energy density batteries, and actually is expected to &lt;i&gt;reduce &lt;/i&gt;propulsion system weight overall - the feasibility red-flags are fewer than any other concept I know about right now. FlightGobal &lt;a href=&quot;https://www.flightglobal.com/news/articles/aurora-flight-sciences-to-evaluate-nasa-electric-air-442471/&quot;&gt;reports&lt;/a&gt; that NASA has funded an external assessment of the STARC-ABL by Aurora. This will be a good test of NASA's design work. I really hope they publish the results. You can read NASA's latest existing assessment of the STARC-ABL &lt;a href=&quot;https://ntrs.nasa.gov/search.jsp?R=20170005612&quot;&gt;here&lt;/a&gt;. &lt;b&gt;It is expected to save about 11% fuel burn&lt;/b&gt; compared to state-of-the-art tube and wing commercial aircraft; equivalent to about &lt;b&gt;one generation's worth of turbofan engine technology&lt;/b&gt;.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;img src=&quot;https://www.nasa.gov/sites/default/files/thumbnails/image/composite-image-01a-121115.jpg&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;2176575160&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;&lt;i&gt;Image credits: Airbus Helicopters (press kit), XTI Aircraft (fair use claimed), NASA (public domain)&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ben Brelje</name></author><category term="electric flight" /><category term="aurora flight sciences" /><category term="zunum" /><category term="xti" /><category term="vahana" /><category term="airbus" /><category term="cityairbus" /><summary type="html">The CityAirbus eVTOL demonstrator completes propulsion system ground testing in preparation for first flight in 2018XTI Trifan announces a major redesign and 60% scale flight test demonstratorAurora Flight Sciences joins The Boeing CompanySTARC-ABL rev B to be externally assessed by Aurora</summary></entry><entry><title type="html">Have electric aircraft reached the peak of inflated expectations?</title><link href="https://brelje.net/blog/have-electric-aircraft-reached-peak-inflated-expectations/" rel="alternate" type="text/html" title="Have electric aircraft reached the peak of inflated expectations?" /><published>2017-11-17T00:00:00+00:00</published><updated>2017-11-17T00:00:00+00:00</updated><id>https://brelje.net/blog/peak-inflated</id><content type="html" xml:base="https://brelje.net/blog/have-electric-aircraft-reached-peak-inflated-expectations/">&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;It’s common knowledge that most new technologies are
overhyped during early development. Technology advisory firm Gartner terms this
process the &lt;i&gt;&lt;a href=&quot;https://www.gartner.com/technology/research/methodologies/hype-cycle.jsp&quot;&gt;hype cycle&lt;/a&gt;&lt;/i&gt; and suggests
that there are five stages. Sure, it's made up and it's not really a cycle, but we'll go with it:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;Technology trigger&lt;/b&gt;: Laboratory or theoretical
results suggest a promising new area known mostly to topical experts. Industry
and the press largely have not picked up the story yet&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Peak of inflated expectations&lt;/b&gt;: Popular press
and industrial leaders learn of the technology and appreciate the
potential benefits but not the technical risks and limitations. Some early
demonstrators may be revealed as successes; the bugs may not be publicly known.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Trough of disillusionment&lt;/b&gt;: Commercial
implementations produce mixed results once customers put the technology into
use and expose flaws. Major early projects may fail.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Slope of enlightenment&lt;/b&gt;: Problems are fixed in
second-generation products following in-service experience. Industry begins to
change its ways of doing business to take full advantage of the new technology.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Plateau of productivity&lt;/b&gt;: The technology becomes mainstream
in industry; incremental improvement maximizes performance. &lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Where
is electric aircraft propulsion in the hype cycle?&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;

&lt;!--more--&gt;

&lt;div class=&quot;block-rawhtml&quot;&gt;&lt;figure class=&quot;figure&quot;&gt;
&lt;script data-pagespeed-no-defer=&quot;&quot;&gt;//&lt;![CDATA[
(function(){for(var g=&quot;function&quot;==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError(&quot;ES3 does not support getters and setters.&quot;);b!=Array.prototype&amp;&amp;b!=Object.prototype&amp;&amp;(b[c]=a.value)},h=&quot;undefined&quot;!=typeof window&amp;&amp;window===this?this:&quot;undefined&quot;!=typeof global&amp;&amp;null!=global?global:this,k=[&quot;String&quot;,&quot;prototype&quot;,&quot;repeat&quot;],l=0;l&lt;k.length-1;l++){var m=k[l];m in h||(h[m]={});h=h[m]}var n=k[k.length-1],p=h[n],q=p?p:function(b){var c;if(null==this)throw new TypeError(&quot;The 'this' value for String.prototype.repeat must not be null or undefined&quot;);c=this+&quot;&quot;;if(0&gt;b||1342177279&lt;b)throw new RangeError(&quot;Invalid count value&quot;);b|=0;for(var a=&quot;&quot;;b;)if(b&amp;1&amp;&amp;(a+=c),b&gt;&gt;&gt;=1)c+=c;return a};q!=p&amp;&amp;null!=q&amp;&amp;g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split(&quot;.&quot;),d=t;a[0]in d||!d.execScript||d.execScript(&quot;var &quot;+a[0]);for(var e;a.length&amp;&amp;(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0&lt;c){for(var a=Array(c),d=0;d&lt;c;d++)a[d]=b[d];return a}return[]};function w(b){var c=window;if(c.addEventListener)c.addEventListener(&quot;load&quot;,b,!1);else if(c.attachEvent)c.attachEvent(&quot;onload&quot;,b);else{var a=c.onload;c.onload=function(){b.call(this);a&amp;&amp;a.call(this)}}};var x;function y(b,c,a,d,e){this.h=b;this.j=c;this.l=a;this.f=e;this.g={height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};this.i=d;this.b={};this.a=[];this.c={}}function z(b,c){var a,d,e=c.getAttribute(&quot;data-pagespeed-url-hash&quot;);if(a=e&amp;&amp;!(e in b.c))if(0&gt;=c.offsetWidth&amp;&amp;0&gt;=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;a=d.top+(&quot;pageYOffset&quot;in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+(&quot;pageXOffset&quot;in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+&quot;,&quot;+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a&lt;=b.g.height&amp;&amp;d&lt;=b.g.width)}a&amp;&amp;(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&amp;&amp;z(this,b)};u(&quot;pagespeed.CriticalImages.checkImageForCriticality&quot;,function(b){x.checkImageForCriticality(b)});u(&quot;pagespeed.CriticalImages.checkCriticalImages&quot;,function(){A(x)});function A(b){b.b={};for(var c=[&quot;IMG&quot;,&quot;INPUT&quot;],a=[],d=0;d&lt;c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&amp;&amp;a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a=&quot;oh=&quot;+b.l;b.f&amp;&amp;(a+=&quot;&amp;n=&quot;+b.f);if(c=!!b.a.length)for(a+=&quot;&amp;ci=&quot;+encodeURIComponent(b.a[0]),d=1;d&lt;b.a.length;++d){var e=&quot;,&quot;+encodeURIComponent(b.a[d]);131072&gt;=a.length+e.length&amp;&amp;(a+=e)}b.i&amp;&amp;(e=&quot;&amp;rd=&quot;+encodeURIComponent(JSON.stringify(B())),131072&gt;=a.length+e.length&amp;&amp;(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;)}catch(r){try{f=new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)}catch(D){}}f&amp;&amp;(f.open(&quot;POST&quot;,d+(-1==d.indexOf(&quot;?&quot;)?&quot;?&quot;:&quot;&amp;&quot;)+&quot;url=&quot;+encodeURIComponent(b)),f.setRequestHeader(&quot;Content-Type&quot;,&quot;application/x-www-form-urlencoded&quot;),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName(&quot;IMG&quot;);if(!c.length)return{};var a=c[0];if(!(&quot;naturalWidth&quot;in a&amp;&amp;&quot;naturalHeight&quot;in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute(&quot;data-pagespeed-url-hash&quot;);e&amp;&amp;(!(e in b)&amp;&amp;0&lt;a.width&amp;&amp;0&lt;a.height&amp;&amp;0&lt;a.naturalWidth&amp;&amp;0&lt;a.naturalHeight||e in b&amp;&amp;a.width&gt;=b[e].o&amp;&amp;a.height&gt;=b[e].m)&amp;&amp;(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C=&quot;&quot;;u(&quot;pagespeed.CriticalImages.getBeaconData&quot;,function(){return C});u(&quot;pagespeed.CriticalImages.Run&quot;,function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&amp;&amp;w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run('/mod_pagespeed_beacon','https://brelje.net/blog/have-electric-aircraft-reached-peak-inflated-expectations/','8Xxa2XQLv9',true,false,'ZA2yw0MBm_o');
//]]&gt;&lt;/script&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/b/bf/Hype-Cycle-General.png&quot; class=&quot;img-responsive&quot; data-pagespeed-url-hash=&quot;3189459121&quot; onload=&quot;pagespeed.CriticalImages.checkImageForCriticality(this);&quot; /&gt;
  &lt;figcaption class=&quot;figure-caption&quot;&gt;&lt;i&gt;The Gartner hype cycle (Wikimedia Commons)&lt;/i&gt;&lt;/figcaption&gt;
&lt;/figure&gt;&lt;/div&gt;
&lt;div class=&quot;block-paragraph&quot;&gt;&lt;div class=&quot;rich-text&quot;&gt;&lt;p&gt;I would say that we are &lt;b&gt;on the way to the peak of inflated
expectations&lt;/b&gt;. To my knowledge, no electric aircraft currently hold US type
certificates. In Europe, the number can be counted on one hand, and they are mostly motorgliders. Popular
publications have begun to feature electric propulsion in breathless terms with
beautiful renderings and little critical thought, generally repeating manufacturer claims (e.g. &lt;a href=&quot;https://www.theguardian.com/business/2017/sep/27/easyjet-electric-planes-wright-electric-flights&quot;&gt;&lt;b&gt;this&lt;/b&gt;&lt;/a&gt; and &lt;a href=&quot;https://techcrunch.com/2017/10/05/how-zunum-aeros-hybrid-electric-planes-aim-to-transform-flight-starting-in-2022/&quot;&gt;&lt;b&gt;this&lt;/b&gt;&lt;/a&gt;). Industry press has done a
better job keeping expectations in check.&lt;/p&gt;&lt;p&gt;The more important question though, is &lt;b&gt;can electric aircraft survive the trough of disillusionment? &lt;/b&gt;(In keeping with the topography theme, maybe I'll call it the &lt;a href=&quot;https://www.mountaineers.org/explore/routes-places/paradise-area-review/mount-rainier-disappointment-cleaver&quot;&gt;Disappointment Cleaver&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I recently read two assessments of aircraft electric
propulsion; one seemingly too credulous, the other seemingly too skeptical.
Let’s dissect them.&lt;/p&gt;

&lt;p&gt;European consulting firm Roland Berger released&lt;b&gt; &lt;a href=&quot;https://www.rolandberger.com/publications/publication_pdf/roland_berger_aircraft_electrical_propulsion.pdf&quot;&gt;a report&lt;/a&gt;&lt;/b&gt; (direct PDF link) outlining the electric aircraft trend, intended for business professionals. It opens
with all hype: &lt;i&gt;“All indications suggest that we may be on the cusp of a
revolution in the aerospace and aviation industries.” &lt;/i&gt;After examining
the facts, the report ends with an appropriately conservative “watch and wait”
recommendation. If you only read the headline and intro, you would get a much more optimistic picture.&lt;/p&gt;

&lt;p&gt;Roland Berger analysts have done the hard work of
cataloging what they claim are all known electric aviation projects.  They count 70, categorized into four types:&lt;b&gt;
general aviation&lt;/b&gt;, &lt;b&gt;urban air taxi&lt;/b&gt;, &lt;b&gt;regional aircraft&lt;/b&gt;, and &lt;b&gt;large commercial aircraft&lt;/b&gt;.
Surprisingly, half of the projects belong to startup firms; &lt;b&gt;industry incumbents
are backing just 20%&lt;/b&gt;. I was surprised to see that only 31% of the projects use
distributed propulsion, and this must include most of the multirotor urban air
taxi concepts; this seems low to me. The flaw with this analysis is that it
counts by raw number of projects. A better comparison would be percentage of
total dollar value being spent, but the data on these projects are very closely
held.&lt;/p&gt;

&lt;p&gt;The report does review important technical barriers to electrification. I
largely agree with their identification of battery and electronics weight and
safety as being the largest engineering barriers today. The report claims that
500 Wh/kg is “widely regarded” as the minimum for electric flight; I have
seen no evidence of this consensus. The tipping point depends on current economic conditions, and especially the mission. &lt;a href=&quot;https://brelje.net/blog/deriving-modified-breguet-range-equation-hybrid-turboelectric-aircraft/&quot;&gt;Longer missions require better batteries&lt;/a&gt;. To enable real fuel savings in hybrid, commercial fixed-wing applications with
useful range, I think the tipping point is probably higher – 750 Wh/kg or more – and this is the assumption used by the NASA-funded SUGAR study. eVTOL concepts can get away with less.  I also strongly disagree with their assessment that series hybrid propulsion is not
viable. The analysis does not take into account the airplane-level weight and
propulsive efficiency benefits illustrated most clearly by the NASA STARC-ABL
concept. &lt;/p&gt;&lt;p&gt;Addressing certification barriers, the report correctly notes that &lt;a href=&quot;https://www.aopa.org/advocacy/advocacy-briefs/understanding-part-23-rewrite&quot;&gt;changes to 14 CFR 23&lt;/a&gt; will enable GA and ‘commuter’ type electric aircraft to be certified soon. There is
currently no movement to extend these changes to Part 25, which governs
commercial airplanes with 20 or more seats. However, the Part 23 rewrite illustrates that with appropriate analysis methods and enough
lobbying, regulation will most likely not stand in the way of commercial
airplane electrification.&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;My favorite part of the report contrasts current optimism
about electric propulsion with previous “revolutions” in aerospace, namely
supersonic transports (SSTs) and very light jets (VLJs). Both of these
innovations failed to break into the mainstream. The comparison of initial hype
for these concepts with current hype for electric propulsion is appropriate, but there is an
important distinction. SSTs and VLJs were &lt;i&gt;market &lt;/i&gt;failures, not technology
failures; the technology was intended to open up new market segments, but the market never materialized with costly SST/VLJ operating economics. This is the economic question that urban air mobility concepts must answer: can eVTOL aircraft be built and flown for a price that urban commuters are willing to pay? I suspect the answer is no until autonomous manned aircraft are certifiable, but I am not an expert in the economics of these vehicles. &lt;/p&gt;&lt;p&gt;For fixed wing electric flight, electrification is intended to lower costs on existing missions, not open up previously unobtainable missions, so the SST/VLJ comparison doesn't quite work. However, the authors raise a relevant point for those targeting expansion in the regional airline
market. It’s already hard enough to make money in the regional
airline business. A competitive electric product will need to really change the
operating economics.&lt;/p&gt;

&lt;p&gt;Altogether, I think Roland Berger wrote a good report for their intended audience. The quantitative and engineering analysis has a
few problems, but by and large the recommendations are reasonable. Read the
whole thing.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://www.avweb.com/blogs/insider/Another-Electric-Airplane-229728-1.html&quot;&gt;second take&lt;/a&gt; comes from Paul Bertorelli at AvWeb, writing
a snarky response to a recent announcement from Zunum. &lt;/p&gt;

&lt;p&gt;&lt;i&gt;“Mark this date on your calendar: 2022. That seems to be
when the promised magic of electric airplanes will come together and, we’re
assured, you’ll be able to fly to a small airport in an Uber multi-rotor then
board an electric hybrid airliner to be whisked off to an airport 500 miles
away. Thence to your downtown destination via another Uber air taxi. What a
wondrous new world awaits.”&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;Bertorelli then states the hard facts but begins to temper
his position. He correctly notes that current battery specific energy levels
are low and that performance claims by startup firms can be hard to believe. He
also observes that Airbus has pulled back its own EP development program (Airbus would not agree with that characterization, but I think it is fair). Ultimately, though, the author
concludes that electric aviation will arrive, but not yet. He sees that the
“slope of enlightenment” will take a long time to climb.&lt;/p&gt;

&lt;p&gt;On one hand, I agree with Bertorelli’s complaint about
unrealistic promises. Overly optimistic entry-into-service dates are endemic
for aerospace companies of all sizes: from the SpaceX Falcon Heavy (originally
slated for 2011 – still waiting) to the Terrafugia Transition (in development
since 2006; first delivery estimated for 2015 – still waiting) to the
granddaddy of all delayed programs, the Lockheed Martin F-35 (development started 1992 – IOC declared in 2015). However, we need to give companies credit for setting aggressive goals. SpaceX routinely fails to
meet self-imposed deadlines but only because they're ridiculous to begin with by industry standards. SpaceX still produces impressive capabilities relatively quickly. Elon Musk is
an impatient leader but a patient investor. The author acknowledges this at the
end: &lt;i&gt;&lt;b&gt;&quot;But what the hell, this is aviation, right? Would-be purveyors
of new aircraft always do that and we wouldn’t respect them if they didn’t.&quot;&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;

&lt;p&gt;True that, Mr. Bertorelli. We should be grateful that some early adopters are brave enough to try. &lt;/p&gt;&lt;p&gt;So to answer my original question: &lt;i&gt;&lt;b&gt;can electric aircraft survive the trough of disillusionment? &lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Urban air mobility / eVTOL concepts are technically feasible today and may compete with or replace helicopters to carry wealthy passengers using pilots. If the autonomy certification problem cannot be solved in a timely fashion, I do not believe the operating economics will work for average people. There simply aren't enough skilled helicopter pilots, and if there were, they'd be too expensive. There are also serious air traffic management problems which will take decades to solve. &lt;/p&gt;&lt;p&gt;For fixed wing, the answer completely depends on continued progress in batteries and power electronics. The other technical problems are solvable, and if batteries become good enough the economics will ensure that electric aircraft come to fruition. &lt;/p&gt;&lt;p&gt;What should companies be doing in the interim? &lt;b&gt;Continued learning.&lt;/b&gt; Incumbents should be flying as many demonstrators and doing as many bench tests as they can afford in order to build up service experience and design knowledge. When prerequisite technologies reach economic tipping points, the well-prepared firm will already know how to design, build, certify, operate, and maintain electric aircraft with the safety and reliability we've come to expect from conventional aircraft. Modeling and simulation (my research) will help find the happy medium between moving too early and too late.&lt;/p&gt;&lt;p&gt;(&lt;i&gt;Edit: Apparently I wasn't the first to apply the hype cycle to EP. Bjorn Fehrm at Leeham News has a &lt;a href=&quot;https://leehamnews.com/2017/09/21/bjorns-corner-electric-aircraft-part-13/&quot;&gt;similar take&lt;/a&gt;)&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</content><author><name>Ben Brelje</name></author><category term="electric flight" /><category term="industry assessment" /><category term="hybrid-electric" /><category term="technology" /><category term="risk" /><category term="electric propulsion" /><summary type="html">It’s common knowledge that most new technologies are overhyped during early development. Technology advisory firm Gartner terms this process the hype cycle and suggests that there are five stages. Sure, it's made up and it's not really a cycle, but we'll go with it:Technology trigger: Laboratory or theoretical results suggest a promising new area known mostly to topical experts. Industry and the press largely have not picked up the story yetPeak of inflated expectations: Popular press and industrial leaders learn of the technology and appreciate the potential benefits but not the technical risks and limitations. Some early demonstrators may be revealed as successes; the bugs may not be publicly known.Trough of disillusionment: Commercial implementations produce mixed results once customers put the technology into use and expose flaws. Major early projects may fail.Slope of enlightenment: Problems are fixed in second-generation products following in-service experience. Industry begins to change its ways of doing business to take full advantage of the new technology.Plateau of productivity: The technology becomes mainstream in industry; incremental improvement maximizes performance. Where is electric aircraft propulsion in the hype cycle?</summary></entry></feed>