CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Wall Shear in User Fortran (http://www.cfd-online.com/Forums/cfx/25536-wall-shear-user-fortran.html)

Allan March 26, 2008 07:29

Wall Shear in User Fortran
 
I am trying to determine the wall shear from a junction box routine. I have a square building which I have divided into sections and used a step function to sort out the respective pressure and wall shear on the respective section. See examples below.

p2 = p * step(((2*dz)-z)/1[m])*step((z-((1)*dz))/1[m])

sx2 = wall shear x * step(((2*dz)-z)/1[m])*step((z-((1)*dz))/1[m])

I then define the same number of additional variables and assign the corresponding variable the value of the expression.

In Fortran I call the variables at each timestep in a transient run by USER_GET_GVAR. In the examples below, VARNAME_F is the respective pressure for the section in question and VARNAME_SX corresponds to a wall shear x variable as defined above.

CALL USER_GET_GVAR(VARNAME_F,DOM,'areaInt_x',CRESLT,PX( i,1),CZ,DZ,IZ,LZ,RZ)

CALL USER_GET_GVAR(VARNAME_SX,DOM,'areaInt_x',CRESLT,SX (i,1),CZ,DZ,IZ,LZ,RZ)

I use the same procedure for the y and z directions. But when I try to run the simulation the solver stops after the first timestep when runnning the junction box routine and express the following error message:

Error in subroutine cal_TAUWALL_TURB :

Called for invalid locale: VERTICES

GETVAR originally called by subroutine CAL_BCP_Aver_IP

+--------------------------------------------------------------------+ | Writing crash recovery file | +--------------------------------------------------------------------+

+--------------------------------------------------------------------+ | ERROR #001100279 has occurred in subroutine ErrAction.

| | Message:

| | Stopped in routine GV_ERROR

| |

If I exclude the wall shear terms in my fortran routine there is no problem and the simulation keeps on running.

Does anyone have any idea as to where I could have made some mistakes or what needs to be set in CFX-Pre to make the USER_GET_GVAR functions for the wall shear work?

Thanks

Allan



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