|
[Sponsors] |
April 20, 2004, 11:25 |
strain rate in UDF
|
#1 |
Guest
Posts: n/a
|
Can anyone tell me how to define in Fluent 6.1.18 a strain rate in UDF?
I have read the UDF manual Fluent book, but I only have found: C_CRITICAL_STRAINB_RATE(c,t). I have used it in my udf, but I got an error: "error:>(greater-than) :invalid argument [2]: wrong type [not a number] error object:nan". In UDF manual I have found a definition for velocity derivatives but without strain rate. I have checked that Fluent calculate strain rate during calculation using Mixture model, but how can I name "strain rate" in UDF? Should I construct it from velocity derivatives or it should be used one name or symbol? Thanks for any help Paulina |
|
April 20, 2004, 11:34 |
Re: strain rate in UDF
|
#2 |
Guest
Posts: n/a
|
I think you should try with C_STRAIN_RATE_MAG(c,t) if you want to access strain rate from your UDF.
|
|
April 20, 2004, 11:36 |
Re: strain rate in UDF
|
#3 |
Guest
Posts: n/a
|
Hi 2L,
Thank you for so quickly response. I will try it. Best regards Paulina |
|
April 20, 2004, 11:42 |
Re: strain rate in UDF
|
#4 |
Guest
Posts: n/a
|
Hello 2L once again!
I have included in the UDF: #include "mem.h" for C_STRAIN_RATE_MAG(c,t). Should I put something else or it is correct? Paulina |
|
April 21, 2004, 03:54 |
Re: strain rate in UDF - please help
|
#5 |
Guest
Posts: n/a
|
Dear 2L,
I have written in the UDF the strain rate as you told me: "C_STRAIN_RATE_MAG(c,t)", but I have got an error: "Error:> (greater-than):invalid argument [2]: wrong type [not a number], Error Object: nan" Maybe have you got another advice? I also have tried to put under strain rate the velocity derivative as following: strain rate = sqrt(S*S) = sqrt[[C_DUDX(c,t)*(C_DUDX(c,t)+C_DUDX(c,t))]+[C_DUDY(c,t)*(C_DUDY(c,t)+C_DVDY(c,t))]+[C_DUDZ(c,t)*(C_DUDZ(c,t)+C_DWDZ(c,t))]+[C_DVDX(c,t)*(C_DVDX(c,t)+C_DUDY(c,t))]+[C_DVDY(c,t)*(C_DVDY(c,t)+C_DVDY(c,t))]+[C_DVDZ(c,t)*(C_DVDZ(c,t)+C_DWDY(c,t))]+[C_DWDX(c,t)*(C_DWDX(c,t)+C_DUDZ(c,t))]+[C_DWDY(c,t)*(C_DWDY(c,t)+C_DVDZ(c,t))]+[C_DWDZ(c,t)*(C_DWDZ(c,t)+C_DWDZ(c,t))]]; and of course: #include "mem.h" But the result was negative too, the same as above. If you know how can I ascribe the strain rate propertly in UDF, could you help me please? Thanks in advance Regards Paulina |
|
April 21, 2004, 04:18 |
Re: strain rate in UDF - please help
|
#6 |
Guest
Posts: n/a
|
Hello !
In my case, I used the VOF model and I wanted simply to define a power law viscosity. I have pasted here my code for viscosity. Hope it can help you. Good luck ! #include "udf.h" DEFINE_PROPERTY(viscosity, c, t) { real visco; visco = K*pow(C_STRAIN_RATE_MAG(c,t),n-1.); return visco; } |
|
April 24, 2004, 12:28 |
Re: strain rate in UDF - please help
|
#7 |
Guest
Posts: n/a
|
Hello,
Thank you for your advice. I tried your suggestion,but it didn't work. I am still looking for a proper symbol for strain rate. I have tried to calculate the value of the strain rate from the following equation, where strain rate has defined as: strain_rate(c,t) = sqrt[[C_DUDX(c,t)*(C_DUDX(c,t)+C_DUDX(c,t))+C_DUDY(c,t)* (C_DUDY(c,t)+C_DVDX(c,t))+C_DUDZ(c,t)*(C_DUDZ(c,t) +C_DWDX(c,t))]+ [C_DVDX(c,t)*(C_DVDX(c,t)+C_DUDY(c,t))+C_DVDY(c,t)* (C_DVDY(c,t)+C_DVDY(c,t))+C_DVDZ(c,t)*(C_DVDZ(c,t) +C_DWDY(c,t))]+ [C_DWDX(c,t)*(C_DWDX(c,t)+C_DUDZ(c,t))+C_DWDY(c,t)* (C_DWDY(c,t)+C_DVDZ(c,t))+C_DWDZ(c,t)*(C_DWDZ(c,t) +C_DWDZ(c,t))]]; But I have got also an error: "line 287: strain_rate: no function prototype, Error: Set_Thread_Variables: wta(real) Error Object: ((constant . 1) (profile " " " ")) Maybe have you got any suggestions? Once again thanks for answer. Best regards Paulina |
|
November 19, 2014, 05:09 |
vorticity rate/strain rate
|
#8 |
Member
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13 |
i want to write the UDF of the ratio
scale of voticity rate/scale of strain rate if anybody have an idea about UDF, please share this thanks |
|
November 19, 2014, 07:05 |
|
#9 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I have a great idea:
A = scale of vorticity rate; B = scale of strain rate; return(A/B); You just have to write the first two lines yourself. Please share your attempts to write this udf, so we can comment on it. That will work much better. |
|
November 19, 2014, 12:04 |
hi
|
#10 |
Member
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13 |
thanks pakk, after writing i will share UDF for your review.
|
|
November 19, 2014, 19:19 |
hi
|
#11 |
Member
Qureshi M Z I
Join Date: Sep 2013
Posts: 81
Rep Power: 13 |
hi, pakk, do u know the difference between "scale of strain rate" and strain rate. In CFD, word "Scale" is very common with various quantities, such as length scale, time scale or scale of vorticity etc if u know the meaning of "scale" regarding CFD, please share this.
thanks |
|
November 20, 2014, 04:06 |
|
#12 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
You are the one who wants the UDF. I can not tell you what you want to have. Maybe you want the magnitude? I don't know. You tell me!
If you don't know what you mean with your words, how should I know? Go back to the person who gave you these words. By the way: it would have made more sense if you would have asked the question about the meaning of "scale of strain rate" before you asked us to make the UDF. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF to measure Mass Flow Rate | a.lynchy | Fluent UDF and Scheme Programming | 31 | October 4, 2018 15:10 |
strain rate magnitude | ahmadbakri | STAR-CCM+ | 1 | June 3, 2010 14:03 |
UDF for the critical rate of strain. | cryogenicT | FLUENT | 0 | March 25, 2010 16:52 |
UDF for critical strain rate to extinction | Birute Bunkute | FLUENT | 1 | March 25, 2010 16:40 |
strain rate at arbitrary position in a cell | K. Kevala | FLUENT | 0 | February 4, 2004 18:14 |