1. PF Contest - Win "Conquering the Physics GRE" book! Click Here to Enter
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Learning c++ for math, CFD, etc.

  1. Mar 1, 2016 #1
    When I took such courses I suffered due to the fact that I could not code/program. My friends and professors knew how to make 1-D or 2-D grids for heat transfer problems, writing calculus formulas and differential equations in code. How can I learn this? I already know how to solve these problems by hand. Which books are recommended to learn to write in c++ something such as a grid based on nodes in a generic CFD problem for 1D or 2D steady state heat conduction of (for example) a steel rod or something simple like writing the definite integral of f(x)dx from 3 to 5 when f(x) = x^2. Are there any texts out there that teach you how to translate math/physics problems to c++ or making a grid for a CFD problem in c++?
  2. jcsd
  3. Mar 1, 2016 #2


    Staff: Mentor

  4. Mar 3, 2016 #3
    Since you are interested in learning scientific programming in C++ on the truly professional level, you might consider the following book that is dealing with programming of problems related to stress analysis of shells (a very common engineering problem):

    The book contains all relevant mathematics and the complete source codes implementing the algorithms described in the book. (The book is available on Amazon:
    https://www.amazon.com/Computational-Geometry-Surfaces-Application-Analysis/dp/0646930818 )

    Hope this helps.
  5. Mar 3, 2016 #4
  6. Mar 3, 2016 #5
    This is good. I took three finite element courses, but we used matlab and my professor always had to help me code. I always wanted to learn FEA in c++ instead. The price is a bit too extravagant though. I can easily afford it, but still. I'll wait until I have fully understood the basics of c++ before buying it. Thanks for the suggestion.
  7. Mar 4, 2016 #6
    Certainly, you are welcome (I think the price is set due to the size of the codes provided on the CD supplied with the book).
    Actually, there is a number of books on Amazon covering general topics like "C++ for scientists and engineers", "numerical methods in C++", etc.; you might search for a suitable book just using those keywords. Hopefully you will find one that suits your interests.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted