CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Calling CEL values in FORTRAN (https://www.cfd-online.com/Forums/cfx/23536-calling-cel-values-fortran.html)

Rob January 16, 2007 13:01

Calling CEL values in FORTRAN
 
Hi all, does anyone know if there is a data aquision routine in fortan, that i can use to call values stored as CEL expressions? i have tried using 'CALL USER_GETVAR' but with no luck, if anyone can help, possibly with a small example? that would be great!

Thanks everyone!

Rob.

opaque January 16, 2007 14:17

Re: Calling CEL values in FORTRAN
 
Dear Rob,

Do you mean constants added to the LIBRARY section? Like in

LIBRARY:

CEL:

EXPRESSIONS:

my_c1 = 1

my_c2 = 2

my_c3 = my_c1 * my_c2

END

END

END

Do you want access to either of the 3 variables?

Sorry, the ANSYS CFX solver does not keep those constants around after the run starts. They are preprocessed and thrown away..

However, if you stored your constants (not expressions) in the USER section, you can use USER_PEEKx (see documentation) to access those.

Opaque.


Rob January 19, 2007 07:56

Re: Calling CEL values in FORTRAN
 
Thanks Opaque, i have done as you suggested and it works great. However, i have a few new issues.. i am also trying to call the timestep into the fortran (value in seconds) which i believe is DTSTEP, although the help files dont specify this exactly. I am already using CALL_TRANS_INFO, to call ATSTEP, the current timestep number, but the same call for DTSTEP doesnt work. Also i would liek to call the angular velocity of the component into fortran, but i cant find any information on this. If u can help with any of these i would be very grateful.

Thanks again for your help!

Rob

opaque January 19, 2007 09:38

Re: Calling CEL values in FORTRAN
 
Dear Rob,

If you need the time step (delta t), the internal name is DT no DTSTEP.. That may be your problem.

With respect to the angular velocity (you are using rotating frame right?), the memory location is not documented and unfortunately user_get_phys_info does not copy the information to the USER directory.

Could you share why do you want to access the angular velocity, or how do you plan to use it?

Opaque.



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