|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
James Zhong
Join Date: Mar 2009
Posts: 25
Rep Power: 18 ![]() |
In subroutine heatfl.F, is heatfl1 an array with subscripts i,j,k or a variable? Besides cell index i,j,k, can I use other variables like t, xi(i),yj(j) and zk(k) in this subroutine?
|
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Mar 2009
Posts: 40
Rep Power: 18 ![]() |
They are not arrays. When the subroutine is called, the solver will pass the i/j/k cell index and the subroutine will calculate the heat source per unit mass per unit time in that i/j/k cell, store the values in heatfl1/heatfl2 and then return heatfl1/heatfl2 to the solver.
You can use xi/yj/zk in the subroutine as it already include the meshcb module. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
James Zhong
Join Date: Mar 2009
Posts: 25
Rep Power: 18 ![]() |
H.C, thank you for your reply! So since heatfl1 is not an array, if I want to define the heat flux for a specific cell at a specific moment, what I am to do is something like:
IF (t = xx AND i = xx AND j = xx AND k = xx) THEN heatfl1= xx Am I right? Thanks! |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Mar 2009
Posts: 40
Rep Power: 18 ![]() |
Yes. I believe so.
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
James Zhong
Join Date: Mar 2009
Posts: 25
Rep Power: 18 ![]() |
Thank you!
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 15 ![]() |
Could you help me?I modified the FORTRAN routine HEATFL to define a spatially varying heat source.How can I set variables in prepin.inp to call this modified soubroutine ?Do I just set dum=xx or idum=xx ?Is it necessary to compile HEATFL.f to HEATFL.obj?If so,where should I save them?Thank you very much!
|
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 15 ![]() |
Could you help me?I modified the FORTRAN routine HEATFL to define a spatially varying heat source.How can I set variables in prepin.inp to call this modified soubroutine ?Do I just set dum=xx or idum=xx ?Is it necessary to compile HEATFL.f to HEATFL.obj?If so,where should I save them?Thank you very much!
|
|
![]() |
![]() |
![]() |
![]() |
#8 | |
New Member
Guangxi
Join Date: Sep 2014
Location: China
Posts: 4
Rep Power: 12 ![]() |
Quote:
I'm doing the same thing as you have done years ago, since heatfl is power source per unit mass,when I define a gauss plane heat source, how can I convert power rate (unit: W) to power source per unit mass? In other words, when the power rate equal 1w, then heatfl= ?, thank you~ |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
what subroutine is used? | nut | Siemens | 1 | December 8, 2006 13:56 |
subroutine | Tipakorn | Siemens | 0 | May 10, 2006 04:16 |
subroutine | Juliet | Siemens | 2 | November 27, 2003 18:52 |
Use subroutine | Moon | Siemens | 1 | March 13, 2003 07:49 |
Use Subroutine.. | Moon | Siemens | 1 | February 10, 2003 12:03 |