CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   FORTRAN Routine - variable passing (

Malcolm August 11, 2005 13:23

FORTRAN Routine - variable passing

I am writing a FORTRAN routine (for use in cfx 5.7.1) and am confused about how variables are passed to it. It is similar to the example in the cfx manual "User CEL Example 1: User Defined Momentum Source" but a little more complicated.

From the user function editor I need to pass in: Temperature, y location, and z location. So in the arguments list box I have:

Argument List: [K], [m], [m]

Within the FORTRAN routine, I have it so that the lower level routine is called using:

CALL USER_NAME (NLOC,RET(1,1),ARGS(1,1),ARGS(1,2), ARGS(1,3)))

My confusion is regarding what ARGS(1,1), ARGS(1,2), ARGS(1,3) are. How does the FORTRAN routine know that I wanted ARGS's to be. (i.e. how do I pass the y and z locations rather than the x and y)

Any advice would be appreciated.

Malcolm August 11, 2005 18:51

Re: FORTRAN Routine - variable passing
Never mind.

I forgot that that the variable is defined where the subroutine is initially called.

All times are GMT -4. The time now is 08:42.