Finite Element Analysis (FEA) in MATLAB - Textbook Guide

Click For Summary

Discussion Overview

The discussion focuses on finding resources and guidance for setting up Finite Element Analysis (FEA) in MATLAB. Participants share book recommendations, code references, and personal experiences related to implementing FEA and Computational Fluid Dynamics (CFD) methods.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks a detailed textbook to assist in coding FEA in MATLAB, mentioning their background in hand sketches.
  • Another participant recommends a book with MATLAB code and notes that an older book may still be relevant despite changes in MATLAB since its publication.
  • A different participant shares a link to a resource that claims FEA can be implemented in MATLAB in 50 lines, suggesting starting with a finite difference method for beginners.
  • One participant reflects on the numerical methods presented in John Anderson's book, noting its effectiveness in breaking down PDEs into algebraic problems necessary for FEA.
  • Another participant describes their approach to defining and looping through arrays in MATLAB, detailing the process of handling initial and boundary conditions and the iterative nature of their calculations.
  • Participants express uncertainty about the availability of good finite element method textbooks and share personal collections of books on the topic.

Areas of Agreement / Disagreement

There is no consensus on a single best resource for learning FEA in MATLAB, with multiple book recommendations and approaches discussed. Participants have differing views on the relevance of older texts and the best methods to implement FEA.

Contextual Notes

Some participants mention the need for further clarification on specific coding techniques and the handling of arrays in MATLAB, indicating that their understanding is still developing.

Who May Find This Useful

Individuals interested in learning about FEA in MATLAB, particularly those with a background in computational methods or fluid dynamics, may find this discussion beneficial.

rppearso
Messages
196
Reaction score
3
Does anyone know of a great text that shows how to set up FEA in MATLAB in detail. I have wrote out the sort of pre pseudo code from John Andersons - Computational Fluid Dynamics now I just need to build it out in code. I am old school with the hand sketches, hopefully this does not get me a down vote.

40457590_1882933911773922_8490047946346201088_o.jpg

40403655_1882935495107097_1975171256596561920_o.jpg
 

Attachments

  • 40457590_1882933911773922_8490047946346201088_o.jpg
    40457590_1882933911773922_8490047946346201088_o.jpg
    38.1 KB · Views: 651
  • 40403655_1882935495107097_1975171256596561920_o.jpg
    40403655_1882935495107097_1975171256596561920_o.jpg
    29.7 KB · Views: 693
Physics news on Phys.org
You can also do FEA in MATLAB in 50 lines:
https://www.math.hu-berlin.de/~cc/cc_homepage/download/1999-AJ_CC_FS-50_Lines_of_Matlab.pdf

I thought Anderson also gives some numerical methods in his book?
I would start with a finite difference method if this is your first attempt to write a CFD solver (but MATLAB is fine, at least you don't have to worry about implementing solvers for sparse matrices).
I don't know a good book on finite element methods, although I have a couple of them on my shelf.
 
bigfooted said:
You can also do FEA in MATLAB in 50 lines:
https://www.math.hu-berlin.de/~cc/cc_homepage/download/1999-AJ_CC_FS-50_Lines_of_Matlab.pdf

I thought Anderson also gives some numerical methods in his book?
I would start with a finite difference method if this is your first attempt to write a CFD solver (but MATLAB is fine, at least you don't have to worry about implementing solvers for sparse matrices).
I don't know a good book on finite element methods, although I have a couple of them on my shelf.

Thank you for the reference. Anderson does not provide raw code, although I did find his email address and asked him (but he has not yet responded). His book does a marvelous job of breaking the PDE's into algebraic problems which is what is required for finite element (PDE -> algebra) and then looped in an array.

Basically I just need to figure out how to define/build out an array and then loop each element of the array in time (allowing each array element to pull values from each other either from adjacent array cells or values from previous time steps in the same array or other arrays.

So the initial array will be pre-populated with values (initial and boundary conditions, the boundary conditions are no longer "neumann" they are simply algebra) and then the calculations will solve and a new array will be created. There will now be 2 arrays with values, the initial conditions (t=0) and the new conditions (t=1), then to get t=2 the calculations will be ran again using the new values from t=1. These new t=2 array values can either replace the initial conditions or just keep creating more arrays (with computing power what it is today and the fact this is a simple pseudo one dimensional problem I don't think there will be issues just to save them but only display the latest values in the plot. I then want to display the values as colors in the shape that I have drawn and have that shape change as I manually change the area factor A(x). This will go on until the new t=x value is negligibly different from t=x-1 (that acceptable difference, steady state, will be set by the user).

I don't think this is super hard to do in MATLAB but I have never done it so need a little help/reference. I have only done a loop in an "array" with a single box so an array didn't really need to be set up, I simply set up a do until loop to converge on a value.
 

Similar threads

  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K