|
[Sponsors] |
May 24, 2012, 11:20 |
User Fortran questions
|
#1 |
New Member
Join Date: Oct 2010
Posts: 29
Rep Power: 16 |
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 |
|
May 25, 2012, 06:20 |
|
#2 |
New Member
Join Date: Oct 2010
Posts: 29
Rep Power: 16 |
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? |
|
|
|
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 |