Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection of typos/errors from the book #257

Open
doyubkim opened this issue Aug 28, 2019 · 9 comments
Open

Collection of typos/errors from the book #257

doyubkim opened this issue Aug 28, 2019 · 9 comments
Assignees
Labels

Comments

@doyubkim
Copy link
Owner

doyubkim commented Aug 28, 2019

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!

@doyubkim doyubkim self-assigned this Aug 28, 2019
@doyubkim doyubkim added the book label Aug 28, 2019
@doyubkim doyubkim changed the title Collection of typos from the book Collection of typos/errors from the book Aug 28, 2019
@ZeusYang
Copy link

ZeusYang commented Sep 3, 2019

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
Copy link
Owner Author

doyubkim commented Sep 3, 2019

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

@doyubkim doyubkim pinned this issue Sep 4, 2019
@doyubkim
Copy link
Owner Author

doyubkim commented Sep 4, 2019

@ZeusYang the errata page has been updated.

@ZeusYang
Copy link

ZeusYang commented Sep 4, 2019

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
Copy link
Owner Author

doyubkim commented Sep 5, 2019

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

@ZeusYang
Copy link

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
Copy link
Owner Author

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
Copy link
Owner Author

The errata page has been updated.

@doyubkim
Copy link
Owner Author

As reported in #307, the return type of the 2D cross product should be scalar (page 27).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants