-
-
April 10, 2019 at 10:32 am
kadimtalebe
SubscriberHello everyone,
I want to calculate Age of Air in Ansys Fluent. I found this in UDF Manuel,
Â
"The following UDF, named mean_age_diff, computes the diffusivity for the mean age of air using a user-defined scalar. Note that the mean age of air calculations do not require that energy, radiation, or species transport calculations have been performed. You will need to set uds-0 =Â
 at all inlets and outlets in your model. This function can be executed as an interpreted or compiled UDF.
Â
Â
Â
Â
/**********************************************************************
UDF that computes diffusivity for mean age using a user-defined
scalar.
***********************************************************************/
#include "udf.h"
DEFINE_DIFFUSIVITY(mean_age_diff,c,t,i)
{
return C_R(c,t) * 2.88e-05 + C_MU_EFF(c,t) / 0.7;
}
"
I also changed some settings and you can see them below.Â
Â
I am not sure about the value which I wrote "1" in below
Â
Â
Is it enough?
-
April 10, 2019 at 1:11 pm
Amine Ben Hadj Ali
Ansys EmployeeYou need to provide the density of the material instead of one.
-
April 10, 2019 at 1:25 pm
kadimtalebe
SubscriberThank you very much for your reply Mr. Amine.
Â
Also, I found a way to calculate age of air in CFX with adding additional variable and subdomain. I modelled a simple geometry and tried to compare the results but results are different and results which i obtained from cfx are pretty good and more logical. I tried it with different geometries and CFX results are more accurate. What did I missed? why the results are different?
Best regards,
Â
Kadim.
-
April 10, 2019 at 2:35 pm
Amine Ben Hadj Ali
Ansys EmployeeI cannot tell you what you have missed if you do not add more details about the Fluent model. How different is different in your scale`?
-
September 28, 2020 at 3:58 pm
Holzmann
SubscriberHey there,nnmy name is Tobi. I do have some questions regarding the AoA calculation mentioned above. From my personal perspective, the equation given there is wrong. First of all, the air can exchange via advection and due to molecular transport phenomona. Hence, we do need both terms in our conservative equations. However, the diffusion of the air is basically the molecular viscosity of the air (at the cell temperature) plus the increase due t o turbulence. As we are using the Boussinesq Hypothesis + Reynolds Averaging method (bla blub), we end up with different turbulence models which at the end will just do one thing ... right, increase the viscosity. Therefore, in the diffusion equation we should have either:mu + mu_t or mu_eff. In the equation above we clearly find the effective viscosity (C_MU_EFF). The pre-term C_RHO * 2.88e-5 does not make any sense to me. However, it seems that it should be related to the molecular viscosity of air which is:density * kinematic viscosity. However, the kinematic viscosity is around 1.8 e-5. So I guess someone made a mistake here and everybody just re-used the same. nnNevertheless, as we already take the effecitve viscosity (which normally comes from the turbulence model), we should not include the first term and also there should be no need to divide the second part by the turbulent Prandtl number as is should be done in the turbulence class already. This seems to be a mistake that no-one resolved in public forums. Personally, I would identify the diffusion term that is given in this thread and also in the Ansys User-Guide to be wrong. It seems that the first term is the molecular viscosity of the fluid (with a wrong constant -> kinematic viscosity is 1.8e-5 rather than 2.8 e-5) and the second term should be the turbulent viscosity rather than the effective viscosity. At the end, the return function should be simply C_MU_EFF(c,t). As I cannot checkout the code of Fluent, it would be quite nice to get a feedback related to this topic.nnThank you in advance,nKind regards,nTobias Holzma -
September 29, 2020 at 10:53 am
Rob
Forum ModeratorBefore you remove the C_RHO term very carefully read the section in the manual on scalars and compare diffusion with the same equation for species. It is required, and it's covered in the theory guide. -
September 30, 2020 at 8:44 am
Holzmann
SubscriberHi Rob, nthank you for your reply. I guess you are an experienced numerical mathematician. So the equations are clear, right? The diffusion for air is simply the dynamic viscosity mu which is actually rho * kinematic one. Hence, if you just want to have the laminar or molecular viscosity without influence of the turbulent part, you can simply write C_RHO * kinematic viscosity. However, the kinematic viscosity should be 1.53e-5 and not 2.88e-5. It seems to be an typo here. The factor is 1.53 between these both values or recursive 0.65. As given in some papers, it is common practice to divide the molecular viscosity by the Schmidt number so the question would be why there is a Schmidt number of 0.65. nHowever, back to your comment. It is pure air which means the diffusion coefficient (without turbulence) should be equal to the dynamic viscosity. Which is around 1.8e-5 Pas. Or rho * kinematic = 1.19 kg/m³ x 1.533e-5 m²/s = 1.8e-5nMy quess is that here, we are taking a constant kinematic viscosity while incorporating temperature dependent density. However, this is just the first term. The second one should be either be only the turbulence one or if we are dealing with the effective viscosity (which should already include the molecular one), the first term should vanish.nMy statements are based on the fundamental equations we use, e.g., »Mathematics, Numerics, Derivations and OpenFOAM«.nI welcome any feedback from your side again Rob.nKind Regards,nTobiasn -
September 30, 2020 at 9:28 am
Rob
Forum ModeratorLook at what you're setting: diffusivity. Then consider that viscosity, density etc play a part in that. What are the material properties of a scalar? n -
September 30, 2020 at 12:12 pm
Holzmann
SubscriberHey Rob,I am not sure why your answers are kept short but I guess we misunderstand each other as I am not getting the meaning of your statement, e.g., what are the material properties of a scalar. A scalar is a dimensionless number in my opinion. The passive transport equation of the scalar mean-age-of-air has the unit seconds. Probably I don't get the wording as I am commonly using another software.nHowever, as I am not familiar how Fluent solves the passive transport equation (convective diffusion). So actually we solve this equation (its from my book, so no license problems)n
The diffusion coefficient D is for laminar air - flow the dynamic viscosity for air. If we are turbulent, we add the turbulent diffusion to the standard dynamic viscosity to get the increase mixing based on turbulence. So, if one solves for incompressible cases (no density changes), the dynamic viscosity is simply the kinematic one. However, calculation of the diffusion coefficient given in the first post here (which is also in the User Guide) calculates only the coefficient D.nThe second part of the return function is the effective viscosity (mu). As it is mu and not nu, the equations are not incompressible (no constant density). So please explain me why we have the first term? It is simply rho * nu = mu.nSo summing up:nrho * nu = munrho * nu + mu_eff / 0.7nmu_eff = mu + mu_tnSo in my opinion we end up with:nmu + (mu + mu_t)/0.7nConsidering the Schmidt number to be one we get:nmu + mu + mu_t = 2 mu + mu_tnWhich is in my opinion wrong, as we do have twice the molecular viscosity.nFurthermore, nu which is 2.88e-5 does not make sense to me. I am not aware of this factor. It does not have any meaning to me as it has no units in the equations. The only thing I can imagine is that the equations I am familiar with, are handled differently in fluent. Maybe somewhere the D factor is divided by rho, or what ever. However, both summands:nC_RHO * 2.88e-5nC_MU_EFFnNeed to have the same units. Rho has kg/m³, the C_MU_EFF (if it is the effective (dynamic) viscosity of the fluid) has Pas and hence, the factor 2.88e-5 should have m²/s. The factor 0.7 seems to be the Schmidt-Number (dimensionless).nn
-
September 30, 2020 at 1:05 pm
Rob
Forum ModeratorWe're not able to give detailed responses, or stray away from documentation or general knowledge as covered in the rules. Unfortunately this is heading beyond what we're allowed to cover. nComing back to your comments about the equation:carefully look at how SCALAR diffusion and SPECIES diffusion are covered in the documentation. There's a reason the UDF is coded the way it is. n -
October 1, 2020 at 4:36 pm
Holzmann
SubscriberHey Rob,nthanks for the comment. Wow, that i sad unfortunately. However, after calling the Fluent support, I got some feedback and I can also checkout the costumer area. Here one will find via residence time some points that go into the direction I mention here. Thank you for your kindness and (small) feedback nnTobin
-
- The topic ‘Age of Air’ is closed to new replies.
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- I am doing a corona simulation. But particles are not spreading.
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- Issue to compile a UDF in ANSYS Fluent
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
-
4167
-
1487
-
1363
-
1194
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.


