CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CD-adapco

file call

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 17, 2003, 11:29
Default file call
  #1
CMB
Guest
 
Posts: n/a
Hi,

This is a problem that is more related to Fortran than to star cd I guess, but here it is: I have two sets of cells separated from one another. In POSDAT I constructed two separate lists of cell numbers and centroids of these cells e.g. IP1, IP2 and CX1 and CX2, then I calculated the list of matched cells MATCH12, i.e. MATCH12(7,1) is the prostar cell number of the type 1 in pair 7. And then I wrote that list to a file, so that it could be accessed directly from another subroutine before POSDAT is called for restart runs, with:

OPEN (101,File='Match.list')

DO IM=1,ICOUNT5

write (101,*) IM,MATCH12(IM,1),MATCH12(IM,2)

END DO

close (101) Now, my question is how do I open this file when I would like to access this list in another subroutine, I know this should be very basic but I am a preety bad programer.

Many thanks
  Reply With Quote

Old   October 17, 2003, 12:05
Default Re: file call
  #2
jimbob
Guest
 
Posts: n/a
Hi Carlos,

I think you should invest in a book on fortran! Once you have created your file, you can open it in the same way you did before; open (101,file='Match.list') and then read the data from the file.

If you want to be safe, use "inquire" to check if the file is there.

If you want to pass information from one subroutine to anther, during the same simulation, look into using "common" blocks. Cheers.
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
call for help sihat FLUENT 1 October 9, 2007 05:53
Call of Ratusr.f jojo CD-adapco 6 October 17, 2005 14:33
Call for papers Steve Zhang Main CFD Forum 0 December 7, 2001 10:46
Call for Papers Alton J. Reich Main CFD Forum 0 November 16, 2000 11:01
Call for Papers Tom Gutjahr CD-adapco 0 April 28, 2000 06:42


All times are GMT -4. The time now is 17:32.