Tuesday, April 22, 2014

Partial Differential equations

Last homework for the class.  Just have a test left. :D
PartDiffEq.c       -  Example from book 
PartDiffEq_HW1.c    -   Problem 1 from handout.
Really bad picture, until I scan in the page, problem 1 layout and actual results

Obligatory use of my matrix library:
matrix.c  matrix.h
Compile like this:
gcc  matrix.c PartDiffEq_HW1.c -lm 
Save the results to a text file:
./a.out  > PartDiffEq.results.txt
Not sure I have this down pat yet.  When the equation is not equal to 0, I am not sure what to do, the HW1 I had a formula to get the exact answer, and I calculated back to figure out what to subtract from the output vector to compensate for that.

What we used the formula for was to find the temperature of an insulated thin rectangular plate that had reached a stable temperature. You have to figure out the formula for the temperature of the edges, make a grid of points inside and create a matrix for the points, then create a vector of the outputs, find the inverse of the matrix and then calculate the solution vector.

No comments:

Post a Comment