Discrepancy between Navier-Stokes into and first example

Open
#288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
50/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Compare the Navier-Stokes introductory page at the equation-ipcs-one section with the first example problem at ns_code1.html, focusing on the definition of u^(n+1/2) and the shown F1 code. Confirm the intended intermediate variable, update the explanation or example so they agree, and verify that the equation and code describe the same scheme.

Written by the indexing model from the issue text.

Description

In the Navier-Stokes introductory page, an intermediate step is described here. By the definition of $u^{n+\frac12} = \frac12 (u^{n}+u^{n+1})$, the equation depends on $u^\ast$ as well as $u^{n+1}$. In the first example problem, it seems $u^\ast$ is implicitly assumed to be the same as $u^{n+1}$:

# previously
U = 0.5 * (u_n + u)
# ...
p_n = Function(Q)
p_n.name = "p_n"
F1 = rho * dot((u - u_n) / k, v) * dx # here
F1 += rho * dot(dot(u_n, nabla_grad(u_n)), v) * dx
F1 += inner(sigma(U, p_n), epsilon(v)) * dx
F1 += dot(p_n * n, v) * ds - dot(mu * nabla_grad(U) * n, v) * ds
F1 -= dot(f, v) * dx
a1 = form(lhs(F1))
L1 = form(rhs(F1))

I believe this discrepancy is resolved by instead defining:
$u^{n+\frac12} := \frac12 (u^{n}+u^{*})$

Dominant language
Jupyter Notebook
Stars
167
Forks
89
Avg merge
3h 25m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jorgensd/dolfinx-tutorial

All issues in jorgensd/dolfinx-tutorial

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.