-
-
February 29, 2024 at 12:17 pmguan shengyiSubscriber
Hi all
I am trying to use an UDF to define mass diffusion coefficients for fluid in the system.
I am attempting to redefine the fluid diffusion coefficient using `DEFINE_DIFFUSIVITY`, but I am encountering issues. My goal is to modify the diffusion coefficient based on a pressure condition using a scaling factor, and I am using `C_DIFF_EFF(c,t,i)` to retrieve the diffusion coefficient. However, when storing this value in a User-Defined Memory (UDMI) variable, it remains 0. Can you help me identify the issue? Below is my UDF.
DEFINE_DIFFUSIVITY(DD, c, t,i)/*two-phase fluid*/
{
real Kg;/*diffusion coefficient*/
if (C_P(c, t) < 20e+05)
{
Kg = 10e-20*C_DIFF_EFF(c, t, 1);
}
else if (C_P(c, t) > 20e+05)
{
Kg = C_DIFF_EFF(c, t, 1);
}
C_UDMI(c, t, 0) = C_DIFF_EFF(c, t, 1);
return Kg;
} -
March 4, 2024 at 12:32 pmSRPAnsys Employee
Hi,
I suggest you to initialized kg to zero and try to store the modified kg in UDMI.
-
March 4, 2024 at 1:12 pmRobForum Moderator
Duplicate /forum/forums/topic/define-mass-diffusion-coefficients-for-porous-media-and-multiphase/
-
- The topic ‘define mass diffusion coefficients for multiphase and porous media.’ is closed to new replies.
- Speed up simulation in HFSS
- Workbench license error
- ansys fluent error when opening it “unexpected license problem”
- Unexpected error on Workbench: Root element not found.
- not able to get result
- Unable to recover corrupted project in Workbench
- Unattended (silent) installation of 2024R2 & -productfile switch
- Unexpected issues with SCCM deployment of Ansys Fluids and Structures 2024 R1
- Questions and recommendations: Septum Horn Antenna
- AQWA: Hydrodynamic response error
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.