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

Why I can't read one external file?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2004, 18:35
Default Why I can't read one external file?
  #1
Lee
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

  Reply With Quote

Old   March 30, 2004, 19:57
Default Re: Why I can't read one external file?
  #2
steve
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.
  Reply With Quote

Old   March 30, 2004, 20:14
Default Re: Why I can't read one external file?
  #3
Lee
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.
  Reply With Quote

Old   March 31, 2004, 01:58
Default Re: Why I can't read one external file?
  #4
Jörn Beilke
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.
  Reply With Quote

Old   April 1, 2004, 06:18
Default Re: Why I can't read one external file?
  #5
dan
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.
  Reply With Quote

Old   April 1, 2004, 07:17
Default Re: Why I can't read one external file?
  #6
yacine
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)

  Reply With Quote

Old   April 1, 2004, 08:45
Default Re: Why I can't read one external file?
  #7
Steve
Guest
 
Posts: n/a
What file unit did you use to open your file? Maybe it's one already used by STAR-CD.
  Reply With Quote

Old   April 2, 2004, 13:25
Default Re: Why I can't read one external file?
  #8
Philip Jones
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
  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
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


All times are GMT -4. The time now is 01:45.