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

User Fortran questions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2012, 11:20
Default User Fortran questions
  #1
New Member
 
Join Date: Oct 2010
Posts: 29
Rep Power: 16
Silmaril is on a distinguished road
Is it possible to use OPEN, WRITE fortran commands in junction box routines?

In particular, I would like to open (create if not present) a text file where I can write down some data. I tried to make OPEN and WRITE callings within a junction box routine, the solver shows no problem running and presumably the junction box calling was successful, but unfortunately no file was created with the specification given in the OPEN statement.
I tried the same statements within a CEL routine and this time the file was created with the correct written data.

these are the lines for testing this problem (I simply added them to the jcb_template.F that can be found in ANSYS examples):

C-------------------------------------------------------------------------
OPEN(UNIT=35,STATUS='UNKNOWN',FILE='E:\Work\Work_C FX\test.txt')
C
WRITE(UNIT=35,FMT=*) 'test'
C
CLOSE(UNIT=35)
C-------------------------------------------------------------------------

the same lines where implemented also in the TStat_control.F file for the HVAC tutorial (USER CEL ROUTINES) and here they give the right result.

Any suggestion?

Thanks in advance

Lorenzo
Silmaril is offline   Reply With Quote

Old   May 25, 2012, 06:20
Default
  #2
New Member
 
Join Date: Oct 2010
Posts: 29
Rep Power: 16
Silmaril is on a distinguished road
I also tried to make a CALL for MESAGE inside the junction box routine, it doesn't write anything in the output file (standard output), while if called inside the CEL fortran routine it works.
At this point I think that the junction box is not even opened, even if defined in the .def file....... In this case an error message is not going to show?
Silmaril 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
Particle Transport & Termination Control with User FORTRAN Julian K. CFX 3 January 12, 2012 10:48
Context of user fortran functions Bloshchitsyn Vladimir CFX 0 October 17, 2007 07:28
CFX arc-modeling, User Fortran, CEL.... Bloshchitsyn Vladimir CFX 2 October 15, 2007 10:29


All times are GMT -4. The time now is 18:58.