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

Adding a new boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By k.farnagh

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2016, 11:37
Default Adding a new boundary condition
  #1
New Member
 
Kasra
Join Date: Aug 2014
Posts: 29
Rep Power: 11
k.farnagh is on a distinguished road
Hi,

What I want to do, is compiling JohnsonJacksonParticleSlip Bc's for OF 211.

I could find .c and .h files of mentioned Bc for particle and theta somewhere in twoPhaseEulerFoam solver of OF4.

Then I've applied steps which described below:
http://www.cfd-online.com/Forums/ope...tml#post446451

At "wmake libso" step, it terminate to:
Code:
wmakeLnInclude: linking include files to ./lnInclude
SOURCE=JohnsonJacksonParticleSlipFvPatchVectorField.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 -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/JohnsonJacksonParticleSlipFvPatchVectorField.o
JohnsonJacksonParticleSlipFvPatchVectorField.C:28:28: fatal error: twoPhaseSystem.H: No such file or directory
 #include "twoPhaseSystem.H"
                            ^
compilation terminated.
make: *** [Make/linux64GccDPOpt/JohnsonJacksonParticleSlipFvPatchVectorField.o] Error 1
Edit:What thing made me confused is destination of .c and .h files in comparison between version 3 and 4. in v_3 they are placed (src/finiteVolume/...) and in v_4 placed in solver (phaseCompressible../kineticTh../derivedFvPatchFields). Does this difference affect on way described in link?

Furthermore in of 211 solver twoPhaseSystem is not defined.
Would you please help me in this topic.

Sincerely Yours
Kasra

Last edited by k.farnagh; July 31, 2016 at 07:08.
k.farnagh is offline   Reply With Quote

Old   July 28, 2016, 12:04
Default
  #2
Member
 
Ben Jankauskas
Join Date: Jun 2013
Location: Exeter
Posts: 34
Rep Power: 12
rhythm is on a distinguished road
Hi,

In my experience this error means that you did not correctly specify dependency paths in ./Make/options file. So - I'd double check it and see if everything is correct in there.

Another thing that I usually do (even though wmake libso does that) is run:
Code:
wmakeLnInclude .
by hand or put it in ./Allwmake, before executing wmake libso

That is all I can suggest at the moment.

If you've uploaded your ./Make/options file then possibly someone will give a more specific answer.

Cheers,
Ben
rhythm is offline   Reply With Quote

Old   July 28, 2016, 14:42
Default
  #3
Member
 
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 12
Jerryfan is on a distinguished road
Hi Kasra,


I think you it's because you somehow included the twoPhaseSystem.H file somewhere in your boundary condition class. See the error:
Quote:
C:28:28: fatal error: twoPhaseSystem.H: No such file or directory
#include "twoPhaseSystem.H"
Jerryfan is offline   Reply With Quote

Old   July 28, 2016, 18:06
Default
  #4
New Member
 
Kasra
Join Date: Aug 2014
Posts: 29
Rep Power: 11
k.farnagh is on a distinguished road
Hi,
Thank you Ben and Jerry.

@Ben: you are right. I think dependency paths and most likely codes in "file" file is not proper for J&J Bc's as they're achieved from another Bc (parabolicVelocity which is main object of link in post#1) but I don't know what changes should be done. I upload them. BTW I've tried your suggest and it appears options, I couldn't find what should I do with them.

@Jerry: yes. twoPhaseSystem.h is included in body of bc and its important to put the suitable paths in order to access to right library or directories.

Thanks. looking forward.

Sincerely Yours
Kasra
Attached Files
File Type: gz JohnsonJacksonParticleSlip.tar.gz (5.7 KB, 15 views)
k.farnagh is offline   Reply With Quote

Old   July 28, 2016, 20:48
Default
  #5
Member
 
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 12
Jerryfan is on a distinguished road
Hi Kasra,


I somehow made the compilation proceed a little bit more. But it seems that there are other problems. The version of O.F. I am using is 2.3.1. See what I got from the compilation.

Quote:
wmakeLnInclude: linking include files to ./lnInclude
SOURCE=JohnsonJacksonParticleSlipFvPatchVectorFiel d.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I /home/jerry/OpenFOAM/OpenFOAM-2.3.1/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/transportModels/compressible/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/basic/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/transportModels/incompressible/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/compressible/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/phaseCompressible/lnInclude -IlnInclude -I. -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPDebug/JohnsonJacksonParticleSlipFvPatchVectorField.o
JohnsonJacksonParticleSlipFvPatchVectorField.C: In constructor ‘Foam::JohnsonJacksonParticleSlipFvPatchVectorFiel d::JohnsonJacksonParticleSlipFvPatchVectorField(co nst Foam::fvPatch&, const Foam:imensionedField<Foam::Vector<double>, Foam::volMesh>&, const Foam::dictionary&)’:
JohnsonJacksonParticleSlipFvPatchVectorField.C:92: 9: error: ‘FatalErrorInFunction’ was not declared in this scope
FatalErrorInFunction
^
JohnsonJacksonParticleSlipFvPatchVectorField.C: In member function ‘virtual void Foam::JohnsonJacksonParticleSlipFvPatchVectorField ::updateCoeffs()’:
JohnsonJacksonParticleSlipFvPatchVectorField.C:163 :50: error: ‘const class Foam::Field<Foam::Vector<double> >’ has no member named ‘group’
fluid.phase1().name() == internalField().group()
^
make: *** [Make/linux64GccDPDebug/JohnsonJacksonParticleSlipFvPatchVectorField.o] Error 1
Jerryfan is offline   Reply With Quote

Old   July 28, 2016, 21:07
Default
  #6
Member
 
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 12
Jerryfan is on a distinguished road
Hi Kasra,


I made it work now. It is because of the O.F. version I am using. I copied the JohnsonJacksonParticleSlipFvPatchVectorField.H and JohnsonJacksonParticleSlipFvPatchVectorField.C files from my O.F. source directory. I added more directories in the EXE_INC. I went through perfectly.


Quote:
wmakeLnInclude: linking include files to ./lnInclude
SOURCE=JohnsonJacksonParticleSlipFvPatchVectorFiel d.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I /home/jerry/OpenFOAM/OpenFOAM-2.3.1/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/transportModels/compressible/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/basic/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/transportModels/incompressible/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/compressible/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/phaseCompressible/lnInclude -I../twoPhaseSystem/lnInclude -I../interfacialModels/lnInclude -IlnInclude -I. -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/jerry/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPDebug/JohnsonJacksonParticleSlipFvPatchVectorField.o
'/home/jerry/OpenFOAM/jerry-2.3.1/platforms/linux64GccDPDebug/lib/libmyBCs.so' is up to date.
Jerryfan is offline   Reply With Quote

Old   July 29, 2016, 02:34
Default
  #7
New Member
 
Kasra
Join Date: Aug 2014
Posts: 29
Rep Power: 11
k.farnagh is on a distinguished road
Hi Jerry.

Would you please show or put your Bc files here for comparison.
BTW as I know this kind of Bc included to versions 3 and 4 of OF. May you please add destination where you find them.
What was the reason you add other EXE_INC. it doesn't work without them?

Thank you for your effort and help Jerry.

Sincerely Yours
Kasra
k.farnagh is offline   Reply With Quote

Old   July 29, 2016, 10:48
Default
  #8
Member
 
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 12
Jerryfan is on a distinguished road
Hi Kasra,


I am now outside and can not access my computer which has OpenFOAM installed. This BC is also supported and available at least for version 2.3.1, the one I am currently using. I added other entries for the EXE_INC because of the twoPhaseSystem.H file. If I don't include them, the compilation won't go through as the compiler is not able to resource to this file and other files this file depends on. I will post the files I have as soon as I return tonight.


Best regards,
Jerry
Jerryfan is offline   Reply With Quote

Old   August 3, 2016, 08:36
Default
  #9
New Member
 
Kasra
Join Date: Aug 2014
Posts: 29
Rep Power: 11
k.farnagh is on a distinguished road
Hi,
I've changed "file" file content according to Jerry recommend.

Code:
EXE_INC =  -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I /home/kasra/OpenFOAM/OpenFOAM-2.3.0/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/transportModels/compressible/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
    -I../twoPhaseSystem/lnInclude \
    -I../interfacialModels/lnInclude

EXE_LIBS = \
    -lincompressibleTransportModels \
    -lfluidThermophysicalModels \
    -lspecie
I've modified bold line for compatibility with my system. It should be noted the destination of bold line is for version 230 (which installed third party in my linux) but remember that I want to use Bcs for version 211 (twoPhaseSystem is not included in this version). Is it true addressing?

However I encounter to below after wmake libso:
Code:
In file included from /home/kasra/OpenFOAM/OpenFOAM-2.3.0/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/lnInclude/twoPhaseSystem.H:38:0,
                 from JohnsonJacksonParticleSlipFvPatchVectorField.C:28:
/home/kasra/OpenFOAM/OpenFOAM-2.3.0/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/lnInclude/phaseModel.H:40:23: fatal error: rhoThermo.H: No such file or directory
 #include "rhoThermo.H"
                       ^
compilation terminated.
make: *** [Make/linux64GccDPOpt/JohnsonJacksonParticleSlipFvPatchVectorField.o]
Looking forward your help.

Sincerely Yours'
Kasra
Zhiheng Wang likes this.
k.farnagh is offline   Reply With Quote

Reply


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Radiation interface hinca CFX 15 January 26, 2014 17:11
conjugate boundary condition Daniel_Khazaei OpenFOAM Programming & Development 0 December 31, 2013 13:11
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


All times are GMT -4. The time now is 10:06.