0% found this document useful (0 votes)
102 views4 pages

Computer Task 2

The document describes Computer Task 2 which involves implementing and testing code for element stiffness and stress calculations for the isoparametric Quad8 element. It consists of three subtasks: 1) Implementing an element stiffness matrix routine, 2) Solving a cantilever beam problem and calculating stresses, and 3) Meshing a curved domain with an analytical solution to verify the finite element method. The report must include theoretical descriptions, flow charts, plots, comparisons to analytical solutions, and the modified code files.

Uploaded by

Ivan Er
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)
102 views4 pages

Computer Task 2

The document describes Computer Task 2 which involves implementing and testing code for element stiffness and stress calculations for the isoparametric Quad8 element. It consists of three subtasks: 1) Implementing an element stiffness matrix routine, 2) Solving a cantilever beam problem and calculating stresses, and 3) Meshing a curved domain with an analytical solution to verify the finite element method. The report must include theoretical descriptions, flow charts, plots, comparisons to analytical solutions, and the modified code files.

Uploaded by

Ivan Er
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

TMHL62.

Computer Task 2 Last updated February 8, 2023

Computer Task 2 – Implementation of the method

In this task you will implement and test code for element stiffness and stress calcula-
tions for the isoparametric Quad8 element for 2D, plane-stress elasticity in MATLAB.
Code templates together with routines for mesh generation, shape functions and so
on can be downloaded from Lisam. The codes are extensively commented, so please
read the comments carefully in order to understand what happens and what you need
to do.
A ”groupnumber” is used to generate unique data for each student, and is obtained
by signing up on a list in Lisam.
Computer Task 2 consists of three subtasks:

Subtask 1. Implement a routine for computing the element stiffness matrix of an


iso-parametric Quad8 element called KeQ8.m. An empty code starting with

function Ke = KeQ8(xy,D,t)

is provided. Here xy is an 8×2 array containing the x- and y-coordinates of the nodes,
D is the constitutive matrix and t is the thickness. Use the code main subtask 1.m
for developing and testing your code. See comments therein for further instructions.
The code obtained from element check.m should be stated in your report together
with your group number.

Subtask 2. a) Use your code from subtask 1 to solve the cantilever beam problem
illustrated below. The template script main subtask 2.m should be used as a starting

Figure 1: A long slender structure modelled as a beam or as


a membrane. A load with total magnitude F [N] is applied on
the free end.

point for your work. Compare the displacement with an analytical solution from
elementary beam theory assuming a rectangular cross-section and with the length set
to L = 4 + 0.05 · groupnumber [m].
b) Write a code for calculating the stress vector σ at an arbitrary point (ξ, η) in
an element and use it to compute the (nodally averaged) von Mises stress in the
cantilever beam.

1
TMHL62. Computer Task 2 Last updated February 8, 2023

Subtask 3. The figure below shows a curved domain Ω with inner radius ri
and outer radius ro loaded by an in-plane body load b = b(x, y). The displacement
u = (u(x, y), v(x, y))T is prescribed to 0 on the boundary Γ. Consider the stationary

Figure 2: Curved domain Ω with boundary Γ.

plane-stress, isotropic linear elasticity problem

divσ(u) + b = 0 in Ω
u = 0, on Γ.

Based on this problem, we construct a related problem with an analytical solution by


choosing a displacement, call it uMMS such that uMMS = 0 on Γ and computing the
corresponding body load as bMMS = −divσ(uMMS ). The displacement uMMS is now
the1 analytical solution to the problem

divσ(u) + bMMS = 0 in Ω
u = 0, on Γ,

and we can use this to verify our finite element method by comparing our FE-solution
to this problem with the manufactured solution uMMS . This technique for construct-
ing analytical solutions is known as the Method of Manufactured Solutions, hence the
subscript MMS.
Your task is to, based on the script main subtask 3.m where a constructed solu-
tion is given and the corresponding body load computed using symbolic calculations,
finish the implementation of the mapping technique to mesh the domain, incorporate
1
We write the analytical solution, because with boundary conditions that prevent rigid body
motion, the stationary linear elasticity problem has a unique solution.

2
TMHL62. Computer Task 2 Last updated February 8, 2023

your own element stiffness matrix and stress routines from subtasks 1 and 2. Then
make a comparison between the analytical and the FE displacements. In addition
you should provide a plot of the FE (von Mises) stress field.

3
TMHL62. Computer Task 2 Last updated February 8, 2023

Report
The written report must contain the following parts:
- Theoretical description of stiffness matrix and stress calculations with all entities
carefully defined.
- Flow charts for the stiffness matrix calculations.
- Displacement and stress plots.
- Comparisons with analytical solutions.
- Program listing. You should only include the .m-files in which you have made
additions and/or modifications.

You might also like