|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Umesh
Join Date: Feb 2015
Posts: 5
Rep Power: 11 ![]() |
Hi all,
This is Umesh Sharad Shisode, am in the final year of M.Tech. in Modeling and Simulation at Centre for Modeling and Simulation, Pune University, Maharashtra, India. My project title is : Development of Conjugate Gradient Solver in OpenFOAM / CPP using MPI platform. I have created solver in CPP, but I am unable to link that with the OpenFOAM. So please help me to solve the problem. I want to know, what are the things to look in order to link new solver with the OpenFOAM. Thanks in advance. regards, Umesh. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 ![]() |
Hi Umesh,
It is better that you post the problems or errors that you have faced when linking your solver to OpenFOAM. It will be easier for Foamers to understand your problem. Usually coupling any two solvers, depends on the way you want to do, i.e. implicit, explicit, or semi, and depend on how you want to organize your Input/Oput interfaces. Best regards, T.D. Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Umesh
Join Date: Feb 2015
Posts: 5
Rep Power: 11 ![]() |
Hi T.D.,
Thanks for your reply. I got your suggestion but the problem is I don't know how to set up interface between CPP program (my own code) with the OpenFOAM library. Kindly guide me to create interface, so that I can compile my program and check its status with OpenFOAM. Waiting for your reply. |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 ![]() |
Hi,
For an interface, You can use "Python" as scripting language. Look at this: https://openfoamwiki.net/index.php/Contrib/PyFoam So Python can execute your program and at end it can pass the outputs as inputs to OpenFOAM automatically. Also Vice versa procedure is possible too. You can organize all this as you like. I hope this will help you. Best Regards, T.D. Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 ![]() |
Hi Umesh,
In the wiki there is page that explains how OpenFOAM stores matrices. See this link https://openfoamwiki.net/index.php/O...es_in_OpenFOAM If you don't mind me asking: what would be the purpose of developing a new cg solver instead of using the one that is already implemented? Best Regards, Paulo |
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Umesh
Join Date: Feb 2015
Posts: 5
Rep Power: 11 ![]() |
Hi Paulo & T.D.,
Thanks for your help. Surely It will help me. Hi Paulo, purpose of developing a new cg solver is to get known with the syntax of OpenFOAM. So that I can manage the function in order to add MPI platform to make it even more efficient And finally to complete my Masters thesis ![]() regards, Umesh |
|
![]() |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 ![]() |
Quote:
I'd glad if you give us some procedures/guidelines for transferring data ( such as vectors/matrices) between OF and PyFoam/Python, too. Thanks a lot for your kind attention. M.Asghari |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 ![]() |
Hi,
Since OpenFOAM is in C++, then the easiest way is to use STL:SWIG that convert std::vector to Python list. see this link: http://stackoverflow.com/questions/2...ist-using-swig Regards, T.D. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 ![]() |
Hi ,
Can u tell us what's inverse process,too? How can a vector in Pyfoam be converted to that in OF? Thanks for ur attention. |
|
![]() |
![]() |
![]() |
Tags |
cpp, development, linking, mpi |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 cfg file and runtime problems | hedley | SU2 | 19 | January 26, 2016 04:17 |
Development of partially premixed solver in OpenFoam | harshad88 | OpenFOAM Programming & Development | 3 | May 23, 2014 00:35 |
Quarter Burner mesh with periosic condition | SamCanuck | FLUENT | 2 | August 31, 2011 11:34 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 20:02 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 14:08 |