CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   === Using multiple POSDAT.F - simple trick === (http://www.cfd-online.com/Forums/cd-adapco/55034-using-multiple-posdat-f-simple-trick.html)

Murali November 29, 2005 06:09

=== Using multiple POSDAT.F - simple trick ===
 
There may be instances when the simulation may require multiple versions of POSDAT.F to be used. For example, one POSDAT.F may be used to calcualte and another used to print. Everytime copy pasting the code or renaming the files as POSDAT.F may be a little boring / inefficient. In stead the following procedure can be adopted:

Suppose you have posdat1.f and posdat2.f for 2 different purposes. Rename them as POSDAT1.TXT and POSDAT2.TXT and keep them in the ufile folder. In the original 'empty' POSDAT.F generated by STAR, use the follwoing line:

INCLUDE 'POSDAT1.TXT'

if you need to run the first job. this command automatically transfers the control to the POSDAT1.TXT. Mind that though they are named .txt they still need to be in proper fortran format. else, this will result in compilation error. Also they cannot have the extension '.f' because star tries to compile them as separate files and ends up giving an error.


Mahesh Masurkar November 29, 2005 08:15

Re: === Using multiple POSDAT.F - simple trick ===
 
Hi murali, this is good. Add this in wiki.

Ben November 29, 2005 12:33

Re: === Using multiple POSDAT.F - simple trick ===
 
I may be wrong but I am fairly certain that using include files is a fair bit slower than directly compiled objects


All times are GMT -4. The time now is 22:46.