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 comentarios

darova
darova el 17 de Abr. de 2020
What about this?
Jake
Jake el 19 de Abr. de 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 el 19 de Abr. de 2020
What is this?
Jake
Jake el 20 de Abr. de 2020
The grid representation? I'm assuming you're referring to the FEM part here and not the MATLAB part.

Iniciar sesión para comentar.

 Respuesta aceptada

darova
darova el 20 de Abr. de 2020

1 voto

Here are some of my thoughts

4 comentarios

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Abr. de 2020

Comentada:

el 20 de Abr. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by