Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: 1d heat finite element

$
0
0
On 12/10/2012 3:49 PM, RICARDO wrote:
> Hello forum.
> I am solving the heat equation i 1d using FEM. It works fine for
>initial condition. However when I tried to run it for t>0 it does not work properly.
>


how about first fixing these issues which Matlab tells you about?

25: The value assigned to variable 't' might be unused.
31: Variable 'hel' might be set by a nonscalar operator.
31: Variable 'hel' might be set by a nonscalar operator.
40: The value assigned to variable 'hel' might be unused.
40: The variable 'hel' appears to change size on every loop
iteration. Consider preallocating for speed.
120: The value assigned to variable 'gs_global' might be unused.

and few more. You can see these from clicking on tools->code analyzer.

I am not saying these will fix or not fix, your logic errors, but
it won't hurt to fix these first.

I think you are asking here for someone to debug your FEM program?
I hope someone will have to do that. FEM is interesting subject.

If I were you, I'd make a print out of the code, and sit
and go over it carefully to make sure it is doing what
it is supposed to do. debugging is an important skill that needs
to be learned in order to become a good programmer.

--Nasser

Viewing all articles
Browse latest Browse all 19628

Trending Articles