I compiled your code, but I am trying to use it for DEFINE_PROPERTY. For the error you get, I put mixture_domain=Get_Domain(1). It compiles and runs well
|
Quote:
|
The same problem !
Dear Ebrahim,
I have a same problem like your case and just my viscosity function is different. Did you solve your UDF's problem? I would be appreciated if you could help me on this. Thanks in advance, Ali |
Dear Ebrahim,
I have a same problem like your case and just my viscosity function is different. Did you solve your UDF's problem? I would be appreciated if you could help me on this. Thanks in advance, Ali |
The same problem !
Dear Ebrahim,
I have a same problem with you problem. Just my viscosity function is different. Did you solve the UDF's problem(viscous function vs volume of fraction)? I would be appreciated if you could help me on this. Thanks in advance, Ali Quote:
|
The solution was already given by Hossein Amini, just above your message.
If you are interested in what was the reason for the error message: the variable "mixture_domain" is defined, but never given a value. You ask the computer to say something about a mixture domain, but you don't tell him which mixture domain (even though you probably only have one), so Fluent is confused. |
Hi,
What is [**pt] in 6 line and[*] in 7 , 8 lines? Thanks, Ali Quote:
|
The star indicates that the variable is a pointer.
|
Add UDF in Fluent's materials section?
Hi All,
I wrote UDF code in Fluent and I added it instead of the constant amount of water viscosity, but I have not answered so far! Should special settings be made? Thanks, Ali |
I don't understand what you are asking.
|
Quote:
|
I have a twophase flow :
Water and a other fluid phase |
And you already wrote a UDF or not?
What is your problem? Do you not know how to write it? Or do you get errors? Or do you get unexpected results? If you want help, don't let us guess at what you are doing... |
Hi ali, as pakk said your question is bit unclear.
Please share your UDF, or maybe the function you are trying to code for the viscosity. In case you are getting unexpected results, please share the results and tell us why you think they are wrong. So, everyone will have a better understanding of the problem. cheers |
UDF for viscosity
3 Attachment(s)
Thank you for your reply.
I use a mix model that the water and the other phase (X) are mixed, which phase water and phase X have individual properties (density and viscosity). In the Inlet Boundary Condition, the phase X with a certain amount of volume of fraction (alphaX) is mixed with the water phase However, in different points of the domain and at different times, the volume of fraction of the X phase changes, and subsequently the viscosity of the mixed phase (m) also changes according to the formula: Viscosity (m) = 3.8 * viscosity (water) * (1-(alphaX/0.62))^(-1.55) Where, the viscosity function of the mixture phase (m) varies according to the volume of fraction (alpha X) of the phase X, and also the μc is the constant value of the viscosity of water. A very similar example to my problem that I found on the cfd-online site is as follows: https://www.cfd-online.com/Forums/fl...-fraction.html It is important that based on a study on related articles, I have to replace the UDF file on the constant amount of water viscosity in the Materials substitute of fluent to vary the viscosity of the mix phase at different points and at different times in the domain. Of course, I have already written three UDF codes, but I have not responded to any of these. Thank you in advance for your commenting on any of these fallowing codes: |
Hi,
Maybe you can use both Code:
DEFINE_ADJUST Code:
DEFINE_PROPERTY Code:
DEFINE_PROPERTY(viscosity_mix,c,t) hope it helps cheers! |
Thanks for your reply.
What do you mean by last statement: "Please remember to define a user define memory before compiling, because the values are stored in an UDM." How can I define a user define memory before compiling? I isn't professional in writing UDF!!! |
1 Attachment(s)
What numbers do I enter in this window?
|
If you want to have one User Defined Memory, change the first zero (0) into a one (1).
|
1 Attachment(s)
Quote:
As you see, In my case two fluids are mixed together: water and another fluid called ferrosilicon (Other than Air). In udf code that you wrote, how do I understand the software that the volume fraction (vof) is related to the ferrosilicon fluid? |
All times are GMT -4. The time now is 06:17. |