Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

When we have a numerical model that represents a real physical system, and that exhibits chaos (e.g. fluid dynamics models, climate models), how can we know that the model is performing as it should? We cannot compare two sets of model output directly, because even small changes in initial conditions will dramatically change the outputs of individual simulations. We cannot compare the model output directly to observations, either because we can never know with enough detail the initial conditions of the observations, and numerical approximation would anyway cause minor differences that would propagate through the system.

This question is partly inspired by David Ketcheson's question on unit testing scientific code: I'm particularly interested in how regression tests for such models could be implemented. If a minor initial conditions change can lead to major output changes (which may well still be adequate representations of reality), then how can we separate those changes from changes caused by modifying parameters, or implementing new numerical routines?

share|improve this question

3 Answers 3

All you can compare in such cases are the statistics of your solution: averages, higher moments, heat fluxes across the boundary, and other integral quantities. Take a look at one of the many papers discussing turbulence models for the Navier-Stokes equations, for example: they're full to the brim with plots of power spectra, entalpies, entropies, enstrophies, and other words you have never before heard of. All are some integral quantity of the flow and they are compared against the same integral quantities computed from other simulations and/or experiments.

share|improve this answer
    
Do you know of a good example paper? Would be a good addition to your answer. –  naught101 Nov 15 '12 at 4:27
    
Not off the top of my head -- I'm not a turbulence modeling person. I would start with some of the more recent papers by Tom Hughes, though, and work from there. –  Wolfgang Bangerth Nov 15 '12 at 13:35
    
I think this is a good example of using summary statistics to determine the regime of a dynamic system: "Statistical inference for noisy nonlinear ecological dynamic systems" –  Jugurtha Nov 16 '12 at 15:20

If your code can run in non-chaotic regimes of your underlying problem, especially non-chaotic regimes where you can use the method of manufactured solutions, you should write regression tests that run in these regimes even if they aren't otherwise interesting to you. If these tests fail, then you immediately know that something has gone wrong in your latest code changes. Then you can move on to more physically relevant problems.

share|improve this answer
    
I don't think that whole climate models could be run thus way, but perhaps major components could. Something like a super-unit test. Nice idea. –  naught101 Nov 16 '12 at 20:54
2  
But that's the point. Your regression tests should have good code coverage (gcov and the like are your friends) and should run quickly. If you're running an entire climate model as your daily regression test, I suspect you're wasting a lot of time. –  Bill Barth Nov 16 '12 at 22:24

First, I am going to focus on your last sentence, as you touch on a few different things in you question, but I feel it adequately captures what you are asking. If you are changing numerical routines, you shouldn't be changing initial conditions or system parameters until you have validated the new routine from the old one. On the weakest level I see this as comparing some time averaged values over your solution, and them being in agreement (even if the transient behaviors diverged from each other within the chaos). On the strongest level, you would expect the two routines to reproduce the full transient behavior. Which of these you want, and which is acceptable depends on what questions you are asking and what conclusions you are drawing from the solutions.

As far as telling whether a model is "performing as it should", that is an entirely different question. This has nothing to do with the numerical routines you choose. How you build your model, from your simplifying assumptions to your measurements/calculations of parameters, you should be basing all of your decisions on the physics of the problem, and hopefully prior work done on similar cases. You may be able to validate a model with a simple case reproduced in a lab setting, but there are times when even that is non-trivial. If you can't determine an important system parameter to within an order of magnitude, you can't expect anyone to trust the small details you are calculating in the transient local behavior.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.