The essential pre-requisites for any solver to tackle real life 3D problems are to handle complex geometries and quick turnaround time. In this direction an Unstructured Finite Volume (FVM) based multi-threaded heat conduction solver has been developed to address both the issues respectively. The solver is object oriented and written in Java language. Unstructured Finite Volume method has been utilized for the space discretization and a four stage Runge-Kutta scheme is used for time integration. This solution methodology is highly parallelizable and extensively used in CFD codes. The present solver can handle non-linear steady state and transient 3D thermal problems with Dirichlet, Neumann and surface radiation boundary conditions. The solver has been validated against bench mark problems. In the present work a 3D complex geometry is discretised into 2.5 lakh hexahedrons has been taken as a test case to demonstrate the efficiency of the solver with multi-threading in dual processor machines. The results obtained are presented.
I. ? INTRODUCTION
The governing equations of most of the physical phenomenon are non-linear in nature and are not amenable for obtaining a closed form solution. Hence numerical solution is the only way to circumvent the problem. The numerical solution of a governing equation in a region of interest (computational domain) involves the discretization of the computational domain into entities (elements), decomposition of the spatial and temporal terms in the governing equations into algebraic equations and solving them over the elements.
The elements based on their topology can be triangle, quadrilateral for 2D domains and hexahedron, tetrahedron, prism, pyramid etc. for 3D domains. The discretization methods for the governing equations are Finite Difference, Finite Element, Finite Volume etc . The solution methodology of the governing equations depends on the nature of the physical phenomenon.
It is customary to refer to the computer program which discretizes the computational domain ?as pre-processor, which solves the governing equations as solver and the one which visualizes the results obtained as post processor.
Of late Unstructured FVM gained popularity over their counterparts because of their adherence to conservativeness and amenability to complex geometries. In this scheme, the solution procedure is carried out in the actual physical domain. Hence, the entire difficulty in numerical simulation relies on the proper discretization of the actual physical domain which in turn depends on the agility of the pre- processor.
The flow chart is shown in fig.1. From the above schematic, it is evident that, it is amenable to parallelization. An Object-Oriented approach was adopted in tune with the contemporary programming practice . Parallelization in general involves in identifying the tasks, which can be done independently on an element and performing them simultaneously on different elements using different processors. If all the processors access the same main memory, it is known as Shared Memory parallelization (SMP) and on the other hand if each processor has its own memory, then it is called as Distributed memory (DMP) parallelization.
The latter form of parallelization has a communication overhead, because of the transfer of data among the processors. This is not so in the former as all the processors access the same main memory.
The process of subdividing the tasks and submitting to various processors in SMP is known as multi-threading.
In the present work, JAVA language [3,4] has been used for developing the solver. JAVA has been chosen because of its object-oriented nature and well-defined thread class which resulted in less development time. ?In the case of parallelization using JAVA threads in an SMP machine, the simplified programming efforts allows to concentrate more on the physics and numerics rather than computer programming.
III. DESCRIPTION OF SOLVER
The solver as described earlier solves 3D energy equation by Unstructured FVM method, it uses Runge-Kutta scheme for time integration and handles hexahedral elements.
The following are the various classes in the solver
A. Class Element
The following are the various methods in the class Element:
Constructor: Element (Nodes): To create element object with given attributes like connecting nodes and dependant variables.
Time step: Setdt (Element): To compute the time step for given element
a. Setresidue (facenum, Element): To compute the residue of a given element when its neighbour across a given face is an element
b. Setresidue (facenum, Ghost): To compute the residue of a given element when its neighbour across a given face is a ghost
?4. Compute Volume: Setvol (): To compute the Volume of a given element
5. Compute minimum edge length: Setdi (): To compute the minimum edge length of each element
6. Compute normals: Setnormals (): To compute the face normals of each element
7. Compute centroids: Setcentroids(): To compute the face centroids and centroid of a given element.
?B. Class Node
Constructor: Node (coods, nbrs, elsun): To create a node object with given coordinates, count of the elements surrounding it and their numbers
Reconstruction: Reconstruction (Elements): To compute the nodal values of the dependant variables from the centroidal values.
Ghost (Parent, boundary type, Facenum, heatb transfer coeff., Temperature,)
To create a Ghost element with a given element as parent, on a given side, with specified heat transfer coefficient, surrounding temperature.
b. Compute Ghost Centroid
To compute the centroid of the ghost.
C. Class Solver
Solver: Solver (name, start, finish, Element, Node, Ghost) To run the solver thread for a specified number of elements.
Run: Run ()
To compute and update the dependant variables
D.b Class HexaHeat
To handle input / output operations, distribute the elements among the processor, create, run and synchronise the threads.
To demonstrate the ability of the solver to handle complex geometries, a valve designed for high temperature and high pressure is modelled to simulate isothermal surface inside the valve under steady state operation. The critical part of the valve is disc region which is analysed in the present problem. The computation domain is shown in Fig 5. The computational domain is discretized into 225075 nodes and 205920 hexahedral elements. The valve is exposed to high temperature on one side and ambient conditions on the other side. Water enters the valve chamber at 30 C with a velocity of 2 m/sec at the inlet region. Convective heat transfer boundary conditions derived from correlations were specified on the coolant contact surfaces. The isothermal surfaces are shown under steady state operation are shown in Fig.6,7.
To demonstrate the efficiency of multi- threading, the problem was first run on a single processor with single thread. Then on a dual processor two threads, three threads etc. were done. The time taken is as tabulated.
No. of Processors
No. of threads
Time taken, Sec
The efficiency obtained is 90.47%. All the computations were performed on an Apple Mac G5 dual processor machine with 4GB RAM. With the availability of multi-core multi-processor system this methodology will enable us to considerably bring down the turnaround time for real life 3D problems.
V. FUTURE WORK
To add normal radiation also into the code.
To increase the efficiency by further optimization of the algorithm.
 Charles Hirsch, Computational Methods in internal and external flows Vol. 1 & Vol. II, John Wiley & Sons, New York, 1992.
 Carlslaw, H. S and J.C. Jaeger, Conduction Heat Transfer in Solids, 2nd ed. Oxford University Press, London, 1959.
 Herbert Schildt, Java The complete reference, New York, McGraw-Hill,2004.
 E. Balagurusamy., Programming with Java A primer, 2nd Ed, Tata McGraw-Hill, NewDelhi, 2005.
 H.K. Versteeg and W. Malalasekara, An Introduction to Finite Volume Method, Longman scientific and technical publication, 1995.
 A.G. Malan, R.W. Lewis, “On the development of high-performance C++ Object oriented Code with applications to an explicit edge-based fluid dynamics scheme”, Computers & Fluids, 33,2004, pp1291-1304.