Numerical methods for differential equations
Advection-diffusion
Advection-diffusion given vector field, for our case we go to 1D case.
Diffusive term, advection term.
b.c.: u(0) = 0, u(L) = 1.
We want to figure out an exact solution of the problem.
U(x) = eβ/μx⁄eβ/μL − 1
β/μ >> 1 ⇒ u(x) ≈ eβ/μ(x−L)⁄eβ/μL
β/μ = 10.
Linear sol. when diffusive term dominates with respect to transport.
When transport dominates with respect to diffusion, solution in 2 regions, 1 with strong variations, the other almost constant → high gradient regions = boundary layer → amplitude is of the size of: μ/β.
Discretization with finite elements
Discretization with finite elements.
Dirichlet b.c.
Global becomes 1st and last row adjusted according to b.c.
∀ node: difference as finite differences.
Exact solution?
Peclet number 0.
Numerical methods for differential eqns
Advection-diffusion
Advection-diffusion.
Given vector field.
For our ease we go to 1D case.
Diffusive term.
Advection term.
We want to figure out an exact solution of the problem:
Linear sol. when diffusive term dominates with respect to transport.
When transport dominates with respect to diffusion, solution with 2 regions: 1 with strong variations, the other almost constant -> high gradient regions = boundary layer.
Finite element discretization
Discretization with finite elements.
Dirichlet b.c.
Could also have constant term.
Global becomes 1st and last row adjusted according to b.c.
E.g. discretization of transport term: (3rd line of the problem).
Classic 1D F.E. scheme h, equivalent to a centered finite difference scheme.
Laplace i.e. discretization.
Central approximation.
∀ node:
Finite differences.
Peclet number
Peclet number.
Exact solution?
Pe = Bh/2μ
Similar meaning of Pe, tells relative importance of advection and diffusion terms.
u = g ij, so fundam. solution a substitution we get charact. eqn a b.c. ⇨ Solution.
Solution: u i = 1-(1+Pe)/(1-Pe)i/(1+Pe)/(1-Pe)n
Suppose, for simplicity, n = even, Pe ≈ 1 ⇨ Bh ≈ 2μ (Adv. dominates wrt Diff.).
Oscillations and mesh size
Where is the problem?
In the discretization we say something not meaningful from physical point of view!
u n+1 - u n-1/2 is sensitive to the direction!!
We don't want to change approximation, only to avoid oscillations work on Pe.
Pe = Bh/2μ ⇨ can play with h, so that Pe < 1.
h < 2μ/β; in practice increasing of number of elements not used.
It involves very small elements, big issue in 2D or 3D.
Other possibility: Loose something in order of convergence to avoid oscillation.
Upwind finite difference approximation
Upwind finite difference approximation.
Only 1st order accurate.
It adds artificial diffusion, "killing" oscillations.
u = u i-1 + 2u i - u i+1/h2
[ β u i+1 - u i/h = 0
u i - u i+1 = -u i-1 + 2u i - u i+1/
It is, in practice, another diffusive term centered approximation of 1st derivative.
( μ + Bh/2) u i - u i+1 + 2u i - u i+1/h2
Equivalent to the original problem, in which physical diffusivity is increased of an artificial diffusion term, τ = 3Bh/2.
Generalization of the hypothesis
We can try to generalize the hypothesis:
μ ( 1 + Bh 1 ) x = μ (1 + Pe) = x
Pe = Pe Bh 2/h2 = P2 1 + Pe
μ = μ (1 + (ϕ(ρe)) ϕ (t) such that lim ϕ (t) = 0 t→+∞
If ϕ(t) = 0 go back to the original problem (centered approx 2nd order).
ϕ(t) = upwinding, 1st order.
ϕ(t) = t - t + B(t), B(t) = tt, t 1t0 Bernoulli function.
Schapfelter - Gummel (SG) 2nd order.
For constant facing term solution in the nodes analytical (TO).
Multi-dimensional case
Original problem in multi-dimensional case:
-μ Δu + (β ∙ ∇) u = 0
Discretization parameter, mesh size.
(μ - ch(κ)) Δu + (β ∙ ∇) u = 0
Stabilization parameter, can be properly chosen.
Actually we're adding an isotropic viscous term, same in all directions, but vector fields β affects the result.
∫ [(μ + ch ∇) [ (∇u)∇v]] dz + ∫ [β ∙ ∇u ∇v] dz = 0
Could be better not to have anisotropic diffusion coefficient (acting more on vector field dir).
-div (∇ ( k ∇v) ), kij = ch βi βj weakfoundation.
∫Ωch (β ∙ ∇v) (β ∙ ∇v)
Projecting viscosity on the direction of vector field β.
μ d2dy 2 + βddydy dx = 0
∫ μddvdv dx + ∫ βddvdv dx = 0
Add μ, so that:
∫Ω (1 + Bh2) ddvdv dx + (2/h) ∫ β ddvdv dx = 0
μd2dgivendby xidxi
Like we have changed test function for diffusivity term = χ.
∫ μddvdu dx = 0
Test function is giving more weight to upwinding terms and less to downwinding ones.
Upwinding done by χ, no more by hand, and only for diffusive part.
Usually we don't want to choose different test functions for different parts of the problem, but here it’s really useful.
Modified test functions
- Considering generic node i and test function, want to add something null at both ends and parabolic ➞ cƴ (1-ƴ)_ƴϕq(ƴ) = (1-ƴ) - cƴ (1-ƴ) ⎤ modified test functions.
- _ƴϕq(ƴ) = ƴ + cƴ (1-ƴ) ⎦.
- Original weak formulation: ∫I(ƴdvdu dⱯvdu) dx = 0dt.
- Use modified test f. for Ʋ.
- Use original test f. for u.
- Petrov-Galerkin method (solution and test f. spaces are different).
Petrov-Galerkin method
Ex. In 1D:
_Kij = ∫dxdⱯiqjdx
_Tij = ∫dxdⱯi PjⱯ dx
Galekin approach.
Petrov-Galerkin uses Ɐq.
Compute Ɐij, ⱯijǼ and compare them with Ɐ〈ij〉 (should be ⱯK = ⱯK, Ɐ applied by some upwind).
Strongly consistent stabilization
- Strongly Consistent Stabilization-div(Ƴuv) +b Ƴu +Ɐ = Ɐ u ≇FⱯ Ƌ2 on 2 could use FEMOR.
a(u,v) = Ƒ(v) v Ɐ0 H1(.⌠
a(u,ᵥ) = ƳⱯu o ∫Ω 1/2 [b ⋅ ∇u + div(bv)] v dx = (u, LTv) → L = -LT
Alternative approach
A different approach could be used:
L = au = bv u, LT = -div(bv)
Lsymmu = 1/2 [(Lu + LTv) = 1/2 (b ⋅ ∇u - div(bu)) = 1/2 div b u
Lskewu = 1/2 [(Lu - LTv) = 1/2 (b ⋅ ∇u + div(bu))
Lsymm - div(au) - 1/2 div (b ⋅ v) + ∇u
For SUPG Shv - Lsh - v.
We choose μ, b as constant, ∇ ⋅ f = 0.
We inspect how advection and diffusion contribute.
We focus on most common finite elements P1.
L ᘯ uh = ᘯ −−−− = b ⋅ ∇uh = b ⋅ ∇uh
SNuhi = Lshev uh b ⋅ ∇uh => ∑ K τ ⋅ b ⋅ ∇u ⋅ b ⋅ ∇u
-
Takehome problems
-
Takehome problems
-
Navier Sokes Problems
-
General useful results and Elliptic Problems