fortran cfx tutorial - Tutorial for using Fortran codes in ANSYS CFX

Page 1 of 2

# Include "cfd_constants.h" CC ------------------------------ C Argument list C -------- ---------------------- C INTEGER narg,
NRET, NLOC C REAL ARG (NLOC, Gran), RET (NLOC, NRET) xxxvi

# Include "cfd_constants.h" xxxvii

DC ------------------------------ C Argument list C --------------- --------------- C REAL EROSION, ANGLE, VEL_PT (3) CC
---------------- ------ C ------------------------------ C C Local variables REAL RT, VP, K2, K12, V1, V2, V3, ANGLE_MAX_RAD,
ANGLE_MAX, ANGLE_DEG, F, DC SPEED ------------------------------ C C Executable statements -----------------------------ANGLE_MAX = 25.0 C = ANGLE_MAX_RAD ANGLE_MAX * pi/180. K12 = 0.585 159.1 = V1 V2 V3 = 194.75 = 190.5 C
= ANGLE_DEG ANGLE * 180./PI VEL C = SQRT (VEL_PT (1) ** 2 + VEL_PT (2) ** 2 + VEL_PT (3) ** 2) C VP =
((VEL/V2) * SIN (ANGLE)) ** 4 C RT = 1 - (VEL/V3) * SIN (ANGLE) C IF (ANGLE_DEG. LE. ANGLE_MAX) THEN ELSE
K2 K2 = 1.0 = 0.0 ENDIF CF = (1 + K2 * K12 * SIN (ANGLE * (PI / 2) / ANGLE_MAX_RAD)) ** 2 EROSION C = (F *
((VEL/V1) ** 2) * (COS (ANGLE) ** 2) * (1-RT ** 2) + VP) / 1000. C END

For simple conference, the definitions of the commands in CFX were as follows:

USER ROUTINE: myerosion

Calling Name = Name = erosion_tabakoff erosion_tabakoff Library Library Path = C: \ PIPE VALVE EROSION_tabakoff
Option = Particle User Routine END END END FLOW: Flow Analysis 1 SOLUTION UNITS:

Angle Units = [rad] Length Units = [m] Mass Units = [kg] Solid Angle Units = [sr] Temperature Units = [K] Time Units = [s]
END ANALYSIS TYPE:

Option = Steady State EXTERNAL SOLVER COUPLING:

Option = None END xxxviii

END DOMAIN: Default Domain

Coord Frame = Coord 0 Domain Type = Fluid Location = B1.P3 BOUNDARY: Default Domain Default

Boundary Type = WALL Location = \ F1.B1.P3, F10.B1.P3, F11.B1.P3, F12.B1.P3, F2.B1.P3, F6.B1.P3, F7.B1.P3, F8 . \
B1.P3, F9.B1.P3 BOUNDARY CONDITIONS: MASS AND MOMENTUM:

Option = No Slip Wall END WALL ROUGHNESS:

http://translate.googleusercontent.com/translate_c?depth=1&hl=en&ie=UTF8&prev=... 29-08-2013

com/translate_c?depth=1&hl=en&ie=UTF8&prev=. Sand Fully Coupled.0 Coefficient of Restitution = 0.0 Coefficient of Restitution = 0.. 29-08-2013 .Velocity Particle User Routine = myerosion Particle Interaction Wall Return Variables List = Particle Erosion END WALL PARTICLE INTERACTION: Option = Equation Dependent END VELOCITY: Option = Coefficient Restitution Coefficient of Restitution Parallel Perpendicular = 1.Particle Impact \ Angle.Velocity Particle User Routine = myerosion Particle Interaction Wall Return Variables List = Particle Erosion END WALL PARTICLE INTERACTION: Option = Equation Dependent END VELOCITY: Option = Coefficient Restitution Coefficient of Restitution Parallel Perpendicular = 1. Sand One Way Coupled.9 END END END FLUID: Sand One Way Coupled BOUNDARY CONDITIONS: EROSION MODEL: Option = User Defined END USER WALL PARTICLE INTERACTION: Argument Variables List = Sand One Way Coupled.9 END END END END http://translate..Tutorial for using Fortran codes in ANSYS CFX Page 2 of 2 Option = Smooth Wall END END FLUID: Sand Fully Coupled BOUNDARY CONDITIONS: EROSION MODEL: Option = User Defined END USER WALL PARTICLE INTERACTION: Argument Variables List = Sand Fully Coupled.googleusercontent.Particle Impact \ Angle.fortran cfx tutorial .

Sign up to vote on this title
UsefulNot useful