CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Mass residuals (http://www.cfd-online.com/Forums/cfx/18691-mass-residuals.html)

Hamsdi October 25, 2001 05:04

Mass residuals
 
Hello, I want to check the mass residuals before choosing a turbulunce model in my USR Fortran routine. Is there a variable which stores the mass residuals? (I haven't found it in the manual :)) (Using CFX 4.4)

Thanks in advance!

Jan Rusås October 25, 2001 05:34

Re: Mass residuals
 
It is in the manual :)

You can declare all the residuals as a variable under

>>VARIABLE NAMES USER SCALAR1 'MASS RESIDUAL'

You must then read how to get acces to this variable in the actual usr. fortran you want to use , ie CALL GETSCA(......

Hope this is a help.

Jan

Hamsdi October 25, 2001 07:48

Re: Mass residuals
 
Thanks for the quick response. I still have a problem accessing the variable in my routine. The error text in the output file is as follows:

THE FOLLOWING KEYWORD HAS NOT BEEN PROCESSED

USER SCALAR1

I called it with

CALL GETSCA('MASS RESIDUALS', IRMASS, CWORK)

Thanks again ;-)


cfd guy October 25, 2001 10:55

Re: Mass residuals
 
Hi,
Did you check out if you included the number of user scalar equations in the options of the command file? I'll give you a brief example:


--CFX4
--OPTIONS


THREE DIMENSIONS


BODY FITTED GRID


CARTESIAN COORDINATES


TURBULENT FLOW


ISOTHERMAL FLOW


INCOMPRESSIBLE FLOW


USER SCALAR EQUATIONS 1
--VARIABLE NAMES


USER SCALAR1 'MASS RESIDUAL'

Hope this helps,
Regards,
cfd guy

Hamsdi October 29, 2001 05:29

Re: Mass residuals
 
Thanks, now it works!


All times are GMT -4. The time now is 14:49.