Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1277 Registered: 06-2003
| Posted on Monday, July 20, 2009 - 07:02 pm: | |
The rationale for this term is given in the notes to the script (click the link in the script) and in the Viscous.pde example. Briefly put, it is an "equation of state" variable that allows the fluid to be slightly compressible. This allows effective computation without compromising the "incompressible" character of the fluid. Looked at another way, it is a penalty factor for enforcing mass conservation. It is a fictitious quantity whose value must be chosen to compromise between strict incompressibility and computational convenience. If you make it too large, the numerical method will become ill-conditioned, and solution will be impossible. If you make it too small, mass will not be conserved. The goal is to make the penalty as small as possible without affecting the solution. So we try a range of values and choose the one that seems best for our needs. In this case, it turned out to be 100. But see the notes in viscous.pde.
|