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

adding lift model to twoPhaseEulerFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 17, 2013, 12:28
Default adding lift model to twoPhaseEulerFoam
  #1
New Member
 
Join Date: Sep 2010
Location: Windsor, Ontario
Posts: 17
Rep Power: 7
mehrdad_kbg is on a distinguished road
Hi everybody,

I am trying to add new interfacial models to the twoPhaseEulerFoam solver. So, I started from lift force. I followed the drag model existing in the default solver and developed the lift model according to that. Every thing is exactly similar except the changes that I have made to implement the lift.

There was no issue when I compiled the interfacialModels library by doing wmake libso. But when I do a wmake for the solver I get the following error:

mytwoPhaseEulerFoam2.C.text+0x8a6b): undefined reference to `Foam::liftModel::New(Foam::dictionary const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam:haseModel const&, Foam:haseModel const&)'
mytwoPhaseEulerFoam2.C.text+0x8ab9): undefined reference to `Foam::liftModel::New(Foam::dictionary const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam:haseModel const&, Foam:haseModel const&)'
collect2: ld returned 1 exit status
make: *** [/home/mehrdad/OpenFOAM/mehrdad-2.1.1/platforms/linux64GccDPOpt/bin/mytwoPhaseEulerFoam2] Error 1


Do you have any idea what can cause this error?!

Thanks.
mehrdad_kbg is offline   Reply With Quote

Old   September 17, 2013, 12:53
Default
  #2
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
Without having your error message further checked: Did you set you linker options correctly and included:
Code:
 -L$(FOAM_USER_LIBBIN)
dkxls is offline   Reply With Quote

Old   September 17, 2013, 13:13
Default
  #3
New Member
 
Join Date: Sep 2010
Location: Windsor, Ontario
Posts: 17
Rep Power: 7
mehrdad_kbg is on a distinguished road
The "files" and "options" in the interfacial Models folder are attached:

liftModels/liftModel/liftModel.C
liftModels/liftModel/newLiftModel.C
liftModels/Tomiyama/Tomiyama.C

dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
dragModels/WenYu/WenYu.C

LIB = $(FOAM_USER_LIBBIN)/libEulerianInterfacialModels

------------------------------------------------------------------------------------------
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I../phaseModel/lnInclude

LIB_LIBS = \
-lphaseModel
mehrdad_kbg is offline   Reply With Quote

Old   September 17, 2013, 13:25
Default
  #4
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
The options file of your solver?
dkxls is offline   Reply With Quote

Old   September 17, 2013, 13:28
Default
  #5
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
The options file of your solver should look something like this:
Code:
EXE_LIBS = \
    -L$(FOAM_USER_LIBBIN) \
    -lEulerianInterfacialModels \
    -lfiniteVolume \
    -lmeshTools \
    -lincompressibleTransportModels \
    -lphaseModel \
    -lkineticTheoryModel
dkxls is offline   Reply With Quote

Old   September 17, 2013, 13:34
Default
  #6
New Member
 
Join Date: Sep 2010
Location: Windsor, Ontario
Posts: 17
Rep Power: 7
mehrdad_kbg is on a distinguished road
here is my solver's option file:

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-IturbulenceModel \
-IinterfacialModels/lnInclude \
-IphaseModel/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-Iaveraging

EXE_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-lincompressibleTransportModels \
-lphaseModel \
-lEulerianInterfacialModels \
-lfiniteVolume \
-lmeshTools
mehrdad_kbg is offline   Reply With Quote

Old   September 17, 2013, 14:05
Default
  #7
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
Sorry, these were just the simple guesses... Without checking in detail what goes wrong I don't have any ideas any more.
dkxls is offline   Reply With Quote

Old   September 17, 2013, 15:18
Default
  #8
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 11
dkxls will become famous soon enough
Something I just realized, you named the modified library the same as the original one.
Quote:
Originally Posted by mehrdad_kbg View Post
LIB = $(FOAM_USER_LIBBIN)/libEulerianInterfacialModels
I'm not sure if this work, at least I have never tried it to not even get into the situation of confusing them.

You could try something like:
Code:
LIB = $(FOAM_USER_LIBBIN)/libEulerianInterfacialModelsMod
and
Code:
EXE_LIBS = \
       -L$(FOAM_USER_LIBBIN) \
       -lincompressibleTransportModels \
       -lphaseModel \
       -lEulerianInterfacialModelsMod \
       -lfiniteVolume \
       -lmeshTools
dkxls is offline   Reply With Quote

Old   September 17, 2013, 16:08
Default
  #9
New Member
 
Join Date: Sep 2010
Location: Windsor, Ontario
Posts: 17
Rep Power: 7
mehrdad_kbg is on a distinguished road
You solved my problem.

Thank you veryyyyyyyyyyyyy much.
mehrdad_kbg 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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Is it possible to model natural convection in a 2D horizontal model in fluent caitoc FLUENT 1 May 5, 2014 13:32
About the dimension of Saffman-Mei particle lift force model haakon OpenFOAM Programming & Development 1 April 22, 2013 12:27
Adding new term in to K eqn of K-Epsilon turbuelnce model neeraj OpenFOAM Running, Solving & CFD 3 October 11, 2012 07:18
Adding a Turbulence Model doug OpenFOAM Running, Solving & CFD 10 October 2, 2012 06:55


All times are GMT -4. The time now is 22:37.