Processing math: 23%

Tuesday, April 30, 2024

Galerkin method in abstract settings

 
This section deals with analyzing errors in finite element method. To determine when Galerkin method will produce a good approximation, abstraction is introduced.
Let B:V×VR be bounded bilinear form and let F:VR be bounded linear form.
It is assumed that the problem to be solved can be stated as, find uV such that
B(u,v)=F(v),vV
  Example
To make sense of above abstraction, it is best to see how this is derived using a weak form of PDE as shown below.
Consider Poisson's equation given by:
Δu=fin Ω,u=0on Ω
where Ω is a bounded domain, f is a given function, and u is the function to be determined.


The weak formulation involves multiplying the differential equation by a test function v from the space H10(Ω), integrating over the domain Ω, and applying integration by parts:
Ωuvdx=Ωfvdx
Here, B(u,v)=Ωuvdx and F(v)=Ωfvdx define the bounded bilinear and linear forms respectively.

Well posed problem
The abstract setting problem is considered well-posed, if for each FV , there exists a unique solution uV and the mapping F>u is bounded. V here means dual space of V. Alternately, if L:VV given by <Lu,v>=B(u,v) is an isomorphism.

Example
For Dirichelet problem of Poisson's equation, we have
V=H1(Σ)B(u,v)=Σ(gradu(x))(gradv(x))dxF(v)=Σf(x)v(x)dx
 A generalized Garlekin method for the abstract problem begins with a finite dimensional normed vector space Vh, a bileaner form Bh:Vh×VhR and a linear form Fh:VhR and defines uhVh by
 Bh(uh,v)=Fh(v),vVh
 Above equation can be written in the form Lhuh=Fh where Lh:VhVh given by <Lhu,v>=Bh(u,v)
 If the finite dimensional problem is non-singular, then the norm of discrete solution operator known as ``stability constant'' is defined as
 L1h

 In this approximation of the original problem determined by V,B,F by Vh,Bh,Fh intention is that Vh in some sense approximates V and Bh,Fh approximate B,V. This is idea behind ``Consistency''.
 The goal here is to approximate uh to u. This is known as ``Convergence''.

 To this end, assume there is a restriction operator πh:VVh so that πhu is close to u.
 Using the equation Lhuh=Fh, we can compute the ``consistency error'' as
 LhπuFh
 Error we wish to control is
 πhuu
 Easy to see the relation between error and consistency error.
 πhuu=L1h(LhπuFh)
 Recall thet norm of Lh is stability constant. If we take norms both sides to above equation, we see that the norm of error is bounded by product of stability constant and norm of consistency error.
 πhuu∥≤∥
Expressing this in terms of bilinear forms the relation becomes,
LhπhuVh∥=sup0vVhBh(πhu,v)Fh(v))v
Above equation, especially RHS needs some explanation.
The consistency error measures how close B_h(\pi_hu,v) to F_h(v) for all test functions v in the subspace V_h. Here F_h represents the discrete analog of forcing function. The ratio including sup means worst or max consistency error to the norm of test function v over all possible non-zero test functions in V_h.
Finite dimensional problem is non-singular iff
γh=inf0uVhsup0vVhBh(u,v)u∥∥v
And the stability constant is given by \gamma^{-1}_h
Notes:

Above \gamma_h measures smallest ration of bilinear form B_h(u,v) to the product of norms of u and v overall non-zero functions u,v in the subspace V_h. Above condition shows that the bilinear form B_h(u,v) is bounded from below and has a positive lower bound. This is also called ``coercive'' over subspace V_h. Since B_h(u,v) is a matrix, above condition shows that this matrix is non-singular. For numerical methods, this means the problem is well-posed and having a continuous solution.


Monday, April 29, 2024

PDE- Galerkin method and example

 
The Galerkin method is a numerical technique that transforms boundary value problems, particularly partial differential equations (PDEs), into a system of linear algebraic equations by projecting the problem onto a finite-dimensional subspace.
Steps of the Galerkin Method


 Problem Setup: 

Start with the weak form of the differential equation integrated against a test function.

Choice of Basis Functions

Select basis functions {ϕi}i=1n that satisfy the boundary conditions.
 Approximation of the Solution: 

Assume u(x)un(x)=i=1nciϕi(x).
 Galerkin Projection: 

Ensure the residual is orthogonal to the span of the basis functions:
  Residualϕjdx=0for all j.

Example: One-Dimensional Poisson Equation

Consider the problem
u(x)=f(x),u(0)=u(1)=0.
on the interval [0,1].
Step 1: Weak Form

Multiply by a test function v(x) and integrate by parts to get:
01u(x)v(x)dx=01f(x)v(x)dx.
Step 2: Discretization

Choose linear basis functions and assume:
u(x)un(x)=i=1nciϕi(x).
Step 3: Galerkin Projection

Insert the approximation into the weak form using basis functions as test functions:
i=1nci01ϕi(x)ϕj(x)dx=01f(x)ϕj(x)dxfor all j.
Step 4: Matrix Formulation

Define the stiffness matrix A and load vector b as follows:
Aij=01ϕi(x)ϕj(x)dx,bj=01f(x)ϕj(x)dx.
This leads to the linear system:
Ac=b,
where c is the vector of coefficients.
\subsection*{Example: Very simple and concrete}
Take a differential equation
d2ydx2+x+y=0,0x1
with boundary condition y(0)=y(1)=0

Example:

Step 1
Take a trail solution y(x)=a0+a1x+a2x2. Always take the number of constants one greater than the highest differential power. Here we have second order differential. So, we take 2+1=3 constants a0,a1,a2.
Apply boundary conditions x=0,y=0. This leads to a0=0. Then apply boundary condition x=1,y=0 leads to a1=a2. Then the trail function becomes y(x)=a2(x2x). This is one parameter solution - namely a2.

Step 2
Compute Weighting function
W(x)=ya2=x2x

Step 3
Compute domain residuals. Simply substitute the trail function into original differential equation.
Rd=d2ydx2+x+yRd(x)=da2(x2x)dx2+x+a2(x2x)
 Step 4
Minimization of domain residual:
01W(x)Rd(x)dx=0
Compute minimization. You will get a2=598.
Then the solution is y(x)=598(xx2).
Other formulations
For the differential equation u=f, we can write this as first order by setting
σ=u,σ=f
The pair σ,f can be characterized variationally as unique critical point of the functional
I(σ,u)=11(12σ2uσ)dx+11fudx
over H1(1,1)×L2(1,1)
Note if we take the original J(x) the Energy functional and substitute, we get above.
J(u)=1211|u(x)|2dx11f(x)u(x)dx=1211σ211f(x)u(x)dx=1211σ2+f(x)11u(x)dx1111u(x)dxf(x)dx=1211σ2+0=1211σ2+11f(x)u(x)dx11f(x)u(x)dx=1112σ2fσ+11f(x)u(x)dx

Hilbert space properties for PDEs

 In the context of PDEs the following properties are important for the Hilbert spaces.

Notation: Let V be Hilbert space and let a(.,.):V\times V \rightarrow \mathcal{R} be a bilinear form.
Property 1:
For PDE solutions, we need this bilinear form to be bounded.
|a(u,v)|<M||u||||v|| for some M>0R 
Property 2:
This is called V-Ellipticity'. The concept of V-ellipticity is crucial in establishing the well-posedness (existence, uniqueness, and stability of solutions) of boundary value problems formulated in a variational framework. It guarantees the uniqueness and stability of solutions to the corresponding variational problems. In essence, if the bilinear form derived from a PDE is V-elliptic, then the solution to the variational problem (and hence to the PDE) depends continuously on the data (such as boundary conditions and external forces), ensuring that small changes in input lead to small changes in the output.
Mathematically, it provides a lower bound for the bilinear form.
a(u,v)α||v||2 α is a constant. vV

Simple example
Simplest example of Hilbert space is Euclidean space with euclidean metric. It is not too difficult to verify that the euclidean metric is bilinear, it is bounded in the property 1 sense and it has V-Ellipticity (Property 2).

Sunday, April 28, 2024

Weak formulation of boundary value PDE and its meaning

Energy functional
An energy functional is a mapping from a function space (often a Sobolev space) to the real numbers, which assigns a "total energy" value to each function in the space. The energy assigned typically depends on the function and its derivatives, reflecting physical or geometrical properties like potential energy, kinetic energy, or strain energy in various physical contexts.

J(u)=1211|u(x)|2dx11f(x)u(x)dx
over H1˚(1,1) where this Sobolev space is for functions that go to 0 at boundary points for weak formulation.

Find uH1˚(1,1)such that
11u(x)v(x)=11f(x)v(x),v(x)H1˚(1,1)

Weak Formulation of a Boundary Value Problem

We consider a boundary value problem where we seek to find a function u that satisfies the differential equation
u(x)=f(x)on(1,1),
with boundary conditions
u(1)=u(1)=0.
Multiplying by a Test Function
To derive the weak form, multiply the differential equation by a test function v(x), which is smooth and vanishes at the boundaries (1,1), hence v(1)=v(1)=0. This test function v(x) belongs to the space H˚1(1,1), a subspace of H1(1,1). We obtain:
u(x)v(x)=f(x)v(x).
Integration Over the Domain
Integrate both sides over the interval (1,1):
11u(x)v(x)dx=11f(x)v(x)dx.
Integration by Parts
Use integration by parts on the left-hand side:
11u(x)v(x)dx=[u(x)v(x)]11+11u(x)v(x)dx=0+11u(x)v(x)dx,
                                                                                                        where the boundary terms vanish because v(1)=v(1)=0.
Weak Formulation
Thus, we have the weak formulation of the boundary value problem:
11u(x)v((x)dx=11f(x)v(x)dx.
This equation must hold for all test functions v(x)H˚1(1,1).
Meaning of the Weak Formulation
In this form, the differential equation u=f is translated into an integral equation that does not require the function u to be twice differentiable. Instead, u needs only to have its first derivative in L2(1,1). This allows the inclusion of functions with less smoothness, accommodating more general solutions such as those exhibiting weak derivatives.

Saturday, April 27, 2024

Simplest two-point boundary value problem

  

 Previous blog discussed Sobolev space definition and example

Here we focus on Simplest two-point boundary value problem.

Simplest two-point boundary value problem
u(x)=f(x),1<x<1,u(1)=u(1)=0
Energy functional
An energy functional is a mapping from a function space (often a Sobolev space) to the real numbers, which assigns a "total energy" value to each function in the space. The energy assigned typically depends on the function and its derivatives, reflecting physical or geometrical properties like potential energy, kinetic energy, or strain energy in various physical contexts.

J(u)=1211|u(x)|2dx11f(x)u(x)dx
over H1˚(1,1) where this Sobolev space is for functions that go to 0 at boundary points for weak formulation.

Find uH1˚(1,1)such that
11u(x)v(x)=11f(x)v(x),v(x)H1˚(1,1)

 Example

Imagine a fluid flowing between two long, parallel plates separated by a distance, typically normalized for simplicity. The flow is assumed to be steady (unchanging with time) and laminar (smooth with no turbulence).
The fluid is driven by a pressure gradient or external force such as gravity.
 
 Navier-Stokes Equations: For an incompressible, steady flow with no change in flow direction, the Navier-Stokes equations can simplify significantly. For a flow driven by a pressure gradient in the x-direction, or an external force such as gravity, and assuming no dependence on the y coordinate (2D flow), the equation simplifies to:
 μd2udx2=dpdx+f
 where μ) is viscosity of the fluid, dpdx pressure gradient, f additional force such as gravity.

 Assuming constant pressure gradient and assuming f is constant, we can rewrite above equation as
 u(x)=g(x)
 where g(x)=1μ(dpdx+f).
 Assume walls are at x=-1,x=1 and the flow is zero here, that is u(-1)=u(0)=0

 

Friday, April 26, 2024

Sobolev Space definition with example

 Sobolev spaces are essential in functional analysis and partial differential equations.

 The space H1(1,1) is a specific Sobolev space defined on the interval (1,1) on the real line.

Definition of H1(1,1)

The Sobolev space H1(1,1) includes functions u that satisfy both the function itself and its first derivative being in L2(1,1). Specifically, the space is defined as follows:


  •    A function u belongs to L2(1,1) if:

  11|u(x)|2dx<

  •   The first weak derivative u must also be in L2(1,1), which means:

  11|u(x)|2dx<


Weak derivatives are used to accommodate functions that might not be differentiable in the classical sense everywhere on the interval, including functions that are continuous and differentiable almost everywhere but may have points of derivative discontinuity.


Norm in H1(1,1)}

The norm in the Sobolev space H1(1,1) is defined to incorporate both the function and its derivative, given by:
uH1=(11|u(x)|2+|u(x)|2dx)1/2

Importance and Applications

Sobolev spaces such as H1(1,1) are crucial in the study of partial differential equations (PDEs), as they frequently arise as the solution spaces for various PDEs. Understanding Sobolev spaces is foundational for advanced studies in fields such as mathematical physics, engineering, and applied mathematics.


Example Function for H1(1,1)

Working with a concrete example clarifies above definitions.

Consider the function u(x)=x2 as an example for a function in the Sobolev space H1(1,1). We will verify that both u and its first derivative u belong to L2(1,1).

\Verification of uL2(1,1)
First, we check if the function u(x)=x2 is square integrable over (1,1):

11|u(x)|2dx=11x4dx

Calculate the integral:

11x4dx=[x55]11=15(15)=25

This result confirms that u(x)=x2 is in L2(1,1) as the integral is finite (<).

Verification of uL2(1,1)
Next, compute the derivative of u(x) and check its square integrability:

u(x)=2x

Check if u(x)=2x is square integrable:

11|u(x)|2dx=11(2x)2dx=411x2dx

Computing the integral:

11x2dx=[x33]11=13(13)=23

Thus:

411x2dx=423=83

Since this integral is also finite, u(x)=2x is in L2(1,1).


Thus, the function u(x)=x2 and its derivative u(x)=2x are both in L2(1,1), confirming that u(x)=x2 is a valid example of a function in the Sobolev space H1(1,1).


Chain complexes on Hilbert spaces

 Chain complexes are mathematical structures used extensively in algebraic topology, homological algebra, and other areas of mathematics. Th...