2.3.31.  DEFINE_SOLIDIFICATION_PARAMS

2.3.31.1. Description

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.


2.3.31.2. Usage

DEFINE_SOLIDIFICATION_PARAMS (name, c, t, Amush, Gamma)

Argument Type

Description

symbol name

UDF name.

Int c

x Cell Index.

Thread*

Cell thread pointer.

real*Amush

Pointer to real having mushy zone constant.

Real*Gamma

Pointer to real for back diffusion parameter.

Function returns

void

2.3.31.3. Example

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);
 }

2.3.31.4. Hooking a Solidification Parameter UDF in ANSYS Fluent

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.


Release 18.2 - © ANSYS, Inc. All rights reserved.