Proceedings of Computational Heat and Fluid Flow
November 10, 2017, IIT, Madras
DIFFUSION ON TWO-DIMENSIONAL UNSTRUCTURED ORTHOGONAL AND
NON-ORTHOGONAL MESHES IN A SQUARE DOMAIN
Chintankumar Jansari (ME16S012) , Sreejith Pillai (ME16D406)
Machine Design Section
Department of Mechanical Engineering
Indian Institute of Technology,Madras
ABSTRACT of this mesh because we can easily mesh any complex geome-
Unstructured meshes are quite common for representing tries. As we can include more than one type of elements in mesh,
complex geometries in realistic fluid flow problems ,but formu- the cells do not have fixed number of neighbours. Their element
lation of these meshes for Finite Volume method is not as simple connectivity can not be easily expressed as two dimensional ar-
as structured [Link] this project a FORTRAN code is devel- ray like structured mesh. This mesh is highly inefficient in terms
oped for the solution of diffusion equation in square domain for of storage capacity as it requires explicit storage of cell neigh-
both orthogonal and non-orthogonal unstructured meshes. A nu- bourhood relationship.
merical example is solved to validate the code.
GOVERNING EQUATIONS
NOMENCLATURE The discretisation in unstructured meshes can be developed
Γ Diffusivity from the basic control volume technique [2, 3] . Steady state
Φ Diffusion variable diffusion equation can be written as,
SΦ Source term
A f Vector area of face ∇ · (Γ∇Φ) + SΦ = 0 (1)
Φξ Differentiation of Φ with respect to ξ
k Thermal conductivity Taking integration over control volume,
T Temperature
Z Z
∇ · (Γ∇Φ) dv + SΦ dv = 0 (2)
cv cv
INTRODUCTION
When we talk about more realistic domain for fluid flows, as Using Gauss Divergence theorem,
the geometric irregularity increases, it is impossible to approx-
Z Z
imate the domain with the use of structured meshes. There is
(Γ∇Φ) · dA + SΦ dv = 0 (3)
necessity of the mesh which can handle geometric complexity cs cv
more naturally, which is fulfilled by unstructured grid [1]. Un-
structured mesh can be considered as the limiting case of multi Taking linear profile assumption for source term.
block grid where each cell works as one block. Unstructured
mesh does not have any implicit relationship between coordinate
axis. It can be considered as one of the most important attributes
∑(Γ∇Φ) f · A f + (Su + S p Φ p )∆v = 0 (4)
f
1 Copyright c 2017 by ASME
FIGURE 2. Problem figure
FIGURE 1. Cell centred control volume arrangement
usually being treated as source term by calculating its value using
Non-Orthogonal mesh the last iteration values.
−Φ0 −Φb
By taking approximation Φξ = Φ1∆ξ and Φη = Φa∆η , we
can write our discretised equation
∂Φ ∂Φ
∇Φ = i+ j (5)
∂x ∂y
using chain rule we can write, aP ΦP = ∑ anb Φnb + b (10)
nb
Φξ = Φx xξ + Φy yξ , Φη = Φx xξ + Φy yη (6) where, !
Γ f A f ·A f
Area of the face ab, anb = ∆ξ A f ·eξ
, aP = ∑nb anb − S p ∆v, b = Su ∆v
nb
A f = Ax i + Ay j (7)
Orthogonal mesh
For orthogonal meshes, eξ and eη are perpendicular, which
putting equation 5,6 and 7 in equation 4 we get vanishes the second term and makes quantity inside bracket in
the first term equal to A f .
! !
Ax yη −Ay xη Ay xξ −Ax yξ
∑(Γ∇Φ) f · A f = Γ f J Φξ + Γ f J Φη (8)
f
RESULTS AND DISCUSSION
Numerical example of pure diffusion is solved. Square do-
where J = xξ yη − xη yξ main of 0.4 m side length is taken as problem domain. Thermal
Applying geometric simplification from figure we can reduce the conductivity is 1000kW /m. Left side and bottom side have con-
above equation, stant temperature of 1000C and 2000C respectively, while other
two sides are at [Link] 2 shows the domain under consider-
eration. Pure diffusion and steady state conditions are assumed.
! !
A f ·A f A f ·A f
∑(Γ∇Φ) f · A f = Γ f A f ·eξ Φξ − Γ f A f ·eξ (eξ · eη )Φη (9) Three different type of meshes are taken to solve the problem
f (a)Structured Mesh(Quadrilateral elements) (b) Orthogonal un-
structured mesh (Trianlge elements) (c) Non-orthogonal unstruc-
Here,the first term in equation 9 is called as Direct Gradient term tured mesh (Mixture of triangle and quadrilateral elements).
and the second term is called as Cross Diffusion term, which is Considering our assumptions,the governing equation re-
2 Copyright c 2017 by ASME
FIGURE 3. Mesh (a)Structured Mesh(Quadrilateral elements) (b) Orthogonal unstructured mesh (Trainlge elements) (c) Non-orthogonal unstructured
mesh (Mixture of triangle and quadrilateral elements)
FIGURE 4. Temperature distribution for (a)Structured Mesh (Quadrilateral elements) (b) Orthogonal unstructured mesh (Triangle elements) (c)
Non-orthogonal unstructured mesh (Mixture of triangle and quadrilateral elements)
which is basically Laplace equation. Analytical solution for
Laplace over square domain is available. The analytical solution
for our problem will be,
∞
Tanaly = ∑ An sinh(2.5nπ(x − 0.4))sin(2.5nπy)
n=1
+∑∞
n=1 Bn sinh(2.5nπ(y − 0.4))sin(2.5nπx)(12)
where,
FIGURE 5. Approximate analytical solution 200(1−cos(nπ) 400(1−cos(nπ)
An = nπsinh(−nπ) , Bn = nπsinh(−nπ)
duces,
Since the solution is summation of infinite exponential sine
∂ 2T ∂ 2T
k( 2 + 2 ) = 0 (11) 3 Copyright c 2017 by ASME
∂x ∂y
series, there is the need to approximate the exact solution. We
considered first 300 iterations for both the terms(for large value
of n, coefficients An and Bn approach zero values). Approximate
solution is plotted in figure 5. From figure 4 we can say that there
is good agreement found between different meshes for tempera-
ture distribution. These results also look physically correct by
comparing with approximate analytical solution as shown figure
5. Some deviation can be observed at the corners which is due
to the application of two dirichlet boundary conditions at single
point and interpolation used for plotting contour plots.
CONCLUSION
A FORTRAN code is developed for finite volume method
to solve steady state diffusion equation over unstructured mesh.
One numerical example over square domain is solved with three
different meshes and compared with approximate analytical so-
lution, which validates the code written.
REFERENCES
[1] Sandip Mazumder. Numerical Methods for Partial Differen-
tial Equations. page v. Academic Press, 2016.
[2] Suhas V Patankar. Numerical Heat Transfer and Fluid Flow,
volume 53. 1980.
[3] H.K: Versteeg and W. Malalasekera. Introduction to Compu-
tational Fluid Dynamics, volume 44. 2005.
4 Copyright c 2017 by ASME