MATH 676 – Finite element methods in scientifjc computing Wolfgang Bangerth, T exas A&M University http://www.dealii.org/ Wolfgang Bangerth
Lecture 31.7: Nonlinear problems Part 5: Pseudo-time stepping for the minimal surface equation http://www.dealii.org/ Wolfgang Bangerth
The minimal surface equation Consider the minimal surface equation: −∇⋅ ( 2 ∇ u ) = f in Ω A √ 1 +|∇ u | u = g on ∂Ω where we choose 2 , f = 0, g = sin ( 2 π( x + y )) Ω= B 1 ( 0 )⊂ℝ Goal: Solve this numerically with via pseudo-time stepping. http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping General approach: T o solve L ( u ) = f by pseudo-time stepping, we seek the limit u ( x )= lim τ→∞ ¯ u ( x , τ) where solves u ( x , τ) ¯ ∂¯ u ( x , τ) ± L (¯ u ) = ± f ∂ τ Note: is an artifjcial “time-like” variable. We will call it τ pseudo-time . http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Requirements: T o fjnd a stationary limit of where u ( x , τ) ¯ ∂¯ u ( x , τ) ± L (¯ u ) = ± f ∂ τ we need that this time-dependent equation ● has a solution, ● the solution is unique ● the solution converges to a steady state as τ→∞ ● convergence is independent of the starting point ● the steady state is stable http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping General guide: T o fjnd a stationary limit of where u ( x , τ) ¯ ∂¯ u ( x , τ) ± L (¯ u ) = ± f ∂ τ choose the sign so that ● the operator I ±ϵ G (¯ u ) (where G (¯ u )¯ u = L (¯ u ) ) is a contraction for a suffjciently small ϵ> 0 ● the resulting equation is something that resembles a known “physical” equation http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Example: Solve by fjnding the limit of −Δ u = f ∂¯ u ( x , τ) ± ( −Δ¯ u ( x, τ) ) = ± f ( x ) ∂ τ We have two options: ● Plus sign: ∂¯ u ( x , τ) −Δ¯ u ( x, τ) = f ( x ) ∂ τ This is the well-known heat equation: Unique solution! ● Minus sign: ∂¯ u ( x , τ) +Δ¯ u ( x , τ) = − f ( x ) ∂ τ This is the “backward heat equation”: No unique solution! http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Boundary + initial values: T o solve L ( u ) = f in Ω u = g on ∂Ω by pseudo-time stepping using the equation ∂¯ u ( x , τ) ± L (¯ u ) = ± f ( x ) ∂ τ we need boundary and initial values: u ( x , τ) = g ( x ) on ∂Ω×( 0, ∞) ¯ u ( x , 0 ) = ¯ u 0 ( x ) in Ω ¯ Note 1: We can (usually) choose initial conditions arbitrarily. Note 2: But means faster convergence! u 0 ( x ) ≈ u ( x ) ¯ http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Pseudo-time discretization: Do time stepping scheme on ∂¯ u ( x , τ) ± L (¯ u ) = ± f ( x ) in Ω×( 0, ∞) ∂ τ u ( x, τ) = g ( x ) on ∂Ω×( 0, ∞) ¯ u ( x, 0 ) = ¯ u 0 ( x ) in Ω ¯ For example, try the implicit Euler method: n − 1 ( x ) n ( x )−¯ u u ¯ u n ) = ± f ( x ) in Ω ± L (¯ Δ τ n ( x , τ) = g ( x ) on ∂Ω ¯ u Problem: If L(u) is nonlinear, then this equation is still nonlinear in u n – we wanted something linear! http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Pseudo-time discretization: Do time stepping scheme on ∂¯ u ( x , τ) ± L (¯ u ) = ± f ( x ) in Ω×( 0, ∞) ∂ τ u ( x, τ) = g ( x ) on ∂Ω×( 0, ∞) ¯ u ( x, 0 ) = ¯ u 0 ( x ) in Ω ¯ For example, try the explicit Euler method: n − 1 ( x ) n ( x )−¯ u u ¯ u n − 1 ) = ± f ( x ) in Ω ± L (¯ Δ τ n ( x , τ) = g ( x ) on ∂Ω ¯ u Problem: If L(u) is a second order difgerential operator, we may have to take very small time steps! (See lecture 27.) http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Pseudo-time discretization: Do time stepping scheme on ∂¯ u ( x , τ) ± L (¯ u ) = ± f ( x ) in Ω×( 0, ∞) ∂ τ u ( x, τ) = g ( x ) on ∂Ω×( 0, ∞) ¯ u ( x, 0 ) = ¯ u 0 ( x ) in Ω ¯ For example, try a semi-implicit Euler method: n − 1 ( x ) n ( x )−¯ u u ¯ u n = ± f ( x ) in Ω u n − 1 )¯ ± G (¯ Δ τ n ( x, τ) = g ( x ) on ∂Ω ¯ u Here: Choose G(u)u = L(u) where G(u) is a linear operator. (See previous lecture.) http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Pseudo-time discretization: Do time stepping scheme on ∂¯ u ( x , τ) ± L (¯ u ) = ± f ( x ) in Ω×( 0, ∞) ∂ τ u ( x, τ) = g ( x ) on ∂Ω×( 0, ∞) ¯ u ( x, 0 ) = ¯ u 0 ( x ) in Ω ¯ For example, try a semi-implicit method + extrapolation: n − 1 ( x ) n ( x )−¯ u u ¯ ± G (~ u n )¯ u n = ± f ( x ) in Ω Δ τ n ( x, τ) = g ( x ) on ∂Ω ¯ u Here: Extrapolate from previous time steps, e.g. n − 1 −¯ n − 2 u u n − 1 +¯ ~ n − 1 −¯ n − 2 n = ¯ u u Δ τ = 2 ¯ u u Δ τ http://www.dealii.org/ Wolfgang Bangerth
Pseudo-time stepping Pseudo-time discretization: Do time stepping scheme on ∂¯ u ( x , τ) ± L (¯ u ) = ± f ( x ) in Ω×( 0, ∞) ∂ τ u ( x, τ) = g ( x ) on ∂Ω×( 0, ∞) ¯ u ( x, 0 ) = ¯ u 0 ( x ) in Ω ¯ Goal: Use a method that ● is stable ● allows us to take large time steps ● does not have to be particularly accurate ● does not necessarily have to follow a “physical” trajectory as long as the limit is correct! http://www.dealii.org/ Wolfgang Bangerth
Minimal surface equation Concrete application: Solve the minimal surface equation −∇⋅ ( 2 ∇ u ) = f in Ω A √ 1 +|∇ u | u = g on ∂Ω Step 1: Find the steady state limit of ∂ τ −∇⋅ ( u ) = f in Ω ∂¯ u A 2 ∇ ¯ √ 1 +|∇ ¯ u | u = g on ∂Ω ¯ Note: Choose sign as in the heat equation. http://www.dealii.org/ Wolfgang Bangerth
Minimal surface equation Step 2: For ∂ τ −∇⋅ ( u ) = f in Ω ∂¯ u A 2 ∇ ¯ √ 1 +|∇ ¯ u | ¯ u = g on ∂Ω choose a semi-implicit discretization: −∇⋅ ( n ) = f in Ω n −¯ n − 1 u u A ¯ 2 ∇ ¯ u Δ τ n √ 1 +|∇ ¯ n − 1 | u u n = g on ∂Ω ¯ Note: This choice likely already implies a time step restriction. http://www.dealii.org/ Wolfgang Bangerth
Minimal surface equation Step 3: For n −Δ τ n ∇⋅ ( n ) = ¯ A n − 1 +Δ τ n f in Ω 2 ∇ ¯ u u u ¯ √ 1 +|∇ ¯ u n − 1 | n = g on ∂Ω ¯ u choose a space discretization (here: fjnite elements): n ) +Δ τ n ( ∇ φ h , ( n ) ) = ( φ h , ¯ A n − 1 +Δ τ n f ) ∀ φ h ∈ V h ( φ h , ¯ 2 ∇ ¯ u u u √ 1 +|∇ ¯ n − 1 | u Note: We need to also enforce the correct boundary conditions. http://www.dealii.org/ Wolfgang Bangerth
Minimal surface equation Step 4: For n −Δ τ n ∇⋅ ( n ) = ¯ A n − 1 +Δ τ n f in Ω 2 ∇ ¯ u u u ¯ √ 1 +|∇ ¯ u n − 1 | n = g on ∂Ω ¯ u choose a suitable time step : Δ τ n ● Small enough to be “reasonably accurate” ● Large enough to get to infjnity “reasonably quickly” ● In practice: increase time step over tim ● T erminate iteration once solution “is converged” http://www.dealii.org/ Wolfgang Bangerth
Adapting step-26 Let's adapt step-26 for this purpose! ● If necessary: – read through step-26 – watch lectures 26, 27, 29 ● Change boundary values (previously: zero) ● Change right hand side (here: zero) ● Implement difgerent stifgness matrix ● Left out: – time step size control – termination criterion http://www.dealii.org/ Wolfgang Bangerth
MATH 676 – Finite element methods in scientifjc computing Wolfgang Bangerth, T exas A&M University http://www.dealii.org/ Wolfgang Bangerth
Recommend
More recommend