0% found this document useful (0 votes)
158 views4 pages

Appendix A.: DEFINE Macro Definitions

The document defines macros for writing user-defined functions (UDFs) in Fluent. It provides macros for general solver functions, model-specific functions, multiphase functions, and discrete phase model (DPM) functions. The macros specify the required arguments and return types for each type of UDF.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views4 pages

Appendix A.: DEFINE Macro Definitions

The document defines macros for writing user-defined functions (UDFs) in Fluent. It provides macros for general solver functions, model-specific functions, multiphase functions, and discrete phase model (DPM) functions. The macros specify the required arguments and return types for each type of UDF.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Appendix A.

A.1

DEFINE Macro Denitions

General Solver DEFINE Macros

The following denitions for general solver DEFINE macros (see Section 4.2) are taken from the udf.h header le. #define DEFINE_ADJUST(name, domain) \ void name(Domain *domain) #define DEFINE_INIT(name, domain) \ void name(Domain *domain) #define DEFINE_ON_DEMAND(name) \ void name(void) #define DEFINE_RW_FILE(name, fp) \ void name(FILE *fp)

A.2

Model-Specic DEFINE Macros

The following denitions for model-specic DEFINE macros (see Section 4.3) are taken from the udf.h header le. #define DEFINE_CG_MOTION(name, dt, vel, omega, time, dtime) \ void name(void *dt, real vel[], real omega[], real time, real dtime) #define DEFINE_DIFFUSIVITY(name, c, t, i) real name(cell_t c, Thread *t, int i) #define DEFINE_GEOM(name, d, dt, position) \ void name(Domain *d, void *dt, real *position) #define DEFINE_GRID_MOTION(name, d, dt, time, dtime) \ void name(Domain *d, void *dt, real time, real dtime) #define DEFINE_HEAT_FLUX(name, f, t, c0, t0, cid, cir) \ void name(face_t f, Thread *t, cell_t c0, \ Thread *t0, real cid[], real cir[]) #define DEFINE_NOX_RATE(name, c, t, NOx) \ void name(cell_t c, Thread *t, NOx_Parameter *NOx) #define DEFINE_PROFILE(name, t, i) \ void name(Thread *t, int i) #define DEFINE_PROPERTY(name, c, t) \ real name(cell_t c, Thread *t)

c Fluent Inc. November 29, 2001

A-1

DEFINE Macro Denitions

#define DEFINE_SCAT_PHASE_FUNC(name, c, f) \ real name(real c, real *f) #define DEFINE_SOURCE(name, c, t, dS, i) \ real name(cell_t c, Thread *t, real dS[], int i) #define DEFINE_SR_RATE(name, f, t, r, mw, yi, rr) \ void name(face_t c, Thread *t, \ Reaction *r, real *mw, real *yi, real *rr) #define DEFINE_TURB_PREMIX_SOURCE(name, c, t, turbulent_flame_speed, source) \ void name(cell_t c, Thread *t, real *turbulent_flame_speed, real *source) #define DEFINE_TURBULENT_VISCOSITY(name, c, t) real name(cell_t c, Thread *t) #define DEFINE_UDS_FLUX(name, f, t, i) \ real name(face_t f, Thread *t, int i) #define DEFINE_UDS_UNSTEADY(name, c, t, i, apu, su) \ void name(cell_t c, Thread *t, int i, real *apu, real *su) #define DEFINE_VR_RATE(name, c, t, r, mw, yi, rr, rr_t) \ void name(cell_t c, Thread *t, \ Reaction *r, real *mw, real *yi, \ real *rr, real *rr_t)

A-2

c Fluent Inc. November 29, 2001

A.3 Multiphase DEFINE Macros

A.3

Multiphase DEFINE Macros

The following denitions for multiphase DEFINE macros (see Section 4.4) are taken from the udf.h header le. #define DEFINE_CAVITATION_RATE(name, c, t, p, rhoV, rhoL, vofV, p_v, n_b, m_dot) \ void name(cell_t c, Thread *t, real *p, real *rhoV, real *rhoL, real *vofV, \ real *p_v, real *n_b, real *m_dot) #define DEFINE_DRIFT_DIAM(name, c, t) \ real name(cell_t c, Thread *t) #define DEFINE_EXCHANGE_PROPERTY(name, c, mixture_thread, \ second_column_phase_index, first_column_phase_index) \ real name(cell_t c, Thread *mixture_thread, int second_column_phase_index,\ int first_column_phase_index) #define DEFINE_VECTOR_EXCHANGE_PROPERTY(name, c, mixture_thread, \ second_column_phase_index, first_column_phase_index, vector_result) \ void name(cell_t c, Thread *mixture_thread, int second_column_phase_index,\ int first_column_phase_index, real *vector_result)

A.4

Discrete Phase Model DEFINE Macros

The following denitions for DPM DEFINE macros (see Section 4.5) are taken from the dpm.h header le. Note that dpm.h is included in the udf.h header le. #define DEFINE_DPM_BODY_FORCE(name, p, i) \ real name(Tracked_Particle *p, int i) #define DEFINE_DPM_DRAG(name, Re) \ real name(real Re) #define DEFINE_DPM_SOURCE(name, c, t, S, strength, p) \ void name(cell_t c, Thread *t, dpms_t *S, \ real strength, Tracked_Particle *p) #define DEFINE_DPM_PROPERTY(name, c, t, p) \ real name(cell_t c, Thread *t, Tracked_Particle *p) #define DEFINE_DPM_OUTPUT(name, header, fp, p, t, plane) \ void name(int header, FILE *fp, \ Tracked_Particle *p, Thread *t, Plane *plane) #define DEFINE_DPM_EROSION(name, p, t, f, normal, alpha, Vmag, mdot) \ void name(Tracked_Particle *p, Thread *t, \ face_t f, real normal[], real alpha, \ real Vmag, real mdot) #define DEFINE_DPM_SCALAR_UPDATE(name, c, t, initialize, p) \ void name(cell_t c, Thread *t, int initialize, \ Tracked_Particle *p)

c Fluent Inc. November 29, 2001

A-3

DEFINE Macro Denitions

#define DEFINE_DPM_LAW(name, p, ci) void name(Tracked_Particle *p, int ci) #define DEFINE_DPM_SWITCH(name, p, ci) \ void name(Tracked_Particle *p, int ci) #define DEFINE_DPM_INJECTION_INIT(name, I) \ void name(Injection *I)

A-4

c Fluent Inc. November 29, 2001

You might also like