Chorin's method in NSBENCH

Asked by Peter Maday

In the nsbench framework (test environment for different Navier-Stokes solvers in Fenics) at the implementation of Chorin's projection method for the tentative velocity step the following code is available:

# Tentative velocity step
F1 = (1 / k) * inner(u - u0, v) * dx + inner(grad(u0) * u0, v) * dx + \
    nu * inner(grad(u), grad(v)) * dx - inner(f, v) * dx
a1 = lhs(F1)
L1 = rhs(F1)

I am trying to understand the method (and the weak form derivations) and was wondering why the diffusion term in the original formulation nu*laplace(u^n) gets transformed to nu * inner(grad(u), grad(v)) * dx in the dolfin code? Shouldn't this be a weak form for nu*laplace(u^*)? (based on the notation from Wikipedia eqn 1. (http://en.wikipedia.org/wiki/Projection_method_%28fluid_dynamics%29#Chorin.27s_projection_method))?

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Peter Maday
Solved:
Last query:
Last reply:
Revision history for this message
Kent-Andre Mardal (kent-and) said :
#1

On 26 February 2013 12:06, Peter Maday <<email address hidden>
> wrote:

> New question #222875 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/222875
>
> In the nsbench framework (test environment for different Navier-Stokes
> solvers in Fenics) at the implementation of Chorin's projection method for
> the tentative velocity step the following code is available:
>
> # Tentative velocity step
> F1 = (1 / k) * inner(u - u0, v) * dx + inner(grad(u0) * u0, v) * dx + \
> nu * inner(grad(u), grad(v)) * dx - inner(f, v) * dx
> a1 = lhs(F1)
> L1 = rhs(F1)
>
> I am trying to understand the method (and the weak form derivations) and
> was wondering why the diffusion term in the original formulation
> nu*laplace(u^n) gets transformed to nu * inner(grad(u), grad(v)) * dx in
> the dolfin code? Shouldn't this be a weak form for nu*laplace(u^*)? (based
> on the notation from Wikipedia eqn 1. (
> http://en.wikipedia.org/wiki/Projection_method_%28fluid_dynamics%29#Chorin.27s_projection_method)
> )?
>

Integration by parts is used. This is typical for finite element
simulations.

Kent

>
> --
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>

Revision history for this message
Peter Maday (madapeti) said :
#2

Thanks for the fast reply. My question was about the discrepancy between the expression used for the implementation (as presented in the Fenics book) and the one present at Wikipedia. At Wikipedia the tentative velocity update step has laplace(old velocity) on the RHS while here laplace(new velocity) is used.
Now I realized that this is due to the difference in the forumlation and not a step in the weak form derivation I got wrong.

Revision history for this message
Kent-Andre Mardal (kent-and) said :
#3

On 26 February 2013 19:45, Peter Maday <<email address hidden>
> wrote:

> Question #222875 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/222875
>
> Status: Answered => Solved
>
> Peter Maday confirmed that the question is solved:
> Thanks for the fast reply. My question was about the discrepancy between
> the expression used for the implementation (as presented in the Fenics
> book) and the one present at Wikipedia. At Wikipedia the tentative velocity
> update step has laplace(old velocity) on the RHS while here laplace(new
> velocity) is used.
> Now I realized that this is due to the difference in the forumlation and
> not a step in the weak form derivation I got wrong.
>

u is the trial function (TrialFunction) that is used in the computation of
the tentative
velocity us (of type Function). Hence, it is the Chorin scheme, but we have
an explicit time
stepping of the convection. A finite element function u = sum_i u_i N_i is
of type Function, while
N_i is a TrialFunction or TestFunction.

Kent