Open doyubkim opened 5 years ago
Hello, @doyubkim . I'm a little confused on page 202 of the book. The first paragraph is a discussion about the stability of diffusion solver.
Note that the diffusion code we wrote was in fact a triangle filter.
Variable c is proportional to the width of the filter kernel; thus, higher c
means more blurring. Figure 3.17a shows the shape of this kernel. Now
c is the combination of the time-step timeIntervalInSeconds, diffusion
coefficient diffusionCoefficient, and inverse square of the grid-spacing
invGridSpacingSqr.
Here, c equals: And then, the book says:
This means that the kernel shape depends on these three
parameters. The problem is that variable c has its limit. The lowest possible
value is zero (Figure 3.17b) and the highest value is 0.5 (Figure 3.17c).
Otherwise, the kernel will include the grid points that are not part of the central
differencing, resulting in unintended calculations.* Therefore, the highest
possible diffusion coefficient is limited by 0.25 * gridSpacingSquare / dt. In
the case of 2D and 3D, the limits are gridSpacingSquare / dt / 8.0 and
gridSpacingSquare / dt / 12.0.
Yeah, the variable c has its limit and its highest value is 0.5. But the figure 3.17c just shows c=0.25
rather than c=0.5
:
Meanwhile, to get the highest possible diffusion coefficient, the book takes c=0.25
as input. For 1D, the book says, *the highest possible diffusion coefficient is limited by 0.25 gridSpacingSquare / dt. Obviously, here c=0.25
instead of c=0.5
**.
Maybe the highest possible diffusion coefficient is not calculated by the formula above?
Another good catch, @ZeusYang! Looks like a typo in the caption.
@ZeusYang the errata page has been updated.
It's about the Gauss-Seidel method. The equation (1.34): The formula (C.3) on page 276 has the same problem.
It's about the definition of "conjugate" between two vectors. The equation (1.36): It should be:
You rock, @ZeusYang! The errata page has been updated.
From equation (3.36), you put an extra right bracket here.
From equation (3.43):
And I was wondering why we should do this for Dirichlet-type boundary condition? Thanks in advance.
Another great find! And yet another curse of LaTex editing :(
For the last question, it assumes that f_3 is fixed, thus f^{n+1}_3 == f^{n}_3.
The errata page has been updated.
As reported in https://github.com/doyubkim/fluid-engine-dev/pull/307, the return type of the 2D cross product should be scalar (page 27).
I am periodically updating the errata page, and reports from the readers really help other readers to understand the contents better. I do get reports via emails, but I thought it would be great to have a GitHub issue for better visibility. This is motivated by issue #254.
If you know any errors from the book, please do not hesitate and feel free to report here!