• About The Regularized Singularity

The Regularized Singularity

~ The Eyes of a citizen; the voice of the silent

The Regularized Singularity

Monthly Archives: November 2014

Resistance is Futile

29 Saturday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

Time is an illusion.

― Albert Einstein

Infinity-Time1 Time is relentless. As an opponent it is unbeatable and can only be temporarily held at bay. We all lose to it, with death being the inevitable outcome. Science uses the second law of Thermodynamics as the lord of time. It establishes a direction defined by the creation of greater disorder. In many ways the second law stands apart from other physical laws in its fundamental nature. It describes the basic character of change, but not its details.

But if your theory is found to be against the second law of thermodynamics I can give you no hope; there is nothing for it but to collapse in deepest humiliation.

— Sir Arthur Stanley Eddington

2ndLT_Colour_Small Change is constant and must be responded to. The challenge of the continual flow of
events provides the key distinguishing character of response. On the one hand conservatives resist the flow and attempt to retain the shape of the World. Liberals and progressives work to shape the change to so that the World changes for the better. Where the conservative sees the best future in the past, the progressive sees the best future as being a new beginning.

Change isn’t made by asking permission. Change is made by asking forgiveness, later.

― Seth Godin

f51c72c0f963fba023c505963654d5b0These tendencies are seen in differing taste for the arts. Take music where oldies are the staple of conservatives who don’t warm to the newer ideas. The old standards of their childhood and teen years make for a calming influence and sentimental listening. The progressive ear looks for new combinations rather than the familiar. Invention and improvisation are greeted warmly as a new challenge to one’s tastes. For example rap is viewed as not being music of any sort by the conservative ear, and greeted as stunningly original by the liberal ear. On the one hand the past is viewed as a template for the future, and on the other changes are seen as the opportunity for improvement. This tension is at the core of humanity’s struggle for mastery over time.images

Our time is marked by certain emblematic moments such as 9/11, Nixon’s resignation or the fall of the Berlin Wall. Each of these moments clearly defines a transition from everything before it, to everything after it. Some of these moments are simply climaxes to events preceding them. september-9-11-attacks-anniversary-ground-zero-world-trade-center-pentagon-flight-93-second-airplane-wtc_39997_600x450The horror of 9/11 started with the rise of Islam 1400 years ago, continuing with the Crusades, European colonialism, the oil crisis of the 70’s, American support for the Shah and his fall with rise of Islamic fundamentalism, the Soviet invasion of
Afghanistan, the American invasion of Iraq and the constancy of Arab tension over Israel. Our response has assured that the war will continue and has only enflamed more terrorism. Rather than short-circuit the cycle of violence we have amplified it, and assured its continuation for another generation. We have learned nothing from the history leading up to the event of September 11, 2001.

Tradition becomes our security, and when the mind is secure it is in decay.

― Jiddu Krishnamurti

These developments highlight some of the key differences with conservative and liberal responses to crisis. The conservative response usually takes little note of history, and applies power as the strategy. Power usually suits the powerful being arguably simple and usually effective. Liberals and progressives on the other hand are eager to take a different path, try something new and different, but often encounter paralysis from the analysis of the past. The different approach is often a failure, but when it succeeds the results are transformative. Power’s success only reinforces the power applying it. Ultimately when power encounters the right challenge, it fails and upsets the balance. In the end the power is reset and eventually the balance will be restored with a new structure at the helm.

Societies in decline have no use for visionaries.

― Anaïs Nin

shapeimage_1In science, the same holds conventional theories and approaches work almost all the time, but when they are overturned it is monumental. Even there conservative approaches are the workhorse and the obvious choice. Every so often they are exposed by something progressive and new that produces results the old approaches could not. This is the sort of thing that Kuhn wrote about with revolutions in science. As with other human endeavors the liberal and progressive wing leads science’s galileoadvance. The day-in, day-out work of science is left to the conservative side of things.

 “Normal science” means research firmly based upon one or more past scientific achievements, achievements that some particular scientific community acknowledges for a time as supplying the foundation for its further practice.

— Thomas Kuhn

So we are left with a balance to achieve. How do we handle the inevitability of change from the remorseless march of time? Are we interested in the conservative approach leading to uninspired productivity? Or progressive breakthroughs that push us forward, but most often end in failure?

All the effort in the world won’t matter if you’re not inspired.

― Chuck Palahniuk

Adaptivity is Under Utilized

28 Friday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

The measure of intelligence is the ability to change.

― Albert Einstein

In looking at the codes we work with today one thing stands out. The methods used in production software are generally much simpler than it should be. Advances that should have been commonplace by now aren’t present. There seems to be a good reason for this; the complexity of implementing algorithms on modern computers biases choices toward the simple. The result is a relative stagnation in algorithms with telltale sign of utilizing adaptive concepts far less than one would have imagined.

Extraordinary benefits also accrue to the tiny majority with the guts to quit early and refocus their efforts on something new.

― Seth Godin

UnknownThe types of adaptivity most commonly seen are associated with adaptive grids (or “h” refinement). Grids lend themselves to straightforward understanding and impressive visualization. Even with its common presence, even this form of adaptivity is seen far less than one might have thought looking forward twenty years ago. Adaptivity takes other forms far less common than h-refinement such as p-adaptivity where the order of an algorithm is adjusted locally. A third classical form is r-adaptivity where the mesh is moved locally to improve solutions. This is the second most common approach in the guise of remesh-remap methods (or ALE codes). I’d like to chat about a handful of other approaches that could be big winners in the future especially if combined with the imagesclassical approaches.

To improve is to change; to be perfect is to change often.

― Winston S. Churchill

One of the really big options to exercise with adaptivity are algorithms. Simply changing the algorithm based on local solution characteristics should yield great enhancement in accuracy, and robustness. Taken broadly the concept has been around a long time even if it isn’t recognized as such. Right from the beginning with Von Neumann and Richtmyer’s artificial viscosity the addition of nonlinear dissipation renders the method adaptive. The dissipation is effectively zero if the flow is smooth, and dominant if the flow is discontinuous. Upwinding is another such approach where the support (or stencil) for a method is biased by the physics for better (less accurate, but physical) results.

imagesThese are relatively simple ideas. More complex adaptation in algorithms can be associated with methods that use nonlinear stencils usually defined by limiters. These methods use a solution quality principle (typically monotonicity or positivity) to define how a computational stencil is chosen (FCT, MUSCL, and TVD are good examples). More advanced methods such as essentially non-oscillatory (ENO) or the elegant Weighted ENO (WENO) method take this adaptivity up a notch. While algorithms like FCT and TVD are common in codes, ENO hasn’t caught on in serious codes largely due to complexity and lack of overall robustness. The robustness problems are probably due to the overall focus on accuracy over robustness as the key principle in stencil selection.

cyclesOne area where the adaptivity may be extremely useful is the construction of composite algorithms. The stencil selection in ENO or TVD is a good example as each individual stencil is a consistent discretization itself. It is made more effective and higher quality through the nonlinear procedure used for selecting. Another good example of this principle is the compositing of multigrid methods with Krylov iterations. Neither method is as effective on its own. They either suffer from robustness (multigrid) or suboptimal scaling (Krylov). Together the methods have become the standard. Part of the key to a good composite is the complementarity of the properties. In the above case multigrid can provide optimal scaling and Krylov offers stability. This isn’t entirely unlike TVD methods where upwinding offers the stability, and one of the candidate stencils offers optimal accuracy.ConvergenceHistory

A third area to consider is adaptive modeling approaches. One example can be found with multiscale methods where a detailed (assumed more accurate) model is used for the physics to make up for the crude baseline model. In many cases multiple models might be considered to be valid or applicable such as turbulence, failure or fracture modeling. In other cases none of the available models might be applicable. It might make sense to solve all the models and establish conditions for choosing or compositing their effect on the solution. If done correctly the limitations of a single method might be overcome through the selection procedure. In each of the cases mentioned above the current approaches are woefully inadequate.Unknown-2

A general issue with adaptivity that in estimation is holding it back is the relative balance of focus on accuracy over robustness. I believe great tipping the balance toward robustness demanded for applications could make progress. In academic research accuracy is almost always the focal point often at the cost of robustness. Efficiency would be the second focal point that undermines adaptivity’s adoption by codes.
As I noted in an earlier post, https://williamjrider.wordpress.com/2014/11/21/robust-physical-flexible-accurate-and-efficient/, the emphasis is often opposite to what applications demand. The combination of robustness-physicality-flexibility might do well to replace the typical accurate-efficient focus. The efficiency focus has hamstrung methods development for the whole of the MPP era, and the next generation of computers promises to make this worse. Combined with the research focus on accuracy this produces a combined impact of spurring outright stagnation in deployment of the adaptive approaches that ought to be dominating computation today.images

The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking.

― Albert Einstein

Despite our massive advances with the raw power of computers, we have missed immense opportunities to unleash their full potential. The mindset that has created this environment is still dominant; more emphasis is placed on running old methodology on new computers than inventing new (better) methodologies optimal to the new computers. The result of this pervasive mismanagement is a loss of opportunity, and a loss potential. The end result is also a lack of true capability and problem solving capacity on these computers. Over time this stagnation has cost us more problem solving capability than we have gained over the same period of time with faster computers.

It’s never too late

…to start heading in the right direction.

― Seth Godin

Science and Technology to be Thankful For

27 Thursday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

Gratitude makes blessings permanent.

― Raheel Farooq

It is the uniquely wonderful holiday of Thanksgiving in the United States. It’s one of the few holidays that haven’t been completely sullied by commercialism although “Black Friday” is making a run at it. I’m thankful that my employer honors the Holiday unlike too many. It might be nice to list things to be thankful about in science and technology.

As we express our gratitude, we must never forget that the highest appreciation is not to utter words, but to live by them.

―John F. Kennedy

4797035306_84fa3db10a_zMy job. All in all I’m pretty lucky. Beyond having enough money to have a comfortable life with food to eat, comfortable shelter and a few luxuries, I get to do what I love a little bit each week. I’ll save my concerns that the Labs where I work are a shadow of their former selves compared to the rest of the World, I’m doing great.

What a computer is to me is the most remarkable tool that we have ever come up with. It’s the equivalent of a bicycle for our minds.

― Steve Jobs

naseem-preccinsta burnerModeling and simulation. The use of computers to solve problems in physics and engineering has become commonplace. Its common nature shouldn’t detract from the wonder we should feel. Our ability to construct virtual versions of reality is both wonderful for exploration, discovery and utility. The only thing that gives me pause is a bit of hubris regarding the scope of our mastery.

AldroppedImage_3gorithms. Systematic ways of solving problems that are amenable to computing fill me with wonder. The only regret is that we don’t rely upon this approach enough. An accurate, elegant and efficient algorithm is a thing of beauty. Couple the algorithm with mathematical theory and it is breathtaking.

Useful applied math. Mathematics is a wonderful tool if used properly. So much useful theory has been developed for so many aspects of science. Whenever mathematics is applied to bring order to an area of science I celebrate. It should be happening a lot more than it does, but when it does it’s great.

Technology is anything invented after you were born.

― Alan Kay

Transistor_Count_and_Moore's_Law_-_2011.svgThe end of Moore’s law. This is a great opportunity for science to quit being lazy. If we had relied upon more than raw power for improving computing, our ability to use computers today would be so much more awesome. Perhaps now, we will focus on thinking about how we use computers rather than simply focus on building bigger ones.

Innovative software. Is what makes the current computing revolution interesting. Perhaps science will start to understand how the key is software and not raw computing power. Software is evolving computing even with Moore’s law being on life support because it changes how we use computers constantly.

When we change the way we communicate, we change society

― Clay Shirky

Orig.src_.Susanne.Posel_.Daily_.News-internet.governance.brazil.state_.dept_occupycorporatismThe Internet and the World Wide Web. We are living through a great transformation in human society. The Internet is changing our society, our governance, our entertainment, and almost anything else you can imagine. The core is it changes the way we talk, and the way we get and share information. It makes each day interesting and is the spoon that stirs the proverbial pot.

Operation_Upshot-Knothole_-_Badger_001Nuclear weapons. We owe the relative piece that the World has experienced since World War II to this horrible weapon. As long as they aren’t used they save lives and keep the great powers in check.

images

Turbulence. This is the gift that keeps giving. Turbulence is basically unsolved. It is also beautiful, important and pervasive. A breakthrough in understanding this bit of physics would be transformative.

shockwaves-img8

Shock physics. Shocks are super cool. Energetic and destructive the drive to understand them drove early computing during World War II, and few realize the debt we owe to them. We understand far less about shock physics than we might admit, and it would be great to get back to focusing on discovery again.

Gretl-stat-image-300x225Big data and statistics. Computers, sensors, drones and the internet of things is helping to drive the acquisition of data at levels unimaginable only a few years ago. With computers and software that can do something with it, we have a revolution in science. Statistics has become sexy and add statistics to sports and you combine two things that I love.

dna2Genetics. The wonders of our knowledge of the genome seem boundless and shape knowledge gathering across many fields. Its impact on social science, archeology, paleontology to name a few is stunning. We have made incredible discoveries that expand the knowledge of humanity and provide wonder for all.

Our technology forces us to live mythically

― Marshall McLuhan

Modern medicine. Today we have all sorts of medicines and treatments that allow us to live and be productive with ailments that would have destroyed our lives a few generations ago.

Evernote Camera Roll 20140815 101005Albuquerque sunsets. The coming together of optics, meteorology, and astronomy, the sunsets here are epically good. Add the color other the mountains opposite the setting sun and inspiration is never more than the end of the day away.

Sandia Mountain. A tribute to geology, the great shield, or half of a watermelon at Evernote Camera Roll 20141127 053201Evernote Camera Roll 20141004 090845sunset, it looks like home.

No duty is more urgent than that of returning thanks.

―James Allen

 

Some Improvements Aren’t Obviously Better

26 Wednesday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

Better never means better for everyone… It always means worse, for some.

― Margaret Atwood

A couple of days ago I went through the HLL flux function –Riemann solver, and a small improvement (https://williamjrider.wordpress.com/2014/11/24/the-power-of-simple-questions-the-hll-flux/). Today I’ll report on another improvement, that doesn’t appear to improve much at all, but its worth considering. This is work in progress and right now its not yielding anything too exciting.

Never confuse movement with action.

― Ernest Hemingway

Again, I’ll focus on the HLL flux and attack the issue of the final flux function’s sign preservation. The first thing to address is the propriety of the entire idea. There is a nice (short) paper on a closely related topic [Linde]. The bottom line is that the initial data may have a certain sign convention, and the dynamics induced in the Riemann problem can change that. So before deciding how to apply the Riemann solver and whether that application is appropriate one needs to realize the impact of the internal structure.

The problem I noted that under some conditions the dissipation in the flux can change the sign of the computed flux (when the velocity is much less than the sound speed, and the change in the equations variables is large enough). If you look at the fluxes in the mass or energy equation, they are the product of the velocity multiplying a positive definite quantity. The mass flux is the velocity multiplying the density, \rho u and the energy flux is u\left(\rho E + p\right) where \rho, E and p are the density, total energy and the pressure. If the velocity always has a sign in the Riemann solution, the resulting flux inherits that sign convention.

The HLL flux is F(U) = \frac{A+D}{\Delta}; A= S_R F_L –S_L F_R; D= S_R S_L ( U_R - U_L ); \Delta = S_R - S_L where S_L \le 0 and S_R \ge 0. If |S_{L,R}| >> |u| we can have problems. This is particularly true is U_R –U_L is large.

Without deviation from the norm, progress is not possible.

― Frank Zappa

To attack the issue of whether the sign change is a problem and might be unphysical, I look at the dynamics within the Riemann solution. This can be easily computed using the linearized solution to the Lagrangian Riemann solution, u_* = \frac{ W_L u_L+ W_R u_R - \left( p_R - p_L \right) }{W_L + W_R} where W_L=\rho_L c_L and W_R =\rho_R c_R are the Lagrangian wave speeds. If u_L, u_R and u_* all have the same sign, the flux will have that sign. Given this background I test the HLL flux for compatibility with the established sign convention. If the sign convention is violated I do one of a couple of things: set F\left(U\right) = 0 or F\left(U\right) = F_L if u_*>0 and F\left(U\right) = F_R if u_* < 0. Then I test it.

Restlessness is discontent — and discontent is the first necessity of progress. Show me a thoroughly satisfied man — and I will show you a failure.

― Thomas A. Edison

The issue definitely shows up a lot in computations. I set up a challenging problem where the density is constant in the initial data, and there is a million-to-one pressure jump. This produces a shock and contact discontinuity moving to the right. The density jump is nearly six because the shock is so strong (\gamma = 1.4). The HLL tends to smear the contact very strongly, and this is where the flux sign convention is violated.

We can see that an exact Riemann solver gives a sharp contact (the structure on the left side of the density peak). We also show the energy profile, which is also impacted by the idiosyncrasy discussed today. 198A7043-8203-484D-9783-230478DE500B0D09AE91-DBFC-4CF9-ABFD-C4ED8778E398

With HLL we get a smeared out contact, especially to the left. None of the changes to HLL flux discussed above really make much of a difference either.

AE8C288A-0537-4456-96A7-C2C03834CC10 D3F25468-8495-4FBA-9E43-16D4049689D2

But knowing that things could be worse should not stop us from trying to make them better.

― Sheryl Sandberg

E185DA3B-C42D-4DFA-9779-3F12AC49A8AC DA15F04E-18C5-4863-BF05-396BD9428C44

To do better is better than to be perfect.

― Toba Beta

[Linde] Linde, Timur, and Philip Roe. “On a mistaken notion of “proper upwinding”.” Journal of Computational Physics 142, no. 2 (1998): 611-614.

Simple Gets Complicated Fast

25 Tuesday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

There’s no limit to how complicated things can get, on account of one thing always leading to another.

― E.B. White

Yesterday I looked at a simple question regarding Riemann solvers. The conclusion of this brief investigation was that more examination is warranted. A large part of the impetus for the question comes from a recent research emphasis on positivity preserving discretizations. This means that quantities that are physically positive like density and energy are garuanteed to be positive in numerical solutions.

These have always focused on the variables being solved for. The fluxes used to build the solution procedure have been examined as producing physically-admissible solutions. I noticed that in least one case, the momentum flux, the flux should be positive-definite and its numerical approximation might not be. I’ll provide a little background on the thought process that got me to the question. The point I’ll make is much more exotic and esoteric in nature.

Back when I was in Los Alamos I did work on the nature of the truncation error using a technique called “modified equations”. This technique uses the venerated Taylor series expansion to describe the order of the approximation error in a numerical method. Unlike many analysis methods, which are limited to linear equations, the modified equation method gives results for nonlinear equations. One of things I noticed in the process of analysis explains a common problem with upwind differencing: entropy violating solutions to expansion waves often called rarefaction shocks.apjs307031f1_lr

For normal fluid dynamics shocks occur upon compression, and rarefactions occur upon expansion. If an expanding flow has a shock wave it is unphysical. In cases where wave speed used in upwinding goes through zero, the dissipation in upwinding goes to zero as the dissipation is directly proportional to the wave speed. This happens at “sonic points” where the velocity is equal to the sound speed, u\pm c=0.

We can see what happens using the modified equation approach for upwinding. Take a general discretization for upwind differing in conservation form, \Delta x \partial_x f(u) \approx f_{j+1/2} - f_{j-1/2}. We use the upwind approximation f_{j+1/2} = \frac{1}{2} \left( f(u)_j + f_{j+1} \right) - \frac{1}{2} \left| \partial_u f\right|\left( u_{j+1}-u_j \right). We plug all of this into the equations and expand u in a Taylor series, u(x+j\Delta x) = u(x) + \Delta x \partial_x u + \frac{1}{2} (\Delta x)^2 \partial_{xx}u +\ldots.

When we plunge into the math, and simplify we get some really interesting results, \partial_x f(u) \approx \partial_x\left[ f(u) +\frac{\Delta x}{2}\left| \partial_u f\right| \partial_x u +\frac{(\Delta x)^2}{6}\left( \partial_{uu}f (u_x)^2 + \partial_u f u_{xx}\right)\right]. Here is the key to rarefaction shocks; when the wavespeed, \partial_u f is near zero, the dissipation is actually governed by a higher order term, \partial_{uu} f (\partial_x u)^2.It is also notable that the dissipation aids the upwind dissipation for compressions, and thus shock waves. Anti-dissipation is a shock wave would be utterly catastrophic.

Usually fluids are convex, \partial_{uu} f>0 thus when u_x>0 the term in question is anti-dissipative. This is intrinsically unphysical. The dissipation from upwinding from the lower order term proportional to \Delta x is not large enough to offset the anti-dissipation. This produces the conditions needed for a rarefactions shock wave. I’ve worried that these effects can consistently cause problems in solutions and undermine the entropy satisfying solutions. These terms were not considered in the basic theory of upwinding introduced by Harten, Hyman and Lax using modified equation analysis [HHL]. What makes matters worse is that the anti-dissipative terms will dominate in expansions when we take the upwind approximation to second-order.

The most complicated skill is to be simple.

― Dejan Stojanovic

[HLL] Harten, Amiram, James M. Hyman, Peter D. Lax, and Barbara Keyfitz. “On finite‐difference approximations and entropy conditions for shocks.” Communications on Pure and Applied Mathematics 29, no. 3 (1976): 297-322.

The Power of Simple Questions: The HLL Flux

24 Monday Nov 2014

Posted by Bill Rider in Uncategorized

≈ 1 Comment

Questions are infinitely superior to answers.

― Dan Sullivan

The quality of research hinges upon questions and their quality. Surprisingly simple questions can lead to discovery. I’m not claiming discovery here, but I’ll start with what seems like a simple question and attack it.

There are some questions that shouldn’t be asked until a person is mature enough to appreciate the answers.

― Anne Bishop

Should the flux from a Riemann solver obey certain sign preserving qualities? By this I mean that under some conditions the numerical flux used to integrate hyperbolic conservation laws should obey a sign convention. I decided that it was a reasonable question, but it need to be bounded. I found a good starting point.

What’s a Riemann solver? If you know already go ahead and skip to the next paragraph. If you don’t here is a simple explanation: if you bring two slabs of material together at different conditions and then let them interact, the resulting solution can be idealized as a Riemann solution. For example if I have two blocks of gas separated by a thin diaphragm then remove it, the resulting structures are described by the Riemann solution. This is also known as a “shock tube”. Godunov showed us how to use the Riemann solution to construct a numerical method [Godunov].

For the Euler equations the momentum flux \rho u^2 + p should be positive definite always (at least for gas dynamics). The density, \rho and the pressure, p are both positive. The remaining term is quadratic, thus the entire thing is positive. I reasoned that a negative flux would be unphysical. I worried that dissipative terms when added to the computation of the flux could make it negative.

Doing this generally is a challenge, but there is one Riemann solver that is simple and has a compact closed form, the HLL (for Harten-Lax-Van Leer) flux [HLL, HLLE]. This flux function is incredibly important because of its robustness and use as a “go to” flux for difficult problems [Quirk]. Its simplicity makes it a synch to implement. Its form is also so simple that it almost begs to be analyzed.

The basic form is F =A +D  where A (S_R-S_L)=S_R F\left( U_L \right) – S_L F \left( U_R \right) , (S_R -S_L) D =S_L S_R \left( U_R - U_L \right), S_L is negative definite, and S_R is positive definite bounding wave speeds. The subscripts L and R refer to the states to the left and right of the interface where the Riemann solution is sought. For the Euler equations these are always the acoustic eigenvalues associated with shocks and rarefactions in the solution. We can choose these so that S_L = \min\left(0, u-c\right) and S_R = \max\left(0, u+c\right) are as large as possible for the initial data. If all the wave speeds are moving to the left or right, the HLL formula simplifies quite readily to the “proper” upwinding, which is the selection of F\left(U_L\right) for rightward waves, and F\left(U_R\right) for leftward. Care must be taken to assure that any internal waves aren’t created in the Riemann solution that changes the directionality of the waves. If this is true, these changes must be incorporated in the estimates for S_L and S_R.

If we have a flux that will be positive definite, it isn’t too hard to see where we will have problems. If the combination of the wave speed sizes and the jump in the variable, U_R-U_L is too large it may overwhelm the fluxes resulting in a negative value. For the case of the momentum flux this will happen in strong rarefactions where the velocities are opposite in sign. There is a common problem to solve that test this known colloquially as the “1-1-1” problem. Here the density and energy are set to one and the velocities are equal and opposite. This creates a strong rarefaction that nearly creates a vacuum.

With the HLL flux the computed momentum flux is negative at the center of the domain. I believe this has some negative impacts on the solution. The manifests itself as the “heating” at the center of the expansion in the energy solution, and the “soft” profile at the center of the velocity profile. Both are indicative of significantly too diffuse solution.

3250594A-779E-4A57-8F36-DFA34BD2FCF8E90595CE-520D-4B7F-9A53-E97BC0937E6124A014A2-0973-4826-98DA-E572D26E017B

007BD594-5B54-42FA-8456-74AE20F28FB0

To counter this potentially “unphysical” response I detect the negative momentum flux and set the flux to zero overwriting the negative value. This changes the solution significantly by most notably removing the overheating from the center of the region, but leaving behind a small oscillation. The velocity field is now flat near the center of the domain while the changes in the density and pressure are subtler. With the original flux the density is slightly depressed near the center, with the modification the density is slightly elevated.

06DF847A-67A3-4B6A-BC2A-54D29AEEB5C44CD48521-509B-4C61-86B2-FE129EAD404FE2087096-36EE-4DE5-9109-26032268F4919E7CAF8B-7831-4696-B385-C5184B37B388

The scientist is not a person who gives the right answers, he’s one who asks the right questions.

― Claude Lévi-Strauss

I view these results are purely preliminary and promising. They need much more investigation to sort out their validity, and the appropriate means of modifying the flux. I believe that the present modification still yields an entropy-satisfying scheme. A couple of questions are worth thinking about moving forward. There are other cases where the sign of the HLL flux is demonstrably wrong, but not where the flux itself is signed in a definite way. This certainly happens with contract discontinuities, but existing methods exist to modify HLL to preserve contacts better [HLLEM]. Does this problem go beyond the case of contacts? Higher order truncation error terms produce both dissipative and anti-dissipative effect. How do these effects influence solution? In artificial viscosity, the method turns off dissipation in expansion. How would this type of approach work with Riemann solvers?

Judge a man by his questions rather than by his answers.

― Voltaire

[Godunov] Godunov, Sergei Konstantinovich. “A difference method for numerical calculation of discontinuous solutions of the equations of hydrodynamics.” Matematicheskii Sbornik 89, no. 3 (1959): 271-306.

[HLL] Harten, Amiram, Peter D. Lax, and Bram van Leer. “On upstream differencing and Godunov-type schemes for hyperbolic conservation laws.” SIAM review 25, no. 1 (1983): 35-61.

[HLLE] Einfeldt, Bernd. “On Godunov-type methods for gas dynamics.” SIAM Journal on Numerical Analysis 25, no. 2 (1988): 294-318.

[HLLEM] Einfeldt, Bernd, Claus-Dieter Munz, Philip L. Roe, and Björn Sjögreen. “On Godunov-type methods near low densities.” Journal of computational physics 92, no. 2 (1991): 273-295.

[Quirk] Quirk, James J. “A contribution to the great Riemann solver debate.” International Journal for Numerical Methods in Fluids 18, no. 6 (1994): 555-574.

Necessary, Sufficient and Balanced

23 Sunday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

Computers get better faster than anything else ever. A child’s PlayStation today is more powerful than a military supercomputer from 1996.

— Erik Brynjolfsson

Columbia_Supercomputer_-_NASA_Advanced_Supercomputing_FacilityFor supercomputing to provide the value it promises for simulating phenomena, the methods in the codes must be convergent. The metric of weak scaling is utterly predicated on this being true. Despite its intrinsic importance to the actual relevance of high performance computing relatively little effort has been applied to making sure convergence is being achieved by codes. As such the work on supercomputing simply assumes that it happens, but does little to assure it. Actual convergence is largely an afterthought and receives little attention or work.

Don’t confuse symmetry with balance.

― Tom Robbins

intel_exaflop_needsThus the necessary and sufficient conditions are basically ignored. This is one of the simplest examples of the lack of balance I experience every day. In modern computational science the belief that faster supercomputers are better and valuable has become closer to an article of religious faith than a well-crafted scientific endeavor. The sort of balanced, well-rounded efforts that brought scientific computing to maturity have been sacrificed for an orgy of self-importance. China has the world’s fastest computer and reflexively we think there is a problem.tianhe-1-chinese-supercomputer-2-600x450

I am not saying it is utterly useless. It can play video games.

—Unnamed Chinese Academy of Sciences Professor

At least the Chinese have someone who is smart enough to come to an honest conclusion about their computer! It could be a problem, or it might not be a problem at all. Everything that determines whether it’s a problem has little or nothing to do with the actual computer. The important thing is whether we, or they do the things necessary to assure that the computer is useful.

There is nothing quite so useless, as doing with great efficiency, something that should not be done at all.

― Peter F. Drucker

I know we are doing a generally terrible job of it. I worry a lot more about how much the Chinese are investing in the science going into the computer relative to us. The quote above probably means that they understand how bullshit the “fastest supercomputer” metric actually is. The signs are that they are taking action to fix this. This means much more than the actual computer.four

Once upon a time applied mathematics was used to support the practical and effective use of computing. During the period of time from World War 2 to the early 1990’s applied math helped making scientific computing effective. It planted the seeds of the faith in faster computers we take for granted today. Over the past twenty or so years, this has waned and applied math has shrunk from impact. More and more computing simply works on autopilot to produce more computing power without doing what is important for utilizing this power effectively. Applied math is one of the fields necessary to do this.

Computer science is one of the worst things that ever happened to either computers or to science.

— Neil Gershenfeld

resizedimage300297-lsbemissionscroppedsmWhile necessary applied math isn’t sufficient. Sufficiency is achieved when the elements are applied together with science. The science of computing cannot remain fixed because computing is changing the physical scales we can access, and the fundamental nature of the questions we ask. The codes of twenty years ago can’t simply be used in the same way. It is much more than rewriting them or just refining a mesh. The physics in the codes needs to change to reflect the differences.

a huge simulation of the ‘exact’ equations…may be no more enlightening than the experiments that led to those equations…Solving the equations leads to a deeper understanding of the model itself. Solving is not the same as simulating.

—Philip Holmes

For example we ought to be getting ensembles of calculations from different initial conditions instead of single well-posed initial value problems. This is just like experiments, no two are really identical, and computations should be the same. In some cases this can lead to huge systematic changes in solutions. Reality produces vastly different outcomes from ostensibly identical initial conditions. This makes people really uncomfortable, but science and simulations could provide immense insight into this. Our current attitudes are holding us back from realizing this.

Single calculations will never be “the right answer” for hard problems.

—Tim Trucano

Right now this makes scientists immensely uncomfortable because the necessary science isn’t in place. Developing understanding of this physically and mathematically is needed for confidence. It is also needed to get the most out of the computers we are buying. Instead we simply value the mere existence of these computers and demonstrate their utility through a sequence of computing stunts of virtually no scientific value.

To me, this is not an information age. It’s an age of networked intelligence, it’s an age of vast promise.

—Don Tapscott

Beyond the science, the whole basis of computing is still grounded in models of computing from twenty or thirty years ago (i.e., mainframes). While computing has undergone a massive transformation and become a transformational social technology scientific computing has remained stuck in the past. Science is only beginning to touch the possibilities of computing. In many ways the high performance computing world is even further behind than much of the rest of the scientific world in utilizing of the potential computing as it exists today. the-internet-of-things

All these computers, all these handhelds, all these cell phones, all these laptops, all these servers — what we’re getting out of all these connections is we’re getting one machine. … We’re constructing a single, global machine.

—Kevin Kelly

sc14-logoA chief culprit is the combination of the industry and its government partners who remain tied to the same stale model for two or three decades. At the core the cost has been intellectual vitality. The implicit assumption of convergence, and the lack of deeper intellectual investment in new ideas has conspired to strand the community in the past. The annual Supercomputing conference is a monument to this self-imposed mediocrity. It’s a trade show through and through, and in terms of technical content a truly terrible meeting (I remember pissing the Livermore CTO off when pointing this out).SC13_Floor

You can’t solve a problem with the management of technology with more technology.

—Bill Joy

The opportunities provided by the modern world of computing are immense. Scientific computing should be at the cutting edge, and instead remains stranded in the past. The reason is the lack of intellectual vitality that a balanced effort would provide. The starting point was a failure to attend to the necessary and sufficient efforts to assure success. Too much effort is put toward making “big iron” function, and too little effort in making it useful.

We’ve got 21st century technology and speed colliding head-on with 20th and 19th century institutions, rules and cultures.

— Amory Lovins

Math’s role in computational science?

22 Saturday Nov 2014

Posted by Bill Rider in Uncategorized

≈ Leave a comment

 Mathematics is the art of explanation.

― Paul Lockhart

In projects I work on mathematics plays a key role. Too often the math doesn’t provide nearly enough impact because it can’t handle the complexity of applications. math144_forget-it-anecdotalOne of the big issues is the proper role of math in the computational projects. The more applied the project gets, the less capacity math has to impact it. Things simply shouldn’t be this way. Math should always be able to compliment a project.

This begs a set of questions to consider. For example what sort of proofs are useful? My contention is that proofs need to show explanatory or constructive power.  What do I mean by this?

 

[…] provability is a weaker notion than truth

― Douglas R. Hofstadter

proofA proof that is explanatory gives conditions that describe the results achieved in computation. Convergence rates observed in computations are often well described by mathematical theory. When a code gives results of a certain convergence rate, a mathematical proof that explains why is welcome and beneficial. It is even better if it gives conditions where things break down, or get better. The key is we see something in actual computations, and math provides a structured, logical and defensible explanation of what we see.

How is it that there are so many minds that are incapable of understanding mathematics? … the skeleton of our understanding, …

― Henri Poincaré

Constructive power is similar, but even better. Here the mathematics gives us the power to build new methods, improved algorithms or better performance. It provides concrete direction to the code and the capacity to make well-structured decisions. With theory behind us we can define methods that can successfully improve our solutions. With mathematics behind us, codes can make huge strides forward. Without mathematics it is often a matter or trial and error.

mathToo often mathematics is done that simply assumes that others are “smart” enough to squeeze utility from the work. A darker interpretation of this attitude is that people who don’t care if it is useful, or used. I can’t tolerate that attitude. This isn’t to say that math without application shouldn’t be done, but rather it shouldn’t seek support from computational science.

Robust, physical, flexible, accurate and efficient

21 Friday Nov 2014

Posted by Bill Rider in Uncategorized

≈ 4 Comments

In working on an algorithm (or a code) we are well advised to think carefully about requirements and priorities. It is my experience that these can be stated clearly as a set of adjectives about the method or code that form the title of this post. Moreover the order of these adjectives forms the order of the priorities from the users of the code. The priorities of those funding code development are quite often the direct opposite!

There is nothing quite so useless as doing with great efficiency something that should not be done at all.

– Peter Drucker

n05_TR018003None of these priorities can be ignored. For example if the efficiency becomes too poor, the code won’t be used because time is money. A code that is too inaccurate won’t be used no matter how robust it is (these go together, with accurate and robust being a sort of “holy grail”).

 Extraordinary claims require extraordinary evidence.

― Carl Sagan

The problem I’d like to raise your attention to be that the people handing out money to do the work seem inverts these priorities. This creates a distinct problem with making the work useful and impactful. The over-riding concern is the high-performance computing imperative, which is encoded in the call for efficiency. There is an operating assumption that all of the other characteristics are well in hand, and its just a matter of getting a computer (big and) fast enough to crush our problems out of sight and out of mind. Ironically, the meeting devoted to this dim-sighted worldview is this week, SC14. Thankfully, I’m not there.

All opinions are not equal. Some are a very great deal more robust, sophisticated and well supported in logic and argument than others.

― Douglas Adams

antifragile1Robust. A robust code runs to completion. Robustness in its most refined and crudest sense is stability. The refined sense of robustness is the numerical stability that is so keenly important, but it is so much more. It gives an answer come hell or high water even if that answer is complete crap. Nothing upsets your users more than no answer; a bad answer is better than none at all. Making a code robust is hard work and difficult especially if you have morals and standards. It is an imperative.

Physical. Getting physical answers is often thought of as being equal to robustness, and it should be. It isn’t so this needs to be a separate category. In a sense physical answers are a better source of robustness, that is, an upgrade. An example is that the density of a material must remain positive-definite, or velocities remain sub-luminal, and things like that. A deeper take on physicality involves quantities staying inside bounds imposed, or satisfaction of the second law of thermodynamics.Supersonic_Bullet_Shadowgraph

Robustness and physicality of solutions with a code are ideally defined by the basic properties of an algorithm. Upwind differencing is a good example where this happens (ideally). The reality is that achieving these goals usually takes a lot of tests and checks with corrective actions where the robustness or physicality is risked or violated. This makes for ugly algorithms and ugly codes. It makes purists very unhappy. Making them happy is the place where the engineering becomes science (or math).

A computational study is unlikely to lead to real scientific progress unless the software environment is convenient enough to encourage one to vary parameters, modify the problem, play around.

– Nick Trefethen

Flexible. You can write your code to solve one problem, if the problem is important enough, and you solve it well enough it might be a success. If your code can solve a lot of problems robustly (and physically) you might be even more successful. A code that is a jack-of-all-trades is usually a huge success. This requires a lot of thought, experience and effort to pull off. This usually gets into issues of meshing, material modeling, input, output, and generality in initial and boundary conditions. Usually the code gets messy in the process.

All that it is reasonable to ask for in a scientific calculation is stability, not accuracy. – Nick Trefethen

Accuracy. This is where things get interesting. For the most part accuracy is in conflict with every single characteristic we discuss. It is a huge challenge to both ends of the spectrum to robustness and efficiency. Accuracy makes codes more prone to failure (loss of robustness) and the failures have more modes. Accuracy is expensive and makes codes run longer. It can either cause more communication, or more complexity (or both). It makes numerical linear algebra harder and far more fragile. It makes boundary conditions, and initial conditions harder and encourages much more simplification of everything else. If it can be achieved accuracy is fantastic, but it is still a huge challenge to pull of.

The fundamental law of computer science: As machines become more powerful, the efficiency of algorithms grows more important, not less.

– Nick Trefethen

IBM_Blue_Gene_P_supercomputerEfficiency. The code runs fast and uses the computers well. This is always hard to do, a beautiful piece of code that clearly describes an algorithm turns into a giant plate of spaghetti, but runs like the wind. To get performance you end up throwing out that wonderful inheritance hierarchy you were so proud of. To get performance you get rid of all those options that you put into the code. This requirement is also in conflict with everything else. It is also the focus of the funding agencies. Almost no one is thinking productively about how all of this (doesn’t) fit together. We just assume that faster supercomputers are awesome and better.

Q.E.D.

God help us.

 

The Seven Deadly Sins of Secrecy

20 Thursday Nov 2014

Posted by Bill Rider in Uncategorized

≈ 1 Comment

A secret’s worth depends on the people from whom it must be kept.

― Carlos Ruiz Zafan

Secrecy is a necessary element in the conduct of National Security. Some information is either too dangerous to too many to be allowed to be freely shared. It needs to be effective. The mis-classification of information is a threat because it undermines the cases where classification is necessary and appropriate.Boschsevendeadlysins

Secrecy also carries a massive cost that should be factored into the consideration. When something is secret is isn’t subject to the sort of review and consideration that public information is. As a result aspects like the quality of the related work suffer, or achieving quality is more expensive. The United States kept a large number of documents classified for decades and hidden from view in spite of having no classified information and having great historical value. Other documents were classified solely due to their embarrassing nature to the government. Some of these were the same.

Man is not what he thinks he is, he is what he hides.

― André Malraux

capitol-building-from-gala-300x200It isn’t a secret that the United States has engaged in a veritable orgy of classification since 9/11. What is less well known is the massive implied classification through other data categories such as “official use only (OUO)”. This designation is itself largely unregulated as such is quite prone to abuse.

The smart way to keep people passive and obedient is to strictly limit the spectrum of acceptable opinion, but allow very lively debate within that spectrum….

― Noam Chomsky

OUO is also used to manage things like export control. Despite its importance, the law managing export control is terrible. It is poorly written, poorly managed, and its application is primarily driven by fear rather than rational thought. It is too important to treat this way, and I believe its implementation is actually a threat to our security. It might be useful to describe explicitly the ways that secrecy and classification are abused. Some of these sins are a nuisance, and some of them border on unethical, immoral or illegal.Unknown

The ones with no imagination are always the quickest to justify themselves

― Haruki Murakami

Legitimacy (pride). Some information seeks legitimacy through being declared classified in some manner. For example, shoddy work can be implied to be legit through its classification.

It is in the nature of the human being to seek a justification for his actions.

― Aleksandr Solzhenitsyn,

Importance (envy). Some information or the work related to the information is implied to be more important because it is classified. I see this a lot. It is a way of making the case that your work is so important that it needs to be protected.

I have grown to love secrecy. It seems to be the one thing that can make modern life mysterious or marvelous to us. The commonest thing is delightful if only one hides it.

― Oscar Wilde

Hiding (greed). Some information is deliberately hidden through classification, the words to remember here are “need to know”. This is used to hide things that people don’t want too many eyes on. When I encounter this it disgusts me.

It is almost always the cover-up rather than the event that causes trouble.

–Howard Baker

Cover-up (lust). Fortunately, I have not seen this form in person, but it often involves things that are embarrassing or illegal. You’ve seen this in the news, I’m sure it happens a lot more than we think.

 Withholding information is the essence of tyranny. Control of the flow of information is the tool of the dictatorship.

― Bruce Cavil

Control (wrath). This is a common use of classification. It is a valid reason in many cases, but it is also misused when it is applied to keep communication from happening. Another place where the words “need to know” appear.

Safety (gluttony). This is the “cover your ass” version of classification. Basically, you’re not sure so you declare it to be classified because it’s the “safe” thing to do. At some level there isn’t anything wrong with this if you rectify the situation promptly. In many areas there is clear guidance that allows a better final determination to be made. In other areas, like OUO there is no clear guidance, and the safety sin reigns through the fear associated with awfully written laws.

The awareness of the ambiguity of one’s highest achievements – as well as one’s deepest failures – is a definite symptom of maturity.

― Paul Tillich

Ambiguity (sloth). This goes to the heart of the management of classified documents. In the example of export control we have allowed ambiguity and resultant fear to rule for years. There is no standard and no clear guidance. As a result the application of classification is uneven and ultimately self-conflicting.  seven-deadly-sins

← Older posts

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • February 2026
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013

Categories

  • Uncategorized

Meta

  • Create account
  • Log in

Blog at WordPress.com.

  • Subscribe Subscribed
    • The Regularized Singularity
    • Join 55 other subscribers
    • Already have a WordPress.com account? Log in now.
    • The Regularized Singularity
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...