CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Learning cfd with python (https://www.cfd-online.com/Forums/main/207085-learning-cfd-python.html)

saivignesh786@gmail.com September 24, 2018 06:19

Learning cfd with python
 
Hai

I want to learn to code in python for cfd problems.

Around the internet I find resources for matlab and openfoam.

I specifically need python resources since it is open source ,easy to code .

Kindly help me in referring some free online resources for learning CFD through python.

Thanks in advance for your help,
Have a great time.

rewol September 24, 2018 10:06

I genuinely do not think you should look for references or case studies that include CFD application with python.

What is important is that you study the problem and the appropriate CFD method that can accurately solve the problem. Once determined, coding for the solution can be performed with any computer language that you are comfortable with. The rest is just to learn how the Python's syntax works through simple python books, courses etc.

Regards.

JBeilke September 24, 2018 10:16

https://github.com/barbagroup/CFDPython

Ford Prefect September 25, 2018 01:47

Just a comment regarding other options;


Octave is an opensource version of matlab, so if you have matlab scripts it's just copy-paste.


Julia is a relatively new high performance language with many nice features aimed at solving numerical problems such as CFD.



Some benchmarks with different options:



https://julialang.org/benchmarks/

elvis October 21, 2018 02:31

Hi,
http://pythonflu.wikidot.com/ not directly what you looking for as it makes openfoam(c++) useable from python. And it has not been updated since mid 2012.

http://pythonflu.wikidot.com/new-crash-course As you can see pythonFlu coding almost coincides with the referenced OpenFOAM one. Some pythonFlu C++ differences (like usage of namespaces, includes and libraries) lead to a better structured and clearer solver code definition. The differences which come from Python, C++ and SWIG wrapping natures are explicitly highlighted by "ext_" prefix.

So, once you are familiar with OpenFOAM it would be nothing for you to start using pythonFlu. To be able to program your own solver in pythonFlu terms you need to know OpenFOAM API (the referenced documentation could be found here).


All times are GMT -4. The time now is 22:46.