the error during add turbulence model in openFOAM 5.0
Hi everyone,
Now, I implement adding turbulence model in openFoam 5.0. But when I comment "wmake" then the error appeared. https://www.cfd-online.com/Forums/me...4-thanh123.jpg please help me find this error thank you very much |
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 |
Quote:
|
Quote:
Code:
cd $WM_PROJECT_DIR 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. |
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. https://www.cfd-online.com/Forums/me...906-thanh4.jpg https://www.cfd-online.com/Forums/me...e905-thanh.jpg |
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/ |
Quote:
I am following this the reference you sent me. When I run the test with new turbulence it appears the error. https://www.cfd-online.com/Forums/me...e907-thaaa.jpg do you know what is the error? How to fix it? thank you |
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 https://www.cfd-online.com/Forums/op...tml#post660305 https://www.cfd-online.com/Forums/op...kup-error.html https://www.cfd-online.com/Forums/op...kup-error.html https://www.cfd-online.com/Forums/op...kup-error.html |
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))()() https://www.cfd-online.com/Forums/me...e908-error.jpg https://www.cfd-online.com/Forums/me...09-options.jpg https://www.cfd-online.com/Forums/me...keturmodel.jpg 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. |
Try
Code:
#include "fvc.H" |
Quote:
|
Quote:
now, I have been resolved this problem. |
ht2017, in post #9 you say you solved one previous problem you reported in post #7.
How, please? |
All times are GMT -4. The time now is 14:00. |