Pages

Monday, December 20, 2010

My first fluids problem solver using Fortran

With the mean dark days behind me (fall finals), I now have time to pluck at things for fun. I totally lost interest in MatLab and advancing the capabilities of the slider crank mechanism problem is on hold. I got my self a new toy C::B and since I've not been able to gather the motivation to learn C++ or start solving engineering problems in C, I decided to start playing around with Fortran. It seems to have a much cleaner syntax compared to C, at least for calculations (which is what Fortran is really meat for in the first place).

With AER316 behind me, I ran back to Frank M. White and goofed around. With a little help from a few lecture notes and the web, here's the result of what I've done. ;)


That's a screen shot of the code I wrote. I used VIM to get the screen shot as Code::Blocks - C::B has a somewhat bigger interface and all I intended to place here was the code. Compiled it with GFortran and it worked well. As I progress with Fortran, I might add more capabilities if I get a chance to do so.

No comments:

Post a Comment