|
[Sponsors] |
the error during add turbulence model in openFOAM 5.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 26, 2018, 03:25 |
the error during add turbulence model in openFOAM 5.0
|
#1 |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
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 |
|
February 26, 2018, 06:03 |
|
#2 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
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 |
|
February 26, 2018, 06:53 |
|
#3 | |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
Quote:
|
||
February 26, 2018, 07:13 |
|
#4 | |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Quote:
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 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. |
||
February 27, 2018, 01:31 |
|
#5 | |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
Quote:
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. |
||
February 27, 2018, 04:09 |
|
#6 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
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/ |
|
March 1, 2018, 06:40 |
|
#7 | |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
Quote:
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 |
||
March 1, 2018, 12:34 |
|
#8 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
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 Addition of New Turbulence Models giviing errors please help: symbol lookup error? symbol lookup error New dynamic mesh rule with symbol lookup error |
|
March 2, 2018, 08:17 |
|
#9 | |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
Quote:
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. |
||
March 2, 2018, 09:23 |
|
#10 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Try
Code:
#include "fvc.H" |
|
August 9, 2018, 12:25 |
|
#11 | |
Senior Member
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12 |
Quote:
|
||
August 9, 2018, 12:48 |
|
#12 |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
||
July 17, 2019, 14:28 |
|
#13 |
New Member
gned
Join Date: Oct 2012
Posts: 18
Rep Power: 14 |
ht2017, in post #9 you say you solved one previous problem you reported in post #7.
How, please? |
|
|
|
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 |