CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

how to call variables of CFX by FORTRAN

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2019, 09:55
Default how to call variables of CFX by FORTRAN
  #1
New Member
 
Join Date: Oct 2013
Posts: 16
Rep Power: 12
cscfx is on a distinguished road
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!
cscfx is offline   Reply With Quote

Old   June 10, 2019, 10:14
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,806
Rep Power: 32
Opaque will become famous soon enough
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', ...)
Opaque is offline   Reply With Quote

Old   June 11, 2019, 07:07
Default than you for your reply
  #3
New Member
 
Join Date: Oct 2013
Posts: 16
Rep Power: 12
cscfx is on a distinguished road
Quote:
Originally Posted by Opaque View Post
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', ...)
thank you for your reply,Opaque. i do as you said. there is part of my program, as you can see,in the source term,i used "Velo_water "as the water.velocity,is this right? the other variables deal with the same way, thanks!
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.
cscfx is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 10:14.