Solve Finite Element Analysis equation

Hi,
I'm trying to solve the following FEM equation for 1D unsteady heat conduction using MATLAB. I'm new to FEM and to the mathematical approach in MATLAB. So, I'd appreciate any help/suggestion.
What I need help with is to get the converged solution.
At i=0, T=10 and at i=5, T=50. When n=0, T_i^(n+1)=10, 73, 100, 85, 50 respectively at i=1, 2, 3, 4, 5.
dt=0.1 and (alpha/dx)=2
Again, I'd appreciate any and every suggestion here.
Thank you in advance!

4 Comments

What about this?
Sorry about the late response.
Yes, I figured that the equation can be simplified. I will try approaching it that way. Thanks :)
What is this?
The grid representation? I'm assuming you're referring to the FEM part here and not the MATLAB part.

Sign in to comment.

 Accepted Answer

darova
darova on 20 Apr 2020
Here are some of my thoughts

4 Comments

Yes! I figured the same way but my concern is what to have on left side of the equation (or the right side, because as I mentioned in my original post, having two equations on either sides gives an error in MATLAB.) For instance, T1 and T2 are both unknowns.
Pardon my lack of knowledge in both FEM and MATLAB at this point but I'm learning as I go.
This, however, is exactly the confirmation I needed. Thank you very much, Darova.
As you see we have 3 equations with 3 uknowns(T1 T2 and T3)
All you have to do is to solve this system:
example
a = value
dt = value
dx = value
syms T1 T2 T3 % uknowns
eq1 = 1/6*(10-10)/dt + 2/3*(T1-73)/dt ...
eq2 = ...
eq3 = ...
res = vpasolve([eq1 eq2 eq3],[T1 T2 T3],[73 100 85])
I think it's can be automatized for many rows( n )
Jake
Jake on 20 Apr 2020
Edited: Jake on 20 Apr 2020
Thank you! I have yet to learn vpasolve and now I have a reason to!
This is great. Thank you, again.
You are welcome!

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Asked:

on 17 Apr 2020

Commented:

on 20 Apr 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!