0% found this document useful (0 votes)
244 views10 pages

ME582 CH 05

The document discusses semi-discrete formulation for solving unsteady finite element problems. In semi-discrete formulation, time and space derivatives are discretized separately. Shape functions depend only on space, which results in a system of ODEs involving time derivatives of nodal unknowns. These ODEs are then discretized using finite difference schemes like forward Euler, backward Euler, or Crank-Nicolson to solve for solutions at successive time levels.

Uploaded by

Ali Baig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
244 views10 pages

ME582 CH 05

The document discusses semi-discrete formulation for solving unsteady finite element problems. In semi-discrete formulation, time and space derivatives are discretized separately. Shape functions depend only on space, which results in a system of ODEs involving time derivatives of nodal unknowns. These ODEs are then discretized using finite difference schemes like forward Euler, backward Euler, or Crank-Nicolson to solve for solutions at successive time levels.

Uploaded by

Ali Baig
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

ME 582 Finite Element Analysis in Thermofluids

Dr. Cüneyt Sert

Chapter 5

Formulation of FEM for Unsteady Problems

Two alternatives for formulating time dependent problems are called coupled space-time
formulation and semi-discrete formulation. The first one treats the time similar to the space
dimensions and make use of elements that have time dimensions. In this way the formulation of a 1D
unsteady problem becomes very similar to that of a 2D steady problem. In coupled space-time
formulation shape functions are considered to be functions of both space and time, and the
approximate solution over an element for a 1D problem can be written as

where includes the element nodes in both space and time domains. Although coupled space-
time formulation is very simple, it becomes computationally very expensive, especially for large 3D
problems. Due to its efficiency, the second alternative, semi-discrete formulation became the
standard way of studying time dependent problems.

In semi-discrete formulation time and space derivatives are discretized separately. Shape functions
are taken to be functions of space only and discretization of space derivatives provide a set of ODEs
involving time derivatives of the nodal unknowns. These ODEs are then discretized and solved using
well-known ODE solution techniques.

5.1 Semi-Discrete Formulation – Space Discretization

To demonstrate how semi-discrete formulation works we’ll use the following 1D, unsteady AD
equation

in

The scalar unknown is a function of both space ( ) and time ( ). Together with two boundary
conditions, we also need an initial condition (IC) that provides the solution on the whole domain at
an initial time.

Weak form of this DE is obtained in the same way as we did for steady problems. First the weighted
residual statement is written, followed by integration by parts applied to the diffusion term to yield
the following elemental weak form

∫( ) ∫

5-1
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

where B.T. represents the boundary integral term. Approximate solution that we seek over an
element is in the following form

where the time dependency of the solution is associated with the nodal unknowns and shape
functions are taken to be the same the ones used for steady problems, i.e. functions of space only.
Typically shape functions are functions of the master element coordinate , instead of the global
coordinate , but this detail is not important in our discussion here.

Substituting this approximate solution into the weak form we get

∫ [ (∑ ) (∑ ) (∑ )] ∫

Using GFEM we select a weight function of to get the following equation of the
elemental system

∫ [ (∑ ) (∑ ) (∑ )] ∫

Taking the summation sign outside the integral

∑ ∫ ∑ ∫( ) ∫ ⏟
⏟ ⏟ ⏟
[ ] [ ]

The only difference between this equation and the one obtained for the previously studied steady AD
equation is the first term that involves the time derivatives of the nodal unknowns. This final
equation can be written in the following compact form

[ ]{ ̇ } [ ]{ } { }

where { } is the vector of elemental nodal unknowns and { ̇ } denotes the time derivatives of the
nodal unknowns. [ ] , [ ] and { } are the elemental mass matrix, elemental stiffness matrix and
elemental force vector. For simplicity elemental boundary integral vector { } is included in { }.
When the elemental systems are assembled we obtain the following global system

[ ]{ ̇ } [ ]{ } { }

To summarize, for a time dependent problem an extra mass matrix needs to be evaluated.
Calculation of other matrices and vectors are the same as steady problems.

5-2
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

5.2 Semi-Discrete Formulation – Time Discretization

Equation (5.9) includes nodal unknowns and their time derivatives. Therefore it is not a set of
algebraic equations, but instead a set of ODEs. We still need to discretize the time derivatives of the
nodal unknowns. o do this we’ll introduce the following discrete time domain where subscript “s”
denotes time levels.

𝑡
𝑡𝑠− 𝑡𝑠− 𝑡𝑠 𝑡𝑠 𝑡𝑠
Δ𝑡

Figure 5.1 Discretization of the time domain

Solution at time level is given as the initial condition and we’ll obtain the solution at other time
levels one by one. During any stage of the solution, denotes the current time level where the
solution is known and is the next time level where the solution will be determined. is the
time step between time levels and . For simplicity we will consider to be constant for the
whole solution, although it may be more efficient computationally to vary it in time.

5.2.1. Forward Difference (Euler) Scheme

An advantage of semi-discrete formulation is that any of the well known finite difference based time
integration schemes can be used to discretize { ̇ }. One of the simplest approximation one can use to
discretize { ̇ } is the following forward difference (Euler) scheme

{ } { }
{ ̇}

where { } are the known nodal values of time level and { } is the unknown vector of the new
time level that needs to be calculated. denotes the truncation error, i.e. the accuracy of
the scheme, which is first order in this case. In other words truncation error of time
discretization decreases linearly with the time step. Substituting this approximation into
equation (5.9) written for time step , we get

{ } { }
[ ] [ ]{ } { }

For the AD equation that we are studying and for fluid flow problems that we’ll study later, mass
matrix is independent of time so we can drop the subscript from it. But in general stiffness matrix,
force vector and boundary condition vector can be functions of time, so let’s keep their subscripts.
Equation (5.11) can be rearranged as follows to solve for the unknowns at time level

{ } [ ] [[ ] { } { } [ ]{ } ]

5-3
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

Starting from the known { } values, we can use this equation in a time loop to calculate the nodal
unknowns at different time levels.

5.2.2. Backward Difference Scheme

Another common way of discretizing the time derivative is to use backward difference scheme given
below

{ } { }
{ ̇}

Substituting this approximation into equation (5.9) written for time step , we get (again we’ll
assume that the mass matrix is independent of time)

{ } { }
[ ] [ ] { } { }

The unknown vector { } can be solved as follows

{ } [ ] [ ] [[ ] { } { } ]

5.2.3. Crank-Nicolson Scheme

A third commonly used time discretization is known as the Crank-Nicolson scheme, which is based on
the following formulation

{ } { }
{ ̇} { ̇}

Which is second order accurate. Crank-Nicolson is kind of an averaging of forward and backward
differencing schemes. To use it, let’s write equation (5.9) for both time level and as follows

[ ]{ ̇ } [ ] { } { }

[ ]{ ̇ } [ ] { } { }

Multiply these equations by 1/2 , add them up and use equation (5.16) to discretize time derivative
terms. Resulting equation can be rearranged to obtain the unknown vector at the new time level as
follows

{ } ([ ] [ ] ) [([ ] [ ] ){ } { } { } ]

5.2.4. - Family Schemes

Forward differencing, backward differencing and Crank-Nicolson schemes described above can be
generalized as -family schemes using the following discretization.

{ } { }
{ ̇} { ̇} for

5-4
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

Similar to what we did for the Crank-Nicolson scheme, we can use Equation (5.20) in equations (5.17)
and (5.18) to obtain the following equation that can be used to solve for new unknowns

{ } [ ̂] [ ̅ ]{ } {̂}

where

[ ̂] [ ] [ ]

[ ̅] [ ] [ ]

{ ̂} [ { } { }]

Forward differencing, backward differencing and Crank-Nicolson schemes correspond to the


following selections of the parameter

orward Differencing ( uler

rank icolson

{ ackward Differencing

5.2.5. Comparison of Implicit and Explicit Time Discretization Schemes and Stability

As seen in equation (5.21), in family schemes [ ̂ ] needs to be inverted. For the forward
differencing scheme [ ̂ ] is equal to the mass matrix, which is generally time independent. Therefore
it needs to be inverted only once, but not at every time level of the numerical solution. However, for
backward differencing and Crank-Nicolson schemes [ ̂ ] also includes [ ] , which is likely to be
time dependent. Therefore it may be necessary to calculate a new [ ̂ ] and invert it at each time step,
which is a costly process.

Forward differencing scheme is known as an explicit scheme. Backward differencing and Crank-
Nicolson are implicit schemes. In general implicit schemes are computationally more demanding as
mentioned above. However, they are also known to be more stable compared to explicit schemes.
Stability of a time discretization scheme is about the behavior of errors during the time marching
process. If the errors remain bounded, i.e. do not continuously grow in time, the scheme is said to be
stable. However, if the scheme allows unlimited growth of errors in time the solution may start to
oscillate unphysically and may blow up eventually.

Explicit schemes such as forward differencing are known to be conditionally stable, i.e. time step
should be selected smaller than a certain critical value to have stable solutions. In practice this
restriction can be too severe, ruining the computational efficiency of the explicit schemes. Implicit
schemes such as backward differencing and Crank-Nicolson are unconditionally stable. They do not
have critical time step restrictions and can work with larger time steps. However, note that time
steps should still be seected small enough to capture the unsteady behavior of the solution
accurately. Due to this advantage of being able to work with larger time steps, implicit schemes may
be preferred over explicit ones, even if they require more computational work at each time step.

5-5
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

5.2.6. Mass Matrix Lumping

As explained above, unsteady problems are solved step-by-step in a time loop. At each time level a
linear algebraic system needs to be solved. Altough explicit schemes could do this in a more efficient
manner compared to implicit ones, still the solution of a linear algebraic system at each time level is
a costly process. To avoid this lumping can be applied to the mass matrix, convertng it into a diagonal
matrix. When the mass matrix becomes diagonal, we no longer need to solve a linear equation
system at each time level, insteady the unknowns at the new time level can now be calculated
independent of each other. Also with mass lumping critical time step values of conditionally stable
schemes become larger. Mass lumping increases computational efficiency considerably, but it also
introduces additional numerical errors to the solution and it should be used with care.

Row-sum lumping is the easiest way of obtaining lumped mass matrices. Entries of each row of the
mass matrix is summed and the sum is assigned to the diagonal entry of that row. Proportional
lumping is another alternative way of lumping the mass matrices [1].

5.2.7. Other Time Discretization Schemes

-family schemes that are studied in this chapter are not the only possible ways of time
discretization. Actually first order forward differencing (Euler scheme) belongs to the family of
explicit Adam’s ashforth schemes. Backward differencing and Crank-Nicolson schemes belong to the
family of implicit Adam’s Moulton schemes It is possible to study Adam’s family schemes to see how
higher order explicit and implicit time discretizations can be constructed [2]. Runge-Kutta is another
well-known family of schemes used for time discretization [2].

5.3 Sample 1D Unsteady Solution

Consider the unsteady heat diffusion in a 1D domain governed by the following DE

Initial condition

oundary conditions

The problem can be treated to model the cooling of a 1D bar that is initially heated to have a
parabolic temperature distribution with the maximum temperature being at its center. Its ends are
kept at a fixed low temperature and the bar loses it to the surrounding through its ends and
temperature over it reduces in time until it comes to an equilibrium.

Let’s solve this problem using the following mesh of 5 linear elements, each having a length of

1 2 3 4 5 6
e=1 e=2 e=3 e=4 e=5 5-6
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

Elemental mass matrix derived in the previous section is

∫ ∫

which will be the same for each element, since all of them are linear elements of the same size. Using
the shape functions of 1D linear elements, entries of [ ] can be evaluated as



(due to symmetry of [ ])


Therefore elemental mass matrices are

[ ] [ ]

Assembled global mass matrix is

[ ]

[ ]

Elemental stiffness matrix for the DE of interest is


Considering to be constant, elemental stiffness matrices will also be the same for all elements.
Their entries are

∫( ) ( )

∫( ) ( )

5-7
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

(du e to symmetry of [ ])

∫( ) ( )

Therefore elemental stiffness matrices are

[ ] [ ]

and the assembled global stiffness matrix is

[ ]

[ ]

Let's obtain the solution using forward differencing scheme with a time step of . At level
nodal unknown vector { } can be obtained from the given initial condition as follows

{ }

{ }

To march in time, we need to use the following forward differencing formula derived in the previous
section

[ ]{ } [ ]{ } { } [ ] { }

For this problem force function on the right hand side of the DE is zero. Also both BCs are of essential
type and therefore and entries of the elemental boundary integral vector (which is included in
{ } ) cannot be calculated but they are also not necessary.

To get the solution at the new time level we first need to reduce the above general system to the
following 4x4 system by the use of given EBCs

[ ]{ } [ ]{ } [ ]{ }

Solution at the new time level becomes

{ } { }

5-8
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

We can continue like this and calculate one more solution as

[ ]{ } [ ]{ } [ ]{ }

to get

{ } { }

Note that forward differencing is a conditionally stable explicit scheme. If we continue a few more
time steps we will get unphysical oscillations indicating that we need to lower the time step to
obtain a stable solution.

5.4 Exercises

E-5.1. Continue the solution of Section 5.3 and see how the solution blows up. Solve the problem
again with the same time step using backward differencing. Does the solution converge to a steady-
state?

E-5.2. Modify steady1D.m code so that it can solve time dependent problems with family schemes.
Solve the problem of Section 5.3 with different time steps and determine the critical time step value.

E-5.3. Use the unsteady version of steady1D.m code to solve the problem of Section 5.3 with 50
elements. Is the critical time step value that you calculated in the previous exercise still valid or does
the critical time step value depends on the mesh (element length)?

E-5.4. Consider a steel pipeline that is 1 m in diameter and has a wall thickness of 40 mm. The pipe is
heavily insulated on the outside, and before the initiation of flow, the walls of the pipe are at a
uniform temperature of . With the initiation of flow, hot oil at is pumped through the
pipe, creating a convective condition corresponding to at the inner surface of the
pipe. Determine the temperature of the exterior pipe surface covered by the insulation after 8
minutes? Consider the pipe wall to be a plane wall, since its thickness is much less than its diameter.
Use multiple meshes and time steps to make sure that your solution is mesh and time step
independent. Properties of steel are , , .

This problem is taken from reference [3].

E-5.5. A new process for treatment of a special material is to be evaluated. The material is a sphere
of radius , is initially in equilibrium at in a furnace. It is suddenly removed from the
furnace and subjected to a two-step cooling process.

Step 1: Cooling in air at for a period of time until the center temperature reaches a critical
value, . For this situation, the convective heat transfer coefficient is
. After the sphere has reached this critical temperature, the second step is
initiated.

5-9
ME 582 Finite Element Analysis in Thermofluids
Dr. Cüneyt Sert

Step 2: Cooling in a well stirred water bath at , with a convective heat transfer coefficient of
.

a) Calculate the time required for step 1 of the cooling process to be completed.
b) Calculate the time required during step 2 of the process for the center of the sphere to
cool from to .

Properties of the sphere material are , , .

This problem is taken from reference [3].

E-5.6. In laying water mains, utilities must be concerned with the possibility of freezing during cold
periods. Although the problem of determining the temperature of in soil as a function of time is
complicated by changing surface conditions, reasonable estimates can be based on the assumption
of constant surface temperature over a prolonged period of cold weather. What minimum burial
depth would you recommend to avoid freezing under conditions for which soil, initially at a
uniform temperature of , is subjected to a constant surface temperature of for days?
Properties of soil are , , .

This problem is taken from reference [3].

𝑇𝑠

𝑇 𝑥𝑚 ?

Water mains
𝑇 𝑥𝑚 days

5.5 References

[1] J. N. Reddy, An Introduction to the Finite Element Method, 3rd ed., Mc Graw-Hill, 2005.

[2] S. C. Chapra, R. P. Canale, Numerical Methods for Engineers, 5th ed., Mc Graw-Hill, 2006.

[3] F. P. Incropera, D. P. Dewitt, T. L. Bergman, A. S. Lavine, Fundamentals of Heat and Mass


Transfer, 6th ed., John Wiley and Sons, 2007.

5-10

You might also like