Learning c++ for math, CFD, etc.

  • Thread starter Thread starter Mech2013
  • Start date Start date
  • Tags Tags
    C++ Cfd
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 4K views
Mech2013
Messages
4
Reaction score
0
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++?
 
Physics news on Phys.org
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):
http://members.ozemail.com.au/~comecau/quad_shell.htm

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/dp/0646930818/?tag=pfamazon01-20 )

Hope this helps.
 
NumericalFEA said:
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):
http://members.ozemail.com.au/~comecau/quad_shell.htm

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/dp/0646930818/?tag=pfamazon01-20 )

Hope this helps.
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.
 
Mech2013 said:
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.
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.