Natural Boundary Conditions

Embed Size (px)

Citation preview

  • 7/27/2019 Natural Boundary Conditions

    1/4

    Natural Boundary Conditions

    In contrast to essential boundary conditions, which are built into the solution space,natural boundary conditions are built into the weak form.

    Example 1. Consider the 1-D Poisson equation with a Neumann boundary condition onthe left and a homogeneous Dirichlet (essential) boundary condition on the right,

    d2u

    dx2= f(x), 0 < x < 1, (1)

    du

    dx(0) = 0,

    u(1) = 0.

    If we multiply the ODE by v(x) and integrate by parts, we obtain

    10

    f(x)v(x) dx = 10

    d2

    udx2

    v(x) dx =10

    dudx

    dvdx

    dx dudx

    (1)v(1) + dudx

    (0) 0

    v(0).

    Suppose we impose the same right (essential) boundary condition on v as the solution usatisfies, so v(1) = 0. Then we obtain

    10

    f(x)v(x) dx =10

    du

    dx

    dv

    dxdx + 0v(0). (2)

    If we define

    V0 = {v H1[0, 1] : v(1) = 0}

    a(u, v) =10

    du

    dx

    dv

    dxdx

    L(v) =10

    f(x)v(x) dx 0v(0),

    then we obtain from (2) the weak form of the above Poisson equation: Find u V0 suchthat

    a(u, v) = L(v) v V0.

    The weak solution is also the minimizer over V0 of the energy functional

    J(v) = 12

    a(v, v) L(v).

    Remark. As before, one can show that a is bilinear, symmetric, coersive, and boundedon V0. Hence, the abstract theory of boundary value problems can be applied to show theexistence, uniqueness, and continuous dependence of a weak solution in the Hilbert spaceV0 H1[0, 1].

    1

  • 7/27/2019 Natural Boundary Conditions

    2/4

    Remark. If we impose on the weak solution u some additional smoothness, then we canshow that u solves the Poisson eqn (1). If u C2[0, 1], we can apply integration by parts to(2) to obtain

    1

    0

    f(x)v(x) dx = 1

    0

    d2u

    dx2

    v(x) dx +du

    dx

    (1)v(1) du

    dx

    (0)v(0) + 0v(0) (3)

    for all v V0. But if (3) holds for all v V0, it must hold for all v H10 [0, 1], i.e., it holdsif we impose the additional restriction v(0) = 0 on top of the essential boundary conditionv(1) = 0. Then 1

    0

    d2u

    dx2 f(x)

    v(x) dx = 0 v H10 [0, 1],

    which implies that

    d2u

    dx2 f(x) = 0 x [0, 1],

    so the ODE in (1) holds. If we substitute this into (3) we obtain

    du

    dx(1)v(1) +

    0

    du

    dx(0)

    v(0) = 0 v V0.

    The condition v V0 forces v(1) = 0, so that0

    du

    dx(0)

    v(0) = 0 v V0.

    But v V0 allows v(0) to vary. By picking v(0) = 1, we enforce the left boundary condition,

    0 du

    dx(0) = 0.

    Example 2. Consider the 1-D steady-state diffusion equation with radiation boundarycondition on the left and a homogeneous Dirichlet boundary condition on the right,

    d

    dx

    (x)

    du

    dx

    = f(x), 0 < x < 1, (4)

    (0)du

    dx(0) = (u(0) 0),

    u(1) = 0,

    where is a positive parameter. In the context of heat transfer, the left boundary conditionmeans that the heat flux across the boundary is proportional to the difference between theboundary temperature u(0) and some ambient temperature 0. If we multiply the ODE byv(x) and integrate by parts and apply the boundary conditions for u and assume v(1) = 0(essential BC), we obtain1

    0f(x)v(x) dx =

    10

    (x)du

    dx

    dv

    dxdx (1)

    du

    dx(1) v(1)

    0

    + (0)du

    dx(0)

    (u(0)0)

    v(0)

    2

  • 7/27/2019 Natural Boundary Conditions

    3/4

    and hence 10

    (x)du

    dx

    dv

    dx+ u(0)v(0) =

    10

    f(x)v(x) dx + 0 v(0).

    The left hand side defines the bilinear form a(u, v) and the right hand side gives the linearfunctional L(v). The weak solution lies in the function space V0 = {v H1[0, 1] : v(1) = 0}.

    Clearly a is symmetric and it is easy to show that a is bounded with respect to the SobolevH1 norm. Coersivity can be established as long as the flux parameter is nonnegative. Thecorresponding energy functional is

    J(v) =1

    2a(v, v) L(v) =

    10

    1

    2

    dv

    dx

    2 f(x)

    v(x) dx +

    2v(0)2 0 v(0).

    Example 3. Natural Boundary Conditions in Higher Dimensions. Consider thesteady-state diffusion equation with mixed boundary conditions

    div ((x)u) = f(x), x (5)

    u(x) = 0, x 1 (essential BC)

    (x)u n(x) = (x), x 0 (natural BC)

    where n denotes the outward unit normal to the boundary and = 1 + 0. By this wemean that 1, 0 form a partitionof, so that = 10 and 10 = . If we multiplythe PDE by v(x), apply Greens identity, apply the boundary conditions for u, and assumethat v satisfies the (essential) homogeneous Dirichlet boundary conditions on 1, we obtain

    (x)u v dx = f(x)v(x) dx + (x)u n(x) v(x) dS (6)=

    f(x)v(x) dx +1

    (x)u n(x) v(x) 0

    dS+0

    (x)v(x) dS.

    This gives us the weak form: Find u V0 such that

    a(u, v) = L(v) v V0

    where

    V0 = {v H1() : v(x) = 0 x 1}.

    a(u, v) = (x)u v dxL(v) =

    f(x)v(x) dx +0

    (x)v(x) dS

    As in the 1-D case, one can show that a is bilinear, symmetric, bounded, and coercive, soa unique weak solution u exists and minimizes J(v) = a(v, v)/2 L(v) over v V0. Ifu C2(), then one can show that the weak solution satisfies the PDE and the boundaryconditions.

    3

  • 7/27/2019 Natural Boundary Conditions

    4/4

    Exercises

    1. Derive the weak form for the ODE BVP

    ddx

    (x)

    dudx

    = f(x), 0 < x < 1,

    u(0) = g0,

    du

    dx(1) = 1,

    i.e., give the appropriate space V0 in which the weak solution lies, give the bilinearfunctional a(u, v), and give the bounded linear functional L(v) associated with thisBVP. Note that you will need to apply a weak version of the superposition principleto handle the left boundary condition.

    2. Implement the finite element method for the BVP in problem 1 with continuous piece-wise linear hat basis functions to obtain an approximate solution with 0 = 2,g1 = 2e

    1, = 1 + x2, and f(x) = 2(1 + x)2 ex. The true solution is u(x) = 2ex.Note that the left boundary condition is Dirichlet, but not homogeneous. Hand in theusual material, i.e., a description of your implementation, code listings, plots, and asummary of convergence results as you vary the grid spacing h.

    4