Go to the documentation of this file.
39#ifndef _3DICE_MACROS_H_
40#define _3DICE_MACROS_H_
60# define PI 3.14159265358979323846
69# define MAX(a,b) (((a) > (b)) ? (a) : (b))
78# define MIN(a,b) (((a) < (b)) ? (a) : (b))
88# define PARALLEL(x,y) (((x) * (y)) / ((x) + (y)))
101# define IS_CHANNEL_COLUMN(channel_model, column) \
103 (channel_model == TDICE_CHANNEL_MODEL_MC_4RM ? (column) & 1 : true)
129# define CCONV_MC_4RM(nchannels, vhc, fr) \
131 ((double) ((vhc * fr) / ((double) (nchannels * 2.0))))
158# define CCONV_MC_2RM(nchannels, vhc, fr, porosity, cell_l, channel_l) \
160 ((double) ( (vhc * fr * porosity * cell_l) \
161 / ( (double) nchannels * 2.0 * channel_l) ))
175# define CCONV_PF(vhc, darcy_velocity, cell_l, cavity_h) \
177 ((double) ((vhc * darcy_velocity * cell_l * cavity_h) / 2.0))
192# define EFFECTIVE_HTC_PF_INLINE(darcy_velocity) \
196 / pow((darcy_velocity/1e+06 + 1.35), 0.64) + 1.533e-06)))
207# define EFFECTIVE_HTC_PF_STAGGERED(darcy_velocity) \
211 / pow((darcy_velocity/1e+06 + 1.35), 1.52) + 1.533e-06)))
221# define FLOW_RATE_FROM_MLMIN_TO_UM3SEC(fr) (( fr * 1e+12 ) / 60.0)
231# define FLOW_RATE_FROM_UM3SEC_TO_MLMIN(fr) (( fr * 60.0 ) / 1e+12)
240# define POROSITY(diameter, pitch) \
242 (1.0 - (PI * diameter * diameter / 4.0) / (pitch * pitch))
251# define DIAMETER(porosity, pitch) \
253 (sqrt (( (1.0 - porosity) * pitch*pitch * 4.0 ) / PI ))