CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Phoenics (http://www.cfd-online.com/Forums/phoenics/)
-   -   User defined subroutine in Ground (http://www.cfd-online.com/Forums/phoenics/52011-user-defined-subroutine-ground.html)

Sanjay February 13, 2006 12:33

User defined subroutine in Ground
 
I need to introduce a subroutine in Ground which I would like to call in different groups of ground. Is it possible. If so, the way please.... Sanjay

Mick February 16, 2006 04:35

Re: User defined subroutine in Ground
 
Yes you certainly can, write the subroutine at the end of ground.for after the

24 CONTINUE

END

Then issue calls to the subroutine in ground.for where required.

You can use an argument lists or existing common blocks or make your own common blocks to pass data into the subroutine.

Its just standard fortran.

You then use bldear.bat to compile and link a new executable. Of course you will need a compilable version of PHOENICS, but I guess that is an obvious thing to say.

What I usually do is copy the bldear.bat file to the working directory and run it from there, but of course you don't have to. If your PHOENICS is set up properly then bldear.bat will be on your path and you can just invoke it from your working directory

So summary :

1/ copy ground.for from \phoenics\d_earth\d_windf to your working directory and edit

2/ bldear.bat lives in \phoenics\d_utils\d_windf, copy this to your working directory and run, or just invoke it from your working directory.

3/ Obviously it is not a good idea to hack the original ground.for in \phoenics\d_earth\d_windf

You will find information on ground coding in POLIS, under the encyclopedia entry GROUND amonst other places. Also the PHOENICS journal is full of papers with Q1 and edited ground.for files listed.

K Sanjay February 23, 2006 07:40

Re: User defined subroutine in Ground
 
Thanks Mike! It worked.

Sanjay


All times are GMT -4. The time now is 02:21.