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

Error in compiling new drag model

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

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   March 22, 2016, 15:26
Default Error in compiling new drag model
  #1
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi every one,

I apply OF 211 third party on Ubuntu 1404. (for specific reasons) also there are 230(third party) and 240(deb pack) versions but deactivated in bashrc by #.

I would like to create modification on "GidaspowErgunWenYu" model which applied in "twoPhaseEulerFoam" solver.

I've tried ways, the best and complete one was on
http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam


for further sanitary I've decided to make a new solver based on which mentioned above but it faced to some problems about missing head files (or directory). finally by adding lines in twoPhaseEulerFoam/make/options files I could overcome. this suggestion taken from
http://www.cfd-online.com/Forums/ope...ilation-2.html
Code:
before correction it looked like
EXE_INC = \
    -I../bubbleFoam \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -IturbulenceModel \
    -IkineticTheoryModels/lnInclude \
    -IinterfacialModels/lnInclude \
    -IphaseModel/lnInclude \
    -Iaveraging

EXE_LIBS = \
    -lEulerianInterfacialModels \
    -lfiniteVolume \
    -lmeshTools \
    -lincompressibleTransportModels \
    -lphaseModel \
    -lkineticTheoryModel
and after that
Code:
EXE_INC = \
    -I$(FOAM_SOLVERS)/multiphase/bubbleFoam \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -IturbulenceModel \
    -IkineticTheoryModels/lnInclude \
    -IinterfacialModels/lnInclude \
    -IphaseModel/lnInclude \
    -Iaveraging

EXE_LIBS = \
    -L$(FOAM_USER_LIBBIN) \
    -lEulerianInterfacialModels \
    -lfiniteVolume \
    -lmeshTools \
    -lincompressibleTransportModels \
    -lphaseModel \
    -lkineticTheoryModel \
Now, I'm facing new error for compliling modified drag model mentioned above similar previous. that is
Code:
SOURCE=dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I../phaseModel/lnInclude -I../interfacialModels/lnInclude  -IlnInclude -I. -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/GidaspowErgunWenYu.o
In file included from dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C:26:0:
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.H:39:23: fatal error: dragModel.H: No such file or directory
 #include "dragModel.H"
                       ^
compilation terminated.
make: *** [Make/linux64GccDPOpt/GidaspowErgunWenYu.o] Error 1
I must to say, as I've wcleaned once, there isnt lninclude file in make file now.
furthermore when I do

Code:
ls $FOAM_USER_LIBBIN
I just can see these in green

Code:
libEulerianInterfacialModels.so  libkineticTheoryModel.so  libphaseModel.so
Thanks in advance for any help.

Last edited by k.farnagh; March 24, 2016 at 13:41.
k.farnagh is offline   Reply With Quote

Old   March 23, 2016, 12:47
Default How to set make/option file for calling dragModel.H
  #2
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi,
for compiling modified drag model, I confront with error below
Code:
kasra@kasra-Lenovo-IdeaPad-Z510:~/Desktop/twoPhaseEulerFoamer/interfacialModels$ wmake
SOURCE=dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I../phaseModel/lnInclude -I../interfacialModels/lnInclude  -IlnInclude -I. -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/GidaspowErgunWenYu.o
In file included from dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C:26:0:
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.H:39:23: fatal error: dragModel.H: No such file or directory
 #include "dragModel.H"
                       ^
compilation terminated.
make: *** [Make/linux64GccDPOpt/GidaspowErgunWenYu.o] Error 1
In my opinion this problem maybe can be solved via adding libraries or executives in option file exists in make file but I dont know how to do it.

would you please guide me to this purpose?

Last edited by k.farnagh; March 24, 2016 at 04:11.
k.farnagh is offline   Reply With Quote

Old   March 24, 2016, 10:24
Default
  #3
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi,
after effortful process, I decided to use the option file that exists in twoPhaseEulerFoam/interfacialModels/make/ of OF240 for OF211. I could make modified solver with this trick before. but for creating modified drag model, terminated to

Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I../phaseModel/lnInclude -IlnInclude -I. -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/dragModel.o Make/linux64GccDPOpt/newDragModel.o Make/linux64GccDPOpt/GidaspowErgunWenYumod.o -L/home/kasra/OpenFOAM/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib \
          -lOpenFOAM -ldl   -lm -o OpenFOAM.out
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 0 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 4 has invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 5 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 6 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 7 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 8 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 10 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 11 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 12 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 13 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 14 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 15 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 16 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 17 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 18 has invalid symbol index 13
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 19 has invalid symbol index 21
/usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_line): relocation 0 has invalid symbol index 2
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::fvPatchField<double>::New(Foam::word const&, Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) [clone .constprop.103]':
GidaspowErgunWenYumod.C:(.text+0x8bd): undefined reference to `Foam::fvPatchField<double>::debug'
GidaspowErgunWenYumod.C:(.text+0x8ce): undefined reference to `Foam::fvPatchField<double>::patchConstructorTablePtr_'
GidaspowErgunWenYumod.C:(.text+0xa96): undefined reference to `Foam::fvPatchField<double>::patchConstructorTablePtr_'
GidaspowErgunWenYumod.C:(.text+0xb83): undefined reference to `Foam::fvPatchField<double>::patchConstructorTablePtr_'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::type() const':
GidaspowErgunWenYumod.C:(.text._ZNK4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE4typeEv[_ZNK4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE4typeEv]+0x3): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::DimensionedField<double, Foam::volMesh>::type() const':
GidaspowErgunWenYumod.C:(.text._ZNK4Foam16DimensionedFieldIdNS_7volMeshEE4typeEv[_ZNK4Foam16DimensionedFieldIdNS_7volMeshEE4typeEv]+0x3): undefined reference to `Foam::DimensionedField<double, Foam::volMesh>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::fvPatchField<double>::type() const':
GidaspowErgunWenYumod.C:(.text._ZNK4Foam12fvPatchFieldIdE4typeEv[_ZNK4Foam12fvPatchFieldIdE4typeEv]+0x3): undefined reference to `Foam::fvPatchField<double>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryFieldC2ERKNS_16DimensionedFieldIdS2_EERKS4_[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryFieldC5ERKNS_16DimensionedFieldIdS2_EERKS4_]+0x49): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_3tmpIS3_EE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_3tmpIS3_EE]+0x156): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKS3_[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKS3_]+0xda): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator==(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEeqERKNS_3tmpIS3_EE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEeqERKNS_3tmpIS3_EE]+0x2b): undefined reference to `Foam::fvMesh::operator!=(Foam::fvMesh const&) const'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::storeOldTime() const':
GidaspowErgunWenYumod.C:(.text._ZNK4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE12storeOldTimeEv[_ZNK4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE12storeOldTimeEv]+0x1f): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE[_ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE]+0x82): undefined reference to `Foam::fvPatchField<double>::debug'
GidaspowErgunWenYumod.C:(.text._ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE[_ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE]+0xc1): undefined reference to `Foam::fvPatchField<double>::dictionaryConstructorTablePtr_'
GidaspowErgunWenYumod.C:(.text._ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE[_ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE]+0x13e): undefined reference to `Foam::fvPatchField<double>::dictionaryConstructorTablePtr_'
GidaspowErgunWenYumod.C:(.text._ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE[_ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE]+0x2f3): undefined reference to `Foam::fvPatchField<double>::disallowGenericFvPatchField'
GidaspowErgunWenYumod.C:(.text._ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE[_ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE]+0x304): undefined reference to `Foam::fvPatchField<double>::dictionaryConstructorTablePtr_'
GidaspowErgunWenYumod.C:(.text._ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE[_ZN4Foam12fvPatchFieldIdE3NewERKNS_7fvPatchERKNS_16DimensionedFieldIdNS_7volMeshEEERKNS_10dictionaryE]+0x3f7): undefined reference to `Foam::fvPatchField<double>::dictionaryConstructorTablePtr_'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryFieldC2ERKNS_14fvBoundaryMeshERKNS_16DimensionedFieldIdS2_EERKNS_10dictionaryE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryFieldC5ERKNS_14fvBoundaryMeshERKNS_16DimensionedFieldIdS2_EERKNS_10dictionaryE]+0x50): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::dictionary const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE9readFieldERKNS_10dictionaryE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE9readFieldERKNS_10dictionaryE]+0x56): undefined reference to `Foam::fvMesh::boundary() const'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::word const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryFieldC2ERKNS_14fvBoundaryMeshERKNS_16DimensionedFieldIdS2_EERKNS_4wordE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryFieldC5ERKNS_14fvBoundaryMeshERKNS_16DimensionedFieldIdS2_EERKNS_4wordE]+0x4b): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::fvPatchField<double>::snGrad() const':
GidaspowErgunWenYumod.C:(.text._ZNK4Foam12fvPatchFieldIdE6snGradEv[_ZNK4Foam12fvPatchFieldIdE6snGradEv]+0x1f): undefined reference to `Foam::fvPatch::deltaCoeffs() const'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::DimensionedField<double, Foam::volMesh>::readIfPresent(Foam::word const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam16DimensionedFieldIdNS_7volMeshEE13readIfPresentERKNS_4wordE[_ZN4Foam16DimensionedFieldIdNS_7volMeshEE13readIfPresentERKNS_4wordE]+0x1e): undefined reference to `Foam::DimensionedField<double, Foam::volMesh>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readIfPresent()':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE13readIfPresentEv[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE13readIfPresentEv]+0xc6): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_8IOobjectERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_8IOobjectERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE]+0xc8): undefined reference to `Foam::fvMesh::boundary() const'
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_8IOobjectERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_8IOobjectERKNS_6fvMeshERKNS_12dimensionSetERKNS_4wordE]+0xe4): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator-<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4FoammiINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKNS_11dimensionedIdEERKS7_[_ZN4FoammiINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKNS_11dimensionedIdEERKS7_]+0x10d): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::pow<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensioned<double> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam3powINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_RKNS_11dimensionedIdEE[_ZN4Foam3powINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_RKNS_11dimensionedIdEE]+0x109): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::reuseTmpGeometricField<double, double, Foam::fvPatchField, Foam::volMesh>::New(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::word const&, Foam::dimensionSet const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam22reuseTmpGeometricFieldIddNS_12fvPatchFieldENS_7volMeshEE3NewERKNS_3tmpINS_14GeometricFieldIdS1_S2_EEEERKNS_4wordERKNS_12dimensionSetE[_ZN4Foam22reuseTmpGeometricFieldIddNS_12fvPatchFieldENS_7volMeshEE3NewERKNS_3tmpINS_14GeometricFieldIdS1_S2_EEEERKNS_4wordERKNS_12dimensionSetE]+0x6a): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4FoamdvINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_SA_[_ZN4FoamdvINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_SA_]+0x11a): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<double, Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4FoammlIdNS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIT_T0_T1_EEEERKNS_11dimensionedIdEERKS8_[_ZN4FoammlIdNS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIT_T0_T1_EEEERKNS_11dimensionedIdEERKS8_]+0x115): undefined reference to `Foam::calculatedFvPatchField<double>::typeName'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o:GidaspowErgunWenYumod.C:(.text._ZN4FoammlIdNS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIT_T0_T1_EEEERKS8_RKNS_11dimensionedIdEE[_ZN4FoammlIdNS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIT_T0_T1_EEEERKS8_RKNS_11dimensionedIdEE]+0x10e): more undefined references to `Foam::calculatedFvPatchField<double>::typeName' follow
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::word const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_4wordERKS3_[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_4wordERKS3_]+0x179): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_8IOobjectERKS3_[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_8IOobjectERKS3_]+0xe1): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readOldTimeIfPresent()':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE20readOldTimeIfPresentEv[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE20readOldTimeIfPresentEv]+0x101): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
Make/linux64GccDPOpt/GidaspowErgunWenYumod.o: In function `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&)':
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_8IOobjectERKNS_6fvMeshE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_8IOobjectERKNS_6fvMeshE]+0xab): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::typeName'
GidaspowErgunWenYumod.C:(.text._ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC2ERKNS_8IOobjectERKNS_6fvMeshE[_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEEC5ERKNS_8IOobjectERKNS_6fvMeshE]+0x1d0): undefined reference to `Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::debug'
collect2: error: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1
kasra@kasra-Lenovo-IdeaPad-Z510:~/OpenFOAM/kasra-2.1.1/applications/solvers/twoPhaseEulerFoamm/interfacialModels$
any suggestion please
k.farnagh is offline   Reply With Quote

Old   March 26, 2016, 09:45
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings Kasra,

I've merged your two threads on this topic.

I need specific details in order to be able to help you:
  1. Which installation instructions did you follow for installing OpenFOAM 2.1.1 in your machine?
  2. I didn't understand exactly from where you copied the folder "twoPhaseEulerFoam". Did you copy it from 2.1.1 or 2.4.0?
  3. What modifications did you do to the file "Make/files"?
  4. Please follow these steps within the folder for your custom solver:
    Code:
    wclean all
    cd ..
    tar -czf twoPhaseEulerFoamer_v1.tar.gz twoPhaseEulerFoamer
    Then attach the file "twoPhaseEulerFoamer_v1.tar.gz" to your next post.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 27, 2016, 05:34
Default
  #5
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi dear Bruno,

First of all Thanks for reply. Its better merged threads and I appreciate you.

About first question, As there were not any specified way for installing source pack of 211 in Ubuntu 1404, I've followed below link steps for 1210.

https://openfoamwiki.net/index.php/I...M-2.1.1/Ubuntu

I must to say this manner terminated to some difficulties about setting environment (step 5 or Source). As I remember, something were lost or could not be found. Anyway, installation finished (maybe successfully).

second one: twoPhaseEulerFoam has been copied from 211. I've just used option file contents of 240 for this new solver based on 211.

and the last: if you want to know about main make/file it looks
Code:
twoPhaseEulerFoamm.C
EXE = $(FOAM_USER_APPBIN)/twoPhaseEulerFoamm
it should be noted my modified solver name is twoPhaseEulerFoamm now just like twoPhaseEulerFoamer.

and if you want to know about interfacialModel/make/file it looks
Code:
dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
dragModels/Ergun/Ergun.C
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
dragModels/GidaspowErgunWenYumod/GidaspowErgunWenYumod.C
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
dragModels/SchillerNaumann/SchillerNaumann.C
dragModels/Gibilaro/Gibilaro.C
dragModels/WenYu/WenYu.C
dragModels/SyamlalOBrien/SyamlalOBrien.C

LIB = $(FOAM_USER_LIBBIN)/libEulerianInterfacialModels
Which bold line is mine.

Sincerely Yours,
Kasra
Attached Files
File Type: gz twoPhaseEulerFoamm_v1.tar.gz (23.5 KB, 4 views)
k.farnagh is offline   Reply With Quote

Old   March 27, 2016, 10:00
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Kasra,

I've done the following steps, in order to make things work as intended:
  1. I started a new copy from OpenFOAM 2.1.1:
    Code:
    cp -r $FOAM_SOLVERS/multiphase/twoPhaseEulerFoam twoPhaseEulerFoam_v2
  2. I then made sure to clean things up:
    Code:
    cd twoPhaseEulerFoam_v2
    ./Allwclean
  3. Then I made the following changes:
    Code:
    diff --git a/Make/files b/Make/files
    index 4de1bb9..f80060b 100644
    --- a/Make/files
    +++ b/Make/files
    @@ -1,3 +1,3 @@
     twoPhaseEulerFoam.C
     
    -EXE = $(FOAM_APPBIN)/twoPhaseEulerFoam
    +EXE = $(FOAM_USER_APPBIN)/twoPhaseEulerFoamMod
    diff --git a/Make/options b/Make/options
    index 1bf97d1..e735018 100644
    --- a/Make/options
    +++ b/Make/options
    @@ -1,17 +1,16 @@
     EXE_INC = \
    -    -I../bubbleFoam \
    +    -I$(FOAM_SOLVERS)/multiphase/bubbleFoam \
         -I$(LIB_SRC)/finiteVolume/lnInclude \
         -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -    -IturbulenceModel \
         -IkineticTheoryModels/lnInclude \
         -IinterfacialModels/lnInclude \
    -    -IphaseModel/lnInclude \
    -    -Iaveraging
    +    -IphaseModel/lnInclude
     
     EXE_LIBS = \
    -    -lEulerianInterfacialModels \
    +    -L$(FOAM_USER_LIBBIN) \
    +    -lEulerianInterfacialModelsMod \
         -lfiniteVolume \
         -lmeshTools \
         -lincompressibleTransportModels \
    -    -lphaseModel \
    -    -lkineticTheoryModel
    +    -lphaseModelMod \
    +    -lkineticTheoryModelMod
    diff --git a/interfacialModels/Make/files b/interfacialModels/Make/files
    index 8d23cb9..709f726 100644
    --- a/interfacialModels/Make/files
    +++ b/interfacialModels/Make/files
    @@ -8,4 +8,4 @@ dragModels/Gibilaro/Gibilaro.C
     dragModels/WenYu/WenYu.C
     dragModels/SyamlalOBrien/SyamlalOBrien.C
     
    -LIB = $(FOAM_LIBBIN)/libEulerianInterfacialModels
    +LIB = $(FOAM_USER_LIBBIN)/libEulerianInterfacialModelsMod
    diff --git a/interfacialModels/Make/options b/interfacialModels/Make/options
    index 42c2cb5..e74fd6b 100644
    --- a/interfacialModels/Make/options
    +++ b/interfacialModels/Make/options
    @@ -3,4 +3,5 @@ EXE_INC = \
         -I../phaseModel/lnInclude
     
     LIB_LIBS = \
    -    -lphaseModel
    +    -L$(FOAM_USER_LIBBIN) \
    +    -lphaseModelMod
    diff --git a/kineticTheoryModels/Make/files b/kineticTheoryModels/Make/files
    index a6ff2ca..7c0740f 100644
    --- a/kineticTheoryModels/Make/files
    +++ b/kineticTheoryModels/Make/files
    @@ -30,4 +30,4 @@ frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C
     frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C
     frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C
     
    -LIB = $(FOAM_LIBBIN)/libkineticTheoryModel
    +LIB = $(FOAM_USER_LIBBIN)/libkineticTheoryModelMod
    diff --git a/phaseModel/Make/files b/phaseModel/Make/files
    index 719f858..0dafac4 100644
    --- a/phaseModel/Make/files
    +++ b/phaseModel/Make/files
    @@ -1,3 +1,3 @@
     phaseModel/phaseModel.C
     
    -LIB = $(FOAM_LIBBIN)/libphaseModel
    +LIB = $(FOAM_USER_LIBBIN)/libphaseModelMod
    • What matters are the lines that start with a plus "+" or a minus "-" sign, which show the lines I added and the ones I removed.
    • I took the easy way of renaming files by only renaming the final library and application names. I didn't rename any other files, because we are not depending on the original source code at OpenFOAM 2.1.1.
    • The new names all end with "Mod", which stands for "modified".
  4. I then made a copy of your new source code:
    Code:
    cp -r ../../twoPhaseEulerFoamm/interfacialModels/dragModels/GidaspowErgunWenYumod dragModels/
    I ran this command from within the folder "interfacialModels".
  5. I then did the changed that you mentioned in the file "interfacialModels/Make/files".
  6. I went into the main source code folder "twoPhaseEulerFoam_v2" and I then ran:
    Code:
    wclean all
    wmake all
    The first command was just to make sure everything was clean for building.
  7. I ran it a second time, to get the summary:
    Code:
    wmake all
    which gave me something like this:
    Code:
    + wmake libso phaseModel
    '/home/ofuser/OpenFOAM/ofuser-2.1.1/platforms/linux64GccDPOpt/lib/libphaseModelMod.so' is up to date.
    + wmake libso interfacialModels
    '/home/ofuser/OpenFOAM/ofuser-2.1.1/platforms/linux64GccDPOpt/lib/libEulerianInterfacialModelsMod.so' is up to date.
    + wmake libso kineticTheoryModels
    '/home/ofuser/OpenFOAM/ofuser-2.1.1/platforms/linux64GccDPOpt/lib/libkineticTheoryModelMod.so' is up to date.
    + wmake
    make: '/home/ofuser/OpenFOAM/ofuser-2.1.1/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoamMod' is up to date.
Therefore, it built everything as intended. Attached is the working package.


I didn't understand why you wanted to use the "options" file from OpenFOAM 2.4.0...



Best regards,
Bruno
Attached Files
File Type: gz twoPhaseEulerFoam_v2.tar.gz (22.8 KB, 7 views)
k.farnagh likes this.
wyldckat is offline   Reply With Quote

Old   March 28, 2016, 08:58
Default
  #7
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi dear Bruno,

I've received your modified folder and have put it in desktop. I've just done

Code:
wclean all
wmake all
in its location after extracting and have run my case. it works properly . Are there any forgotten steps to be done or advices for me?

and just for peace of mind, If I want to add a new drag model same this one later on, is it ok to add it in dragModels and its address in "file" file then do wmake in interfacialModels location?

An about your question I must to say there were not any specific force for doing that. As I haven't knowledge how to link or invoke header files, I just tried it as a solution but your solution is better definitely.

I want to thank you for all the support and concern.

Sincerely Yours,
Kasra
k.farnagh is offline   Reply With Quote

Old   March 28, 2016, 11:02
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by k.farnagh View Post
Are there any forgotten steps to be done or advices for me?

and just for peace of mind, If I want to add a new drag model same this one later on, is it ok to add it in dragModels and its address in "file" file then do wmake in interfacialModels location?
Quick answers:
  1. Sorry, I forgot to detail the steps to use the attached package. Yes, the steps you have taken are correct.
  2. You can add another new drag model using the same steps you've used. Keep in mind what I did in steps #4 and #5 on my previous post.
wyldckat is offline   Reply With Quote

Old   March 29, 2016, 03:26
Default
  #9
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Dear Bruno, I cannot thank you enough for helping me.
k.farnagh is offline   Reply With Quote

Old   March 30, 2016, 17:10
Default
  #10
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi Dear Bruno,

I confront with these error when I want to wmake some modification on drag model.

Code:
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:281:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(long long, long long, long long)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note:   no known conversion for argument 1 from ‘Foam::dimensioned<double>’ to ‘long long int’
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:281:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(long long, long long, long long)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note: long int Foam::max(long int, int)
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:280:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(long, long, int)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note:   no known conversion for argument 1 from ‘Foam::dimensioned<double>’ to ‘long int’
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:280:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(long, long, int)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note: long int Foam::max(long int, long int)
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:279:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(long, long, long)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note:   no known conversion for argument 1 from ‘Foam::dimensioned<double>’ to ‘long int’
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:279:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(long, long, long)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note: int Foam::max(int, int)
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:278:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(int, int, int)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note:   no known conversion for argument 1 from ‘Foam::dimensioned<double>’ to ‘int’
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:278:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(int, int, int)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note: short int Foam::max(short int, short int)
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:277:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(short, short, short)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note:   no known conversion for argument 1 from ‘Foam::dimensioned<double>’ to ‘short int’
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:277:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(short, short, short)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note: char Foam::max(char, char)
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:276:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(char, char, char)
 ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:265:16: note:   no known conversion for argument 1 from ‘Foam::dimensioned<double>’ to ‘char’
 inline retType max(const type1 s1, const type2 s2) \
                ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/label.H:276:1: note: in expansion of macro ‘MAXMIN’
 MAXMIN(char, char, char)
 ^
make: *** [Make/linux64GccDPOpt/GidaspowErgunWenYuRich1989.o] Error 1
make: *** Waiting for unfinished jobs....
That is part of end and it seems small problem but it took many time without solving.
I've just done "wclean all","wmake all" within "interfacialModel" folder after some renaming and steps 4,5 mentioned.

A lateral question is, may I omit addresses related to another drag models in "file" file for faster compiling?


Would you please help me in this problem too?

Attached file is drag model mentioned.

Sincerely Yours,
Kasra
Attached Files
File Type: gz GidaspowErgunWenYuRich1989.tar.gz (4.2 KB, 3 views)

Last edited by k.farnagh; April 9, 2016 at 07:07.
k.farnagh is offline   Reply With Quote

Old   April 10, 2016, 15:54
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,125
Blog Entries: 39
Rep Power: 110
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Kasra,

You can do the following in the file "interfacialModels/Make/files":
Code:
dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
/* dragModels/Ergun/Ergun.C */
/* dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C */
/* dragModels/GidaspowErgunWenYumod/GidaspowErgunWenYumod.C */
dragModels/GidaspowErgunWenYuRich1989/GidaspowErgunWenYuRich1989.C
/* dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C */
/* dragModels/SchillerNaumann/SchillerNaumann.C */
/* dragModels/Gibilaro/Gibilaro.C */
/* dragModels/WenYu/WenYu.C */
/* dragModels/SyamlalOBrien/SyamlalOBrien.C */

LIB = $(FOAM_USER_LIBBIN)/libEulerianInterfacialModelsMod
The first two are needed, since they are the base class from which the other ones inherit from.

OK, going into the details of the problem:
  1. To make it easier to pinpoint the problem, run the following command from within "interfacialModels":
    Code:
    wmake libso > log 2>&1
    Note: make sure you already ran Allwmake in the main folder for the custom source code of the solver.
  2. Now we inspect the contents of the file "log" and the first "error" is the first problem we should be addressing:
    Code:
    dragModels/GidaspowErgunWenYuRich1989/GidaspowErgunWenYuRich1989.C: In member function ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::GidaspowErgunWenYuRich1989::K(const volScalarField&) const’:
    dragModels/GidaspowErgunWenYuRich1989/GidaspowErgunWenYuRich1989.C:73:148: error: no matching function for call to ‘max(Foam::dimensioned<double>, double)’
         volScalarField Ar(max((pow(phasea_.d(),3)*(phasea_.rho()-phaseb_.rho())*phaseb_.rho()*9.81/pow((phaseb_.nu()*phaseb_.rho()),2)), scalar(1.0e-3)));
                                                                                                                                                        ^
    OK, really long expression. This isn't good for us. The isolate and conquer strategy is a must in this situation.
  3. For example:
    Code:
        volScalarField ArUnlimited(pow(phasea_.d(),3)*(phasea_.rho()-phaseb_.rho())*phaseb_.rho()*9.81/pow((phaseb_.nu()*phaseb_.rho()),2));
        volScalarField Ar(max(ArUnlimited, scalar(1.0e-3)));
  4. What we get:
    Code:
    dragModels/GidaspowErgunWenYuRich1989/GidaspowErgunWenYuRich1989.C: In member function ‘virtual Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::GidaspowErgunWenYuRich1989::K(const volScalarField&) const’:
    dragModels/GidaspowErgunWenYuRich1989/GidaspowErgunWenYuRich1989.C:73:135: error: no matching function for call to ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::dimensioned<double>)’
         volScalarField ArUnlimited(pow(phasea_.d(),3)*(phasea_.rho()-phaseb_.rho())*phaseb_.rho()*9.81/pow((phaseb_.nu()*phaseb_.rho()),2));
                                                                                                                                           ^
  5. OK, let's use OpenFOAM's code-style convention: http://www.openfoam.org/contrib/code-style.php
    Code:
        volScalarField ArUnlimited
        (
            pow(phasea_.d(),3)
          * (phasea_.rho() - phaseb_.rho())
          * phaseb_.rho()
          * 9.81
          / pow(phaseb_.nu()*phaseb_.rho(),2)
        );
    It's easier to read it this way. I already removed an excess parenthesis somewhere, which was only adding to the confusion.
  6. Going back to the error message, it states that this doesn't exist:
    Code:
    ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::dimensioned<double>)’
    In other words, it's not able to find a constructor of type "volScalarField(scalar)".
  7. Long story short, the solution was this:
    Code:
        dimensionedScalar ArUnlimited
        (
            pow(phasea_.d(),3)
          * (phasea_.rho() - phaseb_.rho())
          * phaseb_.rho()
          * scalar(9.81)
          / pow(phaseb_.nu()*phaseb_.rho(),2)
        );
    
        dimensionedScalar Ar
        (
            max
            (
                ArUnlimited,
                dimensionedScalar("ArMin",ArUnlimited.dimensions(),1.0e-3)
            )
        );
    I.e. "Ar" is a dimensioned scalar, not a "volScalarField".
Note: Given that it's a "dimensionedScalar", this means that the loose "9.81" might need units as well.

edit: For finding examples on how to use "dimensionedScalar": https://openfoamwiki.net/index.php/I...hing_for_files

Best regards,
Bruno
k.farnagh likes this.
__________________

Last edited by wyldckat; April 10, 2016 at 15:55. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   April 11, 2016, 04:40
Default
  #12
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi dear friend, Bruno

Thanks for reply. you are the best.
Ar is dimensionless like Re you know. so if I have called "g=9.81" from somewhere defined dimensionally I would not have seen this error in previous structure. is it true deduction?

If you think this solution is acceptable too or worth mentioning, would you please explain how to invoke "g" from constant file of problem.

edit: I've applied this drag model for a case and have seen:

Code:
Create time

Create mesh for time = 0


Reading g
Reading transportProperties

Calculating face flux field phia
Calculating face flux field phib
Reading field alpha

Reading field p

kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    alphak          1;
    alphaEps        0.76923;
}

wallFunctionCoeffs
{
    kappa           0.41;
    E               9.8;
}

Reading field k

Reading field epsilon

Calculating field nutb

Calculating field nuEffa

Calculating field nuEffb

Calculating field DDtUa and DDtUb

Calculating field g.h

Selecting dragModel for phase a: GidaspowErgunWenYuRich1989
Selecting dragModel for phase b: GidaspowErgunWenYuRich1989
dragPhase is a
Selecting viscosityModel HrenyaSinclair
Selecting conductivityModel Syamlal
Selecting radialModel Gidaspow
Selecting granularPressureModel Lun
Selecting frictionalStressModel JohnsonJackson
Courant Number mean: 0.000722971 max: 0.00329451

PIMPLE: Operating solver in PISO mode


Starting time loop

Reading/calculating field UaMean

Reading/calculating field UbMean

Reading/calculating field alphaMean

Reading/calculating field pMean

fieldAverage: starting averaging at time 0

Courant Number mean: 0.000722249 max: 0.00329122
Max Ur Courant Number = 0.00470174
deltaT = 9.99001e-05
Time = 9.99001e-05

DILUPBiCG:  Solving for alpha, Initial residual = 1.30785e-05, Final residual = 2.50114e-21, No Iterations 1
Dispersed phase volume fraction = 0.241546  Min(alpha) = 0  Max(alpha) = 0.6
DILUPBiCG:  Solving for alpha, Initial residual = 1.46833e-08, Final residual = 3.43305e-24, No Iterations 1
Dispersed phase volume fraction = 0.241546  Min(alpha) = 0  Max(alpha) = 0.6


--> FOAM FATAL ERROR: 
LHS and RHS of + have different dimensions
     dimensions : [0 0 0 0 0 0 0] + [0 -0.57 1.14 0 0 0 0]


    From function operator+(const dimensionSet&, const dimensionSet&)
    in file dimensionSet/dimensionSet.C at line 514.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::operator+(Foam::dimensionSet const&, Foam::dimensionSet const&) at ??:?
#3  Foam::dimensioned<double> Foam::operator+<double>(Foam::dimensioned<double> const&, Foam::dimensioned<double> const&) at ??:?
#4  Foam::operator+(double, Foam::dimensioned<double> const&) at ??:?
#5  Foam::GidaspowErgunWenYuRich1989::K(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#6  
 at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  
 at ??:?
Aborted (core dumped)
Yes, you are right. As you've mentioned "g" needs dimension. there are some dimensional matters seemingly. but I couldn't find anything in your last link. Is it true link

EDIT2: BTW I've done below changes and model has worked extremely .
Code:
    dimensionedScalar g
    (
        "g",
        dimensionSet(0, 1, -2, 0, 0, 0 ,0),
        9.81
    );
    dimensionedScalar ArUnlimited
    (
        pow(phasea_.d(),3)
      * (phasea_.rho() - phaseb_.rho())
      * phaseb_.rho()
      * g
      / pow(phaseb_.nu()*phaseb_.rho(),2)
    );
But initial questions of this post still exist.

Sincerely Yours,
Kasra

Last edited by k.farnagh; April 20, 2016 at 04:27.
k.farnagh is offline   Reply With Quote

Old   April 18, 2016, 04:45
Default
  #13
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi,
There are something else beside my last post that I appreciate you guide me to solve them.

I've done some modification on "SyamlalOBrien" drag model and it needed some coding. (Attached)

First of all, I think this model like previous needs allocating dimension to some numbers that I've defined them as scalar wrongly. eg 0.1 is superficial velocity and has velocity dimension in fact. Also I'll be glad to know how to invoke this parameter from "0" file of problem here.

Then there are some problems about manipulation of "if" code and defining sub parameters there are there (c and d. you can see in code). As I've not got any rules to utilize "if" code or combining several "if" together, it looks joke instead of code. So I'll be happy for any alternatives.

This message appears during compilation (parts of end)
Code:
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:693:13: note: template<class Form, class Cmpt, int nCmpt> bool Foam::operator<=(const Foam::VectorSpace<Form, Cmpt, nCmpt>&, const Foam::VectorSpace<Form, Cmpt, nCmpt>&)
 inline bool operator<=
             ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:693:13: note:   template argument deduction/substitution failed:
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:103:29: note:   ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ is not derived from ‘const Foam::VectorSpace<Form, Cmpt, nCmpt>’
      if (beta <= scalar(0.85))
                             ^
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:108:15: error: no match for ‘operator>’ (operand types are ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ and ‘double’)
      if (beta > scalar(0.85))
               ^
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:108:15: note: candidates are:
In file included from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/UList.H:445:0,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/List.H:43,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/HashTable.C:30,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/Istream.H:184,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/token.H:452,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/UILListIO.C:28,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/UILList.C:92,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/UILList.H:285,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/ILList.H:39,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/IDLList.H:35,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/entry.H:45,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dictionary.H:53,
                 from lnInclude/dragModel.H:40,
                 from dragModels/SyamlalOBriendc/SyamlalOBriendc.H:40,
                 from dragModels/SyamlalOBriendc/SyamlalOBriendc.C:26:
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/UList.C:217:6: note: bool Foam::UList<T>::operator>(const Foam::UList<T>&) const [with T = double]
 bool Foam::UList<T>::operator>(const UList<T>& a) const
      ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/UList.C:217:6: note:   no known conversion for argument 1 from ‘double’ to ‘const Foam::UList<double>&’
In file included from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/VectorSpace.H:164:0,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dimensionedType.H:41,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dimensionedScalar.H:38,
                 from ../phaseModel/lnInclude/phaseModel.H:36,
                 from lnInclude/dragModel.H:41,
                 from dragModels/SyamlalOBriendc/SyamlalOBriendc.H:40,
                 from dragModels/SyamlalOBriendc/SyamlalOBriendc.C:26:
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:650:13: note: template<class Form, class Cmpt, int nCmpt> bool Foam::operator>(const Foam::VectorSpace<Form, Cmpt, nCmpt>&, const Foam::VectorSpace<Form, Cmpt, nCmpt>&)
 inline bool operator>
             ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/VectorSpaceI.H:650:13: note:   template argument deduction/substitution failed:
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:108:28: note:   ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ is not derived from ‘const Foam::VectorSpace<Form, Cmpt, nCmpt>’
      if (beta > scalar(0.85))
                            ^
In file included from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dimensionedType.H:298:0,
                 from /home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dimensionedScalar.H:38,
                 from ../phaseModel/lnInclude/phaseModel.H:36,
                 from lnInclude/dragModel.H:41,
                 from dragModels/SyamlalOBriendc/SyamlalOBriendc.H:40,
                 from dragModels/SyamlalOBriendc/SyamlalOBriendc.C:26:
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dimensionedType.C:450:6: note: template<class Type> bool Foam::operator>(const Foam::dimensioned<Type>&, const Foam::dimensioned<Type>&)
 bool operator>
      ^
/home/kasra/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/dimensionedType.C:450:6: note:   template argument deduction/substitution failed:
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:108:28: note:   ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ is not derived from ‘const Foam::dimensioned<Type>’
      if (beta > scalar(0.85))
                            ^
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:116:27: error: ‘c’ was not declared in this scope
         neg(beta - 0.85)*(c*pow(beta, 1.28))
                           ^
dragModels/SyamlalOBriendc/SyamlalOBriendc.C:117:37: error: ‘d’ was not declared in this scope
       + pos(beta - 0.85)*(pow(beta, d))
                                     ^
make: *** [Make/linux64GccDPOpt/SyamlalOBriendc.o] Error 1
make: *** Waiting for unfinished jobs....
edit: Some lateral and irrelevant questions: Is it possible to calculate slip velocity Ur = (Ug - Us) in each zone (cell) by eulerian-eulerian method I mean by twoPhaseEulerFoam?
I think Ur which is applied for Re is slip velocity and is updated at each moment (OF211). if it's true, I want to know about how I can formulize sub parameters exist in "kineticTheoryProperties" file in term of "Ur".

Thank you.

Sincerely Yours,
Kasra
Attached Files
File Type: gz SyamlalOBriendc.tar.gz (4.4 KB, 2 views)

Last edited by k.farnagh; April 24, 2016 at 08:52.
k.farnagh is offline   Reply With Quote

Old   May 21, 2016, 03:08
Default
  #14
New Member
 
Kasra
Join Date: Aug 2014
Posts: 28
Rep Power: 5
k.farnagh is on a distinguished road
Hi,
please help me. I'm looking forward your guide.
k.farnagh 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
Induced drag, pressure drag, viscous drag. aleix.de.toro FLUENT 2 August 24, 2015 18:00
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Applying drag force in the fluid model CanadaFlanker CFX 7 May 5, 2014 23:13
multiphase model and drag law Yasmail AKARIOUH FLUENT 0 April 29, 2008 07:44
multiphase flow modelling, Drag model Anant CFX 1 February 4, 2008 05:18


All times are GMT -4. The time now is 09:50.