CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to compile libraries of OpenFoam V2012 in OpenFoam V7

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2021, 10:02
Post How to compile libraries of OpenFoam V2012 in OpenFoam V7
  #1
New Member
 
Anand Parinam
Join Date: May 2021
Posts: 2
Rep Power: 0
Ap30 is on a distinguished road
Hi all


I am trying to compile a pimpleFoam solver with Lagrangian particles which I already did. In Lagrangian, I need some custom patches - lagrangian\intermediate\submodels\CloudFunctionObj ects\PatchParticleHistogram.


This library is avalible in OpenFoam Version v2012 which is already compiled, Ihave to compile this library in openFoam v7, When I do so It gives lot of errors due to compatibility issues.



Can anyone suggest how to handle compilation of libraries between versions.


I have attached the error screenshot as well as the Patch library files and makeparcelCloudFunctionObjects.H where we add the patch.


Can anyone please suggest how to handle compilation of libraries between versions.


Thanks a lot
Attached Images
File Type: jpg Capture d’écran de 2021-05-26 15-55-56.jpg (175.2 KB, 9 views)
Attached Files
File Type: c PatchParticleHistogram.C (7.5 KB, 0 views)
File Type: h PatchParticleHistogram.H (6.4 KB, 0 views)
File Type: h makeParcelCloudFunctionObjects.H (3.1 KB, 1 views)
Ap30 is offline   Reply With Quote

Old   May 26, 2021, 14:38
Default
  #2
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 347
Rep Power: 10
Gerry Kan is on a distinguished road
Dear Anand:

The short answer is: you need to adjust the code this manually to the corresponding distribution.

As I was doing something similar I noticed that the basic data structures were implemented slightly differently between the .com and the .org distributions. This also means that certain methods for manipulating these data structures will not be portable verbatim.

These changes are usually relatively straightforward. If memory serves you need to figure out the equivalent methods or have slightly different workarounds if none is available. I would start with the compiler errors and go through the corresponding classes in each distribution.

I would not say you need to be very comfortable with the OpenFOAM architecture or OOP in general to get through this, although knowing either (or both) would definitely help. It takes a lot of patience to trace the object hierarchy. The on-line code base will be your best friend.

Hope that helps, Gerry.
Gerry Kan is offline   Reply With Quote

Old   June 9, 2021, 09:02
Default Thank you so much
  #3
New Member
 
Anand Parinam
Join Date: May 2021
Posts: 2
Rep Power: 0
Ap30 is on a distinguished road
Dear Gerry

It is far more complicated. Many a times sma ething works on some system and same thing does not in other evey other thing being same like OF version, Linux Version etc.

Thank you so much.
Quote:
Originally Posted by Gerry Kan View Post
Dear Anand:

The short answer is: you need to adjust the code this manually to the corresponding distribution.

As I was doing something similar I noticed that the basic data structures were implemented slightly differently between the .com and the .org distributions. This also means that certain methods for manipulating these data structures will not be portable verbatim.

These changes are usually relatively straightforward. If memory serves you need to figure out the equivalent methods or have slightly different workarounds if none is available. I would start with the compiler errors and go through the corresponding classes in each distribution.

I would not say you need to be very comfortable with the OpenFOAM architecture or OOP in general to get through this, although knowing either (or both) would definitely help. It takes a lot of patience to trace the object hierarchy. The on-line code base will be your best friend.

Hope that helps, Gerry.
Ap30 is offline   Reply With Quote

Reply

Tags
compiling library, lagrange particle, particle laden flows


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
Why there are two differents libraries for rigid body motions in OpenFOAM? Fauster OpenFOAM Running, Solving & CFD 5 September 7, 2020 16:52
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 15:54
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 cfd.direct OpenFOAM Announcements from Other Sources 0 September 14, 2016 03:19
OpenFOAM cloud computing on Rescale with custom libraries LukaD OpenFOAM Running, Solving & CFD 5 September 11, 2015 09:38
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 21:51


All times are GMT -4. The time now is 02:29.