CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   changing a variable (turbulence dissipation rate) formolation (http://www.cfd-online.com/Forums/fluent-udf/90843-changing-variable-turbulence-dissipation-rate-formolation.html)

m.beh July 21, 2011 16:43

changing a variable (turbulence dissipation rate) formolation
 
Hi

I must modify eps (C_D) in one part of my work.
I simulating a slurry bubble column and I have to modify my turbulence dissipation rate by this formula:
eps(modify)=eps(original)*exp(A*alpha)

eps(modify):turbulence dissipation rate that I need to use in my calculations
eps(original): turbulence dissipation rate that fluent calculates
A: constant
alpha: volume fraction of particles

and I need to change eps to these formula just in my population balance aggregation and breakage kernels.
can I do this with a udf? which macro I must use?

I know that I can wrote the kernels in udf and hook them to populaton balance model but I want to just change the eps it is more easily and I can use the original code of fluent that have less problems
thank you

Amir July 22, 2011 02:48

Hi,
with a simple DEFINE_ADJUST macro, store modified epsilon in a UDM and then use it where ever you want.

m.beh July 22, 2011 03:50

Hi
Thank you amir
but I am new in writing UFD, an I have an other question.

I want to change eps just in one of fluent parts, and I don't want to write a udf for whole part.

you see: for example in population balance model I choose lou aggregation equations that is avalable in fluent just by using population balance model and choose lou kernel for it from a drop down list.
but I want to send my eps(modify)" that I wrote the equation of that on the last post" instead of eps(original) to the part of lou equations.

I know how to save the my eps(modify) in a UDM, after that how I can send it to the lou equations instead of eps(original) ( that I think using the C_D macro for that in the fluent )

in other word, I want to change or modify one of the fluent equations, is this possible? or I must write whole part of the equation again in a UDF?

excuse me for my poor English

Amir July 22, 2011 08:23

Hi,
I haven't used this model before and I don't know about its characteristics, but I have some suggestions:
- first look for capability of hooking any UDF in your desired model description.
- I think it would be possible to change C_D for using in this eq. and then retrieving previous value (because I don't know about this model, I'm not sure about)
- If you can interpret this model as a conservation eq., then you can use UDS template of FLUENT instead. (again I'm not sure about its nature)


Amir

behest March 28, 2014 09:31

modified dissipation term in k-w SST
 
Hello all,
I want to modify the dissipation term of k-equation by UDF. Which macro can be used?
Actually, I must change the formulation of dissipation term in k-equation and then, Fluent uses the modified dissipation term instead of itselfs. My turbulence model is k-w SST and I just manipulate Y_k (dissipation term of k).
Original: Y_k=ro*beta_s*k*w;
Modified: Y_k=ro*beta_s*k*w/delta; (delta is wall distance)

It would be appriciated if anyone makes a comment to how I do this task.


All times are GMT -4. The time now is 00:52.