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

Compilation Error--PoweLawVelocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2018, 08:40
Default Compilation Error--PoweLawVelocity
  #1
Member
 
Vivek
Join Date: Mar 2018
Location: India
Posts: 54
Rep Power: 8
vivek05 is on a distinguished road
Hi,
I am trying to compile power-law velocity using wmake. It is showing this error
PHP Code:
SOURCE=powerLawVelocity/powerLawVelocityFvPatchVectorField.;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/finiteVolume/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/meshTools/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/sampling/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/solidThermo/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/transportModels/compressible/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/basic/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/specie/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/TurbulenceModels/compressible/lnInclude -IlnInclude -I. -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude -I/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/powerLawVelocityFvPatchVectorField.o
In file included from powerLawVelocity
/powerLawVelocityFvPatchVectorField.C:26:0:
powerLawVelocity/powerLawVelocityFvPatchVectorField.H:79:23fatal errorFunction1.HNo such file or directory
 
#include "Function1.H"
                       
^
compilation terminated.
make: *** [Make/linux64GccDPOpt/powerLawVelocityFvPatchVectorField.oError 1 

I am making this file in Openfoam/usr/run directory.

Could anyone help me to find the problem?
vivek05 is offline   Reply With Quote

Old   November 16, 2018, 11:32
Default
  #2
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Hi,


you didn't say which version of OpenFOAM or foam-extend you are using?
But, without knowing the version check the following path:
Code:
 OpenFOAM-???/src/OpenFOAM/primitives/functions
if you don't have function1 source folder there, then that's why the compiler can't find the corresponding header!

Regards,
D. Khazaei
Daniel_Khazaei is offline   Reply With Quote

Old   November 16, 2018, 11:42
Default
  #3
Member
 
Vivek
Join Date: Mar 2018
Location: India
Posts: 54
Rep Power: 8
vivek05 is on a distinguished road
Thanks for your response Mr.Daniel

I am using openFoam 2.3.1

the path for functions

/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/primitives/functions
vivek05 is offline   Reply With Quote

Old   November 16, 2018, 11:58
Default
  #4
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by vivek05 View Post
Thanks for your response Mr.Daniel

I am using openFoam 2.3.1

the path for functions

/home/ssvivek/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/primitives/functions
I have just checked OpenFOAM-2.3.x git, it doesn't have function1 library...so if you want to compile your library, you have two options:

1- port back function1 from recent openfoam versions: if you are familiar with c++ and openfoam structure, it is not that hard.

2- upgrade to the newer openfoam versions
Daniel_Khazaei is offline   Reply With Quote

Old   November 16, 2018, 12:07
Default
  #5
Member
 
Vivek
Join Date: Mar 2018
Location: India
Posts: 54
Rep Power: 8
vivek05 is on a distinguished road
I am not familiar with C++

Could you give me some steps for port backing from other OpenFoam version??
vivek05 is offline   Reply With Quote

Old   November 16, 2018, 12:59
Default
  #6
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by vivek05 View Post
I am not familiar with C++

Could you give me some steps for port backing from other OpenFoam version??
well the safest way is to compile it in user directory without modifying the the installation directory! try as usual and get the function1 from the closest version to your exiting installation! this way you need minimal changes to make it compile on 2.3.1, I would recommend OpenFOAM-4...

you may need to create Make folder and copy files and option file from src/OpenFOAM/Make into your local directory! then modify file and remove unnecessary lines. Also don't forget to change the library path to USER_LIBBIN and name! I assume you know how to compile library in your local directory!

then try to fix each error you get during compile one by one...
Daniel_Khazaei is offline   Reply With Quote

Old   November 16, 2018, 13:08
Default
  #7
Member
 
Vivek
Join Date: Mar 2018
Location: India
Posts: 54
Rep Power: 8
vivek05 is on a distinguished road
Thanks for your reply

I am new to compilation procedure.

Is there any sample guidelines available for compiling a library in openfoam
vivek05 is offline   Reply With Quote

Old   November 17, 2018, 09:21
Default
  #8
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by vivek05 View Post
Thanks for your reply

I am new to compilation procedure.

Is there any sample guidelines available for compiling a library in openfoam

Yes, there are plenty guidelines available, but in this situation, I would recommend installing a new OpenFOAM version if you have just started to learn OpenFOAM!
Daniel_Khazaei 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
[foam-extend.org] foam-extend-3.2 compilation on windows kirmaks OpenFOAM Installation 7 December 3, 2019 20:20
Compilation error for OpenFOAM-ext on Ubantu 10.04 32 bit Sargam05 OpenFOAM Installation 13 March 22, 2014 05:21
[swak4Foam] swak4Foam compilation for OF-2.0.0 camoesas OpenFOAM Community Contributions 19 December 10, 2012 13:24
Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) floydfan OpenFOAM Installation 7 December 20, 2011 05:56
Compilation Error.... Arnab Siemens 4 September 12, 2004 15:54


All times are GMT -4. The time now is 19:38.