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

parameter file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2003, 07:47
Default parameter file
  #1
CMB
Guest
 
Posts: n/a
Hi, when defining parameters in a .dat file via a macro and setting it in the working directory, how can you call this from a subroutine. That is if I set a parameter in a macro by $*set,pi,3.14159, then, clearing all graph registers and reseting all graphical variables and logicals to default values via 'gres'. Storing pi parameter in a graph register, say: gparam,pi,1,1 -register and location number 1. Then using 'sdat' to save this graph register into file 'parameter.dat'. Now that I have my parameter in this file, how can I call it form a subroutine? regards, CM
  Reply With Quote

Old   December 15, 2003, 10:01
Default Re: parameter file
  #2
Richard
Guest
 
Posts: n/a
Assuming there is nothing in the parameter.dat file except the value of the parameter, you just need to open the file and read in the value:

open(85,file='parameter.dat',status='old') read(85,*) pi close(85)
  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
Kinetik parameter for CO + 0.5 02 -> CO2 Martin CFX 0 January 26, 2006 09:30
ADI-SOR relaxation parameter Mohsen Main CFD Forum 0 November 14, 2005 22:53
how to resize the parameter file param.prp ztdep Siemens 2 October 27, 2005 09:31
NFMAX parameter Sileno Phoenics 2 January 12, 2005 05:42
how to use the parameter of LU-SGS methold akangk Main CFD Forum 8 July 31, 2002 22:39


All times are GMT -4. The time now is 19:57.