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

Is it possible to call a library from a different version of OF?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 13, 2018, 09:47
Default Is it possible to call a library from a different version of OF?
  #1
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 8
ripperjack is on a distinguished road
Dear All,

This may sound weird to you, but the situation is that we have invested a lot to develop a solver based on an old version of OF. Now we want to use some new features from latest OF, e.g., the new wall distance calculation.

Upgrading our solver to the latest OF version will be very time consuming and we are super lazy.

So here is what we want to do: In our solver (OF24), call this new wallDist function (OF50) and return the wall distance field. Is it possible?

Ideally, if I can compile a completely standalone library from OF50 and call it from OF24, that will work. But as I know, it is hard to do that. Any ideas?

Thanks very much in advance!

Regards,
Jack
ripperjack is offline   Reply With Quote

Old   March 14, 2018, 04:39
Default
  #2
New Member
 
Marius BŁnker
Join Date: Oct 2017
Posts: 9
Rep Power: 2
Blumenkind is on a distinguished road
Have you tried copying the library (with adjusted Make/files and /options) and recompiling it? Without looking at it, maybe some adjustements have to be made, but i would guess you could follow the errors, wmake will give you
Blumenkind is offline   Reply With Quote

Old   March 14, 2018, 09:10
Default
  #3
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 8
ripperjack is on a distinguished road
Quote:
Originally Posted by Blumenkind View Post
Have you tried copying the library (with adjusted Make/files and /options) and recompiling it? Without looking at it, maybe some adjustements have to be made, but i would guess you could follow the errors, wmake will give you
Thanks for the suggestion. But I am not quite sure how to do it. Are you suggesting me compile a OpenFOAM5.0 library using OpenFOAM240? That will probably not solve our problem. I DO need this library compiled by OpenFOAM5.0 since I may use multiple new features. Changing all of them to OpenFOAM240 "format" may need quite a lot time and I am not sure if they will all work out.

Jack.
ripperjack is offline   Reply With Quote

Old   March 16, 2018, 14:32
Default
  #4
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 8
ripperjack is on a distinguished road
Any ideas? Thanks!
ripperjack is offline   Reply With Quote

Old   March 20, 2018, 06:50
Default
  #5
New Member
 
Marius BŁnker
Join Date: Oct 2017
Posts: 9
Rep Power: 2
Blumenkind is on a distinguished road
Well, I would suggest you try it. I really cannot tell you how many differences there are or how much work it will be. But I cannot think of any method, which will be any less work.
Blumenkind is offline   Reply With Quote

Old   March 21, 2018, 04:35
Default
  #6
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,306
Rep Power: 24
akidess will become famous soon enough
Unless you are doing strange things, updating your solver will be less time consuming and is a worthy investment compared to back-porting the library.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   March 21, 2018, 12:41
Default
  #7
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 8
ripperjack is on a distinguished road
Quote:
Originally Posted by akidess View Post
Unless you are doing strange things, updating your solver will be less time consuming and is a worthy investment compared to back-porting the library.
Hi Anton,

Thanks for your reply. But yes, we are doing the strange thing...

The scenario is that our solver needs to call functions from more than two versions of OpenFOAM, developed by different groups of people.

Say, our solver is based on OF240, we need to call functions from OF-V1 (developed by group A), OF-V2 (developed by group B), OF-V3 (developed by group C). All these groups implemented a lot of their own stuff, so it is impossible to just upgrade to one version while having all the functions we need.

Anyway, that is why we need a trick to call functions from different versions of OpenFOAM.

Thanks,
Jack
ripperjack is offline   Reply With Quote

Old   April 3, 2018, 22:07
Default
  #8
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 8
ripperjack is on a distinguished road
Any ideas? Thanks. Jack.
ripperjack is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting ParaView Data into Python Arrays Jeffzda ParaView 16 February 19, 2018 03:37
Run OpenFoam in 2 nodes of a cluster WhiteW OpenFOAM Running, Solving & CFD 16 December 20, 2016 00:51
Workbench 16.0 - Memory Allocation Factor 196235 CFX 3 August 11, 2016 02:05
Paraview Free/Delete all memory eric_albin OpenFOAM Paraview & paraFoam 9 September 15, 2015 11:33
Plotting data from memory Woltan ParaView 0 March 13, 2013 04:56


All times are GMT -4. The time now is 10:05.