You are on page 1of 2

Finite Element Computational Analysis

EG-M23

Computer assignment

This Matlab finite element programming assignment is worth 25% of the total mark
for EG-M23. This is an individual assignment. Your code must be original, written by
you only. Codes containing any form of plagiarism will be awarded zero marks.

Project description
Your task is to make changes to the Matlab finite element program for 2D heat conduction/convection problems given to the class. The given program uses the 3-noded linear
triangle element. The changes you need to introduce in the original program must be such
that your program
(a) Will solve problems with the internal heat generation defined node-by-node. That
is, the internal heat source will be linearly distributed within each element (rather
than constant as in the original program).
Data input format. The intensity of the heat source (energy per unit volume) must
be given, for each node, immediately after and in the same line as the corresponding
nodal coordinates (as specified in the given example files)
(b) Will solve problems with possible non-zero prescription of boundary normal heat
flux. Note that in the original program any boundary normal heat flux prescriptions
are implicitly taken as zero (that is, the original program adds no contributions associated to boundary flux prescription to the forcing term). The prescribed boundary
normal heat flux must be constant within each element edge for which there is a
prescription.
Data input format. The boundary normal heat flux data must be given strictly
according to the following:
EDGES WITH PRESCRIBED NON ZERO HEAT FLUX = <nOfEdges>
<edgeNode1> <edgeNode2> <qEdge>
<edgeNode1> <edgeNode2> <qEdge>
...
<edgeNode1> <edgeNode2> <qEdge>
Note that this format is used in the file named TestFile.dat provided.
(c) Must read all data strictly according to the format described in the above and then
compute and print the following in the Matlab command window
The nodal temperatures for all nodes of the mesh. These should also be plotted
as a Matlab figure (as per sample code provided)
The reactive heat flux at all nodes with prescribed temperature

Submision and deadline


Once you have completed your project, you must submit electronically through
Blackboard ONLY the Matlab program heat2D.m.
The deadline for submission is Monday 8th December 2014 at 8am. Please,
note that
Late submissions will be awarded zero marks
Submission by email will not be considered

Marking criteria
In marking this assignment, the following will be taken into consideration:
Effectiveness of your code, i.e. if your code performs all calculations it is
meant to accurately. Note that the fact that a code gives the correct answer for
one particular problem does not mean that the code is correct. To make your
code less prone to errors, run some simple examples to which you know the
solution (get a couple of solutions by hand yourself) and check the solutions.
Also make other checks (e.g. running the same example with different node
and/or element numbering order and ensuring that changing node/element ordering does not affect the results). Note that you can use the given file named
TestFile.dat as data file
Your program must be general. That is, it must run without modification
for any problem of the class considered regardless of node numbering order,
material parameters, etc. All example-specific data must be given in the data
file only
Clarity of your code. Your code must be easy to read and follow. Take the
codes already provided as part of the course as examples. Note that plenty of
comments have been added, indentation is used extensively to emphasise blocks
of instructions and specific calculations are performed in clearly identifiable
parts of the code

You might also like