# Linear variation of gradient of a scalar in a cell.

 Register Blogs Members List Search Today's Posts Mark Forums Read March 15, 2020, 08:45 Linear variation of gradient of a scalar in a cell. #1 Senior Member   Mandeep Shetty Join Date: Apr 2016 Posts: 124 Rep Power: 7 If the temperature (or any scalar) is varying linearly in a cell, will the variation of the gradient of the temperature also be linear? If we say that temperature, T, is varying linearly in a square plate given by T = Tp +(x-xp)grad(Tp) where Tp is the Temperature at the centroid of the square plate, xp is the centroid, x is any point on the plate so (x-xp) is the position (so a vector) of any point on the plate from the centroid, grad(Tp) is the temperature gradient at the centroid. Is it correct to write, a) grad(T) = grad(Tp)+(x-xp)grad(grad(Tp)) as (x-xp), even though is a vector, doesn't actually change with x,y,z OR b) grad(T) = grad(Tp)+grad[(x-xp)grad(Tp)] as we cannot consider (x-xp) to be a constant with respect to x, y, z. Ref: Prof.Hrvoje Jasak Thesis, Error Analysis and Estimation for the Finite Volume Method with Applications to Fluid Flows   March 15, 2020, 10:53 #2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,688
Rep Power: 60   Quote:
 Originally Posted by granzer If the temperature (or any scalar) is varying linearly in a cell, will the variation of the gradient of the temperature also be linear? If we say that temperature, T, is varying linearly in a square plate given by T = Tp +(x-xp)grad(Tp) where Tp is the Temperature at the centroid of the square plate, xp is the centroid, x is any point on the plate so (x-xp) is the position (so a vector) of any point on the plate from the centroid, grad(Tp) is the temperature gradient at the centroid. Is it correct to write, a) grad(T) = grad(Tp)+(x-xp)grad(grad(Tp)) as (x-xp), even though is a vector, doesn't actually change with x,y,z OR b) grad(T) = grad(Tp)+grad[(x-xp)grad(Tp)] as we cannot consider (x-xp) to be a constant with respect to x, y, z. Ref: Prof.Hrvoje Jasak Thesis, Error Analysis and Estimation for the Finite Volume Method with Applications to Fluid Flows

Once the temperature is assumed linear, its derivative is a constant in the cell:
T(x)=T0+T1*x -> dT/dx=T1   March 15, 2020, 13:11 #3
Senior Member

Mandeep Shetty
Join Date: Apr 2016
Posts: 124
Rep Power: 7 Quote:
 Originally Posted by FMDenaro Once the temperature is assumed linear, its derivative is a constant in the cell: T(x)=T0+T1*x -> dT/dx=T1
Thank you! If I assume the gradient of temperature itself to vary lineraly can i write   March 15, 2020, 13:16 #4
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,688
Rep Power: 60   Quote:
 Originally Posted by granzer Thank you! If I assume the gradient of temperature itself to vary lineraly can i write grad(T) = grad(Tp)+(x-xp)grad(grad(Tp))?

Well, be careful that grad is also a vector operator. Work on the components dT/dx and dT/dy. But this way you are assuming a quadratic law for the temperature   March 15, 2020, 13:26 #5
Senior Member

Mandeep Shetty
Join Date: Apr 2016
Posts: 124
Rep Power: 7 Quote:
 Originally Posted by FMDenaro Well, be careful that grad is also a vector operator. Work on the components dT/dx and dT/dy. But this way you are assuming a quadratic law for the temperature
I am trying to use a second-order FVM method. I was told that using the second-order FVM method means all the variables (which I am starting to understand just means the primitive variables and not the gradient of the said variables) would be assumed to vary linearly within the cell. So as I am already assuming the temperature to vary linearly, and so I cannot assume the grad(T) to vary linearly again.   March 15, 2020, 13:41 #6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 5,688
Rep Power: 60   Quote:
 Originally Posted by granzer I am trying to use a second-order FVM method. I was told that using the second-order FVM method means all the variables (which I am starting to understand just means the primitive variables and not the gradient of the said variables) would be assumed to vary linearly within the cell. So as I am already assuming the temperature to vary linearly, and so I cannot assume the grad(T) to vary linearly again.

Indeed in a FVM you have a second order accuracy using a linear assumption for the function. The derivative is constant on each of the face so that you can evaluate their difference  Tags finite volume calculus, gradient Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules Similar Threads Thread Thread Starter Forum Replies Last Post nusivares OpenFOAM Running, Solving & CFD 30 December 12, 2017 05:35 vishwesh OpenFOAM Programming & Development 9 November 10, 2017 07:06 tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20 shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38 immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27

All times are GMT -4. The time now is 23:58.