You can use DEFINE_SOLIDIFICATION_PARAMS to specify user-defined mushy zone parameters and back diffusion
parameters. See Modeling Solidification and Melting in the User's Guide for more
information on the solidification and melting model.
Important: The back diffusion parameter is only used if the Back Diffusion option is enabled in the Solidification and Melting dialog box.
DEFINE_SOLIDIFICATION_PARAMS (name, c, t, Amush, Gamma)
|
Argument Type |
Description |
|---|---|
|
|
UDF name. |
|
|
x Cell Index. |
|
|
Cell thread pointer. |
|
|
Pointer to real having mushy zone constant. |
|
|
Pointer to real for back diffusion parameter. |
Function returns
void
The following UDF, named user_soild_params, specifies the mushy zone and uses the Clyne Kurz model for the
back diffusion parameter.
#include "udf.h"
DEFINE_SOLIDIFICATION_PARAMS(user_solid_params, c,t,Amush,Gamma)
{
real alpha ;
real local_solidification_time = 1. ;
real sec_arm_spacing = 5e-5 ;
real solid_diff = 1e-10 ; /*solid diffusivity m2/s */
*Amush = 1e+6 ;
alpha = 4. * solid_diff*local_solidification_time/SQR(sec_arm_spacing);
*Gamma = 2.*alpha/(1.+2.*alpha);
}
After the UDF has been interpreted (Interpreting UDFs) or compiled (Compiling UDFs), the name of the argument that
you supplied as the first DEFINE macro argument
(eg., user_solid_params) will become visible
in the Solidification and Melting dialog box
in ANSYS Fluent. See Hooking DEFINE_SOLIDIFICATION_PARAMS UDFs for
details.