Learning c++ for math, CFD, etc.

  • Thread starter Thread starter Mech2013
  • Start date Start date
  • Tags Tags
    C++ Cfd
Click For Summary

Discussion Overview

The discussion revolves around learning C++ for applications in mathematics, computational fluid dynamics (CFD), and finite element analysis (FEA). Participants seek recommendations for books and resources that can help translate mathematical and physics problems into C++ code, particularly for grid-based problems and numerical methods.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses a desire to learn C++ for solving CFD problems, specifically mentioning the need to create grids for heat transfer problems.
  • Another participant recommends a book by Christian, Gould, and Tobochnick, noting that it is based in Java but may still be useful for finding similar C++ resources.
  • A different suggestion includes a book focused on stress analysis of shells, which contains relevant mathematics and source codes, although the participant acknowledges the book's price as a concern.
  • Some participants mention their background in finite element analysis using MATLAB and express a preference for learning FEA in C++ instead.
  • There are suggestions to search for books on general topics like "C++ for scientists and engineers" and "numerical methods in C++" to find suitable resources.

Areas of Agreement / Disagreement

Participants generally agree on the need for resources to learn C++ for scientific applications, but there are multiple recommendations and no consensus on a single best resource. The discussion remains open-ended regarding the most suitable books or approaches.

Contextual Notes

Some participants express uncertainty about the applicability of Java-based resources to C++, and there is mention of varying levels of coding experience among participants, which may influence their resource preferences.

Who May Find This Useful

Individuals interested in learning C++ for scientific programming, particularly in the fields of mathematics, CFD, and FEA, may find this discussion beneficial.

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.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 28 ·
Replies
28
Views
9K
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 133 ·
5
Replies
133
Views
12K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
11K