GustavLund
Mechanical
- Jan 26, 2011
- 10
Hi,
I want to include *heat generation in my heat transfer analysis. I have the subroutine HETVAL to calculate the flux. Let say that the flux is a function of the current y-coordinate and the current temperature,
eg flux=y*temp (an example)
Right now I'm using USDFLD to get the y-coordinate as statev(1)=COORD(2), and then in HETVAL I'm writing FLUX(1)=statev(1)*TEMP(1)
However it seems as the flux becomes zero. So something is wrong. I have tried with and without
*USER DEFINED FIELDS
and
*DEPVAR
1
in the input file but it makes no difference. Does somebody know why this isn't working? And also, is it possible to write out statev(1), coord(2) and temp(1) in some way? Thanks.
I want to include *heat generation in my heat transfer analysis. I have the subroutine HETVAL to calculate the flux. Let say that the flux is a function of the current y-coordinate and the current temperature,
eg flux=y*temp (an example)
Right now I'm using USDFLD to get the y-coordinate as statev(1)=COORD(2), and then in HETVAL I'm writing FLUX(1)=statev(1)*TEMP(1)
However it seems as the flux becomes zero. So something is wrong. I have tried with and without
*USER DEFINED FIELDS
and
*DEPVAR
1
in the input file but it makes no difference. Does somebody know why this isn't working? And also, is it possible to write out statev(1), coord(2) and temp(1) in some way? Thanks.