CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Question concerning user_get_gvar (https://www.cfd-online.com/Forums/cfx/25663-question-concerning-user_get_gvar.html)

Benjamin April 16, 2008 05:57

Question concerning user_get_gvar
 
Dear CFX users,

I want to couple CFX with a post-processing tool called Covise. It should be a online coupling. So I need after every coefficient loop the values of all the variables (Temperatur, Pressure,.....). First I wrote a Junction Box Routine only to get the temperature to test it. Here it is:

#include "cfx5ext.h"

dllexport(user_output)

SUBROUTINE USER_OUTPUT (CZ, DZ, IZ, LZ, RZ)

C --Preprocessor includes--

#include "MMS.h"

#include "cfd_constants.h"

C --Arguments--

CHARACTER CZ(*)*(1)

DOUBLE PRECISION DZ(*)

INTEGER IZ(*)

LOGICAL LZ(*)

REAL RZ(*)

C --Local variables--

CHARACTER*(4) CRESLTC

REAL VAR, rtemperature

C --Executable statements--

CALL USER_GET_GVAR ('Temperature','StaticMixer',

& 'area',CRESLT,rtemperature,CZ,DZ,IZ,LZ,RZ)

CALL MESAGE ( 'WRITE', 'Temperatur: ', rtemperature)

END

I built the user_output.dll with the cfx5mkext -> No problems. But this routine doesn't work. I don't receive the temperature on the console. How can I acces my rtemperature variable? I use win xp pro sp2 x64 and CFX V10.0

Is this the right solution to get data with user_get_gvar to couple cfx with another tool, or should I use stackpointers?

Thanks for all help.

Greetings Benjamin

Benjamin April 16, 2008 07:56

Re: Question concerning user_get_gvar
 
I found a mistake. I didn't activate the junction box routine in the solver control panel....;) Now I get Temperature on the console after every coefficient loop, but its value is always 0. Why? I use the static mixer example, located in ../examples.

Thanks for help

Greetings Benjamin


All times are GMT -4. The time now is 10:23.