User Tools

Site Tools


scbc2

Some Computer Science Considerations

In this session we explore what a model is, and how a simulation is different. We draw on our experience with simulating plasmas but also on the experience of general simulations. Useful references also include Oberkampf's Verification and Validation in Scientific Computing (e.g. Chapter 2).

Overall process of computational simulation

“The overall problem solving process in computational simulation usually includes the following steps:

  1. Develop a mathematical model – usually expressed by equations of some type – of a physical phenomena or system of interest.
  2. Develop algorithms to solve the equations numerically.
  3. Implement the algorithms in computer software.
  4. Run the software on a computer to simulate the physical process numerically.
  5. Represent the computed results in some comprehensible form such as graphical visualization.
  6. Interpret and validate the computed results, repeating any or all of the preceding steps, if necessary.”

(– M. T. Heath. Scientific Computing: An Introductory Survey. McGraw-Hill, New York, 2nd edition, 2002.)

All simulations are implemented with assumptions, most of which are never written down. Too, simulations are riddled with approximations, most of them out of our control – but one must have an awareness of these in order to account for them as needed.

Some sources of approximation:

  • modeling - for example, omitting friction
  • empirical measurements - for examples, instruments have finite precision; noise; sample size
  • previous computations - input or data may have come from other approximate computations
  • truncation - for example, having to truncate an infinite series
  • rounding - can only represent finite precision
  • computer arithmetic

(Ibid.)

Also:

Algorithmic (in)stability

Even a “correct” implementation of a model into code may not produce the results one is hoping for. This is often out of one's hands as a user but has been a hidden surprise for many! If a model implementer, one needs to be aware of possible issues.

Numerical Instability: An Example

Particularly interesting exercises (pages 18-20, but 19-20): Problem Condition and Numerical Stability

Accuracy versus precision

These words mean different things, though many scientists/programmers/users use them sloppily; two distinct concepts; give thought to the “rightness” (or not) of simulation results

Accuracy and Precision

How Good is a Result? especially the note about units

Which is more desirable: accuracy or precision? Why? Why might one prefer the other? Why can't one always have both?

Working Environment / Tools

Shell

Make

scbc2.txt · Last modified: 2022/07/21 06:59 by 127.0.0.1