CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLOW-3D (https://www.cfd-online.com/Forums/flow-3d/)
-   -   About subroutine heatfl.F (https://www.cfd-online.com/Forums/flow-3d/62753-about-subroutine-heatfl-f.html)

 James March 18, 2009 16:51

About subroutine heatfl.F

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?

 H.C March 18, 2009 17:13

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.

 James March 18, 2009 17:24

Re: About subroutine heatfl.F

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!

 H.C March 18, 2009 19:05

Yes. I believe so.

 James March 18, 2009 23:53

Re:About subroutine heafl.F

Thank you!

 huanglin8545 April 16, 2012 23:11

flow3d input gaussion heat

Quote:
 Originally Posted by H.C (Post 209929) Yes. I believe so.
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!

 huanglin8545 April 16, 2012 23:12

flow3d input gaussion heat

Quote:
 Originally Posted by James (Post 209939) Thank you!
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!

 boy November 23, 2014 21:38

Quote:
 Originally Posted by James (Post 209928) 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!
Hi James,

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~

 All times are GMT -4. The time now is 11:45.