CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > FLOW-3D

How to input gaussian heat source in flow3d?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 22, 2012, 22:25
Default How to input gaussian heat source in flow3d?
  #1
New Member
 
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 14
huanglin8545 is on a distinguished road
Hello, I am trying to simulate a MIG welding pool model using flow3d . I need to use a 2D Gaussian heat source but I don't know how to define it or the expression to use.I don't know how to input it,could you help me?
Thanks!
huanglin8545 is offline   Reply With Quote

Old   April 16, 2012, 13:49
Default
  #2
Senior Member
 
michael barkhudarov
Join Date: Mar 2009
Location: Sante Fe, New Mexico, USA
Posts: 336
Rep Power: 18
MuxaB is on a distinguished road
Quote:
Originally Posted by huanglin8545 View Post
Hello, I am trying to simulate a MIG welding pool model using flow3d . I need to use a 2D Gaussian heat source but I don't know how to define it or the expression to use.I don't know how to input it,could you help me?
Thanks!
there is no standard feature to do it. you will have to modify the FORTRAN routine HEATFL to define a spatially varying heat source
MuxaB is offline   Reply With Quote

Old   April 16, 2012, 23:02
Default flow3d input gaussion heat
  #3
New Member
 
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 14
huanglin8545 is on a distinguished road
Thank you so much.I need more help.I modify the soubroutine HEATFL.F ,how can I set variables in prepin.inp to call this modified soubroutine ?Besides,are there any differences between HEATFL and HEATOB ?
huanglin8545 is offline   Reply With Quote

Old   April 16, 2012, 23:40
Default
  #4
Senior Member
 
michael barkhudarov
Join Date: Mar 2009
Location: Sante Fe, New Mexico, USA
Posts: 336
Rep Power: 18
MuxaB is on a distinguished road
Quote:
Originally Posted by huanglin8545 View Post
Thank you so much.I need more help.I modify the soubroutine HEATFL.F ,how can I set variables in prepin.inp to call this modified soubroutine ?Besides,are there any differences between HEATFL and HEATOB ?
1. HEATFL IS FOR FLUID SOURCES AND HEATOB IS FOR SOURCES INSIDE SOLID.
2. THERE ARE DUMMY VARIABLES, DUM1,...,DUM25 PLUS DUMMY ARRAYS, INTEGER AND REAL, THAT YOU ARE DEFINE IN THE NAMELIST XPUT TO BE USED IN HEATFL. MAKE SURE DUMN.F IS INCLUDED AT THE TOP.
3. HEATFL IS ALWAYS CALLED WHEN HEAT TRANSFER IS ON.

WHAT VERSION ARE YOU RUNNING? IF 10, THEN YOU NEED 11.1 Intel FORTRAN compiler, if an earlier one, then 9.1.
MuxaB is offline   Reply With Quote

Old   April 17, 2012, 21:10
Default flow3d input gaussion heat
  #5
New Member
 
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 14
huanglin8545 is on a distinguished road
Thank you very much for your helpful reply.Now I am confused for some details.Could you help me?
1.MAKE SURE DUMN.F IS INCLUDED AT THE TOP.You mean in the HEATFL.F I must write DUMN.F at the top of the subroutine like this: include'..\comdeck\dumn.for'?
2.My running version is 9.3.2,can I use FTN95 (Fortran 95 for Windows)to compile it?
3.When I modify the HEATFL.F,do I just add the fortran code at the end of the souroutine HEATFL.F ?
4.If I modified HEATFL.F,is it necessary to compile HEATFL.F to HEATFL.obj,and save them in HYDR3D?
Thank you!
huanglin8545 is offline   Reply With Quote

Old   April 17, 2012, 22:00
Default
  #6
Senior Member
 
michael barkhudarov
Join Date: Mar 2009
Location: Sante Fe, New Mexico, USA
Posts: 336
Rep Power: 18
MuxaB is on a distinguished road
Quote:
Originally Posted by huanglin8545 View Post
Thank you very much for your helpful reply.Now I am confused for some details.Could you help me?
1.MAKE SURE DUMN.F IS INCLUDED AT THE TOP.You mean in the HEATFL.F I must write DUMN.F at the top of the subroutine like this: include'..\comdeck\dumn.for'?
2.My running version is 9.3.2,can I use FTN95 (Fortran 95 for Windows)to compile it?
3.When I modify the HEATFL.F,do I just add the fortran code at the end of the souroutine HEATFL.F ?
4.If I modified HEATFL.F,is it necessary to compile HEATFL.F to HEATFL.obj,and save them in HYDR3D?
Thank you!
1. Correct, but DUMN.F, not DUMN.FOR
2. Wow, that's old. yes, FORTRAN 95 is fine but it should be Compaq Visual FORTRAN on Windows or Intel 9.1 for Linux
3. Yes
4. If you use MS Visual Studio or make files provided with the installation, then it will take care of compiling and linking and code. The manual has a chapter on that.
MuxaB is offline   Reply With Quote

Old   April 18, 2012, 05:34
Default flow3d input gaussion heat
  #7
New Member
 
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 14
huanglin8545 is on a distinguished road
Thank you so much.Let me try it.You help me a lot.Thanks again.
huanglin8545 is offline   Reply With Quote

Old   April 19, 2012, 23:10
Default flow3d input gaussion heat
  #8
New Member
 
huanglin
Join Date: Feb 2012
Posts: 24
Rep Power: 14
huanglin8545 is on a distinguished road
Thank you for your help.Now I have some problems to consult you.Could you help me?
In order to input gaussion heat source ,I modified the HEATFL.F by
ftn95 like this :

subroutine heatfl(i,j,k,heatfl1,heatfl2)
c
c add heat sources to fluid
c
c ************************************************** *************
c ** notice **
c ** this subprogram contains flow science, inc. proprietary **
c ** trade secret and confidential information. **
c ** **
c ** unauthorized use prohibited **
c ** copyright 1985-2008 flow science, inc. **
c ************************************************** *************
c
use arrays_module
c
use meshcb_module
c
use obsijk_module
c
#ifdef SINGLE
include '../comdeck/precis4.f'
#else
include '../comdeck/precis.f'
#endif
include '../comdeck/params.f'
include '../comdeck/cntrl.f'
include '../comdeck/const.f'
include '../comdeck/diag.f'
include '../comdeck/logvar.f'
include '../comdeck/obsd.f'
include '../comdeck/bcinfo.f'
include '../comdeck/acctrm.f'
include '../comdeck/scala.f'
include '../comdeck/state.f'
include '../comdeck/dumn.f'
c
c i,j,k = current cell indices
c heatfl1 = heat source for fluid 1
c heatfl2 = heat source for fluid 2
c
c heatfl1,2 is thermal energy per unit mass of fluid material
c per unit time (or power per unit mass)
c
heatfl1=zero
heatfl2=zero
c
ccc include '../comdeck/ijk.f'
c
return
end
c heatin is the gaussion heat source
c r is the size of the gaussion heat source
r=SQRT(i**2+j**2)
heatin=(dum1/2*pi*dum2**2)*EXP(-0.5*r**2/dum2**2)
k=dum3
if(dum3=0.027)
then heatfl1=heatin
endif
I just want to input the heat source on the X-Y surface,and Z=0.027.I don't think it is wrong,but it couldn't compile.I don't know why?
Thanks
huanglin8545 is offline   Reply With Quote

Old   January 29, 2024, 05:44
Default Gaussian heat flux code heatfl.F flow-3d
  #9
New Member
 
hamed
Join Date: Sep 2022
Posts: 17
Rep Power: 3
hamedsheikh is on a distinguished road
Quote:
Originally Posted by huanglin8545 View Post
Thank you for your help.Now I have some problems to consult you.Could you help me?
In order to input gaussion heat source ,I modified the HEATFL.F by
ftn95 like this :

subroutine heatfl(i,j,k,heatfl1,heatfl2)
c
c add heat sources to fluid
c
c ************************************************** *************
c ** notice **
c ** this subprogram contains flow science, inc. proprietary **
c ** trade secret and confidential information. **
c ** **
c ** unauthorized use prohibited **
c ** copyright 1985-2008 flow science, inc. **
c ************************************************** *************
c
use arrays_module
c
use meshcb_module
c
use obsijk_module
c
#ifdef SINGLE
include '../comdeck/precis4.f'
#else
include '../comdeck/precis.f'
#endif
include '../comdeck/params.f'
include '../comdeck/cntrl.f'
include '../comdeck/const.f'
include '../comdeck/diag.f'
include '../comdeck/logvar.f'
include '../comdeck/obsd.f'
include '../comdeck/bcinfo.f'
include '../comdeck/acctrm.f'
include '../comdeck/scala.f'
include '../comdeck/state.f'
include '../comdeck/dumn.f'
c
c i,j,k = current cell indices
c heatfl1 = heat source for fluid 1
c heatfl2 = heat source for fluid 2
c
c heatfl1,2 is thermal energy per unit mass of fluid material
c per unit time (or power per unit mass)
c
heatfl1=zero
heatfl2=zero
c
ccc include '../comdeck/ijk.f'
c
return
end
c heatin is the gaussion heat source
c r is the size of the gaussion heat source
r=SQRT(i**2+j**2)
heatin=(dum1/2*pi*dum2**2)*EXP(-0.5*r**2/dum2**2)
k=dum3
if(dum3=0.027)
then heatfl1=heatin
endif
I just want to input the heat source on the X-Y surface,and Z=0.027.I don't think it is wrong,but it couldn't compile.I don't know why?
Thanks
Hello
I have the same problem and I put the same code in Flow-3d version 11.0.4 software and replaced it. But the software does not read the code. I wanted to see if the problem is with the code or the software settings should be changed?
Can anyone help me?
hamedsheikh is offline   Reply With Quote

Reply

Tags
flow3d, gaussian heat source


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
Moving heat Source AB FLUENT 2 January 30, 2012 07:06
Heat source function of mass flow MarcVi Fluent UDF and Scheme Programming 0 September 16, 2010 13:16
oscillatory heat source Mehdi FLUENT 2 April 7, 2008 17:12
how to add a heat source wanghong FLUENT 0 January 17, 2005 07:03


All times are GMT -4. The time now is 18:33.