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 Kommentare

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

darova
darova am 20 Apr. 2020

1 Stimme

Here are some of my thoughts

4 Kommentare

Jake
Jake am 20 Apr. 2020
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.
darova
darova am 20 Apr. 2020
Bearbeitet: darova am 20 Apr. 2020
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 am 20 Apr. 2020
Bearbeitet: Jake am 20 Apr. 2020
Thank you! I have yet to learn vpasolve and now I have a reason to!
This is great. Thank you, again.
darova
darova am 20 Apr. 2020
You are welcome!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 17 Apr. 2020

Kommentiert:

am 20 Apr. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by