From 65df3681dfb1cf84adfb0de0eee61a5fe9202526 Mon Sep 17 00:00:00 2001 From: mleoni-pf <160495781+mleoni-pf@users.noreply.github.com> Date: Tue, 4 Feb 2025 09:01:44 +0100 Subject: [PATCH] Update navierstokes.md (#247) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Improve workflow handling (#118) * Create common action for all workflows and split them into multiple files * Dokken/update fspace and wmtgs (#127) * fix runs-on * Minor improvements in linearelasticity.md (#124) * Fix various things on release branch * Try adding trame * Revert fundamentals * Membrane code * More updates due to autoformatting * Lagrange -> CG back conversion * Change to github image --------- Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> * Update petsc arches * Fix bounding boxes and more (#135) * Start fixing code for nightly build * rerun all files * Try fixing subdomains * Fix meshio * PETSc python API update (#137) * Resolve https://github.com/jorgensd/dolfinx-tutorial/issues/136 * Fixes related to: https://github.com/FEniCS/dolfinx/pull/2703 * Update changelog * Make sure all notebooks run. Change to pathlib in some examples * Api changes related to: https://github.com/FEniCS/dolfinx/pull/2763 (#142) * Bump version numbers * Bump version numbers (#149) * Fix petsc arch * Prepare v0.7.1 (#154) * Merge branch 'main' into release and bump versions * Delete obsolete file * Temporary shift path in nightly test * Make sure there are no warnigns in build * Tabulation * Updates compatible with nightly branch of DOLFINx (#156) * Replace VectorElement and FiniteElement with `basix.ufl.element`. Replace `dolfinx.fem.FunctionSpace` with `dolfinx.fem.functionspace` * More updates * And more * Last vector element updates * Bump pyvista and dolfinx to v0.7.2 (#159) * Bump pyvista and dolfinx to v0.7.2 * remove -r * Add further pyvista deps * Bump versions * Update petsc solver and pc links. Resolves #143 (#160) * Fix typo and issue Issue on page /fem.html #122 (#161) * Compute entity-cell connectivity before calling locate_dofs_topological. Remove soon to be deprecated pyvista syntax for updating time dependent fields. Fix range->np.arange conversion * Update backend in workflow * Fix broken link (#140) + http:// to https:// (#162) * Run book build prior to parallel run * Add back write frame * Fix wrong link * Fix typo in changelog * Merge main into release (#189) * Merge main into release * Apply suggestions from code review * Various fixes when reading through the diff * Further fixes * add missing checkout (#191) * add missing checkout * Add test docker on release PR and release (only push on tag * Remove unused import * Update text to resolve #194 (#195) * Dokken/update nonlin options (#203) * Update options for non-linear solver to sensible choice, ref #200 * Update docker path * Update python file as well * Update config ptr (#207) * Pressure correction equation fix (#196) * Update fundamentals.md (#199) on line 110, updated a typesetting error in equation (3) * Change from vector to petsc_vec (#206) * dolfinx.fem.Form changed to dolfinx.fem.form (#213) * Update compiler_parameters.ipynb In the text it was mentioned that `dolfinx.fem.Form` was used to compile the form, instead of `dolfinx.fem.form`. Not matching the code cell. * jupytext sync * Form -> form in both py and ipynb and LinearProblem -> fem.petsc.LinearProblem * Update book_stable.yml * Update test_stable.yml * Fix python path in test * Fix CI (#227) * Bump docker/build-push-action from 5 to 6 (#221) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/configure-pages from 4 to 5 (#222) Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](https://github.com/actions/configure-pages/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update book_stable.yml (#225) * Update book_stable.yml * Update test_stable.yml * resolve #224 (#226) * Update test_stable.yml --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update test_stable.yml (#235) * Add libgl flag to ci (#238) * Update navierstokes.md --------- Signed-off-by: dependabot[bot] Co-authored-by: Jørgen Schartum Dokken Co-authored-by: Jørgen S. Dokken Co-authored-by: Julius Herb <43179176+juliusgh@users.noreply.github.com> Co-authored-by: rossbm1 <120818149+rossbm1@users.noreply.github.com> Co-authored-by: Manuel Pena Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test_nightly.yml | 3 +++ chapter2/navierstokes.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_nightly.yml b/.github/workflows/test_nightly.yml index e079357d..ec345863 100644 --- a/.github/workflows/test_nightly.yml +++ b/.github/workflows/test_nightly.yml @@ -40,6 +40,9 @@ jobs: - name: Test building the book run: PYVISTA_OFF_SCREEN=false jupyter-book build -W . + - name: Test building the book + run: PYVISTA_OFF_SCREEN=false jupyter-book build -W . + - name: Test complex notebooks in parallel working-directory: chapter1 run: | diff --git a/chapter2/navierstokes.md b/chapter2/navierstokes.md index dd23acc3..336562cc 100644 --- a/chapter2/navierstokes.md +++ b/chapter2/navierstokes.md @@ -59,7 +59,7 @@ $\langle -\nabla \cdot \sigma, v\rangle$. Just as for the [linear elasticity pro where $T=\sigma \cdot n$ is the boundary traction. If we solve a problem with a free boundary, we can take $T=0$ on the boundary. However, if we compute the flow through a channel or a pipe and want to model flow that continues into an "imaginary channel" at the outflow, we need to treat this term with some care. The assumption we then can make is that the derivative of the velocity in the direction of the channel is zero at the outflow, corresponding to that the flow is "fully developed" or doesn't change significantly downstream at the outflow. Doing so, the remaining boundary term at the outflow becomes -$pn - \mu \nabla u \cdot n$, which is the term appearing in the variational problem [](ipcs-one). Note that this argument and the implementation depends exact on the definition of $\nabla u$, as either the matrix with components $\frac{\partial u_i}{\partial x_j}$ or $\frac{\partial u_j}{\partial x_i}$. +$pn - \mu \nabla u \cdot n$, which is the term appearing in the variational problem [](ipcs-one). Note that this argument and the implementation depend exactly on the definition of $\nabla u$, as either the matrix with components $\frac{\partial u_i}{\partial x_j}$ or $\frac{\partial u_j}{\partial x_i}$. We here choose the latter, $\frac{\partial u_j}{\partial x_i}$, which means that we must use the UFL-operator `nabla_grad`. If we use the operator `grad` and the definition $\frac{\partial u_i}{\partial x_j}$, we must instead keep the terms $pn-\mu(\nabla u)^T \cdot n$.