CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   how to compile the coupledMatrix librairies ? (http://www.cfd-online.com/Forums/openfoam-programming-development/77169-how-compile-coupledmatrix-librairies.html)

Cyp June 15, 2010 14:12

how to compile the coupledMatrix librairies ?
 
Hi!

I would like to use conjugateHeatTransfer in OpenFOAM 1.6. For this purpose I picked up the "applications/conjugate" and "src/coupledMatrix" folder from the OpenFOAM-1.5-dev to my own user folder.

First I need to compile the coupledMatrix librairies. I try just the wmake command, but it doesn't work.

If anyone have a solution, it would be a great help for me.

mturcios777 June 15, 2010 18:38

Libraries are compiled by typing wmake libso <name of library>

herbert June 16, 2010 03:27

Hi Cyp,

I'm not sure if its possible to use coupledMatrix in 1.6. Just compiling it won't work, because the OpenFOAM library in 1.5-dev is different to that of 1.6. I think the easiest way to use coupledMatrix would be to install OpenFOAM-1.5-dev completely.

Regards,
Stefan

Toorop June 1, 2011 10:03

conjugateHeatFoam with OpenFOAM 1.7.1
 
Hi All,

I'm trying to get the conjugateHeatFoam(1.6-ext) solver by Hrvoje Jasak up and running in OpenFOAM version 1.7.1.

I followed the instructions of Eric Paterson's Getting started with OpenFOAM. So as he advised I made the folder hierarchy for user developed code.
$WM_PROJECT_USER_DIR
|-- applications
|-- lib
|-- run
‘-- src

I dl the desired solver and library combo with svn into the appropriate directories:
Code:

svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.6-ext/applications/solvers/coupled/conjugateHeatFoam/

svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.6-ext/src/coupledMatrix/

Compiling the coupledMatrix library:
Code:

wmake libso
The error message after that:
Code:

In file included from coupledLduMatrix/coupledLduMatrix.C:36:0:
coupledLduMatrix/coupledLduMatrix.H:109:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:109:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.H:119:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:119:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.H:129:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:129:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.H:139:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:139:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C:118:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:118:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::Amul(Foam::FieldField<Foam::Field, double>&, const Foam::FieldField<Foam::Field, double>&, const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:139:24: error: ‘const class Foam::lduMatrix’ has no member named ‘AmulCore’
coupledLduMatrix/coupledLduMatrix.C: At global scope:
coupledLduMatrix/coupledLduMatrix.C:159:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:159:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::Tmul(Foam::FieldField<Foam::Field, double>&, const Foam::FieldField<Foam::Field, double>&, const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:180:24: error: ‘const class Foam::lduMatrix’ has no member named ‘TmulCore’
coupledLduMatrix/coupledLduMatrix.C: At global scope:
coupledLduMatrix/coupledLduMatrix.C:198:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:198:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::initMatrixInterfaces(const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, const Foam::FieldField<Foam::Field, double>&, Foam::FieldField<Foam::Field, double>&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:211:28: error: invalid types ‘const int[Foam::label]’ for array subscript
coupledLduMatrix/coupledLduMatrix.C: At global scope:
coupledLduMatrix/coupledLduMatrix.C:223:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:223:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::updateMatrixInterfaces(const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, const Foam::FieldField<Foam::Field, double>&, Foam::FieldField<Foam::Field, double>&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:236:28: error: invalid types ‘const int[Foam::label]’ for array subscript
make: *** [Make/linuxGccDPOpt/coupledLduMatrix.o] Error 1

After searching for solutions on the net, I've found out that many people have encountered this problem but no one has came up with a real solution. It would be nice to know how to setup this solver since the whole structure of OpenFOAM was designed in mind of extensibility.

Unfortunately I'm not a linux/OpenFOAM expert by any means.

Thanks!

benk June 1, 2011 10:37

I would say stick with 1.6-ext if you want to use the coupledMatrix, there are too many issues bringing these types of extended functionality into the non ext/dev versions. AFAIK, there isn't any reason to want to use 1.7.x over 1.6-ext anyway.

Toorop June 2, 2011 03:54

Thx for your reply, I will use the extended version then.

mm.abdollahzadeh June 2, 2013 15:02

Quote:

Originally Posted by Toorop (Post 310143)
Hi All,

I'm trying to get the conjugateHeatFoam(1.6-ext) solver by Hrvoje Jasak up and running in OpenFOAM version 1.7.1.

I followed the instructions of Eric Paterson's Getting started with OpenFOAM. So as he advised I made the folder hierarchy for user developed code.
$WM_PROJECT_USER_DIR
|-- applications
|-- lib
|-- run
‘-- src

I dl the desired solver and library combo with svn into the appropriate directories:
Code:

svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.6-ext/applications/solvers/coupled/conjugateHeatFoam/

svn checkout https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.6-ext/src/coupledMatrix/

Compiling the coupledMatrix library:
Code:

wmake libso
The error message after that:
Code:

In file included from coupledLduMatrix/coupledLduMatrix.C:36:0:
coupledLduMatrix/coupledLduMatrix.H:109:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:109:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.H:119:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:119:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.H:129:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:129:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.H:139:23: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.H:139:54: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C:118:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:118:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::Amul(Foam::FieldField<Foam::Field, double>&, const Foam::FieldField<Foam::Field, double>&, const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:139:24: error: ‘const class Foam::lduMatrix’ has no member named ‘AmulCore’
coupledLduMatrix/coupledLduMatrix.C: At global scope:
coupledLduMatrix/coupledLduMatrix.C:159:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:159:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::Tmul(Foam::FieldField<Foam::Field, double>&, const Foam::FieldField<Foam::Field, double>&, const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:180:24: error: ‘const class Foam::lduMatrix’ has no member named ‘TmulCore’
coupledLduMatrix/coupledLduMatrix.C: At global scope:
coupledLduMatrix/coupledLduMatrix.C:198:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:198:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::initMatrixInterfaces(const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, const Foam::FieldField<Foam::Field, double>&, Foam::FieldField<Foam::Field, double>&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:211:28: error: invalid types ‘const int[Foam::label]’ for array subscript
coupledLduMatrix/coupledLduMatrix.C: At global scope:
coupledLduMatrix/coupledLduMatrix.C:223:11: error: ‘lduInterfaceFieldPtrsListList’ does not name a type
coupledLduMatrix/coupledLduMatrix.C:223:42: error: ISO C++ forbids declaration of ‘interfaces’ with no type
coupledLduMatrix/coupledLduMatrix.C: In member function ‘void Foam::coupledLduMatrix::updateMatrixInterfaces(const Foam::PtrList<Foam::FieldField<Foam::Field, double> >&, const int&, const Foam::FieldField<Foam::Field, double>&, Foam::FieldField<Foam::Field, double>&, Foam::direction) const’:
coupledLduMatrix/coupledLduMatrix.C:236:28: error: invalid types ‘const int[Foam::label]’ for array subscript
make: *** [Make/linuxGccDPOpt/coupledLduMatrix.o] Error 1

After searching for solutions on the net, I've found out that many people have encountered this problem but no one has came up with a real solution. It would be nice to know how to setup this solver since the whole structure of OpenFOAM was designed in mind of extensibility.

Unfortunately I'm not a linux/OpenFOAM expert by any means.

Thanks!


Hi Tibor

Im doing the same for openfoam 2.1x
I have solved a part of the problem at the moment.
first of all you need to add blockLduMatrix to your src/openfoam/matrices/ folder

secondly u need to add the some folders to src/openfoam/matrices/ldumatrixes/lduAddressing/lduInterfaceFields/ *check the same directory in openfoam 1.6ext)

third you need to add some files also to src/openfoam/matrices/ldumatrixes/lduAddressing/lduInterface/

forth u need to modify the lduInterfaceFieldPtrsList.H according to openfoam1.6 ext

if u recompile your openfoam and the compile coupledmatrix library the errors will disappear but u wil have still errors.

u need again modify the ldumatrix.H and ldumatrixATmul.C the if compile the library

u will just have this error

Code:

coupledLduSolver/cgSolver/coupledCgSolver.C:154: error: no matching function for call to ‘gSumProd(Foam::FieldField<Foam::Field, double>&, Foam::FieldField<Foam::Field, double>&)’
coupledLduSolver/cgSolver/coupledCgSolver.C:172: error: no matching function for call to ‘gSumProd(Foam::FieldField<Foam::Field, double>&, Foam::FieldField<Foam::Field, double>&)’

at the moment i don't know how to solve this. if u have already solve it , please share ur experince

mm.abdollahzadeh June 16, 2013 08:21

Dear All

I have compiled it successfully for openfoam 2.1x.

Best
Mahdi

Bahram December 18, 2014 07:10

Dear Mahdi

Hi

I know it is an old thread, you reported that you were successful in importing coupledMatrix class from foam-ext! Can you share your experience how you did it?

Thanks
Bahram


All times are GMT -4. The time now is 04:12.