Friday, October 7, 2011

ACSI Update

I have selected Fortran as the language of choice for my gas dynamics code. Serious research has been done into the mathematical construct of gridless CFD and chemical codes. As this research continues, I will be learning Fortran with a focus on numerically solving partial differential equations. I will start by solving simple 2D diffusion problems using a finite difference scheme then develop an equivalent FPM method for diffusion, working my way up to a fully functional 3D FPM method for fluid flow. Now I am working my way through the basics of programming in Fortran. After programming "Hello World!" I made a simple program that accepts input from the command line. The program sums the two numbers entered and prints the answer.

      PROGRAM AddTo
      REAL NUM1, NUM2, SUM
      PRINT *, "Enter first number"
      READ(*,*) NUM1
      PRINT *, "Enter second number"
      READ(*,*) NUM2
      SUM = NUM1 + NUM2
      PRINT *, "The sum is ", SUM
      END PROGRAM AddTo

I am using GNU's gfortran compiler for Fortran 95 and jEdit to write my code

I have been using these sources for learning basic Fortran:
http://www.mesoscale.iastate.edu/agron505/fortran.htm
http://folk.uio.no/steikr/doc/f77/tutorial/

No comments:

Post a Comment