# With position variable source term discretization

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 11, 2017, 13:05 With position variable source term discretization #1 New Member   Join Date: Apr 2017 Posts: 2 Rep Power: 0 If the heat generation varies linearly with position. How can i discretize that? Problem is 1D mixed of convection and conduction.

January 25, 2018, 08:43
#2
Senior Member

Rami Ben-Zvi
Join Date: Mar 2009
Posts: 155
Rep Power: 17
Quote:
 Originally Posted by Amirhossein mokhtari If the heat generation varies linearly with position. How can i discretize that? Problem is 1D mixed of convection and conduction.
Hi Amirhossein mokhtari,

It is quite simple with the FEM. See e.g., my paper
R. Ben-Zvi, H. Scher and B. Berkowitz, Two-dimensional finite element method solution of a class of integro-differential equations: Application to non-Fickian transport in disordered media, IJNME, Vol. 112 No. 5, pp. 459-478, 2017, DOI: 10.1002/nme.5524, 2017.
in which you may drop the transient and the memory terms and insert S=Axi + B.

I hope it helps,
Rami

 August 9, 2018, 08:57 #3 New Member   Join Date: May 2018 Posts: 19 Rep Power: 8 Hello Amirhossein, I think you can use a linear equation, e.g. q = Ax + B where A and B are coefficients and x is the distance from your reference point. One way of discretization that came to my mind first is setting a do or for loop starting at your reference point and then incrementing. Assign q = B at x=0 assuming 0 is your reference position and B is the heat generation at that point. Then, since you know your final length (xmax) for nmax stepsizes you would have dx = xmax/nmax. Then it is, q = q + A*dx for all the remaining stepsizes. Regards, Lejonet