dT/dt - FORTRAN
Hi
I am trying to write a FORTRAN routine which needs the local heating/cooling rate. The utility USER_GETVAR can be used to get the local gradients (d/dx, d/dy, d/dz). Does anyone know how to get the local rate change? Thanks Malcolm |
Re: dT/dt - FORTRAN
Hi, This answer is based on CFX 4.4 (as this is what I use)...it may not helpful...sorry if this is the case!
In USRSRC (for example) to calculate dw/dt (a scalar variable), this can be done by getting the old scalar value in USRSRC: CALL GETADD('USRSRC','VAROLD','SCAL ',ILEVEL,JSOLD) Then dw/dt at a node would be given by something like: (SCAL(INODE,1,1)-WORK(JSOLD+INODE-1))/DT Note: DT can be obtained in USRSRC by including the named COMMON block /TRANSR/ TIME,DT,DTINVF,TPARM (similar to USRTRN) Hope it helps. RK |
All times are GMT -4. The time now is 23:12. |