CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   FLUINJ USER SUBROUTINE! (http://www.cfd-online.com/Forums/cd-adapco/52892-fluinj-user-subroutine.html)

Spyridon April 26, 2002 09:02

FLUINJ USER SUBROUTINE!
 
Hi!

I am investigating the drag on an evaporating sphere (as if it where an evaporating droplet) using the FLUINJ subroutine to simulate the mass injection from the sphere.

My problem is that the user subroutine ,FLUINJ, although it is being read in the analysis, nothing seems to happen. I have tried changing the FLUXI,UI,VI,WI,etc. variables to no avail. Does anyone know if the FLUINJ subroutine has an error and does not work properly? Any suggestions would really be helpful.

Thank you for your assistance.

Jihae Yang April 28, 2002 03:03

Re: FLUINJ USER SUBROUTINE!
 
The FLUINJ subroutine has no error and worked well in my case.

cell type of part with mass change = 10

= > IF(ICTID.EQ.10) THEN

FLUXI= XXXX

ENDIF


Richard April 28, 2002 10:17

Re: FLUINJ USER SUBROUTINE!
 
As with all user subroutines, there's more to activating and using FLUINJ than just wishing it would work. You need to activate it in PROSTAR, write a meaningful fluinj.f, put it in the ufile directory and compile it into the STAR executable. Usually it is the first or the last of these which you forget to do when you find nothing is happening.

Spyridon April 29, 2002 11:52

Re: FLUINJ USER SUBROUTINE!
 
As I mentioned in my message before, the FLUINJ subroutine has been activated via PROSTAR and through the STAR executable!

It seems that I am missing out something else. Any other suggestions would be great!

Thanks!

raymond May 3, 2002 05:43

Re: FLUINJ USER SUBROUTINE!
 
Did you see some warnings at the start of STAR? I think that you might set the wrong ICTID in your subroutine.

john YL May 3, 2002 06:46

Re: FLUINJ USER SUBROUTINE!
 
The best way to check is:

In prostar STARGUIde, =>Analysis Control => Output Controls => Monitor Numeric Behavior =>

select Print Iteration Residuals and Conservation Checks, then when you run STAR, you can check the .info file and for example, MATERIALWISE MASS BALANCE, if you have fluid injection, you should have non-zero value for term FLINJ

Vladimir Krejci May 21, 2002 12:52

Re: FLUINJ USER SUBROUTINE!
 
You can try whether your subroutine is considered in solution by adding some code into the subroutine. That code will print information given in subroutine to display. If the subroutine is correctly linked and used during a solution, the text "my subroutine is being used" and "expression IF passed" will be printed. If these texts will not be printed, the problem might be in the initialisation process at PROSTAR.

For example:

C

if (ip.eq.1) then

write(*,*) "my subroutine is being used"

endif

if(ictid.eq.something) then

if (ip.eq.1) then

write(*,*) "expression IF passed"

endif

your source FLUXI = ...

endif

RETURN

END

C


Steve Amphlett May 22, 2002 05:29

Re: FLUINJ USER SUBROUTINE!
 
I normally do this sort of thing by default in my STAR user routines:

LOGICAL INIT DATA INIT /.TRUE./

IF (INIT) THEN WRITE(*,*) 'NAME OF USER ROUTINE' INIT = .FALSE. ENDIF

Otherwise you can never really be sure if your routine ever gets called.

Steve Amphlett May 22, 2002 05:31

Re: FLUINJ USER SUBROUTINE!
 
Stupid bloody formatting buggered my previous message good and proper!


All times are GMT -4. The time now is 03:16.