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

subroutine call order

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2003, 10:14
Default subroutine call order
  #1
CMB
Guest
 
Posts: n/a
Hi,

This might be problem dependent, but in a general case, using SIMPLE alg. in a steady state problem, which of the following subroutines are called first in an itteration. Say if I would like to call: sorent.f, sorsca.f and fluinj.f. My guess is that enthalpy changes are calculated in a first instance just after momentum balance, but between fluinj and sorsca I do not really know. I would appreciate any informations about the order in which subroutines are called in Star CD.

Kind regards, C.
  Reply With Quote

Old   October 23, 2003, 12:12
Default Re: subroutine call order
  #2
Richard
Guest
 
Posts: n/a
Why is it important to know? If the coding depends on the coupling of source terms, this should resolve itself by convergence. On the other hand, if you have some procedural requirement like passing information from one subroutine to another or initialising everything in the first subroutine called, you should be able to write FORTRAN that does this without knowing the call sequence. Remember you have the INTFLG array - all subroutines can see it, it's initialised to 0 and it's values are "remembered" by STAR. So you can use it to pass flag from one subroutine to another.
  Reply With Quote

Old   October 24, 2003, 02:54
Default Re: subroutine call order
  #3
Thomas
Guest
 
Posts: n/a
simply write a 'write (*,*) 'blabla-1/2/3...' in each subroutine, then you will see.
  Reply With Quote

Old   October 24, 2003, 05:19
Default Re: subroutine call order
  #4
Brian
Guest
 
Posts: n/a
Ask your CD-adapco representative for a copy of the course material on User Subroutines. It's explained pretty well there, in Chapter 4, but it's too much to paste here, and includes diagrams.
  Reply With Quote

Old   November 26, 2003, 20:08
Default ABOUT INTFLG
  #5
Juliet
Guest
 
Posts: n/a
Hi,experts can you give me detailed information about INTFLG, how to use it, what is it mean?

thanks a lot Juliet
  Reply With Quote

Old   November 27, 2003, 11:34
Default Re: ABOUT INTFLG
  #6
CMB
Guest
 
Posts: n/a
Hi, I am no expert but this is what I know about it, when coding, STAR can help ensuring that something is only executed once and ensuring something is only executed once per itteration/time step. You can use the array intflg for that, the array contains 100 integers which are initialised to zero and which the user is free to modify. STAR does nothing but store them, hence the user can teat them as arbitrary flags.

to ensure that something is executed only once do:

IF (INTFLG(1).EQ.0) THEN C CODE...

INTFLG (1)=1

ENDIF to ensure that this si executed once per itteration do:

IF (INTFLG(1).EQ.0) THEN

INTFLG(2)=-1

INTFLG(1)=1

ENDIF

IF (INTFLG(2).NE.ITER) THEN C CODE...

INTFLG(2) = ITER

ENDIF

this is something I got from the user subroutine adapco course manual, talk to them and ask them to send you a copy, there are some other usefull things in it. Good luck, bye
  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
How can I call EM in subroutine-----sorent.f conglin Siemens 1 November 28, 2008 12:12
Order of Call for STAR Source UDFs Emmanuel Resch Siemens 2 June 25, 2007 06:56
4th order discretization of 2nd order difference dusky.He Main CFD Forum 3 February 14, 2007 09:00
first order time, second order space sven CFX 1 October 27, 2005 14:05
call vertices into subroutine? MG Siemens 2 November 12, 2004 11:48


All times are GMT -4. The time now is 04:13.