SlideShare a Scribd company logo
1 of 43
Download to read offline
Politecnico di Torino
Mechanical Engineering
Numerical Modelling Report
Academic year 2010/2011
TEMPERATURE DISTRIBUTION
IN A GROUND SECTION
OF A DOUBLE-PIPE SYSTEM
IN A DISTRICT HEATING NETWORK
Paolo Fornaseri
Enrico Grassano
Alessandro Tumino
1
INDEX
.......................................................................................................................................................................0
.......................................................................................................................................................................1
Introduction..................................................................................................................................................2
Mathematic model description: the heat equation ..................................................................................2
Boundary conditions for the thermal model.........................................................................................4
Finite elements method theory ..................................................................................................................5
Time discretization ..................................................................................................................................6
Geometry and boundary conditions..........................................................................................................7
Physical Parameters ...................................................................................................................................9
Temperature profile...................................................................................................................................10
Mesh and its Refinement ..........................................................................................................................11
n_mesh parameter .............................................................................................................................11
Standard Refinement .........................................................................................................................12
β€œManual” Refinement.........................................................................................................................12
Particular Case (Mesh for ODE45)....................................................................................................13
Computation Time in function of Triangle size...............................................................................14
Mesh quality .......................................................................................................................................15
Matrix and vectors computations............................................................................................................18
Stiffness matrix......................................................................................................................................18
Right hand side vector ..........................................................................................................................18
Mass matrix ............................................................................................................................................18
Initial Solution............................................................................................................................................19
Stationary solution....................................................................................................................................19
Time advancing .........................................................................................................................................20
Linear system solution method ...............................................................................................................21
Time comparison.......................................................................................................................................22
Results........................................................................................................................................................23
ODE time advancing method ...................................................................................................................29
Conclusions...............................................................................................................................................32
Appendix ....................................................................................................................................................33
2
Introduction
Our analysis concerns the distribution network of a suburb in the city of Turin.
We analyzed the thermal needs, the network layout and many other engineering problems regarding
the distribution of heat.
In the following report we are going to analyze the simplified model of a couple of buried ducts,
conveying the fluid used for thermal needs in the houses.
We analyzed the thermal distribution in the pipeline, in particular we focused on a section of the
ground, in which the water passes through the double-pipe system, namely return and supply pipe.
We used the fundamental heat equation (conduction) and the subsequent numerical discretization, in
the transient and in the steady state.
To this aim, we made some simplifications in order to apply our mathematical model.
Mathematic model description: the heat equation
The domain in which we are working is the cross section of the soil that hence becomes the
plate studied at lesson.
The heat quantity in the plate is expressed like:
∫ 𝑐(π‘₯)𝜌(π‘₯)𝑒(π‘₯, 𝑑)𝑑π‘₯
where:
c is the heat capacity
ρ is the mass density per unit surface
u is the temperature
This integral has to be performed on the whole surface.
Now, having a heat transfer balance on the plate boundary it can be written that:
𝑑
𝑑𝑑
∫ πœŒπ‘π‘’ 𝑑π‘₯ = ∫ 𝛷 βˆ™ 𝑛 𝑑𝑠
where
Ξ¦ is the heat flux
n is the unit vector normal to the boundary
Now, we can use the Gauss-Green theorem and we get:
∫ π‘πœŒ
𝑑𝑒
𝑑𝑑
𝑑π‘₯ = ∫ βˆ‡ βˆ™ 𝛷 𝑑π‘₯
Hence
π‘πœŒ
𝑑𝑒
𝑑𝑑
βˆ’ βˆ‡ βˆ™ 𝛷 = 0
the Fourier relation, linking the heat flux to the temperature gradient, is now introduce.
Substituting in the previous relation we get :
3
π‘πœŒ
𝑑𝑒
𝑑𝑑
βˆ’ βˆ‡ βˆ™ (πœ†βˆ‡π‘’) = 0
Where Ξ» is the thermal conductivity.
The relation holds for every point in the domain of the plate.
The stationary heat equation is:
βˆ‡ βˆ™ (πœ†βˆ‡π‘’) = 0
Actually, the most general relation includes the forcing term q, namely, the heat absorbed or
sold by the system. In our model there’s no the need to include this term, since no external
source of heat is considered.
4
Boundary conditions for the thermal model
In the model we dealt with, we considered three kind of boundary condition:
ο‚· Dirichlet boundary, so the direct imposition of a certain value of temperature on the
boundary
𝑒 = 𝑔
ο‚· Neumann conditions, so fixing the value of the derivative, with respect to a certain
direction, of the temperature. This is the same as impose a flux
πœ•π‘’
πœ•π‘›
= πœ“
ο‚· Robin condition that consists in the expression of the flux like a function of the
temperature
πœ•π‘’
πœ•π‘›
= 𝛼(π‘‡βˆž βˆ’ 𝑒)
where T∞ is the known temperature outside and α is the convective heat transfer
coefficient.
5
Finite elements method theory
We introduce now the finite element model for the previous equation.
We discretize the domain considered a triangulation Ο„, given by a sum of triangles T such that:
π‘ˆ π‘‡βˆˆπœ = Ξ©
First of all, we have to bring back the previous formulation to the following one:
{
𝜚
πœ•π‘’
πœ•π‘‘
βˆ’ βˆ‡ βˆ™ (πœ‡βˆ‡π‘’) = 𝑓
𝑏. 𝑐. π‘œπ‘› π‘‘β„Žπ‘’ π‘ π‘’π‘Ÿπ‘“π‘Žπ‘π‘’
So, new coefficients are obtained from the previous values with the following formulas:
πœ‡ =
πœ†
𝑐
𝑓 =
π‘ž
𝑐
The latter one, as said, is nil.
Now, we consider the variational formulation of the problem
{
π‘’β„Ž(𝑑) ∈ π‘‰β„Ž
∫ 𝜌
πœ•π‘’β„Ž
πœ•π‘‘
π‘£β„Ž 𝑑π‘₯ + ∫ πœ‡βˆ‡π‘’β„Žβˆ‡π‘£β„Ž 𝑑π‘₯ = 0
Where the function v is the generic test function.
In this scheme, the function vh is generated by linear combination of the Lagrange base
functions Ο†j, such that:
π‘£β„Ž = βˆ‘ 𝑣𝑗 πœ‘π‘—
𝑁
𝑗=1
Now, for the variable u it holds:
π‘’β„Ž = βˆ‘ 𝑣 π‘˜(𝑑)πœ‘ π‘˜
𝑁
π‘˜=1
And so finally we obtain:
βˆ‘ 𝑒 π‘˜Μ‡ ∫ πœŒπœ‘π‘— πœ‘ π‘˜ 𝑑Ω
π‘˜
+ βˆ‘ 𝑒 π‘˜
π‘˜
πœ‡ ∫ βˆ‡πœ‘π‘—βˆ‡πœ‘ π‘˜ 𝑑Ω = 0
The method is based on the projection of the weak form of a differential equation on functions
with limited support
The base functions πœ‘π‘— are pyramidal functions with a vertex in xj, height equal to 1
and base made by the triangles TK having a vertex in xj.
6
Time discretization
Since we have to consider the temporal variation, we used different time advancing methods.
To this aim, it’s good to define the matrix quantities that will be used in the system:
𝑀𝑒′
βˆ’ 𝐴𝑒 = 0
hence, it holds:
𝑀 = (π‘šπ‘—π‘˜) = ∫ πœŒπœ‘π‘— πœ‘ π‘˜ 𝑑Ω
and
𝐴 = (π‘Žπ‘—π‘˜) = πœ‡ ∫ βˆ‡πœ‘π‘—βˆ‡πœ‘ π‘˜ 𝑑Ω
The considered time advancing methods are:
ο‚· Explicit Euler
ο‚· Implicit Euler
ο‚· Crank-Nicolson
The second and third methods do not require particular care about the Ξ”t, namely the
advancing step, while the first one is requiring that:
βˆ†π‘‘ ≀
2
|πœ† π‘šπ‘Žπ‘₯|
where Ξ»max is the biggest eigenvector or the matrix M-1A.
7
Geometry and boundary conditions
The geometry and the boundary conditions are here summarized:
ο‚· Pipes: Non homogeneous Dirichlet BCs. The temperature of the metal of the pipes is
simply given by the temperature of the water which passes inside them;
ο‚· Lateral Boundaries: homogeneous Neumann BCs, assuming nil heat flux;
ο‚· Lower Boundary: here we imposed Robin BC, instead more obvious Dirichlet in order to
represent the heat flux due to the soil moisture;
ο‚· Upper Boundary: Robin BC, considering air convection. Heat is continuously dissipated
and the temperature tends to a certain value (environment temperature).
The temperature of the ground below the pipes is assumed as in function of the one of
the environment, but with some distinctions in function of the value of this temperature.
If it is below the average of the period, the temperature of the ground is taken a little
higher than this one, while if it is over the average, this temperature is taken a little
lower. Besides, the temperature of the pipes is taken as the mean of these two
temperatures.
8
Moreover, when implemented on Matlab, continuity between shapes is needed, indeed at the
interface ground/pipes continuity was imposed between the external side of the circles and the
side of the hole of the rectangle.
Here below the most important geometric values are reported. These are the ones taken from
our advanced engineering thermodynamics project. Though, in the program these values can
be decided by the user (all but centers distance and depth).
From thermodynamic report Supply Return
Pipe thickness mm 5 10
Inner diameter mm 40 40
Outer diameter mm 50 60
Centers distance m 0.5
Depth m 0.5
Water Temperature Β°C 90 40
9
Physical Parameters
Some considerations have to be done about the physical parameters.
In particular the insulator thermal conductivity has been chosen higher than the real one.
Indeed the mineral wool has a conductivity of 0.047 W/mK while in this case we chose 5 W/mK,
This was done to avoid a sharp drop in temperature distribution between the pipe and the
ground but a slighter gradient. However the presence of the thin metal wall of the pipe in
reality increases slightly the conduction. We did the same consideration for the ground
conductivity, in order to get a prettier result.
Another parameter has to be mentioned is the surface density. In this case, since a thickness
couldn’t to be defined (2D problem), the value of the real volumetric density was adopted also
for the surface density.
Finally the Robin BC requires the definition of the convection heat transfer coefficient. The one
chosen for the air side is Ξ±air = 20 W/m2K (typical value), whereas for the soil moisture Ξ±soil = 10
W/m2K (guessed value).
Here below all the physical parameters used in the calculations are reported.
Parameter Symbol Unit Value
Insulator thermal
conductivity
Ξ»ins W/mK 5
Ground thermal
conductivity
Ξ»g W/mK 30
Outside air temperature
(winter average)
T∞ °C 8
Deep Ground temperature T∞2 °C 7
Convection - Air side Ξ±air
W/m2
K
20
Convection - Deep Ground
Side
Ξ±soil
W/m2
K
10
Insulation surface density ρins kg/m2
20
Ground surface density ρg kg/m2
2000
Insulation specific heat
capacity
cins J/kgK 500
Ground specific heat
capacity
cg J/kgK 1480
External thermal power q W/m2
0
10
Temperature profile
The temperature profile for the rising temperature in the pipelines (the metal takes 60 seconds
to reach the water temperature):
These profiles are for:
ο‚· Supply temperature = 90Β°C;
ο‚· Return temperature = 40Β°C;
ο‚· Starting Ground temperature = 8Β° C
0 1 2 3 4 5 6
0
10
20
30
40
50
60
70
80
90
Time [s]
Edge1temperature[Β°C]
Temperature Growth in the Pipes at the Switch ON
11
Mesh and its Refinement
The reliability of the solution depends on how the problem is discretized, and so on the mesh
quality.
n_mesh parameter
An important parameter from which depends the quality of the mesh is the number of
sides of the polygons which render the circular shapes of the two pipes. Again, since the
diameters of the pipes can vary, this value is function of these diameters.
n_meshret=n_mesh+ceil(retdiam*4*n_mesh)
n_meshsupp=n_mesh+ceil(suppdiam*4*n_mesh)
These functions to determine the n_mesh values are simply an example of the ones that
could be used to obtain an n_mesh growing with the size of the pipes.
The starting value n_mesh is function of the desired quality of the mesh. The user in our
program has three choices: 4, 16, 32.
12
Talking about refinement, we tried to use different methods and levels of refinement in order
to get a good compromise between computation time and quality of the solution.
Standard Refinement
Introducing a third value (a scalar, in the example below equal to 0.05) in the use of the
mesh function it is possible to decide the level of the refinement.
Me=Mesh(Sh,Bc,0.05)
Here below there is a figure representing the mesh made with the previous command,
with n_mesh = 16.
β€œManual” Refinement
Passing a function of x and y through the InRect function, it is possible to drive the
refinement towards specific zones. In our case obviously the important parts are the
pipes and the insulations.
Raf=@(x,y)0.1-0.08*(InRect([x,y],[0.5 0.5],[
(0.1+retdiam+retins*2) (0.1+retdiam+retins*2)])|InRect([x,y],[1
0.5],[ (0.1+suppdiam+suppins*2) (0.1+suppdiam+suppins*2)]));
Me=Mesh(Sh,Bc,Raf);
The parameters of the InRect function are the coordinates of the centers of the pipes
which represent the centers of the rectangular zones (in our case square zones since a
square approximates a circle better than a rectangle), and the width and the height of
these ones. Since in the last version of our program the dimensions of the pipes can be
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh
13
chosen by the user, the side of the square is function of pipes diameters and insulator
thicknesses.
The refinement is showed in the following figure (n_mesh = 16):
Particular Case (Mesh for ODE45)
Since computations for ODE functions are very heavy, we decide to let the user choose a
very rough discretization in order to make this functions work even with high inspection
times (40000 s, that are indeed necessary to reach the stationary solution).
Of course this is only a trick to obtain anyway a solution of ODE45 with our CPUs. The
mesh is quite ridiculous (made of 148 nodes). For example the circular pipes are
discretized as hexagons (n_mesh = 6).
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh
14
Computation Time in function of Triangle size
The time required to calculate the mesh depends on the geometry and on the triangle
maximum side’s size. Here below both the number of triangles and the time for mesh
calculation vs the side’s sizes are reported, as we can see the trends are proportional.
15
Mesh quality
Here the plot of the mesh quality for different cases is reported. As expected, the lower the
triangle side’s size higher the quality, even though it is not very high in some triangles at the
interface between pipes and ground.
Figure 1 - Low Mesh Quality - Standard Refinement (1) - 148 nodes
Figure 2- Standard Mesh Quality - Standard Refinement (0.05) - 1230 nodes
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh quality
0.7
0.75
0.8
0.85
0.9
0.95
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh quality
16
Figure 3- High Mesh Quality - Standard Refinement (0.05) - 1919 nodes
Figure 4 - Standard Mesh Quality - Manual Refinement - 1208 nodes
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh quality
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh quality
17
Figure 5 - High Mesh Quality - Manual Refinement - 1909 nodes
Figure 6 - High Mesh Quality - Manual Refinement - 1909 nodes (Zoom)
As we can see lower the side higher the mesh quality. As explained before, we chose the mesh
refinement related to the best quality.
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh quality
0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8
0.5
0.55
0.6
0.65
0.7
Mesh quality
0.65
0.7
0.75
0.8
0.85
0.9
0.95
18
Matrix and vectors computations
Stiffness matrix
As said before the system to be solved is: 𝑀𝑒′
+ 𝐴𝑒 = 𝑏
Where M is the mass matrix, A the stiffness matrix and b the right-hand side vector, in our case
represented only by the boundary conditions because the external forcing is nil.
Since there is a mixture of boundary conditions we had to compose a proper function that
could manage this variety of conditions. Therefore we combined the function
AssemblaDiffRobin with the Function AsssemblaDiffNOm (we called it
AssemblaDiffNOmRobin2).
The stiffness matrix is the standard one, modified only in the Robin boundary nodes.
Right hand side vector
The computation of the elements in the vector b was done by assembling the following three
parts:
% bRobin : part of b vector due to Robin BCs
% b1 : part of b vector due to Dirichlet BCs on Return Pipe
% b2 : part of b vector due to Dirichlet BCs on Supply Pipe
Even though the temperatures of the metallic surface of the pipes are 40 and 90Β°C, the Dirichlet
boundary conditions in the main program are imposed for 1Β°C. This choice is driven by the need
of having a b vector versatile in function of the temperature during the time advancing analysis
(In the switching on of the system, the temperature of the metal increases from the
environment temperature to the water temperature). In fact in this way is sufficient to multiply
at each time step the part of b vector related to a certain pipe for the effective temperature of
that pipe.
Each pipe needs a different part of b vector since the growth in temperature and the final
temperature are different. To assign the right value of b to a certain node equation, we need to
use the function
Me.DirichletNodes(-jj,2)==3
(3 is the number of the shape, in this case we are searching the Dirichlet
Nodes of the Supply Pipe)
On the contrary, the part of the b vector related to Robin Boundary does not depend on the
temperatures in the pipes and keeps constant during the time advancing analysis.
Mass matrix
No particular modifications are needed in this case since it does not depend on the boundary
conditions. We simply used the function β€œAssemblaMatriceMassa”.
19
Initial Solution
The initial solution is obtained solving the following system
𝐴𝑒(𝑑 = 0)
in which A is the Stiffness Matrix, and b is the one for the temperature in the pipes at t=0
(Tsupply=Tsoil=8Β°C).
Stationary solution
The Stationary solution is obtained solving the same system, but considering the steady state
(tοƒ βˆž) temperature for the pipes (Tsupply=90Β°C, Treturn=40Β°C):
𝐴𝑒 = 𝑏(𝑑 β†’ ∞)
20
Time advancing
The dynamic solution is obtained by solving the system of differential equations:
𝑀𝑒′
+ 𝐴𝑒 = 𝑏 β†’ 𝑒′
= βˆ’π‘€βˆ’1
𝐴𝑒 + π‘€βˆ’1
𝑏
As time advancing method different choices can be done.
In our assignment we decided to analyze the following ones:
1) Explicit Euler;
2) Implicit Euler;
3) Crank-Nicholson.
As known from theory, in the first one there’s a restriction on the time step, indeed:
βˆ†π‘‘ π‘šπ‘Žπ‘₯ =
2
|πœ† π‘šπ‘Žπ‘₯|
Where Ξ»max is the maximum eigenvalue of the matrix M-1A, in Matlab:
lambda_max=max(eigs(inv(M)*A))); and tis value is, for the default Mesh refinement (the
rougher one) is:
|πœ† π‘šπ‘Žπ‘₯| = 1047.75
So
βˆ†π‘‘ π‘šπ‘Žπ‘₯ = 0.0019 𝑠
Since we observed that our system reaches the stationary solution in 40000 s; this method has
not been applied, because it would have required too much time, for that time step.
Hence we applied only the last two advancing method, that have no constraints on the time
step.
21
Linear system solution method
To solve the linear system the conjugate gradient was adopted. This method was also
integrated with preconditioning by using LU and Cholensky incomplete factorizations and so
obtaining the Preconditioned Conjugate Gradient Method (pcg).
Here below the trends of the relative residuals vs the iteration step are reported, for the
combinations advancing method/preconditioner. Obviously the minimum value is the same for
all these combinations, since the same tolerance was imposed, the things that change is the
slope, namely the velocity of solution converging.
As we can see from this plot the preconditioned methods converge in less number of steps and
implicit Euler method (EI) is faster than Crank-Nicholson (CK) one.
0 20 40 60 80 100 120
10
-8
10
-6
10
-4
10
-2
10
0
10
2
10
4
iteration number
relativeresidual
Methods Comparison
IE - No PreC
IE - LU PreC
IE - Ch PreC
CK - No PreC
CK - LU PreC
CK - Ch PreC
22
Time comparison
The table here reported shows the main results of the various combinations between
advancing method and preconditioning. The EI method with Cholensky incomplete factorization
turns out to be the faster one, whereas the not preconditioned solutions require more time.
Advancing Method Preconditioning Time cond(M-1
A)
Implicit Euler
No prec. 6,38 200,28
LU 6,24 56,94
Cholensky 1,25 56,94
Crank-Nicholson
No prec. 8,54 162,31
LU 4,17 38,48
Cholensky 4,31 38,48
23
Results
Below we are going to expose the results for our preferred geometry, but must be remembered
that in this program there are a few degrees of freedom in the choice of the system.
They are obtained by considering the refined mesh (localized β€œmanual” refinement) with
standard n_mesh (around 23).
Geometry:
Mesh:
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Geometry
Shape 1
Shape 2
Shape 3
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh
24
Mesh Quality:
Initial Solution:
0 0.5 1 1.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Mesh quality
0.75
0.8
0.85
0.9
0.95
0
0.5
1
1.5
0
0.5
1
0
2
4
6
8
10
Initial Solution
25
Stationary Solution:
Crank Nicholson not preconditioned Time Advancing Solution @ 30 s (pipes temperatures still
increasing):
0
0.5
1
1.5
0
0.2
0.4
0.6
0.8
1
0
20
40
60
80
100
Stationary solution
0
0.5
1
1.5
0
0.5
1
0
20
40
60
80
100
Time Advancing
26
Time Advancing Solution @ 300 s (growth in pipes finished):
Time Advancing Solution @ 15000 s (intermediate situation, temperature of the ground is
growing):
0
0.5
1
1.5
0
0.5
1
0
20
40
60
80
100
Time Advancing
0
0.5
1
1.5
0
0.5
1
0
20
40
60
80
100
Time Advancing
27
Difference between steady state profile temperature and final values with time advancing
@15000 s:
Time Advancing Solution @ 40000 s (equilibrium is reached):
0
0.5
1
1.5
0
0.5
1
-4
-3
-2
-1
0
0
0.5
1
1.5
0
0.5
1
0
20
40
60
80
100
Time Advancing
28
Difference between Stationary Solution and Time Advancing Solution @ 40000 s
On the results obtained we can say that they are reliable, because the temperature, fixed at
pipes internal side (Dirichlet condition) decreases with a strong gradient around the edge of the
tube and gradually on the soil. The temperature is also affected by convection with the outside
world as visible from the inclination of the distribution in the soil side subject to the Robin
boundary condition.
Also the time needed to reach the stationary solution is realistic (40000 s β‰ˆ 10 h).
0
0.5
1
1.5
0
0.5
1
-0.15
-0.1
-0.05
0
0.05
0.1
29
ODE time advancing method
We applied also the function ODE45 to solve our problem.
In this function the time step is very small (β‰ˆ10-4 s) and cannot be modified by the user.
Since it couldn’t be solved in a reasonable time with a high quality mesh, we used a rougher
mesh (148 nodes) to have the solution until the steady state solution without the need of
waiting hours. Here below some plots, for different time interals are reported, and the
difference between ODE45 and Crank-Nicholson method is shown.
0
0.5
1
1.5
0
0.5
1
0
20
40
60
80
100
t= 200
0
0.5
1
1.5
0
0.5
1
-40
-30
-20
-10
0
Difference between time advancing and ODE45
30
0
0.5
1
1.5
0
0.5
1
0
20
40
60
80
100
t= 10000
0
0.5
1
1.5
0
0.5
1
-10
-8
-6
-4
-2
0
Difference between time advancing and ODE45
31
0
0.5
1
1.5
0
0.2
0.4
0.6
0.8
1
0
20
40
60
80
100
t= 40000
0
0.5
1
1.5
0
0.5
1
-4
-2
0
2
4
6
x 10
-3
Difference between time advancing and ODE45
32
Conclusions
Of course the results depend mainly on the properties of insulation and of the ground. Since we
took very high values of conductivity to let the gradient be evident, the results are not so β€œreal”.
For example the temperature in the ground near the pipes is increased of about 20-30Β°C (and it
is quite unlikely).
Anyway tuning these parameters to the real one, the results seem reliable.
The difference between time advancing method at tοƒ βˆž is negligible, so the two results
confirm their reliability each other.
Finally the refinement of the mesh has not a strong influence on the results, even though the
quality results to be slightly better, but it has deep effects in computation time.
In the following appendix the scripts are reported
33
Appendix
Main Program (file PROGRAMMA.m)
The following is the main program used for all the calculations discussed. It is
divided in sections and it allows to the user to set the input parameter inside the
ground section. Moreover the user can choose what to evaluate and with which
method. This programs make use of a lot of function inside the foder
05ElementiFiniti2D that must be added to the path. In particular, as said in the
previous chapter the functions AssemblaDiffNOm and AssemblaDiffRobin have
been coupled in the function AssemblaDiffNOmRobin2, that is showed at the end
of the appendix.
clear all
close all
%% Physical Parameters (g=ground; s=supply ;r=return)
rhog=2000; %kg/m3 density
cg=1480; %J/kgK specific heat capacity
kg=30; %W/mK thermal conductivity
mhug=kg/cg;
rhos=20; %kg/m3 density
cs=500; %J/kgK specific heat capacity
ks=5;%W/mK thermal conductivity
mhus=ks/cs;
rhor=20; %%kg/m3
cr=500; %J/kgK specific heat capacity
kr=5;%W/mK thermal conductivity
mhur=kr/cr;
alfaair=20; %%W/m2K air conductivity
alfasoil=10;
%% Temperatures in the Pipes
disp('Temperature in the Supply Line');
tsupp=input('Supply Temperature:');
disp('Temperature in the Return Line');
tret=input('Return Temperature:');
disp('Temperature of the Enviroment');
tenv=input('Enviroment Temperature:');
%% Pipes Diameters
disp('Supply Pipe Diameter (m)');
suppdiam=input('Supply Diameter(suggested value 0.1):');
disp('Return Pipe Diameter (m)');
34
retdiam=input('Return Diameter(suggested value 0.1):');
%% Insulator Thickness
disp('Insulator Thickness in the Supply Line (m)');
suppins=input('Supply Insulation(suggested value 0.1):');
disp('Insulator Thickness in the Supply Line (m)');
retins=input('Return Insulation(suggested value 0.05):');
%% Quality of the Mesh
disp('Quality of the Mesh');
disp('1 - Low (for quite high t_end in ODE solving)');
disp('2 - Standard');
disp('3 - High');
qual=input('Quality (2 default value):');
if qual==1
n_mesh=4;
elseif qual==3
n_mesh=32;
else
n_mesh=16;
end
%% Geometry
n_meshret=n_mesh+ceil(retdiam*4*n_mesh)
n_meshsupp=n_mesh+ceil(suppdiam*4*n_mesh)
Sh(2)=Circle([0.5 0.5],retdiam/2+retins,n_meshret)-Circle([0.5
0.5],retdiam/2,n_meshret); %%return pipe insulation
Sh(3)=Circle([1 0.5],suppdiam/2+suppins,n_meshsupp)-Circle([1
0.5],suppdiam/2,n_meshsupp);%%supply pipe insulation
Sh(1)=Rect([0.75 0.5], [1.5 1])-Circle([0.5 0.5],retdiam/2+retins,n_meshret)-
Circle([1 0.5],suppdiam/2+suppins,n_meshsupp);%-Circle([1 0.5],0.02,n_mesh)-
Circle([0.5 0.5],0.02,n_mesh);%%soil
Sh(1) = set(Sh(1), 'alfa',mhug, 'density', rhog);
Sh(2) = set(Sh(2), 'alfa',mhur, 'density', rhor);
Sh(3) = set(Sh(3), 'alfa',mhus, 'density', rhos);
%% Boundary Conditions
%Robin coefficients
hair=alfaair/kg;
hsoil=alfasoil/kg;
if tenv>7
Tinf=tenv+1;
Tinf2=tenv-1;
elseif tenv>0
Tinf=tenv;
Tinf2=tenv;
else
Tinf=tenv-1;
35
Tinf2=tenv+1;
end
g=alfaair*Tinf/kg;
g2=alfasoil*Tinf2/kg;
Bc=Boundary(Sh);
Bc(1).Polygons(1).Edge(1)=Robin(hsoil,g2);
Bc(1).Polygons(1).Edge(4)=Neumann(0);
Bc(1).Polygons(1).Edge(2)=Neumann(0);
Bc(2).Polygons(2).Edge(:)=Dirichlet(1);
Bc(3).Polygons(2).Edge(:)=Dirichlet(1);
Bc(2).Polygons(1).Edge(:)=Continuity();
Bc(3).Polygons(1).Edge(:)=Continuity();
Bc(1).Polygons(2).Edge(:)=Continuity();
Bc(1).Polygons(3).Edge(:)=Continuity();
Bc(1).Polygons(1).Edge(3)=Robin(hair,g);
figure(1)
title('Geometry')
Draw(Sh,Bc)
%% Mesh
disp('Mesh Refinement');
disp('1 - Standard Refinement (integrated function)');
disp('2 - Manual Refinement around the pipes');
ref=input('Refinement Method:');
if ref==1
disp('Do you want to inspect the time needed for different levels of
refinement?');
disp('1 - No');
disp('2 - Yes');
tan=input('Refinement Method:');
if tan==2
lato=[0.02,0.05,0.1,0.2,0.3,0.5];
for k=1:6,
tic; Me=Mesh(Sh, Bc, lato(k));
time(k)=toc;
tr(k)=length(Me.Triangles);
end
figure(8);
title('Mesh Refinement Time');
subplot(2,1,1);
semilogy(lato,tr);
xlabel('Maximum side [A.U.]');
ylabel('Time [s]');
ylabel('Triangles');
36
subplot(2,1,2);
semilogy(lato,time);
xlabel('Maximum side [A.U.]');
ylabel('Time [s]');
ylabel('Time [s]');
end
if qual==1
Me=Mesh(Sh,Bc,1);
else
Me=Mesh(Sh,Bc,0.05);
end
else
Raf=@(x,y)0.1-0.08*(InRect([x,y],[0.5 0.5],[ (0.1+retdiam+retins*2)
(0.1+retdiam+retins*2)])|InRect([x,y],[1 0.5],[ (0.1+suppdiam+suppins*2)
(0.1+suppdiam+suppins*2)]));
Me=Mesh(Sh,Bc,Raf);
end
figure(2)
Draw(Me);
title('Mesh');
figure(11)
Draw(Me,'quality')
title('Mesh quality');
%% Matrices Computations
[A,bRobin,b1,b2 ]=AssemblaDiffNOmRobin2(Me);
M=AssemblaMatriceMassa(Me);
uu=zeros(size(Me.Coordinates,1),1);
tson=60; %switch on time
Temp2=@(t)tenv+((tret-tenv)/tson)*min(t,tson);
Temp3=@(t)tenv+((tsupp-tenv)/tson)*min(t,tson);
t=linspace(0,80,100);
figure(3)
plot(t,Temp2(t),t,Temp3(t));
xlabel('Time [s]');
ylabel('Edge 1 temperature [Β°C]')
grid on;
title ('Temperature Growth in the Pipes at the Switch ON');
lato2=find(Me.UnknownNodes<0 & Me.Coordinates(:,1)<(0.51+retdiam/2+retins)&
Me.Coordinates(:,2)>(0.49-retdiam/2-retins));
lato3=find(Me.UnknownNodes<0 & Me.Coordinates(:,1)>(1-suppdiam/2-suppins)&
Me.Coordinates(:,2)>(0.49-suppdiam/2-suppins));
37
uu(lato2)=tenv;
uu(lato3)=tenv;
lato4=GetDirichletNodes(Me,[1,1,1]);
uu(lato4)=Evaluate(Bc,[1,1,1],Me.Coordinates(lato4,:));
uutadv=uu;
%% Precond
disp('Do you want to evaluate the conditioning number?');
disp('0 - No');
disp('1 - Yes');
precond=input('Preconditioning:');
if precond==1
dt=200;
Mck=M+(dt/2*A);
Mei=M+dt*A;
disp('Preconditiong methods for implicit euler (ei) or crank nicholson (ck)
method:');
disp('1 - LU incomplete factorization');
disp('2 - Cholensky incomplete factorization');
disp('3 - No preconditioning');
pre=input('Preconditioning:');
if pre==1
[Lei,Uei]=luinc(sparse(Mei),'0');
ncondei=condest(Lei*Ueisparse(Mei));
[Lck,Uck]=luinc(sparse(Mck),'0');
ncondck=condest(Lck*Ucksparse(Mck));
elseif pre==2
[Uei]=cholinc(sparse(Mei),'0');
Lei=Uei';
ncondei=condest((Lei*Uei)sparse(Mei));
[Uck]=cholinc(sparse(Mck),'0');
Lck=Uck';
ncondck=condest((Lck*Uck)sparse(Mck));
else
ncondei=condest(Mei);
ncondck=condest(Mck);
end
disp('computation time: ');
disp('conditioning number');
ncondck
ncondei
end
%% Tolerance Plot
disp('Do you want to evaluate how fast Tolerance is reached?');
disp('0 - No');
disp('1 - Yes');
tolflag=input('Tolerance:');
if tolflag==1
uT0=pcg(A,bRobin+b1*Temp2(0)+b2*Temp3(0),1e-3,100);
u=uT0;
tend=40000;
dt=200;
tic
38
for k11=1:tend/dt
t=k11*dt;
%[u,flag,relres,iter,resvec]=pcg((M+dt2/2*A), (M*u-
dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt2)+b2*Temp3(t-dt2)))),1e-12,200,[],[],u);%Crank-Nicholson
[u,flag,relres11,iter11,resvec11]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2
*Temp3(t))),1e-10,200,[],[],u);
end
time(1)=toc;
Mie=M+(dt*A);
[L,U]=luinc(sparse(Mie),'0');
tic
for k12=1:tend/dt
t=k12*dt;
%[u,flag,relres,iter,resvec]=pcg((M+dt2/2*A), (M*u-
dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt2)+b2*Temp3(t-dt2)))),1e-12,200,[],[],u);%Crank-Nicholson
[u,flag,relres12,iter12,resvec12]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2
*Temp3(t))),1e-10,200,L,U,u);
end
time(2)=toc;
Mck=M+(dt/2*A);
R=cholinc(sparse(Mck),'0');
tic
for k13=1:tend/dt
t=k13*dt;
%[u,flag,relres,iter,resvec]=pcg((M+dt2/2*A), (M*u-
dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt2)+b2*Temp3(t-dt2)))),1e-12,200,[],[],u);%Crank-Nicholson
[u,flag,relres13,iter13,resvec13]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2
*Temp3(t))),1e-10,200,R',R,u);
end
time(3)=toc;
tic
for k=1:tend/dt
t=k*dt;
[u,flag,relres21,iter21,resvec21]=pcg((M+dt/2*A), (M*u-
dt/2*A*u+dt/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt)+b2*Temp3(t-dt)))),1e-10,200,[],[],u);%Crank-Nicholson
%
[u,flag,relres,iter,resvec]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2*Temp3
(t))),1e-10,200,[],[],u);
end
time(4)=toc;
tic
for k=1:tend/dt
t=k*dt;
[u,flag,relres22,iter22,resvec22]=pcg((M+dt/2*A), (M*u-
dt/2*A*u+dt/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt)+b2*Temp3(t-dt)))),1e-10,200,L,U,u);%Crank-Nicholson
%
[u,flag,relres,iter,resvec]=pcg((Mie+dt*A),(Mie*u+dt*(bRobin+b1*Temp2(t)+b2*T
emp3(t))),1e-10,200,L,U,u);
end
39
time(5)=toc;
tic
for k=1:tend/dt
t=k*dt;
[u,flag,relres23,iter23,resvec23]=pcg((M+dt/2*A), (M*u-
dt/2*A*u+dt/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt)+b2*Temp3(t-dt)))),1e-10,200,R',R,u);%Crank-Nicholson
%
[u,flag,relres,iter,resvec]=pcg((Mck+dt*A),(Mck*u+dt*(bRobin+b1*Temp2(t)+b2*T
emp3(t))),1e-10,200,R',R,u);
end
time(6)=toc;
figure(12)
semilogy(0:iter11,resvec11,'-o')
hold on
semilogy(0:iter12,resvec12,'-x')
hold on
semilogy(0:iter13,resvec13,'-r')
hold on
semilogy(0:iter21,resvec21,'-g')
semilogy(0:iter22,resvec22,'+')
semilogy(0:iter23,resvec23,'--rs')
legend('IE - No PreC','IE - LU PreC','IE - Ch PreC','CK - No PreC','CK - LU
PreC','CK - Ch PreC')
xlabel('iteration number');
ylabel('relative residual');
title('Methods Comparison');
end
%% Initial Solution (t=0)
uT0=pcg(A,bRobin+b1*Temp2(0)+b2*Temp3(0),1e-3,100);
uu(Me.UnknownNodes>0)= uT0;
uu(lato2)=Temp2(0); %temperatura in t=0
uu(lato3)=Temp3(0);
figure(4)
Draw(Me,uu);
title('Initial Solution');
%% Stationary Solution
uTInf=pcg(A,bRobin+b1*Temp2(1e50)+b2*Temp3(1e50),1e-3,100);
uu(Me.UnknownNodes>0)= uTInf;
uu(lato2)=Temp2(1e50); %temperatura in t="Inf"
uu(lato3)=Temp3(1e50);
figure(5)
Draw(Me,uu);
title('Stationary solution');
%% Time Advancing
figure(6);
u=uT0;
dt1=1;
dt2=10;
dt3=100;
dt4=500;
40
tend=15000;
t=0;
while t<tend
if t<tson
t=t+dt1;
[u,flag]=pcg((M+dt1/2*A), (M*u-
dt1/2*A*u+dt1/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt1)+b2*Temp3(t-dt1)))),1e-6,200,[],[],u);%Crank-Nicholson
elseif t<tend/100
t=t+dt2;
[u,flag]=pcg((M+dt2/2*A), (M*u-
dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt2)+b2*Temp3(t-dt2)))),1e-6,200,[],[],u);%Crank-Nicholson
elseif t<tend/20
t=t+dt3;
[u,flag]=pcg((M+dt3/2*A), (M*u-
dt3/2*A*u+dt3/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt3)+b2*Temp3(t-dt3)))),1e-6,200,[],[],u);%Crank-Nicholson
else
t=t+dt4;
[u,flag]=pcg((M+dt4/2*A), (M*u-
dt4/2*A*u+dt4/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t-
dt4)+b2*Temp3(t-dt4)))),1e-6,200,[],[],u);%Crank-Nicholson
end
uutadv(Me.UnknownNodes>0)= u;
uutadv(lato2)=Temp2(t);
uutadv(lato3)=Temp3(t);
hold off;
Draw(Me,uutadv);
zlim([0 100]);
title(['t= ' num2str(t)]);
drawnow;
end
title('Time Advancing');
figure(9)
title('Difference between time advancing and stationary solution');
Draw(Me,uutadv-uu);
%% ODE 45
disp('End Time in ODE45 (choose low value, suggested<1000 s, otherwise wait
more XD)');
tend=input('Tend (s):');
figure(7);
u=pcg(A,bRobin+b1*Temp2(0)+b2*Temp3(0),1e-3,100);
odepar=odeset('mass',M);
[t,u]=ode45(@(t,y)(-
A*y+(bRobin+b1*Temp2(t)+b2*Temp3(t))),linspace(0,tend,10),u,odepar);
uu=zeros(size(Me.Coordinates,1),1);
for k=1:length(t)
uu(Me.UnknownNodes>0)= u(k,:);
uu(lato2)=Temp2(t(k));
uu(lato3)=Temp3(t(k));
hold off;
41
Draw(Me,uu);
zlim([0 100]);
title(['t= ' num2str(t(k))]);
drawnow;
end
figure(10)
Draw(Me,uu-uutadv);
title('Difference between time advancing and ODE45');
Auxiliary function: AssemblaDiffNOmRobin2
function [D,bRobin,b1,b2] = AssemblaDiffNOmRobin2(Me)
%It assembles D Matrix and b vector of this particular problem in which
%are involved non homogeneous Dirichlet, homogeneous Neumann and Robin
%boundary conditions
%
%Input:
% Me : Mesh
%
%Output:
% D : Stiffness Matrix
% bRobin : part of b vector due to Robin BCs
% b1 : part of b vector due to Dirichlet BCs on Return Pipe
% b2 : part of b vector due to Dirichlet BCs on Supply Pipe
Tr=Me.Triangles;
NI=Me.UnknownNodes;
C=Me.Coordinates;
N_Tr = size(Tr,1);
N_int = max(NI);
D = spalloc(N_int,N_int,10*N_int);
bRobin = zeros(N_int,1);
b1 = zeros(N_int,1);
b2 = zeros(N_int,1);
% b3 = zeros(N_int,1);
for e=1:N_Tr
Dx(1) = C(Tr(e,3),1) - C(Tr(e,2),1);
Dx(2) = C(Tr(e,1),1) - C(Tr(e,3),1);
Dx(3) = C(Tr(e,2),1) - C(Tr(e,1),1);
Dy(1) = C(Tr(e,2),2) - C(Tr(e,3),2);
Dy(2) = C(Tr(e,3),2) - C(Tr(e,1),2);
Dy(3) = C(Tr(e,1),2) - C(Tr(e,2),2);
Areass=Me.Aree(e);
%valuto la forza
xb=Me.CenterOfMass(e,1);
yb=Me.CenterOfMass(e,2);
for i=1:3
ii = NI(Tr(e,i));
if( ii > 0)
for j=1:3
jj = NI(Tr(e,j));
42
mu=get(Me.Shapes(Me.Faces(e)),'alfa',[xb,yb]);
d=mu*(Dy(i)*Dy(j)+Dx(i)*Dx(j))/(4.0*Areass) ;
if( jj > 0)
D(ii,jj) = D(ii,jj) + d;
else
xy=C(Tr(e,j),:);
aux=Me.DirichletNodes(-jj,:);
val=Evaluate(Me.Bc, aux,xy);
if Me.DirichletNodes(-jj,2)==2
b1(ii) = b1(ii) - d*val ;
elseif Me.DirichletNodes(-jj,2)==3
b2(ii) = b2(ii) - d*val ;
else
% b3(ii) = b3(ii) - d*val ;
end
end
end
end
end
end
L=Me.Edges;
Ro=Me.EdgesRobin;
for k=1:length(Ro)
Nodo1=L(Ro(k),1);
Nodo2=L(Ro(k),2);
dist=norm(C(Nodo1,:)-C(Nodo2,:));
ii1=NI(Nodo1);
ii2=NI(Nodo2);
xmedia=(Me.Coordinates(Nodo1,1)+Me.Coordinates(Nodo2,1))/2;
ymedia=(Me.Coordinates(Nodo1,2)+Me.Coordinates(Nodo2,2))/2;
val=Evaluate(Me.Bc,Ro(k,:), [xmedia, ymedia]);
h=val(1);
g=val(2);
if ii1>0 && ii2<0 %ii1 Γ¨ incognito, ii2 Γ¨ noto
bRobin(ii1)=bRobin(ii1)+g/2*dist;
D(ii1,ii1)=D(ii1,ii1)+h*dist/3;
elseif ii1<0 && ii2>0 %ii1 Γ¨ noto, ii2 Γ¨ incognito
bRobin(ii2)=bRobin(ii2)+g/2*norm(dist);
D(ii2,ii2)=D(ii2,ii2)+h*dist/3;
else %allora sono entrambi di Neumann
bRobin(ii1)=bRobin(ii1)+g/2*norm(dist);
bRobin(ii2)=bRobin(ii2)+g/2*norm(dist);
D(ii1,ii1)=D(ii1,ii1)+h*dist/3;
D(ii2,ii2)=D(ii2,ii2)+h*dist/3;
D(ii1,ii2)=D(ii1,ii2)+h*dist/6;
D(ii2,ii1)=D(ii2,ii1)+h*dist/6;
end
end

More Related Content

What's hot

Solution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. JijiSolution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. Jijiphysicsbook
Β 
ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1prakash0712
Β 
Shape and size effects on concrete properties under an elevated temperature
Shape and size effects on concrete properties under an elevated temperatureShape and size effects on concrete properties under an elevated temperature
Shape and size effects on concrete properties under an elevated temperatureAlexander Decker
Β 
Fuels and Combustion
Fuels and CombustionFuels and Combustion
Fuels and CombustionYuri Melliza
Β 
ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1prakash0712
Β 
Transient heat-conduction-Part-I
Transient heat-conduction-Part-ITransient heat-conduction-Part-I
Transient heat-conduction-Part-Itmuliya
Β 
Numerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conductionNumerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conductiontmuliya
Β 
(3) heat conduction equation [compatibility mode]
(3) heat conduction equation [compatibility mode](3) heat conduction equation [compatibility mode]
(3) heat conduction equation [compatibility mode]Mandava Ramya
Β 
1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat GenerationMihir Patel
Β 
Second Law of Thermodynamics
Second Law of ThermodynamicsSecond Law of Thermodynamics
Second Law of ThermodynamicsYujung Dong
Β 
One dim, steady-state, heat conduction_with_heat_generation
One dim, steady-state, heat conduction_with_heat_generationOne dim, steady-state, heat conduction_with_heat_generation
One dim, steady-state, heat conduction_with_heat_generationtmuliya
Β 
CH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 Solutions
CH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 SolutionsCH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 Solutions
CH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 Solutionssemihypocrite
Β 
Ch2 Heat transfer - conduction
Ch2 Heat transfer - conductionCh2 Heat transfer - conduction
Ch2 Heat transfer - conductioneky047
Β 
Lecture27
Lecture27Lecture27
Lecture27nomio0703
Β 
Problem and solution i ph o 20
Problem and solution i ph o 20Problem and solution i ph o 20
Problem and solution i ph o 20eli priyatna laidan
Β 
6th ed solution manual---fundamentals-of-heat-and-mass-transfer
6th ed solution manual---fundamentals-of-heat-and-mass-transfer6th ed solution manual---fundamentals-of-heat-and-mass-transfer
6th ed solution manual---fundamentals-of-heat-and-mass-transferRonald Tenesaca
Β 

What's hot (19)

Solution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. JijiSolution Manual for Heat Convection second edition by Latif M. Jiji
Solution Manual for Heat Convection second edition by Latif M. Jiji
Β 
ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1
Β 
Heat Convection by Latif M. Jiji - solutions
Heat Convection by Latif M. Jiji - solutionsHeat Convection by Latif M. Jiji - solutions
Heat Convection by Latif M. Jiji - solutions
Β 
Shape and size effects on concrete properties under an elevated temperature
Shape and size effects on concrete properties under an elevated temperatureShape and size effects on concrete properties under an elevated temperature
Shape and size effects on concrete properties under an elevated temperature
Β 
Fuels and Combustion
Fuels and CombustionFuels and Combustion
Fuels and Combustion
Β 
ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1ENGINEERING THERMODYNAMICS-UNIT 1
ENGINEERING THERMODYNAMICS-UNIT 1
Β 
UNIT-1 CONDUCTION
UNIT-1 CONDUCTIONUNIT-1 CONDUCTION
UNIT-1 CONDUCTION
Β 
Transient heat-conduction-Part-I
Transient heat-conduction-Part-ITransient heat-conduction-Part-I
Transient heat-conduction-Part-I
Β 
Numerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conductionNumerical methods in Transient-heat-conduction
Numerical methods in Transient-heat-conduction
Β 
(3) heat conduction equation [compatibility mode]
(3) heat conduction equation [compatibility mode](3) heat conduction equation [compatibility mode]
(3) heat conduction equation [compatibility mode]
Β 
1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation1-D Steady State Heat Transfer With Heat Generation
1-D Steady State Heat Transfer With Heat Generation
Β 
Finite difference equation
Finite difference equationFinite difference equation
Finite difference equation
Β 
Second Law of Thermodynamics
Second Law of ThermodynamicsSecond Law of Thermodynamics
Second Law of Thermodynamics
Β 
One dim, steady-state, heat conduction_with_heat_generation
One dim, steady-state, heat conduction_with_heat_generationOne dim, steady-state, heat conduction_with_heat_generation
One dim, steady-state, heat conduction_with_heat_generation
Β 
CH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 Solutions
CH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 SolutionsCH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 Solutions
CH EN 3453 Heat Transfer 2014 Fall Utah Homework HW 01 Solutions
Β 
Ch2 Heat transfer - conduction
Ch2 Heat transfer - conductionCh2 Heat transfer - conduction
Ch2 Heat transfer - conduction
Β 
Lecture27
Lecture27Lecture27
Lecture27
Β 
Problem and solution i ph o 20
Problem and solution i ph o 20Problem and solution i ph o 20
Problem and solution i ph o 20
Β 
6th ed solution manual---fundamentals-of-heat-and-mass-transfer
6th ed solution manual---fundamentals-of-heat-and-mass-transfer6th ed solution manual---fundamentals-of-heat-and-mass-transfer
6th ed solution manual---fundamentals-of-heat-and-mass-transfer
Β 

Similar to Temperature Distribution in a ground section of a double-pipe system in a districti heating network

One Dimensional Steady State Heat Conduction
One Dimensional Steady State Heat ConductionOne Dimensional Steady State Heat Conduction
One Dimensional Steady State Heat ConductionBektu Dida
Β 
Heat flow through concrete floor
Heat flow through concrete floorHeat flow through concrete floor
Heat flow through concrete floorAmy Do
Β 
Lec11 lumped h capacity no mark.pdf
Lec11 lumped h capacity no mark.pdfLec11 lumped h capacity no mark.pdf
Lec11 lumped h capacity no mark.pdfMalik Mustafa Mohammed
Β 
Experiment 4Newtonian CoolingEGME 306AGroup 2ABS.docx
Experiment 4Newtonian CoolingEGME 306AGroup 2ABS.docxExperiment 4Newtonian CoolingEGME 306AGroup 2ABS.docx
Experiment 4Newtonian CoolingEGME 306AGroup 2ABS.docxgitagrimston
Β 
GATE Mechanical Engineering notes on Heat Transfer
GATE Mechanical Engineering notes on Heat TransferGATE Mechanical Engineering notes on Heat Transfer
GATE Mechanical Engineering notes on Heat TransferHimanshu Vasistha
Β 
ABSTRACTThe objective of this experiment is to understa.docx
ABSTRACTThe objective of this experiment is to understa.docxABSTRACTThe objective of this experiment is to understa.docx
ABSTRACTThe objective of this experiment is to understa.docxannetnash8266
Β 
Heat Conduction with thermal heat generation.pptx
Heat Conduction with thermal heat generation.pptxHeat Conduction with thermal heat generation.pptx
Heat Conduction with thermal heat generation.pptxBektu Dida
Β 
Heat and thermodynamics - Preliminary / Dr. Mathivanan Velumani
Heat and thermodynamics -  Preliminary / Dr. Mathivanan VelumaniHeat and thermodynamics -  Preliminary / Dr. Mathivanan Velumani
Heat and thermodynamics - Preliminary / Dr. Mathivanan VelumaniMathivanan Velumani
Β 
Top School in india
Top School in indiaTop School in india
Top School in indiaEdhole.com
Β 
lecture pf control system_thermal system_206.pdf
lecture pf control system_thermal system_206.pdflecture pf control system_thermal system_206.pdf
lecture pf control system_thermal system_206.pdfAtmacaDevrim
Β 
HMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdf
HMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdfHMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdf
HMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdfRaviShankar269655
Β 
Mohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docx
Mohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docxMohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docx
Mohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docxmoirarandell
Β 
Radial Heat conduction.docx
Radial Heat conduction.docxRadial Heat conduction.docx
Radial Heat conduction.docxEngDiyar
Β 
427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx
427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx
427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptxKajalMIshra63
Β 
Thermodynamics - Unit - II
Thermodynamics - Unit - II Thermodynamics - Unit - II
Thermodynamics - Unit - II sureshkcet
Β 
two dimensional steady state heat conduction
two dimensional steady state heat conduction two dimensional steady state heat conduction
two dimensional steady state heat conduction Amare Addis
Β 
Heat Conduction Simulation with FDM
Heat Conduction Simulation with FDMHeat Conduction Simulation with FDM
Heat Conduction Simulation with FDMXueer Zhang
Β 
CH 11 HEAT EXCHANGERS Lec1 2022.pdf
CH 11 HEAT EXCHANGERS Lec1 2022.pdfCH 11 HEAT EXCHANGERS Lec1 2022.pdf
CH 11 HEAT EXCHANGERS Lec1 2022.pdfAnasmohamedAhmed
Β 
Heat transfer(HT) lab manual
Heat transfer(HT) lab manualHeat transfer(HT) lab manual
Heat transfer(HT) lab manualnmahi96
Β 

Similar to Temperature Distribution in a ground section of a double-pipe system in a districti heating network (20)

One Dimensional Steady State Heat Conduction
One Dimensional Steady State Heat ConductionOne Dimensional Steady State Heat Conduction
One Dimensional Steady State Heat Conduction
Β 
Heat flow through concrete floor
Heat flow through concrete floorHeat flow through concrete floor
Heat flow through concrete floor
Β 
Lec11 lumped h capacity no mark.pdf
Lec11 lumped h capacity no mark.pdfLec11 lumped h capacity no mark.pdf
Lec11 lumped h capacity no mark.pdf
Β 
Experiment 4Newtonian CoolingEGME 306AGroup 2ABS.docx
Experiment 4Newtonian CoolingEGME 306AGroup 2ABS.docxExperiment 4Newtonian CoolingEGME 306AGroup 2ABS.docx
Experiment 4Newtonian CoolingEGME 306AGroup 2ABS.docx
Β 
GATE Mechanical Engineering notes on Heat Transfer
GATE Mechanical Engineering notes on Heat TransferGATE Mechanical Engineering notes on Heat Transfer
GATE Mechanical Engineering notes on Heat Transfer
Β 
ABSTRACTThe objective of this experiment is to understa.docx
ABSTRACTThe objective of this experiment is to understa.docxABSTRACTThe objective of this experiment is to understa.docx
ABSTRACTThe objective of this experiment is to understa.docx
Β 
Heat Conduction with thermal heat generation.pptx
Heat Conduction with thermal heat generation.pptxHeat Conduction with thermal heat generation.pptx
Heat Conduction with thermal heat generation.pptx
Β 
Heat and thermodynamics - Preliminary / Dr. Mathivanan Velumani
Heat and thermodynamics -  Preliminary / Dr. Mathivanan VelumaniHeat and thermodynamics -  Preliminary / Dr. Mathivanan Velumani
Heat and thermodynamics - Preliminary / Dr. Mathivanan Velumani
Β 
Top School in india
Top School in indiaTop School in india
Top School in india
Β 
lecture pf control system_thermal system_206.pdf
lecture pf control system_thermal system_206.pdflecture pf control system_thermal system_206.pdf
lecture pf control system_thermal system_206.pdf
Β 
HMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdf
HMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdfHMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdf
HMT CONVhdhdhdhdhdhdh hv vhvh vECTION 1.pdf
Β 
Mohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docx
Mohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docxMohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docx
Mohammad AlbuloushiExperiment IVNewtonian CoolingEGME 30.docx
Β 
Radial Heat conduction.docx
Radial Heat conduction.docxRadial Heat conduction.docx
Radial Heat conduction.docx
Β 
427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx
427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx
427962671-HT3-Unsteady-State-Heat-Transfer-f-pptx-Lipika-Mam-Ppt.pptx
Β 
Thermodynamics - Unit - II
Thermodynamics - Unit - II Thermodynamics - Unit - II
Thermodynamics - Unit - II
Β 
two dimensional steady state heat conduction
two dimensional steady state heat conduction two dimensional steady state heat conduction
two dimensional steady state heat conduction
Β 
Heat Conduction Simulation with FDM
Heat Conduction Simulation with FDMHeat Conduction Simulation with FDM
Heat Conduction Simulation with FDM
Β 
Thermodynamics 2
Thermodynamics 2 Thermodynamics 2
Thermodynamics 2
Β 
CH 11 HEAT EXCHANGERS Lec1 2022.pdf
CH 11 HEAT EXCHANGERS Lec1 2022.pdfCH 11 HEAT EXCHANGERS Lec1 2022.pdf
CH 11 HEAT EXCHANGERS Lec1 2022.pdf
Β 
Heat transfer(HT) lab manual
Heat transfer(HT) lab manualHeat transfer(HT) lab manual
Heat transfer(HT) lab manual
Β 

Recently uploaded

πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
Β 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
Β 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
Β 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
Β 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
Β 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
Β 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
Β 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
Β 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
Β 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
Β 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
Β 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
Β 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
Β 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
Β 

Recently uploaded (20)

young call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Service
young call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Serviceyoung call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Service
young call girls in Rajiv ChowkπŸ” 9953056974 πŸ” Delhi escort Service
Β 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Β 
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
πŸ”9953056974πŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
Β 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
Β 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
Β 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Β 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
Β 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
Β 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
Β 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
Β 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Β 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Β 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Β 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
Β 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
Β 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
Β 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
Β 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
Β 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Β 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Β 

Temperature Distribution in a ground section of a double-pipe system in a districti heating network

  • 1. Politecnico di Torino Mechanical Engineering Numerical Modelling Report Academic year 2010/2011 TEMPERATURE DISTRIBUTION IN A GROUND SECTION OF A DOUBLE-PIPE SYSTEM IN A DISTRICT HEATING NETWORK Paolo Fornaseri Enrico Grassano Alessandro Tumino
  • 2. 1 INDEX .......................................................................................................................................................................0 .......................................................................................................................................................................1 Introduction..................................................................................................................................................2 Mathematic model description: the heat equation ..................................................................................2 Boundary conditions for the thermal model.........................................................................................4 Finite elements method theory ..................................................................................................................5 Time discretization ..................................................................................................................................6 Geometry and boundary conditions..........................................................................................................7 Physical Parameters ...................................................................................................................................9 Temperature profile...................................................................................................................................10 Mesh and its Refinement ..........................................................................................................................11 n_mesh parameter .............................................................................................................................11 Standard Refinement .........................................................................................................................12 β€œManual” Refinement.........................................................................................................................12 Particular Case (Mesh for ODE45)....................................................................................................13 Computation Time in function of Triangle size...............................................................................14 Mesh quality .......................................................................................................................................15 Matrix and vectors computations............................................................................................................18 Stiffness matrix......................................................................................................................................18 Right hand side vector ..........................................................................................................................18 Mass matrix ............................................................................................................................................18 Initial Solution............................................................................................................................................19 Stationary solution....................................................................................................................................19 Time advancing .........................................................................................................................................20 Linear system solution method ...............................................................................................................21 Time comparison.......................................................................................................................................22 Results........................................................................................................................................................23 ODE time advancing method ...................................................................................................................29 Conclusions...............................................................................................................................................32 Appendix ....................................................................................................................................................33
  • 3. 2 Introduction Our analysis concerns the distribution network of a suburb in the city of Turin. We analyzed the thermal needs, the network layout and many other engineering problems regarding the distribution of heat. In the following report we are going to analyze the simplified model of a couple of buried ducts, conveying the fluid used for thermal needs in the houses. We analyzed the thermal distribution in the pipeline, in particular we focused on a section of the ground, in which the water passes through the double-pipe system, namely return and supply pipe. We used the fundamental heat equation (conduction) and the subsequent numerical discretization, in the transient and in the steady state. To this aim, we made some simplifications in order to apply our mathematical model. Mathematic model description: the heat equation The domain in which we are working is the cross section of the soil that hence becomes the plate studied at lesson. The heat quantity in the plate is expressed like: ∫ 𝑐(π‘₯)𝜌(π‘₯)𝑒(π‘₯, 𝑑)𝑑π‘₯ where: c is the heat capacity ρ is the mass density per unit surface u is the temperature This integral has to be performed on the whole surface. Now, having a heat transfer balance on the plate boundary it can be written that: 𝑑 𝑑𝑑 ∫ πœŒπ‘π‘’ 𝑑π‘₯ = ∫ 𝛷 βˆ™ 𝑛 𝑑𝑠 where Ξ¦ is the heat flux n is the unit vector normal to the boundary Now, we can use the Gauss-Green theorem and we get: ∫ π‘πœŒ 𝑑𝑒 𝑑𝑑 𝑑π‘₯ = ∫ βˆ‡ βˆ™ 𝛷 𝑑π‘₯ Hence π‘πœŒ 𝑑𝑒 𝑑𝑑 βˆ’ βˆ‡ βˆ™ 𝛷 = 0 the Fourier relation, linking the heat flux to the temperature gradient, is now introduce. Substituting in the previous relation we get :
  • 4. 3 π‘πœŒ 𝑑𝑒 𝑑𝑑 βˆ’ βˆ‡ βˆ™ (πœ†βˆ‡π‘’) = 0 Where Ξ» is the thermal conductivity. The relation holds for every point in the domain of the plate. The stationary heat equation is: βˆ‡ βˆ™ (πœ†βˆ‡π‘’) = 0 Actually, the most general relation includes the forcing term q, namely, the heat absorbed or sold by the system. In our model there’s no the need to include this term, since no external source of heat is considered.
  • 5. 4 Boundary conditions for the thermal model In the model we dealt with, we considered three kind of boundary condition: ο‚· Dirichlet boundary, so the direct imposition of a certain value of temperature on the boundary 𝑒 = 𝑔 ο‚· Neumann conditions, so fixing the value of the derivative, with respect to a certain direction, of the temperature. This is the same as impose a flux πœ•π‘’ πœ•π‘› = πœ“ ο‚· Robin condition that consists in the expression of the flux like a function of the temperature πœ•π‘’ πœ•π‘› = 𝛼(π‘‡βˆž βˆ’ 𝑒) where T∞ is the known temperature outside and Ξ± is the convective heat transfer coefficient.
  • 6. 5 Finite elements method theory We introduce now the finite element model for the previous equation. We discretize the domain considered a triangulation Ο„, given by a sum of triangles T such that: π‘ˆ π‘‡βˆˆπœ = Ξ© First of all, we have to bring back the previous formulation to the following one: { 𝜚 πœ•π‘’ πœ•π‘‘ βˆ’ βˆ‡ βˆ™ (πœ‡βˆ‡π‘’) = 𝑓 𝑏. 𝑐. π‘œπ‘› π‘‘β„Žπ‘’ π‘ π‘’π‘Ÿπ‘“π‘Žπ‘π‘’ So, new coefficients are obtained from the previous values with the following formulas: πœ‡ = πœ† 𝑐 𝑓 = π‘ž 𝑐 The latter one, as said, is nil. Now, we consider the variational formulation of the problem { π‘’β„Ž(𝑑) ∈ π‘‰β„Ž ∫ 𝜌 πœ•π‘’β„Ž πœ•π‘‘ π‘£β„Ž 𝑑π‘₯ + ∫ πœ‡βˆ‡π‘’β„Žβˆ‡π‘£β„Ž 𝑑π‘₯ = 0 Where the function v is the generic test function. In this scheme, the function vh is generated by linear combination of the Lagrange base functions Ο†j, such that: π‘£β„Ž = βˆ‘ 𝑣𝑗 πœ‘π‘— 𝑁 𝑗=1 Now, for the variable u it holds: π‘’β„Ž = βˆ‘ 𝑣 π‘˜(𝑑)πœ‘ π‘˜ 𝑁 π‘˜=1 And so finally we obtain: βˆ‘ 𝑒 π‘˜Μ‡ ∫ πœŒπœ‘π‘— πœ‘ π‘˜ 𝑑Ω π‘˜ + βˆ‘ 𝑒 π‘˜ π‘˜ πœ‡ ∫ βˆ‡πœ‘π‘—βˆ‡πœ‘ π‘˜ 𝑑Ω = 0 The method is based on the projection of the weak form of a differential equation on functions with limited support The base functions πœ‘π‘— are pyramidal functions with a vertex in xj, height equal to 1 and base made by the triangles TK having a vertex in xj.
  • 7. 6 Time discretization Since we have to consider the temporal variation, we used different time advancing methods. To this aim, it’s good to define the matrix quantities that will be used in the system: 𝑀𝑒′ βˆ’ 𝐴𝑒 = 0 hence, it holds: 𝑀 = (π‘šπ‘—π‘˜) = ∫ πœŒπœ‘π‘— πœ‘ π‘˜ 𝑑Ω and 𝐴 = (π‘Žπ‘—π‘˜) = πœ‡ ∫ βˆ‡πœ‘π‘—βˆ‡πœ‘ π‘˜ 𝑑Ω The considered time advancing methods are: ο‚· Explicit Euler ο‚· Implicit Euler ο‚· Crank-Nicolson The second and third methods do not require particular care about the Ξ”t, namely the advancing step, while the first one is requiring that: βˆ†π‘‘ ≀ 2 |πœ† π‘šπ‘Žπ‘₯| where Ξ»max is the biggest eigenvector or the matrix M-1A.
  • 8. 7 Geometry and boundary conditions The geometry and the boundary conditions are here summarized: ο‚· Pipes: Non homogeneous Dirichlet BCs. The temperature of the metal of the pipes is simply given by the temperature of the water which passes inside them; ο‚· Lateral Boundaries: homogeneous Neumann BCs, assuming nil heat flux; ο‚· Lower Boundary: here we imposed Robin BC, instead more obvious Dirichlet in order to represent the heat flux due to the soil moisture; ο‚· Upper Boundary: Robin BC, considering air convection. Heat is continuously dissipated and the temperature tends to a certain value (environment temperature). The temperature of the ground below the pipes is assumed as in function of the one of the environment, but with some distinctions in function of the value of this temperature. If it is below the average of the period, the temperature of the ground is taken a little higher than this one, while if it is over the average, this temperature is taken a little lower. Besides, the temperature of the pipes is taken as the mean of these two temperatures.
  • 9. 8 Moreover, when implemented on Matlab, continuity between shapes is needed, indeed at the interface ground/pipes continuity was imposed between the external side of the circles and the side of the hole of the rectangle. Here below the most important geometric values are reported. These are the ones taken from our advanced engineering thermodynamics project. Though, in the program these values can be decided by the user (all but centers distance and depth). From thermodynamic report Supply Return Pipe thickness mm 5 10 Inner diameter mm 40 40 Outer diameter mm 50 60 Centers distance m 0.5 Depth m 0.5 Water Temperature Β°C 90 40
  • 10. 9 Physical Parameters Some considerations have to be done about the physical parameters. In particular the insulator thermal conductivity has been chosen higher than the real one. Indeed the mineral wool has a conductivity of 0.047 W/mK while in this case we chose 5 W/mK, This was done to avoid a sharp drop in temperature distribution between the pipe and the ground but a slighter gradient. However the presence of the thin metal wall of the pipe in reality increases slightly the conduction. We did the same consideration for the ground conductivity, in order to get a prettier result. Another parameter has to be mentioned is the surface density. In this case, since a thickness couldn’t to be defined (2D problem), the value of the real volumetric density was adopted also for the surface density. Finally the Robin BC requires the definition of the convection heat transfer coefficient. The one chosen for the air side is Ξ±air = 20 W/m2K (typical value), whereas for the soil moisture Ξ±soil = 10 W/m2K (guessed value). Here below all the physical parameters used in the calculations are reported. Parameter Symbol Unit Value Insulator thermal conductivity Ξ»ins W/mK 5 Ground thermal conductivity Ξ»g W/mK 30 Outside air temperature (winter average) T∞ Β°C 8 Deep Ground temperature T∞2 Β°C 7 Convection - Air side Ξ±air W/m2 K 20 Convection - Deep Ground Side Ξ±soil W/m2 K 10 Insulation surface density ρins kg/m2 20 Ground surface density ρg kg/m2 2000 Insulation specific heat capacity cins J/kgK 500 Ground specific heat capacity cg J/kgK 1480 External thermal power q W/m2 0
  • 11. 10 Temperature profile The temperature profile for the rising temperature in the pipelines (the metal takes 60 seconds to reach the water temperature): These profiles are for: ο‚· Supply temperature = 90Β°C; ο‚· Return temperature = 40Β°C; ο‚· Starting Ground temperature = 8Β° C 0 1 2 3 4 5 6 0 10 20 30 40 50 60 70 80 90 Time [s] Edge1temperature[Β°C] Temperature Growth in the Pipes at the Switch ON
  • 12. 11 Mesh and its Refinement The reliability of the solution depends on how the problem is discretized, and so on the mesh quality. n_mesh parameter An important parameter from which depends the quality of the mesh is the number of sides of the polygons which render the circular shapes of the two pipes. Again, since the diameters of the pipes can vary, this value is function of these diameters. n_meshret=n_mesh+ceil(retdiam*4*n_mesh) n_meshsupp=n_mesh+ceil(suppdiam*4*n_mesh) These functions to determine the n_mesh values are simply an example of the ones that could be used to obtain an n_mesh growing with the size of the pipes. The starting value n_mesh is function of the desired quality of the mesh. The user in our program has three choices: 4, 16, 32.
  • 13. 12 Talking about refinement, we tried to use different methods and levels of refinement in order to get a good compromise between computation time and quality of the solution. Standard Refinement Introducing a third value (a scalar, in the example below equal to 0.05) in the use of the mesh function it is possible to decide the level of the refinement. Me=Mesh(Sh,Bc,0.05) Here below there is a figure representing the mesh made with the previous command, with n_mesh = 16. β€œManual” Refinement Passing a function of x and y through the InRect function, it is possible to drive the refinement towards specific zones. In our case obviously the important parts are the pipes and the insulations. Raf=@(x,y)0.1-0.08*(InRect([x,y],[0.5 0.5],[ (0.1+retdiam+retins*2) (0.1+retdiam+retins*2)])|InRect([x,y],[1 0.5],[ (0.1+suppdiam+suppins*2) (0.1+suppdiam+suppins*2)])); Me=Mesh(Sh,Bc,Raf); The parameters of the InRect function are the coordinates of the centers of the pipes which represent the centers of the rectangular zones (in our case square zones since a square approximates a circle better than a rectangle), and the width and the height of these ones. Since in the last version of our program the dimensions of the pipes can be 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh
  • 14. 13 chosen by the user, the side of the square is function of pipes diameters and insulator thicknesses. The refinement is showed in the following figure (n_mesh = 16): Particular Case (Mesh for ODE45) Since computations for ODE functions are very heavy, we decide to let the user choose a very rough discretization in order to make this functions work even with high inspection times (40000 s, that are indeed necessary to reach the stationary solution). Of course this is only a trick to obtain anyway a solution of ODE45 with our CPUs. The mesh is quite ridiculous (made of 148 nodes). For example the circular pipes are discretized as hexagons (n_mesh = 6). 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh
  • 15. 14 Computation Time in function of Triangle size The time required to calculate the mesh depends on the geometry and on the triangle maximum side’s size. Here below both the number of triangles and the time for mesh calculation vs the side’s sizes are reported, as we can see the trends are proportional.
  • 16. 15 Mesh quality Here the plot of the mesh quality for different cases is reported. As expected, the lower the triangle side’s size higher the quality, even though it is not very high in some triangles at the interface between pipes and ground. Figure 1 - Low Mesh Quality - Standard Refinement (1) - 148 nodes Figure 2- Standard Mesh Quality - Standard Refinement (0.05) - 1230 nodes 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh quality 0.7 0.75 0.8 0.85 0.9 0.95 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh quality
  • 17. 16 Figure 3- High Mesh Quality - Standard Refinement (0.05) - 1919 nodes Figure 4 - Standard Mesh Quality - Manual Refinement - 1208 nodes 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh quality 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh quality
  • 18. 17 Figure 5 - High Mesh Quality - Manual Refinement - 1909 nodes Figure 6 - High Mesh Quality - Manual Refinement - 1909 nodes (Zoom) As we can see lower the side higher the mesh quality. As explained before, we chose the mesh refinement related to the best quality. 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh quality 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.5 0.55 0.6 0.65 0.7 Mesh quality 0.65 0.7 0.75 0.8 0.85 0.9 0.95
  • 19. 18 Matrix and vectors computations Stiffness matrix As said before the system to be solved is: 𝑀𝑒′ + 𝐴𝑒 = 𝑏 Where M is the mass matrix, A the stiffness matrix and b the right-hand side vector, in our case represented only by the boundary conditions because the external forcing is nil. Since there is a mixture of boundary conditions we had to compose a proper function that could manage this variety of conditions. Therefore we combined the function AssemblaDiffRobin with the Function AsssemblaDiffNOm (we called it AssemblaDiffNOmRobin2). The stiffness matrix is the standard one, modified only in the Robin boundary nodes. Right hand side vector The computation of the elements in the vector b was done by assembling the following three parts: % bRobin : part of b vector due to Robin BCs % b1 : part of b vector due to Dirichlet BCs on Return Pipe % b2 : part of b vector due to Dirichlet BCs on Supply Pipe Even though the temperatures of the metallic surface of the pipes are 40 and 90Β°C, the Dirichlet boundary conditions in the main program are imposed for 1Β°C. This choice is driven by the need of having a b vector versatile in function of the temperature during the time advancing analysis (In the switching on of the system, the temperature of the metal increases from the environment temperature to the water temperature). In fact in this way is sufficient to multiply at each time step the part of b vector related to a certain pipe for the effective temperature of that pipe. Each pipe needs a different part of b vector since the growth in temperature and the final temperature are different. To assign the right value of b to a certain node equation, we need to use the function Me.DirichletNodes(-jj,2)==3 (3 is the number of the shape, in this case we are searching the Dirichlet Nodes of the Supply Pipe) On the contrary, the part of the b vector related to Robin Boundary does not depend on the temperatures in the pipes and keeps constant during the time advancing analysis. Mass matrix No particular modifications are needed in this case since it does not depend on the boundary conditions. We simply used the function β€œAssemblaMatriceMassa”.
  • 20. 19 Initial Solution The initial solution is obtained solving the following system 𝐴𝑒(𝑑 = 0) in which A is the Stiffness Matrix, and b is the one for the temperature in the pipes at t=0 (Tsupply=Tsoil=8Β°C). Stationary solution The Stationary solution is obtained solving the same system, but considering the steady state (tοƒ βˆž) temperature for the pipes (Tsupply=90Β°C, Treturn=40Β°C): 𝐴𝑒 = 𝑏(𝑑 β†’ ∞)
  • 21. 20 Time advancing The dynamic solution is obtained by solving the system of differential equations: 𝑀𝑒′ + 𝐴𝑒 = 𝑏 β†’ 𝑒′ = βˆ’π‘€βˆ’1 𝐴𝑒 + π‘€βˆ’1 𝑏 As time advancing method different choices can be done. In our assignment we decided to analyze the following ones: 1) Explicit Euler; 2) Implicit Euler; 3) Crank-Nicholson. As known from theory, in the first one there’s a restriction on the time step, indeed: βˆ†π‘‘ π‘šπ‘Žπ‘₯ = 2 |πœ† π‘šπ‘Žπ‘₯| Where Ξ»max is the maximum eigenvalue of the matrix M-1A, in Matlab: lambda_max=max(eigs(inv(M)*A))); and tis value is, for the default Mesh refinement (the rougher one) is: |πœ† π‘šπ‘Žπ‘₯| = 1047.75 So βˆ†π‘‘ π‘šπ‘Žπ‘₯ = 0.0019 𝑠 Since we observed that our system reaches the stationary solution in 40000 s; this method has not been applied, because it would have required too much time, for that time step. Hence we applied only the last two advancing method, that have no constraints on the time step.
  • 22. 21 Linear system solution method To solve the linear system the conjugate gradient was adopted. This method was also integrated with preconditioning by using LU and Cholensky incomplete factorizations and so obtaining the Preconditioned Conjugate Gradient Method (pcg). Here below the trends of the relative residuals vs the iteration step are reported, for the combinations advancing method/preconditioner. Obviously the minimum value is the same for all these combinations, since the same tolerance was imposed, the things that change is the slope, namely the velocity of solution converging. As we can see from this plot the preconditioned methods converge in less number of steps and implicit Euler method (EI) is faster than Crank-Nicholson (CK) one. 0 20 40 60 80 100 120 10 -8 10 -6 10 -4 10 -2 10 0 10 2 10 4 iteration number relativeresidual Methods Comparison IE - No PreC IE - LU PreC IE - Ch PreC CK - No PreC CK - LU PreC CK - Ch PreC
  • 23. 22 Time comparison The table here reported shows the main results of the various combinations between advancing method and preconditioning. The EI method with Cholensky incomplete factorization turns out to be the faster one, whereas the not preconditioned solutions require more time. Advancing Method Preconditioning Time cond(M-1 A) Implicit Euler No prec. 6,38 200,28 LU 6,24 56,94 Cholensky 1,25 56,94 Crank-Nicholson No prec. 8,54 162,31 LU 4,17 38,48 Cholensky 4,31 38,48
  • 24. 23 Results Below we are going to expose the results for our preferred geometry, but must be remembered that in this program there are a few degrees of freedom in the choice of the system. They are obtained by considering the refined mesh (localized β€œmanual” refinement) with standard n_mesh (around 23). Geometry: Mesh: 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Geometry Shape 1 Shape 2 Shape 3 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh
  • 25. 24 Mesh Quality: Initial Solution: 0 0.5 1 1.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mesh quality 0.75 0.8 0.85 0.9 0.95 0 0.5 1 1.5 0 0.5 1 0 2 4 6 8 10 Initial Solution
  • 26. 25 Stationary Solution: Crank Nicholson not preconditioned Time Advancing Solution @ 30 s (pipes temperatures still increasing): 0 0.5 1 1.5 0 0.2 0.4 0.6 0.8 1 0 20 40 60 80 100 Stationary solution 0 0.5 1 1.5 0 0.5 1 0 20 40 60 80 100 Time Advancing
  • 27. 26 Time Advancing Solution @ 300 s (growth in pipes finished): Time Advancing Solution @ 15000 s (intermediate situation, temperature of the ground is growing): 0 0.5 1 1.5 0 0.5 1 0 20 40 60 80 100 Time Advancing 0 0.5 1 1.5 0 0.5 1 0 20 40 60 80 100 Time Advancing
  • 28. 27 Difference between steady state profile temperature and final values with time advancing @15000 s: Time Advancing Solution @ 40000 s (equilibrium is reached): 0 0.5 1 1.5 0 0.5 1 -4 -3 -2 -1 0 0 0.5 1 1.5 0 0.5 1 0 20 40 60 80 100 Time Advancing
  • 29. 28 Difference between Stationary Solution and Time Advancing Solution @ 40000 s On the results obtained we can say that they are reliable, because the temperature, fixed at pipes internal side (Dirichlet condition) decreases with a strong gradient around the edge of the tube and gradually on the soil. The temperature is also affected by convection with the outside world as visible from the inclination of the distribution in the soil side subject to the Robin boundary condition. Also the time needed to reach the stationary solution is realistic (40000 s β‰ˆ 10 h). 0 0.5 1 1.5 0 0.5 1 -0.15 -0.1 -0.05 0 0.05 0.1
  • 30. 29 ODE time advancing method We applied also the function ODE45 to solve our problem. In this function the time step is very small (β‰ˆ10-4 s) and cannot be modified by the user. Since it couldn’t be solved in a reasonable time with a high quality mesh, we used a rougher mesh (148 nodes) to have the solution until the steady state solution without the need of waiting hours. Here below some plots, for different time interals are reported, and the difference between ODE45 and Crank-Nicholson method is shown. 0 0.5 1 1.5 0 0.5 1 0 20 40 60 80 100 t= 200 0 0.5 1 1.5 0 0.5 1 -40 -30 -20 -10 0 Difference between time advancing and ODE45
  • 33. 32 Conclusions Of course the results depend mainly on the properties of insulation and of the ground. Since we took very high values of conductivity to let the gradient be evident, the results are not so β€œreal”. For example the temperature in the ground near the pipes is increased of about 20-30Β°C (and it is quite unlikely). Anyway tuning these parameters to the real one, the results seem reliable. The difference between time advancing method at tοƒ βˆž is negligible, so the two results confirm their reliability each other. Finally the refinement of the mesh has not a strong influence on the results, even though the quality results to be slightly better, but it has deep effects in computation time. In the following appendix the scripts are reported
  • 34. 33 Appendix Main Program (file PROGRAMMA.m) The following is the main program used for all the calculations discussed. It is divided in sections and it allows to the user to set the input parameter inside the ground section. Moreover the user can choose what to evaluate and with which method. This programs make use of a lot of function inside the foder 05ElementiFiniti2D that must be added to the path. In particular, as said in the previous chapter the functions AssemblaDiffNOm and AssemblaDiffRobin have been coupled in the function AssemblaDiffNOmRobin2, that is showed at the end of the appendix. clear all close all %% Physical Parameters (g=ground; s=supply ;r=return) rhog=2000; %kg/m3 density cg=1480; %J/kgK specific heat capacity kg=30; %W/mK thermal conductivity mhug=kg/cg; rhos=20; %kg/m3 density cs=500; %J/kgK specific heat capacity ks=5;%W/mK thermal conductivity mhus=ks/cs; rhor=20; %%kg/m3 cr=500; %J/kgK specific heat capacity kr=5;%W/mK thermal conductivity mhur=kr/cr; alfaair=20; %%W/m2K air conductivity alfasoil=10; %% Temperatures in the Pipes disp('Temperature in the Supply Line'); tsupp=input('Supply Temperature:'); disp('Temperature in the Return Line'); tret=input('Return Temperature:'); disp('Temperature of the Enviroment'); tenv=input('Enviroment Temperature:'); %% Pipes Diameters disp('Supply Pipe Diameter (m)'); suppdiam=input('Supply Diameter(suggested value 0.1):'); disp('Return Pipe Diameter (m)');
  • 35. 34 retdiam=input('Return Diameter(suggested value 0.1):'); %% Insulator Thickness disp('Insulator Thickness in the Supply Line (m)'); suppins=input('Supply Insulation(suggested value 0.1):'); disp('Insulator Thickness in the Supply Line (m)'); retins=input('Return Insulation(suggested value 0.05):'); %% Quality of the Mesh disp('Quality of the Mesh'); disp('1 - Low (for quite high t_end in ODE solving)'); disp('2 - Standard'); disp('3 - High'); qual=input('Quality (2 default value):'); if qual==1 n_mesh=4; elseif qual==3 n_mesh=32; else n_mesh=16; end %% Geometry n_meshret=n_mesh+ceil(retdiam*4*n_mesh) n_meshsupp=n_mesh+ceil(suppdiam*4*n_mesh) Sh(2)=Circle([0.5 0.5],retdiam/2+retins,n_meshret)-Circle([0.5 0.5],retdiam/2,n_meshret); %%return pipe insulation Sh(3)=Circle([1 0.5],suppdiam/2+suppins,n_meshsupp)-Circle([1 0.5],suppdiam/2,n_meshsupp);%%supply pipe insulation Sh(1)=Rect([0.75 0.5], [1.5 1])-Circle([0.5 0.5],retdiam/2+retins,n_meshret)- Circle([1 0.5],suppdiam/2+suppins,n_meshsupp);%-Circle([1 0.5],0.02,n_mesh)- Circle([0.5 0.5],0.02,n_mesh);%%soil Sh(1) = set(Sh(1), 'alfa',mhug, 'density', rhog); Sh(2) = set(Sh(2), 'alfa',mhur, 'density', rhor); Sh(3) = set(Sh(3), 'alfa',mhus, 'density', rhos); %% Boundary Conditions %Robin coefficients hair=alfaair/kg; hsoil=alfasoil/kg; if tenv>7 Tinf=tenv+1; Tinf2=tenv-1; elseif tenv>0 Tinf=tenv; Tinf2=tenv; else Tinf=tenv-1;
  • 36. 35 Tinf2=tenv+1; end g=alfaair*Tinf/kg; g2=alfasoil*Tinf2/kg; Bc=Boundary(Sh); Bc(1).Polygons(1).Edge(1)=Robin(hsoil,g2); Bc(1).Polygons(1).Edge(4)=Neumann(0); Bc(1).Polygons(1).Edge(2)=Neumann(0); Bc(2).Polygons(2).Edge(:)=Dirichlet(1); Bc(3).Polygons(2).Edge(:)=Dirichlet(1); Bc(2).Polygons(1).Edge(:)=Continuity(); Bc(3).Polygons(1).Edge(:)=Continuity(); Bc(1).Polygons(2).Edge(:)=Continuity(); Bc(1).Polygons(3).Edge(:)=Continuity(); Bc(1).Polygons(1).Edge(3)=Robin(hair,g); figure(1) title('Geometry') Draw(Sh,Bc) %% Mesh disp('Mesh Refinement'); disp('1 - Standard Refinement (integrated function)'); disp('2 - Manual Refinement around the pipes'); ref=input('Refinement Method:'); if ref==1 disp('Do you want to inspect the time needed for different levels of refinement?'); disp('1 - No'); disp('2 - Yes'); tan=input('Refinement Method:'); if tan==2 lato=[0.02,0.05,0.1,0.2,0.3,0.5]; for k=1:6, tic; Me=Mesh(Sh, Bc, lato(k)); time(k)=toc; tr(k)=length(Me.Triangles); end figure(8); title('Mesh Refinement Time'); subplot(2,1,1); semilogy(lato,tr); xlabel('Maximum side [A.U.]'); ylabel('Time [s]'); ylabel('Triangles');
  • 37. 36 subplot(2,1,2); semilogy(lato,time); xlabel('Maximum side [A.U.]'); ylabel('Time [s]'); ylabel('Time [s]'); end if qual==1 Me=Mesh(Sh,Bc,1); else Me=Mesh(Sh,Bc,0.05); end else Raf=@(x,y)0.1-0.08*(InRect([x,y],[0.5 0.5],[ (0.1+retdiam+retins*2) (0.1+retdiam+retins*2)])|InRect([x,y],[1 0.5],[ (0.1+suppdiam+suppins*2) (0.1+suppdiam+suppins*2)])); Me=Mesh(Sh,Bc,Raf); end figure(2) Draw(Me); title('Mesh'); figure(11) Draw(Me,'quality') title('Mesh quality'); %% Matrices Computations [A,bRobin,b1,b2 ]=AssemblaDiffNOmRobin2(Me); M=AssemblaMatriceMassa(Me); uu=zeros(size(Me.Coordinates,1),1); tson=60; %switch on time Temp2=@(t)tenv+((tret-tenv)/tson)*min(t,tson); Temp3=@(t)tenv+((tsupp-tenv)/tson)*min(t,tson); t=linspace(0,80,100); figure(3) plot(t,Temp2(t),t,Temp3(t)); xlabel('Time [s]'); ylabel('Edge 1 temperature [Β°C]') grid on; title ('Temperature Growth in the Pipes at the Switch ON'); lato2=find(Me.UnknownNodes<0 & Me.Coordinates(:,1)<(0.51+retdiam/2+retins)& Me.Coordinates(:,2)>(0.49-retdiam/2-retins)); lato3=find(Me.UnknownNodes<0 & Me.Coordinates(:,1)>(1-suppdiam/2-suppins)& Me.Coordinates(:,2)>(0.49-suppdiam/2-suppins));
  • 38. 37 uu(lato2)=tenv; uu(lato3)=tenv; lato4=GetDirichletNodes(Me,[1,1,1]); uu(lato4)=Evaluate(Bc,[1,1,1],Me.Coordinates(lato4,:)); uutadv=uu; %% Precond disp('Do you want to evaluate the conditioning number?'); disp('0 - No'); disp('1 - Yes'); precond=input('Preconditioning:'); if precond==1 dt=200; Mck=M+(dt/2*A); Mei=M+dt*A; disp('Preconditiong methods for implicit euler (ei) or crank nicholson (ck) method:'); disp('1 - LU incomplete factorization'); disp('2 - Cholensky incomplete factorization'); disp('3 - No preconditioning'); pre=input('Preconditioning:'); if pre==1 [Lei,Uei]=luinc(sparse(Mei),'0'); ncondei=condest(Lei*Ueisparse(Mei)); [Lck,Uck]=luinc(sparse(Mck),'0'); ncondck=condest(Lck*Ucksparse(Mck)); elseif pre==2 [Uei]=cholinc(sparse(Mei),'0'); Lei=Uei'; ncondei=condest((Lei*Uei)sparse(Mei)); [Uck]=cholinc(sparse(Mck),'0'); Lck=Uck'; ncondck=condest((Lck*Uck)sparse(Mck)); else ncondei=condest(Mei); ncondck=condest(Mck); end disp('computation time: '); disp('conditioning number'); ncondck ncondei end %% Tolerance Plot disp('Do you want to evaluate how fast Tolerance is reached?'); disp('0 - No'); disp('1 - Yes'); tolflag=input('Tolerance:'); if tolflag==1 uT0=pcg(A,bRobin+b1*Temp2(0)+b2*Temp3(0),1e-3,100); u=uT0; tend=40000; dt=200; tic
  • 39. 38 for k11=1:tend/dt t=k11*dt; %[u,flag,relres,iter,resvec]=pcg((M+dt2/2*A), (M*u- dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt2)+b2*Temp3(t-dt2)))),1e-12,200,[],[],u);%Crank-Nicholson [u,flag,relres11,iter11,resvec11]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2 *Temp3(t))),1e-10,200,[],[],u); end time(1)=toc; Mie=M+(dt*A); [L,U]=luinc(sparse(Mie),'0'); tic for k12=1:tend/dt t=k12*dt; %[u,flag,relres,iter,resvec]=pcg((M+dt2/2*A), (M*u- dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt2)+b2*Temp3(t-dt2)))),1e-12,200,[],[],u);%Crank-Nicholson [u,flag,relres12,iter12,resvec12]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2 *Temp3(t))),1e-10,200,L,U,u); end time(2)=toc; Mck=M+(dt/2*A); R=cholinc(sparse(Mck),'0'); tic for k13=1:tend/dt t=k13*dt; %[u,flag,relres,iter,resvec]=pcg((M+dt2/2*A), (M*u- dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt2)+b2*Temp3(t-dt2)))),1e-12,200,[],[],u);%Crank-Nicholson [u,flag,relres13,iter13,resvec13]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2 *Temp3(t))),1e-10,200,R',R,u); end time(3)=toc; tic for k=1:tend/dt t=k*dt; [u,flag,relres21,iter21,resvec21]=pcg((M+dt/2*A), (M*u- dt/2*A*u+dt/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt)+b2*Temp3(t-dt)))),1e-10,200,[],[],u);%Crank-Nicholson % [u,flag,relres,iter,resvec]=pcg((M+dt*A),(M*u+dt*(bRobin+b1*Temp2(t)+b2*Temp3 (t))),1e-10,200,[],[],u); end time(4)=toc; tic for k=1:tend/dt t=k*dt; [u,flag,relres22,iter22,resvec22]=pcg((M+dt/2*A), (M*u- dt/2*A*u+dt/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt)+b2*Temp3(t-dt)))),1e-10,200,L,U,u);%Crank-Nicholson % [u,flag,relres,iter,resvec]=pcg((Mie+dt*A),(Mie*u+dt*(bRobin+b1*Temp2(t)+b2*T emp3(t))),1e-10,200,L,U,u); end
  • 40. 39 time(5)=toc; tic for k=1:tend/dt t=k*dt; [u,flag,relres23,iter23,resvec23]=pcg((M+dt/2*A), (M*u- dt/2*A*u+dt/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt)+b2*Temp3(t-dt)))),1e-10,200,R',R,u);%Crank-Nicholson % [u,flag,relres,iter,resvec]=pcg((Mck+dt*A),(Mck*u+dt*(bRobin+b1*Temp2(t)+b2*T emp3(t))),1e-10,200,R',R,u); end time(6)=toc; figure(12) semilogy(0:iter11,resvec11,'-o') hold on semilogy(0:iter12,resvec12,'-x') hold on semilogy(0:iter13,resvec13,'-r') hold on semilogy(0:iter21,resvec21,'-g') semilogy(0:iter22,resvec22,'+') semilogy(0:iter23,resvec23,'--rs') legend('IE - No PreC','IE - LU PreC','IE - Ch PreC','CK - No PreC','CK - LU PreC','CK - Ch PreC') xlabel('iteration number'); ylabel('relative residual'); title('Methods Comparison'); end %% Initial Solution (t=0) uT0=pcg(A,bRobin+b1*Temp2(0)+b2*Temp3(0),1e-3,100); uu(Me.UnknownNodes>0)= uT0; uu(lato2)=Temp2(0); %temperatura in t=0 uu(lato3)=Temp3(0); figure(4) Draw(Me,uu); title('Initial Solution'); %% Stationary Solution uTInf=pcg(A,bRobin+b1*Temp2(1e50)+b2*Temp3(1e50),1e-3,100); uu(Me.UnknownNodes>0)= uTInf; uu(lato2)=Temp2(1e50); %temperatura in t="Inf" uu(lato3)=Temp3(1e50); figure(5) Draw(Me,uu); title('Stationary solution'); %% Time Advancing figure(6); u=uT0; dt1=1; dt2=10; dt3=100; dt4=500;
  • 41. 40 tend=15000; t=0; while t<tend if t<tson t=t+dt1; [u,flag]=pcg((M+dt1/2*A), (M*u- dt1/2*A*u+dt1/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt1)+b2*Temp3(t-dt1)))),1e-6,200,[],[],u);%Crank-Nicholson elseif t<tend/100 t=t+dt2; [u,flag]=pcg((M+dt2/2*A), (M*u- dt2/2*A*u+dt2/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt2)+b2*Temp3(t-dt2)))),1e-6,200,[],[],u);%Crank-Nicholson elseif t<tend/20 t=t+dt3; [u,flag]=pcg((M+dt3/2*A), (M*u- dt3/2*A*u+dt3/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt3)+b2*Temp3(t-dt3)))),1e-6,200,[],[],u);%Crank-Nicholson else t=t+dt4; [u,flag]=pcg((M+dt4/2*A), (M*u- dt4/2*A*u+dt4/2*((bRobin+b1*Temp2(t)+b2*Temp3(t))+(bRobin+b1*Temp2(t- dt4)+b2*Temp3(t-dt4)))),1e-6,200,[],[],u);%Crank-Nicholson end uutadv(Me.UnknownNodes>0)= u; uutadv(lato2)=Temp2(t); uutadv(lato3)=Temp3(t); hold off; Draw(Me,uutadv); zlim([0 100]); title(['t= ' num2str(t)]); drawnow; end title('Time Advancing'); figure(9) title('Difference between time advancing and stationary solution'); Draw(Me,uutadv-uu); %% ODE 45 disp('End Time in ODE45 (choose low value, suggested<1000 s, otherwise wait more XD)'); tend=input('Tend (s):'); figure(7); u=pcg(A,bRobin+b1*Temp2(0)+b2*Temp3(0),1e-3,100); odepar=odeset('mass',M); [t,u]=ode45(@(t,y)(- A*y+(bRobin+b1*Temp2(t)+b2*Temp3(t))),linspace(0,tend,10),u,odepar); uu=zeros(size(Me.Coordinates,1),1); for k=1:length(t) uu(Me.UnknownNodes>0)= u(k,:); uu(lato2)=Temp2(t(k)); uu(lato3)=Temp3(t(k)); hold off;
  • 42. 41 Draw(Me,uu); zlim([0 100]); title(['t= ' num2str(t(k))]); drawnow; end figure(10) Draw(Me,uu-uutadv); title('Difference between time advancing and ODE45'); Auxiliary function: AssemblaDiffNOmRobin2 function [D,bRobin,b1,b2] = AssemblaDiffNOmRobin2(Me) %It assembles D Matrix and b vector of this particular problem in which %are involved non homogeneous Dirichlet, homogeneous Neumann and Robin %boundary conditions % %Input: % Me : Mesh % %Output: % D : Stiffness Matrix % bRobin : part of b vector due to Robin BCs % b1 : part of b vector due to Dirichlet BCs on Return Pipe % b2 : part of b vector due to Dirichlet BCs on Supply Pipe Tr=Me.Triangles; NI=Me.UnknownNodes; C=Me.Coordinates; N_Tr = size(Tr,1); N_int = max(NI); D = spalloc(N_int,N_int,10*N_int); bRobin = zeros(N_int,1); b1 = zeros(N_int,1); b2 = zeros(N_int,1); % b3 = zeros(N_int,1); for e=1:N_Tr Dx(1) = C(Tr(e,3),1) - C(Tr(e,2),1); Dx(2) = C(Tr(e,1),1) - C(Tr(e,3),1); Dx(3) = C(Tr(e,2),1) - C(Tr(e,1),1); Dy(1) = C(Tr(e,2),2) - C(Tr(e,3),2); Dy(2) = C(Tr(e,3),2) - C(Tr(e,1),2); Dy(3) = C(Tr(e,1),2) - C(Tr(e,2),2); Areass=Me.Aree(e); %valuto la forza xb=Me.CenterOfMass(e,1); yb=Me.CenterOfMass(e,2); for i=1:3 ii = NI(Tr(e,i)); if( ii > 0) for j=1:3 jj = NI(Tr(e,j));
  • 43. 42 mu=get(Me.Shapes(Me.Faces(e)),'alfa',[xb,yb]); d=mu*(Dy(i)*Dy(j)+Dx(i)*Dx(j))/(4.0*Areass) ; if( jj > 0) D(ii,jj) = D(ii,jj) + d; else xy=C(Tr(e,j),:); aux=Me.DirichletNodes(-jj,:); val=Evaluate(Me.Bc, aux,xy); if Me.DirichletNodes(-jj,2)==2 b1(ii) = b1(ii) - d*val ; elseif Me.DirichletNodes(-jj,2)==3 b2(ii) = b2(ii) - d*val ; else % b3(ii) = b3(ii) - d*val ; end end end end end end L=Me.Edges; Ro=Me.EdgesRobin; for k=1:length(Ro) Nodo1=L(Ro(k),1); Nodo2=L(Ro(k),2); dist=norm(C(Nodo1,:)-C(Nodo2,:)); ii1=NI(Nodo1); ii2=NI(Nodo2); xmedia=(Me.Coordinates(Nodo1,1)+Me.Coordinates(Nodo2,1))/2; ymedia=(Me.Coordinates(Nodo1,2)+Me.Coordinates(Nodo2,2))/2; val=Evaluate(Me.Bc,Ro(k,:), [xmedia, ymedia]); h=val(1); g=val(2); if ii1>0 && ii2<0 %ii1 Γ¨ incognito, ii2 Γ¨ noto bRobin(ii1)=bRobin(ii1)+g/2*dist; D(ii1,ii1)=D(ii1,ii1)+h*dist/3; elseif ii1<0 && ii2>0 %ii1 Γ¨ noto, ii2 Γ¨ incognito bRobin(ii2)=bRobin(ii2)+g/2*norm(dist); D(ii2,ii2)=D(ii2,ii2)+h*dist/3; else %allora sono entrambi di Neumann bRobin(ii1)=bRobin(ii1)+g/2*norm(dist); bRobin(ii2)=bRobin(ii2)+g/2*norm(dist); D(ii1,ii1)=D(ii1,ii1)+h*dist/3; D(ii2,ii2)=D(ii2,ii2)+h*dist/3; D(ii1,ii2)=D(ii1,ii2)+h*dist/6; D(ii2,ii1)=D(ii2,ii1)+h*dist/6; end end