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

Fortran user routine getvalue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2018, 11:07
Default Fortran user routine getvalue
  #1
Member
 
cfxtwophaseflow
Join Date: Aug 2017
Posts: 46
Rep Power: 9
sarrazs is on a distinguished road
I need to include the "Current Iteration Number" in the pt_mom_source.F file as an integer.
I tried to add it as an argument for the pt_mom_source function. But all arguments in the function are put in the same array and they are declared as real.
Is there any way to get it but not by adding it to the argument list? I definitely need it as an integer.
I know that there is a defined function in cfx "get_var" but I'm not sure that it can work in a Fortran user routine.

Last edited by sarrazs; March 14, 2018 at 12:26.
sarrazs is offline   Reply With Quote

Old   March 15, 2018, 02:16
Default
  #2
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22
Lance is on a distinguished road
this is what I do to get ATSTEP (accumulated time step)
Code:
      CALL USER_GET_TRANS_INFO(ROUTIN,'GET',' ',CZ,DZ,IZ,LZ,RZ)
      CALL PEEKI('/USER/TRANS_INFO/ATSTEP',1,ATSTEP,'STOP',CRESLT,IZ)
      CALL USER_GET_TRANS_INFO(ROUTIN,'RELEASE',' ',CZ,DZ,IZ,LZ,RZ)
and ATSTEP is defined as an integer. I guess you could do the same for CITERN.
Lance is offline   Reply With Quote

Old   March 15, 2018, 09:59
Default
  #3
Member
 
cfxtwophaseflow
Join Date: Aug 2017
Posts: 46
Rep Power: 9
sarrazs is on a distinguished road
Quote:
Originally Posted by Lance View Post
this is what I do to get ATSTEP (accumulated time step)
Code:
      CALL USER_GET_TRANS_INFO(ROUTIN,'GET',' ',CZ,DZ,IZ,LZ,RZ)
      CALL PEEKI('/USER/TRANS_INFO/ATSTEP',1,ATSTEP,'STOP',CRESLT,IZ)
      CALL USER_GET_TRANS_INFO(ROUTIN,'RELEASE',' ',CZ,DZ,IZ,LZ,RZ)
and ATSTEP is defined as an integer. I guess you could do the same for CITERN.
Thank you very much Lance, I will try this solution.
I have another question please.
Do you know how can I get the Particle Track Number? I want to use it in the pt_mom_source.F. In fact every time that the code calculate the momentum source it needs to identify the bubble on which it is calculating the force.
sarrazs 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
CFX User Fortran: Particle User Sources hustxinxin CFX 0 March 8, 2012 09:37
CFX User Fortran: Particle User Sources hustxinxin CFX 0 March 8, 2012 09:31
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 01:52
Context of user fortran functions Bloshchitsyn Vladimir CFX 0 October 17, 2007 07:28
CFX 10 User Routine NOT in Fortran Andre CFX 14 August 9, 2006 00:03


All times are GMT -4. The time now is 21:41.