Implementing a new viscosity model
Hello,
I am doing a project about pipe flow with non newtonian fluid. Apart from the default viscosity model of OpenFOAM, I want to use Quemada model (not in OpenFOAM). The Quemada file contains: Quemada.C, Quemada.H and Quemada.dep. So my question is after I move the Quemada file into viscosityModels directory, what will be the next step? Really appreciated any help! Bentley. |
Not really been good at this. But i feel that u should make necessary changes in the files/options folders and then introduce these headers in the .C file and then you have to wmake the solver and see if it complies without any error foremost. you could also search in the forum. I guess the below is smthng relating to adding a new viscosity model
Cheers! http://www.cfd-online.com/Forums/ope...ity-model.html |
update progress
Hi all,
I am still unable to build the Quemada viscosity model into my library. And I got some errors as following. Any help will be appreciated! Cheers. Code:
wmake: 'Make' directory does not exist in /opt/openfoam30/src/transportModels/incompressible/viscosityModels/Quemada |
What model did you copy to change into your new model?
|
Can you post your .H file? It looks like you might not have a nu() function defined in your new class which is required as nu is a virtual function in its base class.
|
Hello everyone,
I have created a new Viscosity Model in OpenFOAM 3.0.1 based on the link given by Nightwing in post #2. I'm able to compile without any error but I'm not able to see the new model in the Viscosity Model selection table i.e. when I type transportModel bananas in the transportProperties file in the Constant directory, it is showing me the default 5 viscosity models and not the new model that I had just compiled. Any help is greatly appreciated. Thanks!! |
Have you included the new library in the controlDict file under libs( "yourlibraryhere.so" ); ?
|
Hey TobM,
Yes I have included it in my controlDict file. Edit: I just found out why it wasn't showing. Basically, I have a groovy BC inlet condition for my case setup and in groovy BC also you use libs ("libgroovyBC.so" "libsgroovyStandardBCs.so"). So, in my controlDict, I had libs("libusertempModel.so"); libs("libgroovyBC.so" "libsgroovyStandardBCs.so"). When I clubbed both of these together into one libs statement as in libs(" libgroovyBC.so" "libsgroovyStandardBCs.so" "libusertempModel.so"), it started showing the new viscosity model in the selection table. This wasn't the case in OpenFOAM 2.3 x where I could have 2 separate libs statements, one for the groovy BC and one for the viscosity model. In OpenFOAM 3.0.1, however, clubbing the 2 together gives you the desired result. |
2 Attachment(s)
Hi foamers,
I'am working with simpleFoam, and I have implemented a new Herschel-Bulkley viscosity model integrating the Papanastasiou regularization. - I have created a new folder "RegHerschelBulkley" in "src/transportModels/incompressible/viscosityModels" ; - I have copied my files "RegHerschelBulkley.C", "REgHerschelBulkley.H" and "REgHerschelBulkley.C.dep" into that new folder ; - I have modified "src/transportModels/incompressible/Make/files" by adding the new viscosity model ; - I used the command "wclean" into "src/transportModels/incompressible/" ; - And when I use the command "./Allwmake" into "src/transportModels/", I got the message in the first attachment (which I must admit, I don't really understand...) Now when I try to launch a simulation using my new viscosity model, I got the error message in the second attachment. Can somebody suggest me some adjustments to make? Did I miss something? Any help would be well appreciated. I hope that you will find a couple of minutes to give me an answer. Thanks in advance, and have a nice week. Regards. |
Hi TemC,
I think your first mistake was not to work in your user-folder but instead in the openFOAM installation. A good guide for modifying transport models can be found here: http://www.tfd.chalmers.se/~hani/kur...nFoam%20v2.pdf Best, Moritz |
Good morning Moritz,
Thank you very much for your reply. Regards. |
All times are GMT -4. The time now is 11:43. |