
[Sponsors] 
how to express a heat source term which depends on coordinate 

LinkBack  Thread Tools  Search this Thread  Display Modes 
August 22, 2012, 08:34 
how to express a heat source term which depends on coordinate

#1 
New Member
kob
Join Date: Nov 2011
Posts: 28
Rep Power: 14 
Hello everyone
I am doing a heat transfer problem with source term. Source term itself depends on the x,y coordinates. The expression of the volumetric heat source is: Code:
when 0.2<x<0.2,0.3<y<0.3 q=20*exp(10*y) otherwise q=0 There is another question which is related to the x,y coordinate. Is it correct to express it like: Code:
volScalarField x = mesh.C().component(vector::X); volScalarField y = mesh.C().component(vector::Y); Code:
pos().x pos().y regards! bryant 

August 25, 2012, 07:37 

#2 
New Member
kob
Join Date: Nov 2011
Posts: 28
Rep Power: 14 
Can you tell me about the above things if you know about that?
Thank you very much! regards! bryant 

April 7, 2013, 23:54 

#3 
Member
Neilson Whit
Join Date: Aug 2011
Posts: 74
Rep Power: 14 
Dear bryant_k
did you find the solution? I am also working on it... pleased if you can inform me. 

April 8, 2013, 02:22 

#4 
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 14 
@ wolfindK
you can easily use funkySetFields utility, it's easy to apply, http://openfoamwiki.net/index.php/Co...funkySetFields 

April 9, 2013, 15:10 

#5 
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 
@wolfindark
Have you looked at using the new fvOptions capabilities? Here I have defined a source names "energySource1" with a time duration at a single point. The injection rate coefficients are specified as pairs of SuSp coefficients e.g. h (10 0) where the 10 is the explicit component and 0 is the implicit component. This is a linearized source term (read Patankar's book for more details and a source of this method) Code:
energySource1 { type scalarSemiImplicitSource; active true; timeStart 0.2; duration 2.0; selectionMode points; points ( (2.75 0.5 0) ); scalarSemiImplicitSourceCoeffs { volumeMode absolute; injectionRateSuSp { h (10 0); } } } Code:
$FOAM_SRC/fvOptions/sources/general/semiImplicitSource Last edited by chegdan; April 9, 2013 at 17:29. 

April 9, 2013, 22:57 

#6 
Member
Neilson Whit
Join Date: Aug 2011
Posts: 74
Rep Power: 14 
Thank you chegdan,
For my case I needed a constant heat source, therefore, I used another method which was mentioned in this forum sometime ago. I just added explicit source term to temperature equation (in TEqn.H). Then I set the field values with setFields, a spherical heat source covering a particular region in fluid region. So it works fine until now. I am not sure but if time dependency is needed, it can be implemented in TEqn.H, What do you think..? 

April 10, 2013, 09:14 

#7  
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 
Quote:


November 29, 2013, 06:19 

#8 
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate  Co  Italy
Posts: 520
Rep Power: 18 
Dear All,
pardon the interruption. I have a question about fvOption and I think you can help me. I would like to add a body force on certain cells. I have tried to write something like Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // momentumSource { type vectorExplicitSetValue; active on; //on/off switch selectionMode all; //cellSet // points //cellZone vectorExplicitSetValueCoeffs { injectionRate { F ( 0.1335 0 0 ); } } } Thanks a lot, Samuele 

December 1, 2014, 15:32 

#9 
New Member
zech
Join Date: Oct 2014
Location: Cambridge,England
Posts: 22
Rep Power: 11 
Does scalarSemiImplicitSourceCoeffs{ h (10,0)} mean that the source is S=10+0*x, where S is the magnitude of the source and x is the coordinate. If that is true, then:
1.this method is applicable when the source is linearly related to the coordinate. What if it is not a linear function. Such as a cosine or experiential function? 2.Even worse, it is not even an function: it's just a matrix of random numbers. 3. what if the value is changing in both x and y direction? 

Tags 
heat source 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
GPU Linear Solvers for OpenFOAM  gocarts  OpenFOAM Announcements from Other Sources  37  August 17, 2022 14:22 
Source Term UDF VS Porous Media Model  pchoopanya  Fluent UDF and Scheme Programming  1  August 28, 2013 06:12 
UDF source term  jerome_  FLUENT  2  July 11, 2011 11:55 
DxFoam reader update  hjasak  OpenFOAM PostProcessing  69  April 24, 2008 01:24 
Source Term in Cylindrical Coordinate.  Apurv  Main CFD Forum  0  January 26, 2000 07:15 