Poisson's Equation
From KratosWiki
(Difference between revisions)
(→Domain Discretisation: "local" Shape Functions) |
(→Domain Discretisation: "local" Shape Functions) |
||
Line 660: | Line 660: | ||
:A particular solution using one and two elements is explained in [[Resolution of the 1D Poisson's equation using local Shape Functions |this section]]. A [[Matlab code of the Resolution of the 1D Poisson's equation using local Shape Functions| '''Matlab''']] and [[Python code of the Resolution of the 1D Poisson's equation using local Shape Functions| '''Python''']] codes are also available. | :A particular solution using one and two elements is explained in [[Resolution of the 1D Poisson's equation using local Shape Functions |this section]]. A [[Matlab code of the Resolution of the 1D Poisson's equation using local Shape Functions| '''Matlab''']] and [[Python code of the Resolution of the 1D Poisson's equation using local Shape Functions| '''Python''']] codes are also available. | ||
− | [[Category: | + | [[Category:Poisson's Equation]] |
Latest revision as of 09:02, 4 November 2009
Contents |
Mathematical forms
The Poisson's Equation takes the form:
- in one-dimensional Cartesian coordinates:
- in two-dimensional Cartesian coordinates:
- in three-dimensional Cartesian coordinates:
- for a domain Ω, equivalent to write:
- where K is the material property,
is the unknown to obtain and Q is a source term,
- and an important secondary variable is
.
Boundary Conditions
Two different boundary conditions will be considered:
Dirichlet boundary condition
- The first type boundary condition specifies the values the solution needs to take
on a boundary
of the domain:
Neumann boundary condition
- The second type boundary condition specifies the values that the derivative of a solution (q0) is to take on the boundary (Γq) of the domain:
Physical examples of the Poisson's equation
- Heat Transfer[1]:
-
is the Temperature
- K is the Thermal Conductivity
- Q the Heat Source
- and q the Heat Flow
-
- Electrostatics[2]:
-
is the Scalar Potential (Voltage)
- K is the Dielectric Constant
- Q the Charge Density
- q the Displacement Flux density
- and
is the Electrostatic Field
-
- Electrostatics[3]:
-
is the Scalar Potential (Voltage)
- K is the Electric Conductivity (σ)
- and q is the Current Flow (
)
-
- Magnetostatics[4]:
-
is the Magnetic Potential
- K is the Permeability
- Q the Current Density
- q the Magnetic Field Intensity (
)
- and
is the Magnetostatic Field or Magnetic Induction
-
Analytical Solution for One-Dimensional Domains
General solution using the Heat Transfer example
- Consider the heat transfer without convection effects along the following bar:
- Remember that the conduction phenomena refers to "the transfer of thermal energy from a region of higher temperature to a region of lower temperature through direct molecular communication within a medium or between mediums in direct physical contact without a flow of the material medium".
- As boundary conditions, the temperature is fixed at the beginning of the bar, and the heat flow is given at the end of the bar:
- Taking a differential length and by establishing the balance of heat flows, it can be written:
- outflow
inflow
- outflow
- Using the Fourier law[5]:
- Therefore:
- If an external heat source is considered, the balance of heat flows becomes:
- Rewritting the boundary conditions:
en
en
- Generic Solution:
Check a set of some specific examples of this analytical solution of the Poisson's equation for one-dimensional domains (including some figures and Matlab code you can modify).
Finite Element Method
- The application of the Finite Element Method [6] (FEM) to solve the Poisson's equation consists in obtaining an equivalent integral formulation of the original partial differential equations (PDE). By dividing the whole domain in elements, the integral expression can be expressed as a sum of elementary integrals, easier to simplify as functions of lower order.
- There are two basic procedures: variational formulation and residual formulation, that will be used here.
Weighted Residual Method (WRM)
- The residual formulation is based on the Weighted Residual Method (WRM). The differential equation is converted in an integral equation with certain weighting functions applied to each equation.
- Therefore, the Poisson's equation given by the governing PDE and its boundary conditions:
- can be written using the WRM as follows:
- with
and
the weighting functions.
- The above expressions use infinite functions, impossible to solve for general cases. Therefore, the solution to be found should be an approach able to be expressed in terms of finite functions. For example, an approach solution can be expressed as a lineal combination of some kind of well known functions
called the basis functions:
- Therefore, the integral equation to be solved become:
- The above expression is the Weighted residual form of the equation because by using an approach solution
, the
and
expressions won't be zero:
- and what it will be forced is:
- If the number of weighting functions (
and
) are the same to the basis functions (
), the following system of equations:
- that can be written as:
- with K is a coefficients matrix that depends on the geometrical and physical properties of the problem, a is the vector with the n unknowns (
) to be obtained and f is a vector that depends on the source values and boundary conditions.
- Using the same basis functions
for the whole domain, and if they are selected to naturally accomplish the boundary conditions, the integral form can be written:
- and therefore:
- Depending on the kind of weighting functions used, different weighted residual methods (WRM) can be considered:
- Collocation Method:
,
- Subdomain Method:
- Galerkin Method:
- Least Squares Method:
and
- etc...
Check the resolution of an specific example of the Poisson's equation with the above diferents weights.
Weak form of the Weighted Residual Method
- Coming back to the integral form of the Poisson's equation:
- it should be noted that not always
can be obtained, depending on the selected trial functions. Remember that some functions cannot be integrated, if they are not continuous.
Integrability conditions
- The following pictures show that to integrate the
derivative of a function, the previous derivatives (
) should be continua.
- That is
can be computed if
is continuous.
- A function f(x) has continuity of
class, if f(x) and
with i=0 to m are also continuous.
- C1 means that f(x) and f'(x) are both continuous.
- C0 means that just f(x) is continuous.
- C-1 means that f(x) is not continuous.
- Applying this criterion to the integral form of the Poisson's equation shows:
-
needs to be
(and, therefore, the selected shape forms too)
- k needs to be
, a clear problem for domains with different materials
- W can be discontinuous
-
- A new form of this integral can be obtained using the Integration by parts [7]. In 1D:
- and the complete integral form of the Poisson's equation becomes:
- that shows how the continuity requirements are now less strong than those with the original integral equation.
- The following table summarises the new continuity requirements for each integral form:
Continuity requirements
Original Weak 1
Natural / Neumann boundary condition
- If
the integral form can be simplified as follows:
- Note that:
-
is not present any more in the boundary equation where the heat flux is defined (x = l)
- if the heat flux is zero in l (
), there is not any more reference to the boundary condition (Neumann condition) in the weak form, reason because it is called natural boundary condition
-
is the heat flux in
due to the constraint that fixes the value of
in this point. (
is the reaction to this constraint
-
Discretisation of the Weak Form
- Following now the discretisation process seen in the precedent section, that is, by applying the basis functions:
- For each i:
- ...
- that can be written in matricial form:
- with:
- Depending on the selection of the weighting functions W, the corresponding Collocation, Subdomain, Galerkin method and so on is obtained. In the case that
(Galerkin Method), the terms are as follows:
- Depending on the selection of the weighting functions W, the corresponding Collocation, Subdomain, Galerkin method and so on is obtained. In the case that
- Note that in this case K is symmetric. This is what is called the weak form of Galerkin.
Domain Discretisation: "local" Shape Functions
- In the previous sections, a global approach has been used, that is, a set of functions to be applied over the whole domain. Nevertheless, the entire domain can be geometrically subdivided in elements and the definition of the set of functions be applied just for each of these portions of geometry.
- These subdomains are what it is called the finite elements.
- In a one-dimensional domain, for example and according to the above approaches, the unknown
can be expressed as follows:
- by using n points where the
value is known, points which are called nodes. The constants
can be obtained just by using these
values in each node
.
- Therefore, the approach function
can also be expressed as follows:
- where:
-
are the polynomial interpolation functions, defined locally (in the element's domain);
-
is the value of the unknown
in the i node;
-
- This kind of well known functions
are usually called Shape Functions and only affects to each element (e) with the contribution of the specific node i. For this reason is also called the Shape Function of the Node i. For more details about how to obtain some Shape Functions and their properties, please follow this link.
- To be more specific, in one-dimension, the equation to be solved using the finite element method is:
and
- by using the weak form of the WRM, which becomes:
- If an element of two nodes is used, then:
- If the equation is solved just for the element (e) and the Galerkin Method is applied, then the matricial form can be written as follows:
- with:
- Note that the boundary conditions have not been yet considered. In just a few lines will be treated.
- In order to solve the whole system of equations, the assembly of the global matrix has to be performed, just by putting all together:
- It should be noted that:
- The boundary conditions have to be applied just to the boundaries, and for this reason they only have effect on the first node and last one.
- The final system to be solved is:
- A particular solution using one and two elements is explained in this section. A Matlab and Python codes are also available.