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

wmake error for a new viscosity model

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 27, 2009, 12:12
Default wmake error for a new viscosity model
  #1
ICL
New Member
 
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 10
ICL is on a distinguished road
Sponsored Links
Hey guyz,

I got the following errors when I tried to compile (wmake) a viscosity model. Everything was fine before with the same change. I don`t really know why I got these errors now:

incompressible]$ wmake
g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I.. -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/ahajisha/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC Make/linux64GccDPOpt/transportModel.o Make/linux64GccDPOpt/singlePhaseTransportModel.o Make/linux64GccDPOpt/viscosityModel.o Make/linux64GccDPOpt/newViscosityModel.o Make/linux64GccDPOpt/Roelands.o Make/linux64GccDPOpt/EyringRoelands.o Make/linux64GccDPOpt/Doolittle.o Make/linux64GccDPOpt/Newtonian.o -L/home/ahajisha/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt \
-lOpenFOAM -liberty -ldl -lm -o OpenFOAM.out
/usr/lib/../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
Make/linux64GccDPOpt/viscosityModel.o: In function `Foam::fvPatchField<Foam::SymmTensor<double> >::type() const':
viscosityModel.C.text._ZNK4Foam12fvPatchFieldINS _10SymmTensorIdEEE4typeEv[Foam::fvPatchField<Foam::SymmTensor<double> >::type() const]+0x3): undefined reference to `Foam::fvPatchField<Foam::SymmTensor<double> >::typeName'
Make/linux64GccDPOpt/viscosityModel.o: In function `Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::type() const':
.
.
.
.
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1

I would be very grateful if anyone can lead me to the source of the error.

Thanks alot,
Ali
ICL is offline   Reply With Quote
Sponsored Links

Old   October 27, 2009, 13:01
Default
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 18
mattijs is on a distinguished road
Probably you want to build a library, not an executable. Use 'wmake libso' to build a library. This is not a bug.
mattijs is offline   Reply With Quote

Old   October 27, 2009, 13:05
Default
  #3
ICL
New Member
 
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 10
ICL is on a distinguished road
I compiled the new viscosity model with wmake and I used to compile it with wmake every time I changed it. This time I only changed a constant value in it and got the above-mentioned error using wmake! I don`t know what is the reason...
ICL is offline   Reply With Quote

Old   October 27, 2009, 13:07
Default
  #4
ICL
New Member
 
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 10
ICL is on a distinguished road
I typed wmake in src/transportModels/incompressible by the way. As I mentioned it was fine using wmake for that before.
ICL is offline   Reply With Quote

Old   October 30, 2009, 07:44
Default Correction
  #5
ICL
New Member
 
Ali Sh
Join Date: Jun 2009
Location: London
Posts: 28
Rep Power: 10
ICL is on a distinguished road
First of all, that was not a bug ( Sorry for that)
Use of wmake is possible for executable files such as Solvers. There is a library specified to transportmodels/incompressible and that should be updated using wmake libso incompressible in src/transportmodels directory.
ICL is offline   Reply With Quote

Old   March 2, 2017, 11:30
Default
  #6
New Member
 
Térence
Join Date: Feb 2017
Location: Bordeaux, France.
Posts: 27
Rep Power: 2
TemC is on a distinguished road
Hi foamers,

I'am working with simpleFoam, and I want to implement a new Herschel-Bulkley model. I have already done all the major steps and modifications required.

Now when I try to execute the command "./Allwmake" in "src/transportModels/", I got the message depicted in the attachment. And even when I use the command "wmake libso incompressible" suggested on this thread, I still have this message. Does anybody know what it may be linked to?

I hope that you will find a couple of minutes to give me a reply. Any contribution will be well aprreciated.

Thanks in advance for your time, and have a nice week.

Regards.
Attached Images
File Type: png Compiling_Message.PNG (105.9 KB, 2 views)
TemC is offline   Reply With Quote

Old   March 2, 2017, 12:52
Default
  #7
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 241
Rep Power: 12
floquation will become famous soon enough
Quote:
Originally Posted by TemC View Post
I hope that you will find a couple of minutes to give me a reply. Any contribution will be well aprreciated.
My French is a little rusty, but a few seconds are enough to find the answer:
It says "impossible to create the repository ... permission denied".
In other words, you do not have writing rights in that directory, which makes a lot of sense as it is the "/opt" directory.

You need to either compile using the super-user account [you probably do not want to do this, especially as there is no reason to modify the original OpenFoam source code], or you should compile your modified code in a directory in which you have writing rights. I usually compile my own modifications in ${FOAM_RUN}/../applications or ${FOAM_RUN}/../libraries.
It'd be a good idea to put your executable in $FOAM_USER_APPBIN, instead $FOAM_APPBIN, as it is a user modification.
floquation is offline   Reply With Quote

Old   March 3, 2017, 04:30
Default
  #8
New Member
 
Térence
Join Date: Feb 2017
Location: Bordeaux, France.
Posts: 27
Rep Power: 2
TemC is on a distinguished road
Good morning Sir,

Thank you very much for your advices, I will take them into account.

Regards.
TemC is offline   Reply With Quote

Reply

Tags
compile, error, openfoam, wmake

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
Implementing new viscosity model prjohnston OpenFOAM Running, Solving & CFD 6 July 3, 2015 04:26
Yielding viscosity for Herschel Bulkley model Godwin FLUENT 1 December 12, 2011 06:42
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07
Power Law Viscosity Model cpplabs OpenFOAM Running, Solving & CFD 1 February 13, 2008 09:09
Casson Viscosity model as one user define function Zahra Rahmdel FLUENT 0 November 6, 2004 06:53

Sponsored Links


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