how to express a heat source term which depends on coordinate
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 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); Code:
pos().x regards! bryant 
Can you tell me about the above things if you know about that?
Thank you very much! regards! bryant 
Dear bryant_k
did you find the solution? I am also working on it... pleased if you can inform me. 
@ wolfindK
you can easily use funkySetFields utility, it's easy to apply, http://openfoamwiki.net/index.php/Co...funkySetFields 
@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 Code:
$FOAM_SRC/fvOptions/sources/general/semiImplicitSource 
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..? 
Quote:

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 Thanks a lot, Samuele 
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? 
All times are GMT 4. The time now is 04:59. 