NACA Airfoils Code - Convert Fortran to C++ #4 (Depends on #1 - #3)BRL-CAD
Status: ClosedTime to complete: 100 hrs Mentors: Gauravjeet Singh, Ch3ckTags: c, code, c++, airfoils, transcoding, translation, fortran

The NACA airfoils are airplane wing shapes developed by the National Advisory Committee for Aeronautics (NACA). These shapes are described by a series of digits, which are translated into actual shapes by a series of computer programs. These programs date back several decades, and were written in Fortran.

BRL-CAD's interest in this code is as a possible means of procedurally generating wing geometry in BRL-CAD models, but we would prefer to have the shape generating logic in one of BRL-CAD's standard languages - C or C++. The target code for this effort is a modernization of older NACA codes by Ralph Carmichael called naca456.

The initial conversion will attempt to precisely reproduce the functionality as currently expressed in the Fortran code - any more elaborate reworking of the logic will be evaluated after we have a C/C++ version that reproduces the Fortran outputs correctly.

This task depends on the successful completion of tasks #1 - #3 - this file makes use of the files from those tasks. Students shouldn't claim (and mentors shouldn't assign) this task until the others are complete.

Your task involves converting the file https://github.com/starseeker/naca/blob/master/naca456.f90 to C++.

  1. Check out the git repository: git clone https://github.com/starseeker/naca
  2. Make sure you can build the stub files that are there (cd naca; mkdir build; cd build; cmake ..; make)
  3. Translate the logic in naca456.f90 into naca456.cxx
  4. Make sure the code compiles (it will not be expected to do anything at this stage.)
  5. Submit the new .cxx file. (If you are comfortable doing so, you can fork the project on github, do your work in the fork, and submit a github pull request instead - either approach is fine.)

You'll want to make sure to preserve any comments that contain useful information from the Fortran sources, as well as the actual logic. If you're successful, there will be follow-on tasks building on this one to compare the output of the new C++ naca456 to the original Fortran version.

References:
  • http://www.pdas.com/naca456.html
  • https://github.com/starseeker/naca
Uploaded Work
File name/URLFile sizeDate submitted
task-13-convert-naca465-f90-to-c.diff20.4 KBDecember 20 2014 01:58 UTC
Comments
Andromeda Galaxyon December 7 2014 19:13 UTCTask Claimed

I would like to work on this task.

Andromeda Galaxyon December 7 2014 19:41 UTCClaim Removed

The claim on this task has been removed, someone else can claim it now.

Andromeda Galaxyon December 19 2014 05:34 UTCTask Claimed

I would like to work on this task.

Popescu Andrei on December 19 2014 05:50 UTCTask Assigned

This task has been assigned to Andromeda Galaxy. You have 100 hours to complete this task, good luck!

Andromeda Galaxyon December 20 2014 02:05 UTCReady for review

The work on this task is ready to be reviewed.

Sean on December 20 2014 03:15 UTCTask Closed

Congratulations, this task has been completed successfully.

Sean on December 20 2014 03:15 UTCdoing a great job

Doing a great job avoiding/minimizing the use of globals.