How to call mixture properties in a UDF
Hello,
I have a simple question. I am writing an UDF to calculate MIXTURE viscosity. But i need to call the MIXTURE DENSITY data somehow. Does anyone know how to include MIXTURE PROPERTIES in a UDF as a macro ? ( such as mixture density, mixture specific heat etc. ) Or, perhaps, does C_R(c,t) do exactly that ? Also is it possible to call species critical properties into an UDF to use in mixture rule combinations ? Thanks in advance. Alper |
Hi,
if you are using Code:
DEFINE_ADJUST Code:
DEFINE_ADJUST(my_adjust,mixture_domain) |
Quote:
I am using a real-gas model (not UDF, Redlich Kwong in FLUENT) for mixture density. Isn't there a way to simply call the cell mixture density ? Because with DEFINE_ADJUST, i would calculate a mixture property that is already calculated by FLUENT itself each time. Am i wrong ? Same thing also goes for mixture critical temperature, volume and constant volue specific heat too. There is no macro to call them from mixture domain to use directly ? Best Regards. |
Hi,
If I understand the question, you can probably export the solution data into any file formats that you'd like. File>Export>Solution data... Also, take a look at this page. Cheers! |
No, exporting data once the solution is converged is not the problem. Problem is as follows :
* I am trying to simulate a real-gas reacting flow and trying to define a composition-dependent MIXTURE VISCOSITY via a UDF . (Chung et al. method) * In order to do so, i need to obtain MIXTURE DENSITY somehow. Using DEFINE_ADJUST, as you suggested earlier, is an option but FLUENT already calculates the MIXTURE DENSITY by itself when i choose the real-gas model in mixture box. I am simply trying to obtain the mixture density in each cell, that is calculated by FLUENT, to calculate the MIXTURE VISCOSITY. ( Mixture density is a parameter in the formulation ) I hope it is more clear now. Can it be helped ? :) Best Regards. |
Have you tried something simple like this:
Code:
DEFINE_PROPERTY(myViscosity,c,t) |
Hello Sun,
I used C_R(c,t) for mixture density and menage to compile the code successfully after spending a week for editing bugs. I think it will work fine because i double-checked the code with MATLAB to see if the values are in agreement with similar academic papers. I will share the work once i validete it with an combustion case and share the results. By the way, is there list for PROP_ values for mixture species ? PROP_rho, PROP_mu, PROP_ktc and PROP_mwi are provided in the UDF Manual but i think critical properties for mixture species are accessible too. Regards. |
Glad to hear that everything worked out fine. :)
I am not sure if there is list for that. I usually use UDF manual to find out what macro I need. Looking forward to see the results good luck! |
same problem
Quote:
Hello dear Refik I have the same problem and i cant find pure and mixture density function for UDF. would you please help me? thank you so much |
Quote:
Well C_R indeed returns the mixture density as explained earlier. I assume by "pure" you mean species-density, for which you'll have to formulate a UDF. But i reckon you have very little use for species-density if you are working with turbulent flow. |
Udf
Quote:
Would you please let me see your UDF ? Because i want to calculate mixture gas viscosity like you. Best regards |
All times are GMT -4. The time now is 11:08. |