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

the error during add turbulence model in openFOAM 5.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2018, 03:25
Default the error during add turbulence model in openFOAM 5.0
  #1
Member
 
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9
ht2017 is on a distinguished road
Hi everyone,
Now, I implement adding turbulence model in openFoam 5.0. But when I comment "wmake" then the error appeared.


please help me find this error

thank you very much
ht2017 is offline   Reply With Quote

Old   February 26, 2018, 06:03
Default
  #2
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
First of all, why are you messing around in the OF install directory?

You should be working in the user directories:
$FOAM_USER_APPBIN / $FOAM_USER_LIBBIN

This way you ensure that your changes do not mess up your installation and other solvers that may be dependent on common libraries

You should start with a tutorial that explains how to implement a custom turbulence model. Following is an example, it might not work exactly like that in newer version of OF, but at least it will get you started in the right direction.

http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf
anuragm is offline   Reply With Quote

Old   February 26, 2018, 06:53
Default
  #3
Member
 
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9
ht2017 is on a distinguished road
Quote:
Originally Posted by anuragm View Post
First of all, why are you messing around in the OF install directory?

You should be working in the user directories:
$FOAM_USER_APPBIN / $FOAM_USER_LIBBIN

This way you ensure that your changes do not mess up your installation and other solvers that may be dependent on common libraries

You should start with a tutorial that explains how to implement a custom turbulence model. Following is an example, it might not work exactly like that in newer version of OF, but at least it will get you started in the right direction.

http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf
I also follow this reference but I also can't do it.Could you help me.
ht2017 is offline   Reply With Quote

Old   February 26, 2018, 07:13
Default
  #4
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
Quote:
Originally Posted by ht2017 View Post
I also follow this reference but I also can't do it.Could you help me.
You clearly are not following it as written because the very first slide mentions this command

Code:
cd $WM_PROJECT_DIR
cp -r --parents src/turbulenceModels/RAS/incompressible/kEpsilon \
$WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR/src/turbulenceModels/RAS/incompressible/
mv kEpsilon mykEpsilon
cd mykEpsilon
These lines copy an existing turbulence model (kEpsilon) into the user directory (WM_PROJECT_USER_DIR) and then rename it to mykEpsilon. This is the directory in which the example is being tested and not in the opt directory.

In fact, in your own screenshot you are running wmake in the wrong directory. First of all you are trying to do this in the /opt directory (which is the default install location of OpenFOAM) and not in your user copy - this could create problems for you. Second, even the wmake command is being executed in the wrong directory. It just seems to me you have no idea what you are doing but are blindly copy-pasting into the command line. This is a dangerous practice and will only cause more harm than good! Correct me if I'm wrong in this assumption.
anuragm is offline   Reply With Quote

Old   February 27, 2018, 01:31
Default
  #5
Member
 
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9
ht2017 is on a distinguished road
Quote:
Originally Posted by anuragm View Post
You clearly are not following it as written because the very first slide mentions this command

Code:
cd $WM_PROJECT_DIR
cp -r --parents src/turbulenceModels/RAS/incompressible/kEpsilon \
$WM_PROJECT_USER_DIR
cd $WM_PROJECT_USER_DIR/src/turbulenceModels/RAS/incompressible/
mv kEpsilon mykEpsilon
cd mykEpsilon
These lines copy an existing turbulence model (kEpsilon) into the user directory (WM_PROJECT_USER_DIR) and then rename it to mykEpsilon. This is the directory in which the example is being tested and not in the opt directory.

In fact, in your own screenshot you are running wmake in the wrong directory. First of all you are trying to do this in the /opt directory (which is the default install location of OpenFOAM) and not in your user copy - this could create problems for you. Second, even the wmake command is being executed in the wrong directory. It just seems to me you have no idea what you are doing but are blindly copy-pasting into the command line. This is a dangerous practice and will only cause more harm than good! Correct me if I'm wrong in this assumption.
Hi you,
I did it again and it runs with comment "wmake". In my library appear the folders ( platforms>>linux64GccDPlnt32Opt>>lib>>libuserincom pressibleRASModels.so and in the folder SRC of usre>>turbulenceModels>>incompressible>>RAS appear the lnInclude folder and in the folder Make appear the linux64GccDPlnt32Opt>>(mykEpsilon +option + sourcefile+variable). I think I built my new turbulence in my library. And then I add a line to "controlDict" in the my simulation (libs ("libuserincompressibleRASModels.so"); and change RASModel to mykEpsilon. but when I run my simulation it report "Unknown RASModel type mykEpsilon". Can you give me your advice about the problem?
thank you very much.

ht2017 is offline   Reply With Quote

Old   February 27, 2018, 04:09
Default
  #6
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
To put it simply, it appears that your custom turbulence model is now compiled but the solver (or OpenFOAM) is not aware of its existence. You will need to add this model to the runtime selection table.

This following link is a follow up to the previously linked tutorial. The author mentions what has changed in the recent version of OpenFOAM and why the previous tutorial does not work in OF 3.0 (and newer). They also mention how to make it work.

http://hassankassem.me/posts/newturbulencemodel/
anuragm is offline   Reply With Quote

Old   March 1, 2018, 06:40
Default
  #7
Member
 
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9
ht2017 is on a distinguished road
Quote:
Originally Posted by anuragm View Post
To put it simply, it appears that your custom turbulence model is now compiled but the solver (or OpenFOAM) is not aware of its existence. You will need to add this model to the runtime selection table.

This following link is a follow up to the previously linked tutorial. The author mentions what has changed in the recent version of OpenFOAM and why the previous tutorial does not work in OF 3.0 (and newer). They also mention how to make it work.

http://hassankassem.me/posts/newturbulencemodel/
Hi you,
I am following this the reference you sent me. When I run the test with new turbulence it appears the error.


do you know what is the error? How to fix it?
thank you
ht2017 is offline   Reply With Quote

Old   March 1, 2018, 12:34
Default
  #8
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
There could be many sources behind the error, mostly related to how you've defined your custom library. Chances are you forgot to link an important library or made a wrong class definition in there. Double check it to see you've not made any errors. Then compare your library with one of the default OF libraries to see if you are missing something. Especially, check the Make/options. You can use nm to list the library file and search for the symbol that causes the error using grep with the following format:

Code:
$> nm LIBRARY_PATH/LIBRARY_NAME.so | grep SYMBOL
And to be honest, just do a search of the forum before you ask a question. Chances are it has already been answered by someone before.

Addition of New Turbulence Models giviing errors

please help: symbol lookup error?

symbol lookup error

New dynamic mesh rule with symbol lookup error
anuragm is offline   Reply With Quote

Old   March 2, 2018, 08:17
Default
  #9
Member
 
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9
ht2017 is on a distinguished road
Quote:
Originally Posted by anuragm View Post
There could be many sources behind the error, mostly related to how you've defined your custom library. Chances are you forgot to link an important library or made a wrong class definition in there. Double check it to see you've not made any errors. Then compare your library with one of the default OF libraries to see if you are missing something. Especially, check the Make/options. You can use nm to list the library file and search for the symbol that causes the error using grep with the following format:

Code:
$> nm LIBRARY_PATH/LIBRARY_NAME.so | grep SYMBOL
And to be honest, just do a search of the forum before you ask a question. Chances are it has already been answered by someone before.

Addition of New Turbulence Models giviing errors

please help: symbol lookup error?

symbol lookup error

New dynamic mesh rule with symbol lookup error
the first, I want to thank you to help me and give me the advice necessary. I had success in the adding new turbulence.

Now I am doing the same work with the kOmegaSSTLM turbulence. But I give this notification. Could you give me your advice?

this error: opt/openfoam5/src/TurbulenceModels/turbulence/lnInclude/kOmegaSSTBase.C:133:30 ERROR: 'fvc' has not been declared correctNut(2*magSqr(symm(fvc::grad(this-->u_))),F23());
opt/openfoam5/src/TurbulenceModels/turbulence/lnInclude/kOmegaSSTBase.C:133:30 ERROR: 'fvc' has not been declared
fvc::div(fvc::absolute(this-->phi(),u))()()






I think I do not have a reasonable path in options file or the makeTurModel.C has not declared a thing.
please give me advice.
ht2017 is offline   Reply With Quote

Old   March 2, 2018, 09:23
Default
  #10
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12
anuragm is on a distinguished road
Try

Code:
#include "fvc.H"
anuragm is offline   Reply With Quote

Old   August 9, 2018, 12:25
Default
  #11
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
Quote:
Originally Posted by ht2017 View Post
the first, I want to thank you to help me and give me the advice necessary. I had success in the adding new turbulence.

Now I am doing the same work with the kOmegaSSTLM turbulence. But I give this notification. Could you give me your advice?

this error: opt/openfoam5/src/TurbulenceModels/turbulence/lnInclude/kOmegaSSTBase.C:133:30 ERROR: 'fvc' has not been declared correctNut(2*magSqr(symm(fvc::grad(this-->u_))),F23());
opt/openfoam5/src/TurbulenceModels/turbulence/lnInclude/kOmegaSSTBase.C:133:30 ERROR: 'fvc' has not been declared
fvc::div(fvc::absolute(this-->phi(),u))()()






I think I do not have a reasonable path in options file or the makeTurModel.C has not declared a thing.
please give me advice.
I have the same problem, did u solve it?
ancolli is offline   Reply With Quote

Old   August 9, 2018, 12:48
Default
  #12
Member
 
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9
ht2017 is on a distinguished road
Quote:
Originally Posted by ancolli View Post
I have the same problem, did u solve it?
hi ancoli,

now, I have been resolved this problem.
ht2017 is offline   Reply With Quote

Old   July 17, 2019, 14:28
Default
  #13
New Member
 
gned
Join Date: Oct 2012
Posts: 18
Rep Power: 14
gned is on a distinguished road
ht2017, in post #9 you say you solved one previous problem you reported in post #7.
How, please?
gned 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
how to add a turbulence into a laminar model? zhangxc0223 OpenFOAM Pre-Processing 2 November 14, 2018 07:59
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 10:02
sst turbulence model with OpenFoam HerveAllain OpenFOAM 1 September 28, 2010 11:15


All times are GMT -4. The time now is 18:44.