CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Development of Numerical Solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By T.D.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2015, 23:01
Default Development of Numerical Solver
  #1
New Member
 
Umesh
Join Date: Feb 2015
Posts: 5
Rep Power: 11
umeshisode is on a distinguished road
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.
umeshisode is offline   Reply With Quote

Old   May 18, 2015, 10:00
Smile
  #2
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
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:
Originally Posted by umeshisode View Post
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.
T.D. is offline   Reply With Quote

Old   May 19, 2015, 01:00
Default Development of Numerical Solver
  #3
New Member
 
Umesh
Join Date: Feb 2015
Posts: 5
Rep Power: 11
umeshisode is on a distinguished road
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.
umeshisode is offline   Reply With Quote

Old   May 19, 2015, 04:13
Smile
  #4
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
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:
Originally Posted by umeshisode View Post
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.
Asghari_M likes this.
T.D. is offline   Reply With Quote

Old   May 19, 2015, 07:10
Default
  #5
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
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
vatavuk is offline   Reply With Quote

Old   May 19, 2015, 10:17
Default Development of Numerical Solver
  #6
New Member
 
Umesh
Join Date: Feb 2015
Posts: 5
Rep Power: 11
umeshisode is on a distinguished road
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. I will look at the link you send me.

regards,
Umesh
umeshisode is offline   Reply With Quote

Old   June 28, 2015, 17:14
Default
  #7
Senior Member
 
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16
Asghari_M is on a distinguished road
Quote:
Originally Posted by T.D. View Post
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.

T.D.
I have a similar problem with Python, too.
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
Asghari_M is offline   Reply With Quote

Old   July 16, 2015, 07:16
Smile
  #8
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
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.

Quote:
Originally Posted by Asghari_M View Post
I have a similar problem with Python, too.
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
T.D. is offline   Reply With Quote

Old   July 22, 2015, 04:16
Default
  #9
Senior Member
 
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16
Asghari_M is on a distinguished road
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.
Asghari_M is offline   Reply With Quote

Reply

Tags
cpp, development, linking, mpi


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 16:17.