
[Sponsors] 
October 12, 2009, 13:40 
Userdefined k or epsilon?

#1 
Member
Join Date: Apr 2009
Posts: 78
Rep Power: 9 
Has anyone written successful UDF source equations for turbulence kinetic energy (k) or turbulence dissipation rate (epsilon)?
I've tried writing mine based on the ke equations here (http://www.cfdonline.com/Wiki/Standard_kepsilon_model) but velocity profiles in the boundary layer don't match the Blaussius curve. Thanks! 

October 12, 2009, 20:52 

#2 
New Member

Currently I'm implementing a splitting technique for ke model, so I have to add two ke extra equations. I've done it successfully.
Are you trying to modify existing Fluent ke equations? or you are trying to add ke from scratch? Cheers, Javier 

October 12, 2009, 22:13 

#3 
Member
Join Date: Apr 2009
Posts: 78
Rep Power: 9 
I'm trying to start from scratch. I'm making several v2f models, which use the standard k and e equations.
Would you mind posting your k and e source code? I'd appreciate it. Thanks! 

October 12, 2009, 23:47 

#4 
New Member

Which viscous model are you using for your implementation from scratch of ke? laminar model + 2 UDS equation for ke?
About the source code, I have to check first with my supervisor, just for IP reasons. I think it shouldn't be a problem, because is a method already published and I'm just implementing it in FLUENT. Currently I haven't tried to start from scratch but it is one option that we were thinking because patching the inbuilt ke it's a bit tricky specially in the nearwall region. Cheers, Javier 

October 13, 2009, 01:11 

#5 
Member
Join Date: Apr 2009
Posts: 78
Rep Power: 9 
I'm actually using the ke model with turbulence equations turned off. I hadn't considered running it with the laminar model. I might try that tomorrow, it may solve some problems.
Just to give you some background, the v2f model is based on the ke model, and uses the same k and e equations, with some minor differences. The constants are calibrated differently  in particular, Ce2 is a function of turbulent quantities, and isn't constant. Also, the model is integratable to solid walls and doesn't use damping functions or wall functions. So, FLUENT's k and e equations won't work. I hope you can share your code  I can't imagine that the k and e sources would be proprietary, but I understand if you can't share them. Thanks! 

October 13, 2009, 11:35 

#6 
Member
Join Date: Apr 2009
Posts: 78
Rep Power: 9 
I just remembered why I haven't used the laminar model with 4 UDSs (k, e, v2, f). I need to use a userdefined turbulent viscosity, which is made easy when you use the ke model with turbulence equations turned off.
I'm assuming if you plan to start from scratch with k and e UDSs you'll need to store turbulent viscosity as well. Had you figured out how you were going to hook that to the solver? 

October 13, 2009, 21:21 

#7 
New Member

I haven't tried anything with the laminar option, but I think that you could store the turbulent viscosity in a UDM variable, and updated in every iteration.
I'm sending you a document of what I did through a private message. OK? Cheers, Javier 

October 14, 2009, 11:55 

#8 
Member
Join Date: Apr 2009
Posts: 78
Rep Power: 9 
You could store mu_t as a UDM, but I don't see how you'd hook it to the solver in the laminar model. The laminar model should have mu_t = 0. If you figure that out I'd love to hear how it turns out.


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
SimpleFoam k and epsilon bounded  nedved  OpenFOAM Running, Solving & CFD  15  December 2, 2016 03:40 
user defined turbulence model  manuutin  STARCD  5  October 14, 2009 05:29 
SimpleFoam k and epsilon bounded  nedved  OpenFOAM Running, Solving & CFD  1  November 25, 2008 21:21 
Gradient of a User defined Variable  Ramadas  CFX  2  August 21, 2007 09:19 
User Defined Scalars  Returning Values  Carlos V.  FLUENT  0  April 19, 2006 18:18 