doyubkim / fluid-engine-dev

Fluid simulation engine for computer graphics applications
https://fluidenginedevelopment.org/
MIT License
1.89k stars 265 forks source link

Collection of typos/errors from the book #257

Open doyubkim opened 5 years ago

doyubkim commented 5 years ago

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!

ZeusYang commented 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: 1 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: 2

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**.

3

Maybe the highest possible diffusion coefficient is not calculated by the formula above?

doyubkim commented 5 years ago

Another good catch, @ZeusYang! Looks like a typo in the caption.

doyubkim commented 5 years ago

@ZeusYang the errata page has been updated.

ZeusYang commented 5 years ago

Page 40

It's about the Gauss-Seidel method. The equation (1.34): 3 The formula (C.3) on page 276 has the same problem.

Page 41

It's about the definition of "conjugate" between two vectors. The equation (1.36): 1 It should be: 2

doyubkim commented 5 years ago

You rock, @ZeusYang! The errata page has been updated.

ZeusYang commented 5 years ago

Page 204

From equation (3.36), you put an extra right bracket here.

2

Page 210

From equation (3.43):

1

And I was wondering why we should do this for Dirichlet-type boundary condition? Thanks in advance.

doyubkim commented 5 years ago

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.

doyubkim commented 5 years ago

The errata page has been updated.

doyubkim commented 4 years ago

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).