-
-
January 13, 2021 at 6:45 pmDinoSubscriberHi,nI have two species (air + CO2) and I want to calculate the density of CO2 as it varies with temperature from the equation of state through a UDF. The density of the mixture is set as Incompressible Ideal Gas. I need the density of CO2 to calculate the ppm(volume) of CO2.nCO2 is assigned as species 0.ndensity0 = P * MW0 / (R_universal * T)nmy question is, P here is the static pressure which I can call via C_P(c,t) or I need to do something with the operating pressure as well?nThanks!n
-
January 13, 2021 at 8:16 pmDinoSubscriberJust a clarification:nP is supposed to be the partial pressure, P_gas = P_air + P_CO2, so in the udf how can I call P_CO2?ndensity0 = P0 * MW0 / (R_universal * T). Does that mean I need to choose Ideal Gas not Incompressible Ideal Gas for the density of the mixture?n
-
January 14, 2021 at 4:53 pmKonstantinAnsys Employeein the ideal gas expression for density, P is the absolute pressure = gauge + operating. Fluent solves flow field variables, including pressure, for the mixture, so there is no separate variables for partial pressures. You can easily reconstruct partial pressures from mixture pressure and species mass fraction by taking a product of the two. n
-
January 14, 2021 at 8:43 pmDinoSubscriberThank you for your answer. So, Pi = Yi * P where Yi is the mass fraction of component i ? When I tried to prove it I found that Pi = Xi * P where Xi is the mole fraction. Is that correct?nIf the mole fraction is correct, is there a way to call a mole fraction of a single component within the UDF or I need to multiply the mass fraction by MW_mix/MW_i, where MW is the molar mass? Again, is there a way to call the MW_mix within the UDF since it is a variable that depends on the current mole fraction?nThank you for your help.
-
January 14, 2021 at 9:24 pmKonstantinAnsys Employeeindeed, I mistyped, this is mole fraction that should be used. Mole fraction will need to be constructed from mass fraction and molecular weight as you described. Molecular weights can be accessed in a UDF as shown in 2.5.6.3. Example of UDF manualn
-
January 15, 2021 at 1:52 pmRobForum ModeratorMole fraction is available directly in Fluent post processing, given that would a Custom Field Function do the job? n
-
January 15, 2021 at 6:22 pmDinoSubscriberThank you guys for your help. Yes, I think I can take this part out of the UDF and do it through a Custom Field. But I got really confused:nppm_volume = Y_i * rho_mixture * 10^6 / rho_inY_i is the mass fraction of component i. rho_i = P_i * MW_i / (R_universal * T) and rho_mixture = P MW_mixture / (R_universal * T). So, if we sub this in the ppm_volume formula, the whole thing vanishes and I get ppm_volume = 10^6. What mistake I am introducing here, please.nppm_volume by definition is the (V_i/V_mixture) * 10^6 but since we assume we have partial pressure so the V_i = V_mixture?nis there a way to call or post-processing the partial volume?nThank you,n
-
Viewing 6 reply threads
- The topic ‘Fluent – species – density – UDF’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Fluent fails with Intel MPI protocol on 2 nodes
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- error udf
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- UDF, Fluent: Access count of iterations for “Steady Statistics”
Top Contributors
-
1411
-
599
-
591
-
555
-
366
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.