]> No Title

of course the problem is deciding which result to trust as being at least as accurate as your own result; this of course is something that cannot be determined in a rigorous way, it requires a judgment call based on your experience.

Scrutinizing computer solutions

(Thispart is beyond what Iθjφecryou to knowforAME 101 but Iincluude itfor comple teness).

SL˙mjlar to analyses, I often see computational results that I can tell within 5 seconds must be wrong.

It is notoriously easy to be lulled into a sense of confi dence in computed results, because

the computer always gives you some result, and that result always looks good when plotted

in a 3D shaded color orthographic projection. The corresponding ""smoke test,“ ""function test,“ and ""performance test,“ are as follows:

1. Smoke test. Start the computer program running, and see if it crashes or not. If it doesn't crash, you've passed the smoke test, part (a). Part (b) of the smoke test is to determine if the computed result passes the global conserv ation test. The goal of any program is to satisfy mass, momentum, energy and atom conservation at every point in the coRejectrputaJlonal domain subject to certain constituitive relations (e.g., Newton's law of viscosity τx=μux/y), Hooke's Law =Eε) and equations of state (e.g., the ideal gas law.) This is a hard problem, and it is even hard to verify that the solution is correct once it is obtained. But it is easy to determine whether or not global conservation is satisfied, that is,

Is mass conserved, that is, does the sum of all the mass fluxes at the inlets, minus the mass fluxes at the outlets, equal to the rate of change of mass of the system (=0 for steady problems)

Is momentum conserved in each coordinate directioni)

Is energy conservedi)

Is each type of atom conservedi)

If not, you are 100% certain that your calculation is wrong. You would be amazed at how many results are never ""sanity checked“ in this way, and in fact fail the sanity check when, after months or years of effort and somehow the results never look right, someone finally gets around to checking these things, the calculations fail the test and you realize all that time and effort was wasted.

2. Pejfopyvance test. Comes before the function test in this case. For computational studies, a critical performance test is to comparee your re sult to a known analyγpcal re sult under JlRejectrpllfled conditions. For example, if you're computing flow in a pipe at high Reynolds numbers (where the flow is turbulent), with chemical reaction, temperature‐dependent transport properties, variable density, etc., first

check your result against the textbook solution that assumes constant density, constant transport properties, etc., by making all of the simplifying assumptions (in your model) that the

analytical solution employs. If you don't do this, you really have no way of knowing if your

model is valid or not. You can also use previous computations by yourself or others for testing, but of course there is no absolute guarantee that those computations were correct.

3. Function test. SL˙mjlar to function test for analyses.