|
[Sponsors] |
November 14, 2016, 10:16 |
Revive old OpenFOAM code
|
#1 |
New Member
Join Date: Nov 2016
Posts: 4
Rep Power: 9 |
Hi,
I'm curretnly trying to use code wirtten for OpenFOAM 1.1 with my OpenFOAM 4.0 istallation. I get a lot of error messages when I try to compile. Here is one example: Code:
In file included from fwd1.C:12:0: fbcp1-freeBoundary.h: In member function ‘void freeBoundary::store(bool, const scalarField&, Foam::scalar*, Foam::scalar)’: fbcp1-freeBoundary.h:25:122: error: conversion from ‘const vectorField {aka const Foam::Field<Foam::Vector<double> >}’ to non-scalar type ‘const subField {aka const Foam::SubField<Foam::Vector<double> >}’ requested const vectorField::subField bCentres = liquid ? mesh_l->boundary()[fbPatchI_l].Cf() : mesh_s->boundary()[fbPatchI_s].Cf(); ^ Here is another one: Code:
fbcp1-freeBoundary.h: In constructor ‘freeBoundary::freeBoundary(Foam::fvMesh&, Foam::fvMesh&, bool)’: fbcp1-freeBoundary.h:97:38: error: ‘class Foam::fvMesh’ has no member named ‘allPoints’ motion_s = new vectorField( mesh_s->allPoints() ); Thanks for your help! |
|
November 14, 2016, 13:32 |
|
#2 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
This is what you're looking for:
http://openfoam.com/documentation/cpp-guide/html/ |
|
November 18, 2016, 01:47 |
|
#3 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 14 |
I guess you have to change some library links to go with the new one.
Cheers shakil |
|
November 21, 2016, 04:59 |
|
#4 | |
New Member
Join Date: Nov 2016
Posts: 4
Rep Power: 9 |
Thank you very much for your help!
@anishtain4: the link is very helpful. Quote:
So far, the following libraries are linked: Code:
EXE_LIBS = \ -lcfdTools \ -ldynamicMesh \ -lmeshTools \ $(WM_DECOMP_LIBS) |
||
November 21, 2016, 12:11 |
|
#5 |
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 273
Rep Power: 18 |
To find out libraries you need to link, go to the the files you have (better to go in the order they will be called through Make/files) read every single #include, if it's not in your directory, search for it in OF root directory. You'll always find some in lnInclude directories.
When Openfoam faces a #inlclude, it first checks your local directory, then $FOAM_SRC/OpenFOAM/lnInclude, and finally the links provided. So if you find something in OpenFOAM/lnInclude, you don't need to link it, but anywhere else you gotta link it. However, it seems based on your errors this is not the case. Some of the classes has been restructured and you should look up the function in your code to see what it does, and then based on your code how can you update it. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 15:54 |
OpenFOAM 4.0 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 2 | October 6, 2017 05:40 |
OpenFOAM Training, London, Chicago, Munich, Houston 2016-2017 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | September 14, 2016 03:19 |
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker | rt08 | OpenFOAM Installation | 1 | February 28, 2016 19:00 |
OpenFOAM Foundation releases OpenFOAM 2.2.2 | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 0 | October 14, 2013 07:18 |