CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Wall Shear in User Fortran (

Allan March 26, 2008 06: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.



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?



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