|
[Sponsors] |
March 30, 2004, 18:35 |
Why I can't read one external file?
|
#1 |
Guest
Posts: n/a
|
Dear all,
I tried to read some external filw which includ the pressure data in the subroutine 'bcdefp.f'by using the command 'read', but I found I coulnd't read that external file and couldn't run the model, Star always gives a wrong message, like list in:end of file -1 apparent state: unit 16 named ***file.dat last format:list io unit 16 is a sequential formatted external file Excution terminated I put the external file in the same fold as bcdefp.f as well as in the folder in which .mdl etc. files are So how can I solve this problem? I have to use that pressure data file and I am eager to solve that problem. Thank you very much for your regards! Lee |
|
March 30, 2004, 19:57 |
Re: Why I can't read one external file?
|
#2 |
Guest
Posts: n/a
|
Either you forgot to use an "open" statement before your read or you are not reading the data with the same format its written in.
|
|
March 30, 2004, 20:14 |
Re: Why I can't read one external file?
|
#3 |
Guest
Posts: n/a
|
Anyway, thank you very much, Steve!
But I have to point out that I really used the command 'open' to open that file and I used the same format to read it as the format that file was written in. I don't know what's the reason to cause that problem. |
|
March 31, 2004, 01:58 |
Re: Why I can't read one external file?
|
#4 |
Guest
Posts: n/a
|
Write a small fortran program which reads the file and prints the values on the screen. Once this is working put that coding in the subroutine.
|
|
April 1, 2004, 06:18 |
Re: Why I can't read one external file?
|
#5 |
Guest
Posts: n/a
|
but how to execute that subroutine in starcd? As per my impression only star subroutines which are defined by their names are executed in prostar.
|
|
April 1, 2004, 07:17 |
Re: Why I can't read one external file?
|
#6 |
Guest
Posts: n/a
|
it sound like you have a small problem in reading you data reading. a simple, yet very powerfull tools for debugging is read few lines and print them on the sreen with:
write(*,*) you can also use the command STOP the error "ends..." you getting means that the Nbre of cells you trayng to read NCELL in the loop is bigger than the lines in your file (or some thing in this sence) |
|
April 1, 2004, 08:45 |
Re: Why I can't read one external file?
|
#7 |
Guest
Posts: n/a
|
What file unit did you use to open your file? Maybe it's one already used by STAR-CD.
|
|
April 2, 2004, 13:25 |
Re: Why I can't read one external file?
|
#8 |
Guest
Posts: n/a
|
I would be cautious in using low unit numbers. The safe units are 80 and above, 16 can be used by the code for various stuff
Philip |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
using UDF to read file | Ellen | FLUENT | 5 | November 25, 2008 18:38 |
Read external data(profile) | Davide, SUN | FLUENT | 1 | May 16, 2008 06:47 |
Reg: PLOT-FILE-external file -??extension | chakradhar | FLUENT | 1 | February 11, 2007 14:58 |
UDF Read external File problem | guru | FLUENT | 1 | September 15, 2004 07:24 |
Read file | RBM | FLUENT | 0 | July 14, 2002 14:48 |