|
[Sponsors] |
June 10, 2019, 09:55 |
how to call variables of CFX by FORTRAN
|
#1 |
New Member
Join Date: Oct 2013
Posts: 16
Rep Power: 12 |
hello,everybody,i want to implant a transport equation to CFX, and i add a additional variable to CFX,and the source terms of the transport equation are related to variables of CFX,such as velocity,volume fraction,density.etc. so i write the sources by Fortran language,but i did not know how to calling the variables(such as velocity,volume fraction,density),anybody can give me some help? thanks a lot! I've been puzzled by this question for a long time. i sincerely hope you can give me some helps!
|
|
June 10, 2019, 10:14 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,806
Rep Power: 32 |
Have you done the user Fortran tutorial for sources?
Please search the ANSYS CFX documentation for USER_GETVAR utility, which give you access to variables using the same syntax as used in the expression language, i.e. CEL. For example, if you need velocity, you use something along CALL USER_GETVAR( 'Velocity', ...) |
|
June 11, 2019, 07:07 |
than you for your reply
|
#3 | |
New Member
Join Date: Oct 2013
Posts: 16
Rep Power: 12 |
Quote:
CALL USER_GETVAR( 'water.Velocity', ...pVelo_water,..) ,in source term,when i want to use water.Velocity,i just need to use "Velo_water",is this right? do ILOC=1,NLOC source(ILOC)=2.0/3.0*Velo_water(ILOC) END do sorry ,the picture can not be inserted. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
User Fortran with CFX 14.5.7 on winnt_amd64 | HLo | CFX | 22 | December 13, 2015 08:26 |
Call Fortran program from OpenFoam | tsjb00 | OpenFOAM Running, Solving & CFD | 6 | April 22, 2013 15:26 |
Call CFX from MATLAB | alikhube | CFX | 7 | December 30, 2012 06:35 |
How to call FORTRAN files as UDF? | Ehsan-F | Fluent UDF and Scheme Programming | 6 | September 11, 2012 11:03 |
a fortran problem in CFX | Roy | CFX | 3 | November 14, 2002 08:17 |