|
[Sponsors] |
August 22, 2014, 08:17 |
Python for openfoam
|
#1 |
Member
Divyaprakash
Join Date: Jun 2014
Posts: 74
Rep Power: 12 |
Should I continue to learn Python or should I switch over to C++ if want to make use of openFoam and CUDA (GPU computing))
Can python be used for openfoam? I am just a beginner in the field of CFD. I have started leaning Python just recently and find it quite interesting. ALso I came to know about the benefits of openFoam if I want to work as a freelancer. But I have read that the knowledge of C++ required for it. Also, can GPU computing be done through Python? I have found some articles related to it, but they are very few. |
|
August 22, 2014, 10:05 |
|
#2 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
If you are serious with OpenFOAM you should learn C++. Also note that OpenFOAM has a vast amount of own classes that accomplish what is nowadays also part of newer C++ standards. So it's more of learning OpenFOAM/C++.
Otherwise python is a very good choice for all kind of scientific purposes, especially when it comes to post-processing of CFD data. Numpy and matplotlib are very good starting points here. For visualization purposes ParaView is very well suited (especially for OpenFOAM) and ParaView uses python as it's primary scripting language too. There are a lot of tutorials, Google helps. Concerning the GPU stuff: What do you wanna do? There are a lot of tutorials for python and GPU programming out there, just google "python CUDA". See for example here: https://developer.nvidia.com/how-to-cuda-python http://mathema.tician.de/software/pycuda/ http://mathema.tician.de/software/pyopencl/ Cheers, Armin Last edited by dkxls; August 22, 2014 at 12:21. |
|
Tags |
c++, cuda, gpu, openfoam, python |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Python Shell button is diabled | JPW | ParaView | 4 | November 8, 2015 15:51 |
[OpenFOAM] using the python shell in paraFoam | colinB | ParaView | 14 | September 14, 2015 10:04 |
[OpenFOAM] paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 | aylalisa | ParaView | 4 | June 13, 2014 09:52 |
How to get Python Shell into ParaView 3.8.1? | blaise | OpenFOAM Installation | 3 | July 24, 2012 05:58 |
CentFOAM Python Script Installation: Error | socon009 | OpenFOAM Installation | 2 | May 26, 2012 10:36 |