CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   USRWRK...some HELP... (https://www.cfd-online.com/Forums/cfx/21335-usrwrk-some-help.html)

RK June 13, 2005 12:43

USRWRK...some HELP...
 
Hi,

Just to clarify some info on USRWRK facility in CFX 4.4.

(1) I have setup user workspace in USRWRK

(2) In USRINT, I dump the variable of interest (in this case enthalpy) in this workspace. (as shown in USRINT)

(3) If I want to write to a file using USRTRN that has been dumped in the work space within USRINT, is the syntac correct as shown below?

The way as it is written now, the WORK(IUSRGR+INODE-1) does contain the H variable, but when I try to write it out in USRTRN Zero values are dumped...so something is wrong...

I hope someone can help...

Robin

*********************** SUBROUTINE USRWRK...

CALL SETPER('USRWRK','WORK ','USRGR ',NNODE,IUSRGR)

****************** SUBROUTINE USRINT

CALL GETADD('USRINT','PERMR ','USRGR ',ILEVEL,IUSRGR)

DO 101 I=1,NPT

INODE=IPT(I)

C SET H VAR into the workspace

WORK(IUSRGR+INODE-1)=H(INODE,IPHASE)

101 CONTINUE

************** SUBROUTINE USRTRN

CALL GETADD('USRINT','PERMR ','USRGR ',ILEVEL,IUSRGR) DO 101 I=1,NPT

INODE=IPT(I)

G0=WORK(IUSRGR+INODE-1)

WRITE(*,*) G0

101 CONTINUE **************



All times are GMT -4. The time now is 04:24.