Jean Le Rond D'alembert

Alembert 𝄒

Giuseppe Parasiliti

Pierre-Yves Lagrée

Yohan Penel

Mr Emmanuel Audusse

Mr Olivier

Vauquelin Ms Catherine

Weisman Mr

Després Bruno

Pierre-Yves Mr

Ms Lagrée

Aissiouene Nora

Mr

Penel Yohan

Ms

D ' Marguerite

Olce

Physical, mathematical and numerical modeling of a gas flow in pipeline networks with low Mach number expansion

Keywords: 1-D gas flow, pipeline network, low Mach assumption, thermosyphon, threerung ladder, laws at the junction, reference solution, periodic conditions, temperature gradient, fluid mechanics, numerical modeling, CFD

This project aims to develop a model for low Mach flow in pipelines and an industrial code implementing it. The model can describe low mach regimes while avoiding blunt approximations, improving over legacy approaches like Boussinesq; as a result, our program is more accurate. In order to build our model and program, we investigate gas flow at low velocities in a network of pipes. We consider a one-dimensional system of equations obtained by averaging the Navier-Stokes equations for a compressible fluid over the pipe section. In contrast to the classical Boussinesq approximation, we employ the Low Mach Expansion to describe asymptotically compressible effects, aiming for a more accurate solution capable of characterizing flows with significant temperature variations. We first apply the model we obtained thus far to a well-known configuration of pipes called the "thermosyphon.". This setup consists of a loop of two horizontal adiabatic pipes and two vertical pipes with prescribed wall temperatures, resulting in a temperature gradient that drives the flow. The application of the model to this configuration gives us an exact but semi-implicit solution under laminar and steady-state conditions. This solution serves as a benchmark against which we validate our numerical results. By comparing our computed values with the quasi-exact solution, we demonstrate the accuracy and reliability of our approach. To implement the low Mach averaged model, we use a numerical method based on the characteristics method and the projection technique. We incorporate in our algorithm the treatment of periodic conditions and Dirac distributions as derivatives of the discontinuous gravity term at the corners. To generalize the model to more complex configurations of pipes, we propose laws that govern the junctions between multiple pipes. We study the "three-rung ladder," a closed configuration consisting of horizontal adiabatic pipes and vertical ones with imposed wall temperatures to induce a temperature-driven flow. To tackle the challenges junctions pose in this context, we implemented an algorithm in the program capable of ensuring proper transmission conditions. Whenever feasible, we provide quasi-exact solutions under laminar and steady-state conditions to validate our numerical results further. Overall, this study investigates further low Mach number gas flows, employing advanced numerical techniques and validating our findings against established benchmarks.

Résumé

Cette étude porte sur les écoulements de gaz à faible vitesse dans des réseaux de tuyaux, en se concentrant sur un régime caractérisé par un faible nombre de Mach. Nous utilisons un modèle unidimensionnel obtenu en moyennant les équations de Navier-Stokes pour un fluide compressible sur la section d'une conduite. Notre approche utilise le développement asymptotique à faible nombre de Mach pour décrire les effets compressibles de manière plus précise, contrairement à l'approximation classique de Boussinesq qui en est un cas limite lorsque l'élévation de température est assez faible. Nous utilisons un schéma numérique fondé sur la méthode des caractéristiques et la méthode de projection pour traiter ce modèle à faible Mach. Nous présentons des résultats numériques pour une configuration appelée "thermosiphon". Cette configuration consiste en une boucle fermée constituée de deux tuyaux horizontaux adiabatiques et de deux tuyaux verticaux avec des températures de paroi prescrites, qui entraînent l'écoulement. L'algorithme développé permet de prendre en compte des distributions de Dirac, qui peuvent apparaître en terme source dans le modèle pour représenter les coins de la géométrie. La méthode proposée est également adaptée au modèle pour des conditions aux limites de type périodique en plus des conditions de type Dirichlet. Afin d'établir une référence pour le problème du thermosiphon, nous fournissons une solution exacte mais semi-implicite d'un écoulement laminaire en régime permanent. Cette solution sert de référence pour valider la méthode proposée. Nous proposons également des lois qui régissent les jonctions entre plusieurs conduites et présentons des résultats numériques pour des configurations de conduites plus complexes. Nous nous intéressons en particulier à l'échelle à trois barreaux, une configuration fermée qui corresponds à une extension du thermosiphon. À partir de celle-ci, plusieurs configurations générales peuvent être dérivées. Nous développons un algorithme pour garantir des conditions de transmission adéquates aux jonctions, en fournissant autant que possible des solutions stationnaires semi-analytiques pour valider nos résultats numériques. Cette étude contribue à une meilleure compréhension des principes qui régissent les écoulements de gaz à faible nombre de Mach en utilisant des techniques numériques avancées et en les comparant à des références établies. 1.8 A sketch of the geometry of the three-rung ladder: a closed pipe where the gas is confined and flows between the temperatures T f (cooled, it is denser, and falls) and T c (heated, it is less dense and moves up). . . . . . . . . . . . . . . 1.9 A sketch of the geometry of a more complex configuration, an n-rung ladder:

Mots-clés

a closed pipe where the gas is confined and flows between the temperatures T f (cooled, it is denser, and falls) and T c (heated, it is less dense and moves up).

2.1 Sketch of an oriented inclined pipe with axial velocity u(x). . . . . . . . . . .

Comparison between the

N pipe = 600, T 1 ref = 300K,T 2 ref = 280K,T 3 ref = 260K
, sin θ 1 = 1,sin θ 2 = 1,sin θ 1 = 0, CF L = 0.9 and the convention that pipe 1 is an inflow and pipes 2 and 3 are outflows if velocities are all positives. . . . . . . . . . . . . . . . .

8.11

The open bifurcation simulation: the temperature, velocity and dynamic pressure for the three pipes with N pipe = 4798, T 1 ref = 300K,T 2 ref = 280K,T 3 ref = 260K, sin θ 1 = 1,sin θ 2 = 1,sin θ 1 = 0, CF L = 0.9 and the convention that pipe 1 is an inflow and pipes 2 and 3 are outflows if velocities are all positives.

8.12

The open bifurcation simulation with two resulting outflow pipes: the temperature, velocity and dynamic pressure for the three pipes with N pipe = 298 and CF L = 0.9 in the adiabatic case with no gravity. . . . . . . . . . . . . . . . . 9.1 Performance analysis for both the moments and the projection method: Error profile for temperature and velocity and computing time comparison for a laminar flow at small velocities through a thermosyphon with total length L = 0.25m, diameter D = 0.03m, and imposed temperatures at the walls T c = 300.15K and T f = 280.15K. . . . . . . . . . . . . . . . . . . . . . . . . . XIX 9.2 Comparison between the reference solution (in green) and the converged numerical solution (in red) for the temperature for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed. . . . . . . . . . . . . 9.3 Comparison between the reference solution (in green) and the converged numerical solution (in red) for the velocity for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed. . . . . . . . . . . . . 9.4 Comparison between the reference solution (in green) and the converged numerical solution (in red) for the dynamic pressure for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed. . . . . 9.5 Density profile for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4.

The curves are superposed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.6 Two examples of thermodynamic pressure profiles for a laminar flow at small velocities through a thermosyphon as a function time with as a number of nodes N x = 25597, final time T = 150s, total length L = 8m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, so that ε = 0.017. For the orange pressure P i = 202650P a and T i = 293.07K, while for the blue one P i = 205416P a and T i = 297.07K. . . . . . . . . . . . . . . . . . . . . . . . . 9.7 Temperature profile for a laminar flow at small velocities through a thermosyphon by varying the conductivity k with as the number of nodes N x = 3997, final time T = 10s, length L = 1m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K. The Péclet number varies between 42.29 and 178.70 for values of k between 0.0124 and 0.0524. . . . . . . . . . . . . . 9.8 A sketch of the geometry of the three-rung ladder . . . . . . . . . . . . . . . 9.9 Comparison between the reference solution (in green) and the converged numerical solution (in red) for the temperature for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes 10 Comparison between the reference solution (in green) and the converged numerical solution (in red) for the velocity for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. The curves are superposed. . . . . 9.11 Comparison between the reference solution (in green) and the converged numerical solution (in red) for the dynamic pressure for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. The curves are superposed.149 9.12 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . . . . . 9.13 A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . . . . . . 9.14 A two-dimensional numerical simulation of the dynamic pressure for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . 9.15 Error profile of the temperature for a laminar flow at small velocities through a three-rung ladder with total length L = 0.22m, diameter D = 0.03m, and imposed temperatures at the walls T c = 290.15K and T f = 260.15K. . . . . . 9. 16 Error profile of the velocity for a laminar flow at small velocities through a three-rung ladder with total length L = 0.22m, diameter D = 0.03m, and imposed temperatures at the walls T c = 290.15K and T f = 260.15K. . . . . . 9.17 The constant velocity in the middle rung as a function of the ratio l := L 1 L 2 for a laminar flow at small velocities through an asymmetrical three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L3 = 1m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

We notice that near l = 1 we have u 7 = 0 m s . . . . . . . . . . . . . . . . . . . . 9.18 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number

9.5

The transmission laws at the junction for the asymmetrical three-rung ladder with L 3 = 1m,L 1 = 1m,L 2 = 9m (l < 1): the values of velocities and ratios between velocity and temperature at the junctions J 1 and J 4 . . . . . . . . . .

9.6

The transmission laws at the junction for the asymmetrical three-rung ladder with L 3 = 1m,L 1 = 9m,L 2 = 1m (l > 1): the values of velocities and ratios between velocity and temperature at the junctions J 1 and J 4 . . . . . . . . . .

9.7

The transmission laws at the junction for the 6-rung ladder: the values of velocities and ratios between velocity and temperature at the junctions J 1 , ..., J 10 .157 9.8 The transmission laws at the junction for the juxtaposition of two three-rung ladders: the values of the velocities at the junctions J 1 , ..., J 8 . . . . . . . . . . 9.9 The transmission laws at the junction for the juxtaposition of two three-rung ladders: the values of the ratios between velocities and temperatures at the The natural gas is stored inside tanks at temperatures between 70K and 110K. Figure 1.2 highlights these structures inside a ship, and figure 1.3 shows two people working in an empty tank to give an idea of the tank dimensions. Let the tanks directly contact the ship exterior at temperatures between 290K and 310K leads to inefficiency. Indeed, the main issue during transportation is pressure loss caused by the friction of the gas against the walls of the tank and the heat exchange with its surroundings. In the overland context, the natural gas is transported via pipeline networks, and it is possible to overcome this problem by putting some stations throughout the network to restore the desired pressure, even if that means losing three to five percent of the gas [START_REF] Wu | Model relaxations for the fuel cost minimization of steady-state gas pipelines networks[END_REF]. In maritime transportation, unfortunately, this is not feasible. Optimizing gas transportation by sea is a difficult task with much room for improvement. The balance between minimizing losses and costs and maximizing the transported quantity of gas is still an open challenge. A possible solution that GTT implemented is to insert a double layer of reservoir lining that allows the natural gas exchanges with its surroundings to be controlled. The interior of these layers is filled with a mixture of gases in continuous motion due to the natural temperature gradient between the ship exterior and the tank interior. These gases are confined inside a pipeline network to have control of their streams. This control network is visible at the wall of the tank in figure 1.3. Figure 1.4 shows a detail of the control network. What is needed is both efficient and robust simulations of this control network and innovative optimization models and strategies. Studying complex networks with strong thermal effects is a complicated fluid mechanics problem. Figure 1.5 shows the two-dimensional grid corresponding to the network that will be the domain of the application of our algorithms. The last step is to put together the study of the thermosyphon and that of the junction. We study a three-rung ladder in this optic. As shown in figure 1.8, it is a closed pipe configuration that can be imagined as a thermosyphon with one more horizontal adiabatic pipe that links the heated and the cooled pipes. In this configuration, the gas is confined at some mean pressure and flows in a loop from one canal to another, with a flow redistribution at each pipe junction. The objective is to create more complex configurations by extension of a threerung ladder. We start to extend a three-rung ladder to a n-rung ladder, as shown in figure 1.9. Since we face a gas flow, we use Navier-Stokes Equations to model the physical setting. We combine the conservation of mass and momentum with energy conservation to consider the thermal effects. We also have to choose a density law for the gas. Since the fluid is compressible, we can search for a solution with the Riemann solver thanks to the hyperbolic structure of the equations. We will present some of the features of this technique.

In our problem, the flow velocity is small compared to the wave speed of the medium, so it is possible to propose quasi-incompressible approximations. We will present the Boussinesq approximation, one of the most widespread models, showing its features. It is a powerful tool since it is based on assumptions that fit most common real situations and is accurate enough for most industrial applications. Another feature of our problem is that the flow is temperature-driven, and the temperature variations are significant, of the order of 200K. In this case, the Boussinesq model is no longer valid since it is based on the assumption of little density variations.

We propose a low Mach model capable of fitting more real issues than Boussinesq since it does not suppose that the Mach number is null but small enough to be considered going to zero. This subtle difference has significant consequences, such as more accuracy, as we will see later. Using a low Mach model is justified because its order of magnitude in the industrial application is about 10 -4 . Moreover, the low Mach model is valid for all temperature gradients, and its implementation results in better performance concerning the computing time.

In the following, we will see how the literature is based on Boussinesq for gas flows in pipeline networks. Then, we highlight the engineering applications in which Boussinesq models are no longer valid, and it is necessary to search for low Mach models. We will give an idea of the main fields where they are commonly used nowadays, and we will show that there is still a need for satisfactory low Mach models for pipeline flows. It is in filling such gaps that our work fits.

The thermosyphon

We dedicate this section to the thermosyphon configuration since it is a common industrial method of passive heat exchange based on natural convection, which circulates a fluid without requiring a mechanical pump [START_REF]Thermosiphon -wikipédia[END_REF]. Thermosyphons circulate liquids and volatile gases in heating and cooling applications such as heat pumps, water heaters, boilers, and furnaces [BVI90, SAJ95, GGY + 18]. We speak of thermosyphon even in the presence of air temperature gradients such as those utilized in a wood fire chimney or solar chimney [START_REF] Zinoubi | Experimental study of the resulting flow of plume-thermosiphon interaction: application to chimney problems[END_REF].

This circulation can either be open-loop, as when the substance in a holding tank is passed in one direction via a heated transfer tube mounted at the bottom of the tank to a distribution point, or it can be a vertical closed-loop circuit with a return to the original container. Its purpose is to simplify the transfer of liquid or gas while avoiding the cost and complexity of a conventional pump.

Natural convection of a fluid starts when heat transfer to the fluid gives rise to a temperature difference from one side of the loop to the other. The warmer fluid on one side of the loop is less dense and thus more buoyant than the cooler fluid on the other side. The warmer fluid will float above the cooler fluid, and the cooler fluid will sink below the warmer fluid.

Convection moves the heated fluid upwards in the system as it is simultaneously replaced by cooler fluid returning by gravity.

In some situations, the fluid flow may be reduced or stopped because the loop is not full of fluid. The system no longer convects in this case, so it is not a usual thermosyphon. Heat can still be transferred in this system by the evaporation and condensation of vapor; however, this system is properly classified as a heat pipe thermosyphon [START_REF] Vasiliev | Heat pipes in modern heat exchangers[END_REF][START_REF] Dunn | The heat pipe[END_REF][START_REF] El-Baky | Heat pipe heat exchanger for heat recovery in air conditioning[END_REF]. (Singlephase) thermosyphons can only transfer heat upward or away from the acceleration vector. Thus, orientation is much more important for thermosyphons than for heat pipes.

Thermosyphons are used in liquid-based solar heating systems to heat a liquid like water. The water is heated passively by solar energy and relies on heat transferred from the sun to a solar collector. The heat from the collector can be transferred to water in two ways: directly, where water circulates through the collector, or indirectly, where an anti-freeze solution carries the heat from the collector and transfers it to water in the tank via a heat exchanger. Convection allows the movement of the heated liquid out of the solar collector to be replaced by colder liquid, which is, in turn, heated. Due to this principle, the water must be stored in a tank above the collector [START_REF] Norton | Solar water heaters: A review of systems research and design innovation[END_REF].

In locations historically dominated by permafrost conditions, thermosyphons may be used to counter adverse geologic forces on the foundations of buildings, pipelines, and other structures caused by the thawing of the permafrost [START_REF] Jorgenson | Abrupt increase in permafrost degradation in Arctic Alaska[END_REF].

Thermosyphons are used for cooling internal computer components, [START_REF] Emery | CPU cooling with a thermosiphon loop with tapered manifold (OMM)[END_REF] such as the CPU. While any suitable liquid can be used, water is the most adopted liquid in thermosyphon systems. The heated liquid water evaporates, removing heat, and moves from the components upwards to a heat exchanger, where it liquefies and is able to return to the components. There, the water is cooled and is ready to be recirculated. A radiator is the most commonly used heat exchanger, where air is blown actively with a fan to remove the heat. Some early cars, motor vehicles, and engine-powered farm and industrial equipment used thermosyphon circulation to move cooling water between their cylinder block and radiator [START_REF] Mcelhinney | Centrifugally pumped thermosiphons for motor rotor cooling[END_REF]. This water circulation method depends on keeping enough cool air moving past the radiator to provide a sufficient temperature differential; the vehicle forward motion and the fans accomplish the air movement. As engine power increased, an increased water flow was required, so engine-driven pumps were added to assist circulation.

Many others are the application of the thermosyphon, such as nuclear plants [KPA + 17],

hydrogen plants [START_REF] Sabharwall | Engineering design elements of a twophase thermosyphon for the purpose of transferring NGNP thermal energy to a hydrogen plant[END_REF], or environmental problems [Dwg + 20].

State of the art

The compressible Navier-Stokes are complex non-linear equations that describe fluid flows.

Sometimes, the features of the problem of interest allow the use of a valid approximation to describe the fluid flow well. The most common approximation of the Navier-Stokes equations assuming little overall density variations is the Boussinesq approximation [START_REF] Boussinesq | Théorie de l'écoulement tourbillonnant et tumultueux des liquides dans les lits rectilignes à grande section[END_REF]; this is equivalent to the hypothesis of incompressible flow (null divergence of velocity) and small variations of pressure and temperature. Pressure remains close to the hydrostatic pressure, and there is a linear relation between density and temperature variations. Furthermore, "density variations are neglected where they are not multiplied by gravity g", [START_REF] Boussinesq | Théorie de l'écoulement tourbillonnant et tumultueux des liquides dans les lits rectilignes à grande section[END_REF] says.

Many engineering applications allow the adoption of the Boussinesq approximation within the context of gas flows in pipeline arrangements. We analyze here the most common choices in mathematical modeling under physical considerations. A common issue is dealing with non-linear conservative hyperbolic equations; it is common to simplify some terms in the momentum equations such as the non-linear or the gravity term; usual choices are a Boussinesq or an isothermal assumption, see for example [START_REF] Ehrhardt | KKT systems in operative planning for gas distribution networks[END_REF][START_REF] Herty | A new model for gas flow in pipe networks[END_REF][START_REF] Ke | Transient analysis of isothermal gas flow in pipeline networks[END_REF][START_REF] Osiadacz | Comparison of isothermal and nonisothermal pipeline gas flow model[END_REF]. A frequent choice is to use an averaged one-dimensional model instead of the full three-dimensional one and simplify the momentum equation like in [START_REF] Osiadacz | Simulation and Analysis of Gas Pipeline Networks[END_REF][START_REF] Ke | Transient analysis of isothermal gas flow in pipeline networks[END_REF][START_REF] Reddy | Simulation and state estimation of transient flow in gas pipeline networks using a transfer function model[END_REF]. The non-linear and the inclination terms are neglected, and the energy equation is not considered; the former carries on the simulation through an electrical analogy, while the latter uses a transfer function model coupled with a linear interpolation of available temperature measurements instead of the energy equation. Another application of an electrical analogy is proposed by [START_REF] Cross | Analysis of flow in networks of conduits or conductors[END_REF].

[HGCATRM09] and [START_REF] Matko | Pipeline simulation techniques[END_REF] explore some alternatives. In particular, we took inspiration from [START_REF] Herran-Gonzalez | Modeling and simulation of a gas distribution pipeline network[END_REF] for the physical modeling of our problem, considering the same averaged one-dimensional equations and improving the description by adding the energy equation.

Concerning the numerical schemes, it is possible to use finite differences combined with the method of characteristics like in [START_REF] Osiadacz | Simulation and Analysis of Gas Pipeline Networks[END_REF]. In contrast, others have made some comparisons between finite differences and finite elements, like [San] and [START_REF] Yedrouj | A comparison of a finite element method and a finite difference method for transient simulation of a gas pipeline[END_REF] or used only finite elements like [START_REF] Henriques | Modelação de regimes transitórios lentos em redes de gás usando o método dos elementos finitos[END_REF]. Another aspect to consider in modeling pipeline networks is the integration of the transmission conditions at the junctions. In [BHK06a, BHK06b, CG06], we see several possible coupling conditions based on Riemann solvers. The standard conditions used to deal with junctions are the Kirchhoff ones that impose the mass flux conservation and the pressure continuity [BCG + 14]. Using these conditions allows us to make an electrical analogy in which the pipeline network can be seen as an electric circuit with the velocities as currents and the pressures as voltages. The problem with Kirchhoff conditions is that they do not consider the geometry of the problem, and in some applications, it could cause issues. Works like [START_REF] Kozlov | One-dimensional model of flow in a junction of thin channels, including arterial trees[END_REF][START_REF] Kozlov | Transmission conditions in a onedimensional model of bifurcating arteries with elastic walls[END_REF][START_REF] Berntsson | A modification to the Kirchhoff conditions at a bifurcation and loss coefficients[END_REF] proposed several modifications to these conditions to consider the geometrical setting. Finally, we report articles aiming to optimize the losses of gas, such as [DKL15, BKPR05, MMM06, Ste07].

The Boussinesq approximation has limits since it is only sometimes valid, as in the case of significant temperature gradients driving the flow. In the last decades, another approximation based on the assumption of low Mach numbers has begun to be used in many applications since it compensates the limits of the Boussinesq model.

In 1982, Paolucci introduced a model to remove sound waves (much faster than the average fluid flow) from the governing equations [START_REF] Paolucci | On the filtering of sound from the Navier-Stokes equations[END_REF], improving the Boussinesq model. He obtained a "Low Mach" model for the three-dimensional Navier-Stokes equations for general domains by asymptotic analysis of the low Mach limit. One of the key features of the Paolucci approach is to split the pressure into two terms: a thermodynamic one (noted P (t)) of the dominant order and function of temperature only and a dynamic one (noted Π) of the order of magnitude of squared Mach, function of temperature and position. This model is then applied to studying a differentially heated cavity [START_REF] Paolucci | The differential heated cavity[END_REF], the first of many works on the differentially heated cavity with a low Mach model. In [QWP + 05], they derive numerical reference solutions for steady natural convection flows by varying the Rayleigh number and the viscosity law. In [START_REF] Paillere | Comparison of low Mach number models for natural convection problems[END_REF], we see the effort of performing low Mach simulations through different methods, using an asymptotic expansion and developing an algorithm for the fully compressible Navier-Stokes equations with particular attention to the discretization when the Mach number is low. Over time, the assumption of low Mach number has been extended to more complex physical problems like in [LMP92, MS85, Sch94, AR06, SAM + co, BSBF12, GJK21, Emb89].

During the last decades, the low Mach models have become of great interest, so plenty of studies consider this approximation in many fields. Let us cite some examples to show the variety of applications of the low Mach assumption.

In atmospheric flows, there are many time and length scales. Multi-scale and asymptotic analyses are performed to model the phenomena involved in air circulation. The vertical scales of circulation and pressure variation are comparable at small scales, so the need to filter acoustic modes arises. This necessity is addressed using anelastic models in which the Mach number tends to 0. [Kle03] and [START_REF] Klein | Asymptotic analyses for atmospherics flows and the construction of asymptotically adaptive numerical methods[END_REF] perform a multiple asymptotic analysis by taking the Mach, Froude, and Rossby numbers simultaneously, tending to 0. They obtain similar results to Paolucci with the decoupling of pressure, with the difference that there is no temporal variation for the pressure here.

In multi-phase flows, we refer to [START_REF] Penel | Etude théorique et numérique de la déformation d'une interface séparant deux fluides non-miscibles à bas nombre de Mach[END_REF] for an analysis of droplet flows consisting of a two-phase immiscible flow peculiar to the interior of nuclear reactors or to [BSD + 21] for an analysis of the interaction of a compressible phase with an incompressible one.

Concerning combustion processes in [START_REF] Majda | The derivation and numerical solution of the equations for zero Mach number combustion[END_REF] and [START_REF] Lucchesi | A hybrid, non-split, stiff/rkc, solver for advection-diffusion-reaction equations and its application to low-Mach number combustion[END_REF], we find the analysis of a combustion process of propagation of a flame in a closed vessel while in [PNB + 16] and [NBD + 12] we notice the analysis of complex reacting flows with the coupling of advection, diffusion, and reaction.

In thermoacoustic, we have the results developed in [MWC + ce] and [HWC + 10] for the simulation of thermoacoustic engines and [START_REF] Weisman | Modèle Faible Mach et simulations numériques 2D de l'amplification d'onde thermoacoustique[END_REF] concerning the interaction between the thermal and the acoustic phenomena that are at the base of the working of a thermoacoustic engine.

Recently, in [START_REF] Reyes | Reduced order models for thermally coupled low Mach flows[END_REF], we can see how to extend to low Mach regimes the methods for reduced models through proper orthogonal decomposition of Navier-Stokes equations coupled with thermal effects. [START_REF] Brouwer | Gas pipeline models revisited: model hierarchies, nonisothermal models, and simulations of networks[END_REF] performs an asymptotic analysis combining the asymptotic limit of several small parameters, including the Mach number.

We have seen how, in pipe flows, state of the art is Boussinesq based and how the low Mach assumption is employed in many fields. In this work, we apply the Low Mach approach to flows in pipeline networks.

The structure of the work

This work is structured in three parts. At first, we present the theoretical background with the physical and mathematical modeling of the problem. Then, we construct numerical algorithms and perform numerical simulations for different pipeline configurations. We distinguish between two different cases: the study of the thermosyphon and the extension of the simulation to more complex configurations, including the issues of transmission conditions at junctions. We introduce the model in Chapters 2, 3, and 4 and perform a theoretical analysis.

In Chapter 2, we introduce the equations of interest starting from the conservation laws. We give the averaged one-dimensional version of Navier-stokes equations and non-dimensional analysis. We also introduce the Poiseuille and the Graetz model for studying the behavior of velocity and temperature in pipes. Then, we briefly digress into the Boussinesq model, introduce the low Mach model, and perform a non-dimensional analysis. In the end, we compare the two models.

Chapter 3 introduces the analytical solutions for unsteady laminar regimes. We derive the solutions for every pipe and explain how to extend them to a general arrangement of pipes.

We obtain a reference quasi-analytical solution for the thermosyphon.

In Chapter 4, we introduce the open bifurcation configuration and study the junction transmission conditions. We also introduce the three-rung ladder and provide its reference quasianalytical solution.

In Chapters 5, 6 and 7, we study the numerical algorithms we constructed.

In Chapter 5, we handle the delicate problem of the Dirac deltas that originates when we differentiate the gravity term and compare different approaches. We first directly discretize it without special treatment, then introduce possible ways to approximate it through some regularization functions, and finally apply an algorithm inspired from [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF].

In Chapter 6, we study the discretization of transmission conditions at the junction between more than two pipes for open domains. We apply the theoretical results to an open fork.

In the first stage, we study the case of constant temperature through an electrical analogy introduced in the appendix [C]. Then, we consider the more general case where we apply the conservation of mass and energy.

In Chapter 7, we present the solving algorithm of a general closed pipeline network.

In Chapters 8 and 9, we give the numerical results.

In Chapter 8, we see the implementation of the discretization of the laws at the junction.

In Chapter 9, we start by showing the numerical solution for the thermosyphon, and we analyze how the behavior of the flow is affected by the variation of physical parameters and dimensionless numbers characterizing the flow. Then, we deal with a three-rung ladder. We study the resulting flow behavior by varying the position of the middle peg and compare our results with a two-dimensional Boussinesq solution obtained with both FreeFem++ and Mathematica. We then show the extension to a ladder with a general number of pegs and a general network.

Part I

Physical and Mathematical modeling

This part presents the derivation of models for gas flows through cylindrical pipes and their analysis from the mechanical and mathematical points of view.

We construct a model that will have applications in various concrete settings. The development of such a model became necessary out of an industrial need, specifically within the context of natural gas exploitation. The industrial application we focus on is transporting liquefied natural gas across oceans via ships. A gas network is implemented to ensure its successful transit, assuring the supervision of natural gas exchanges with its surroundings. This gas remains in constant motion, driven by a significant natural temperature gradient between the ocean temperature of 283-293K and the interior temperature of the tank of 73-110K. The velocity of this gas is small enough that the Mach number is around 10 -4 . Our primary objective is to derive an unsteady and one-dimensional low Mach model for pipe flows by applying an asymptotic expansion. We first present one-dimensional Navier-Stokes equations by averaging them over the cross-section of a pipe. By expanding the equations around the small Mach number, we develop a quasi-incompressible model that lies between the compressible Navier-Stokes equations and the Boussinesq model.

One of the most remarkable achievements of our model lies in the decomposition of the pressure into two distinct and significant components. The first component is a thermodynamic pressure, denoted as P (t), uniformly distributed through the entire domain with temporal variations based on the heat flux at the pipe lateral surface. The second component, a dynamic pressure represented as Π(x, t), appears in the equation of conservation of the momentum. This decomposition is typical in low Mach models.

Our model exhibits minimal variations in pressure and velocity due to the influence of thermodynamic effects of small magnitude, but they are not negligible. Our low Mach method offers enhanced flexibility as it does not limit the magnitude of temperature gradients and accommodates significant variations in density and changes of the reference pressure P (t).

Consequently, it surpasses the predictive capabilities of the Boussinesq model. Moreover, we examine the analytical solution for an open pipe. Subsequently, we expand our investigation to closed arrangements of pipes, accounting for the interdependencies among them. We understand that our inlet boundary conditions for the single pipes are now unknown parameters. The solution is quasi-analytical because we obtain a final non-linear equation containing the unknown λ, representing the inlet characteristic length. To approximate it numerically, we will propose two methods: the Newton method and the linearization approach. We neglect the non-linear term in the velocity to simplify our analysis.

We will investigate several geometrical configurations but provide an analytical solution for the thermosyphon and the three-rung ladder.

In this part, we also present the transmission conditions at the junctions. We show how to derive an analytical solution around the junctions. We apply our findings to the case of an open bifurcated domain.

We emphasize that our current investigation is concerned with laminar flows of ideal gases.

Chapter 2

The low Mach model

In this chapter, we derive the mechanical and mathematical models we will study. We will apply this model to several geometrical configurations, both open and closed. In the case of open domain, we will provide inlet and outlet Dirichlet boundary conditions, while for closed domains, we will consider periodic boundary conditions. We briefly remind how to obtain the full Navier-Stokes equations and their one-dimensional average across the cross-section of a pipe. We make some physical considerations to close the system and perform a nondimensional analysis. We use the perturbation theory tools to make an asymptotic analysis with respect to the Mach number and derive a low Mach model. We compare it with the Boussinesq model and show what makes our model more accurate. We give the analytical solution in each pipe in the case of both the presence and absence of the non-linear term in the velocity. We first study the dimensionless form to better understand the physics underlying the equations; then, we use the linearization tools to find approximate solutions.

The equations

We first give the formulation of the conservation laws for mass, momentum, and energy.

We put them together to constitute Navier-Stokes equations and give a simplified averaged version in the particular case of the flow in a pipe.

Conservation laws

Let us take a moving control volume Ω and a moving quantity ϕ associated with a flow at velocity ⃗ u. We have that the variation in time of an elementary portion of volume dΩ is given by the product ⃗ ∇ ⃗ x • ⃗ udΩ. We refer to [START_REF] Germain | Continuum thermodynamics[END_REF] for more details. A conservation law for ϕ consists of imposing that the rate of change of its integral all over the control volume is equal to the amount of the associated flux J ϕ lost (or gained) through the boundary ∂Ω plus the amount created (or consumed) by the supply ψ ϕ in the control volume. Concisely:

D Dt Ω ϕdΩ = - ∂Ω J ϕ dσ + Ω ψ ϕ dΩ,
where the total derivative operator is defined as:

D Dt := ∂ ∂t + ⃗ u • ⃗ ∇ ⃗ x , (2.1)
that in the following will be often reduced to D t (•). By the Reynolds transport theorem for the left-hand side term, we obtain the following:

D Dt Ω ϕdΩ = Ω D Dt ϕdΩ + Ω ϕ D Dt dΩ = Ω ∂ϕ ∂t + ⃗ u • ⃗ ∇ ⃗ x ϕ + ϕ ⃗ ∇ ⃗ x • ⃗ u dΩ. (2.2)
Using equation (2.2) and the divergence theorem for the boundary term, the general global conservation law is:

Ω ∂ϕ ∂t dΩ + Ω ⃗ ∇ ⃗ x • (ϕ⃗ u)dΩ = - Ω ⃗ ∇ ⃗ x • J ϕ dΩ + Ω ψ ϕ dΩ.
By moving all to the left-hand side and for the arbitrariness of the control volume, the most general local conservation law reads:

∂ϕ ∂t + ⃗ ∇ ⃗ x • (J ϕ + ϕ⃗ u) -ψ ϕ = 0.
(2.3) Table 2.1 reports the values of ϕ, J ϕ and ψ ϕ for each conservation law.

Table 2.1: The values of the conserved quantity ϕ, its associated flux J ϕ and supply ψ ϕ for each conservation law.

ϕ J ϕ ψ ϕ Mass ρ 0 0 Momentum ρ⃗ u -σ ρ⃗ g Energy ρ e + 1 2 |⃗ u| 2 ⃗ q -σ • ⃗ u ρ⃗ g • ⃗ u

Mass

Concerning the mass the quantity ϕ plays the role of the density ρ and the sources are null so that equation equation (2.3) becomes the mass conservation law:

∂ρ ∂t + ⃗ ∇ ⃗ x • (ρ⃗ u) = 0.
(2.4)

Momentum

Concerning the momentum, the quantity ϕ plays the role of the mass flux ρ⃗ u. The sources are normally divided into two classes: the internal stresses and the body forces that give this conservation law the name of the Cauchy momentum equation.

The body forces ⃗ f are given by the gravity force, while the internal stresses σ are constituted by the normal stresses given by pressure P and the shear stresses τ , the viscous stresses corresponding to the dissipative part of the stress tensor:

σ := -P Ī + τ .

We obtain that:

⃗ ∇ ⃗ x • J ϕ := -⃗ ∇ ⃗ x • σ = -⃗ ∇ ⃗ x • (-P Ī + τ ) = ⃗ ∇ ⃗ x P -⃗ ∇ ⃗ x • τ , ψ ϕ := f = ρ⃗ g.
In this way, equation (2.3) becomes the momentum conservation law:

∂(ρ⃗ u) ∂t + ⃗ ∇ ⃗ x • (ρ⃗ u ⊗ ⃗ u) + ⃗ ∇ ⃗ x P = ⃗ ∇ ⃗ x • τ + ρ⃗ g. (2.5)
By exploiting equations (2.1) and (2.4), there exists a non-conservative form of equation (2.5) that reads:

ρ D⃗ u Dt + ⃗ ∇ ⃗ x P = ⃗ ∇ ⃗ x • τ + ρ⃗ g.
(2.6)

Energy

Let us introduce the kinetic energy per unit mass K := 1 2 |⃗ u| 2 . The internal energy per unit mass E can be defined as the sum of the potential energy per unit mass e and K, E := e + K.

In this case the quantity ϕ is the energy ρE and the sources are given by:

⃗ ∇ ⃗ x • J ϕ := ⃗ ∇ ⃗ x • -σ • ⃗ u + ⃗ q T , ψ ϕ := ρ⃗ g • ⃗ u.
In this way the energy conservation law reads:

∂(ρE) ∂t + ⃗ ∇ ⃗ x • (⃗ u(ρE + P )) = ⃗ ∇ ⃗ x • ( τ • ⃗ u -⃗ q T ) + ρ⃗ g • ⃗ u,
In compact form, we have:

ρ D Dt E = ⃗ ∇ ⃗ x • ( σ • ⃗ u -⃗ q T ) + ρ⃗ g • ⃗ u. (2.7)
Let us multiply equation (2.6) by the velocity ⃗ u:

ρ⃗ u • D⃗ u Dt + ⃗ u • ⃗ ∇ ⃗ x P = ⃗ u • ⃗ ∇ ⃗ x • τ + ρ⃗ g • ⃗ u.
By arranging the terms, we obtain the balance of the kinetic energy K: T is the symmetric part of the gradient of velocity. Notice that the first term on the left-hand side represents the power of the internal stresses, while the other two terms represent the power of the external forces.

ρ D Dt K = -σ : D(⃗ u) + ⃗ ∇ ⃗ x • σ • ⃗ u + ρ⃗ g • ⃗ u, (2.8) where D(⃗ u) := 1 2 ⃗ ∇ ⃗ x ⃗ u + ( ⃗ ∇ ⃗ x ⃗ u)
By subtracting equation (2.8) by equation (2.7) we obtain:

ρ De Dt + P ⃗ ∇ ⃗ x • ⃗ u = τ : D(⃗ u) -⃗ ∇ ⃗ x • ⃗ q T .
(2.9)

Energy equation with temperature

We want to use the thermodynamics theory to write the energy conservation law in terms of thermodynamic variables. Classical thermodynamics (defined thermostatic by [START_REF] Germain | Continuum thermodynamics[END_REF][START_REF] Gatignol | Thermomécanique des milieux continus[END_REF]) deals with phenomena at equilibrium in time and space. The problem in fluid flows is the movement and variation of all quantities in space and time. To overcome this difficulty, we use the hypothesis of the local accompanying equilibrium state [START_REF] Gatignol | Thermomécanique des milieux continus[END_REF]: although the system is in motion (and therefore in disequilibrium), each elementary volume unit can be considered approximately in equilibrium from the thermodynamics point of view. In our case, the first thermodynamics principle is expressed by equation (2.7) in which the variation of energy is given by the sum of the exchanged work σ : D(⃗ u) and the exchanged heat ⃗ ∇ ⃗ x • ⃗ q T . Notice that in the expression of σ, the pressure term represents the reversible work and τ the irreversible one. Let us now introduce entropy. The first principle can be written in the following form:

de = δW + δQ,
where W is the work and Q is the heat. For a quasi-static reversible transformation we can use the relations δW rev = -P d 1 ρ and ds = δQrev T to write the second principle, which reads for the variation of entropy as follows:

ds = de T + P dV T .
Notice that we then deal with power instead of variation of energy. We obtain the following conservation equation for the entropy:

Ds Dt = 1 T De Dt + P T D Dt 1 ρ (2.4) = 1 T De Dt + P ρT ⃗ ∇ ⃗ x • ⃗ u (2.9) = 1 ρT τ : D(⃗ u) -⃗ ∇ ⃗ x • ⃗ q T .
This equation can be written as:

ρ Ds Dt = -⃗ ∇ ⃗ x • ⃗ q T T + σ, with σ := 1 T τ : D(⃗ u) + ⃗ q T • ⃗ ∇ ⃗ x 1 T ,
where the term σ is called entropy creation term. The second principle of thermodynamics states that σ ≥ 0. To satisfy this condition, in the framework of first gradient theory, we have to impose τ to be proportional to D and ⃗ q T to ⃗ ∇ ⃗ x T . Consequently, the common definitions we use for τ and ⃗ q T derive from the application of the thermodynamics principles, see [START_REF] Germain | Continuum thermodynamics[END_REF] and [START_REF] Gatignol | Thermomécanique des milieux continus[END_REF] for more details. We obtain:

τ := λ ⃗ ∇ ⃗ x • ⃗ u Ī + 2µ D(⃗ u), ⃗ q T := -k ⃗ ∇ ⃗ x T,
where λ and µ are the Lamé parameters and k is the thermal conductivity. Notice that these parameters are functions of the thermodynamic quantities, but we will suppose them to be constant.

Let us now write equation (2.9) as a conservation law for the temperature. We recall from [START_REF] Borgnakke | Fundamentals of Thermodynamics[END_REF] that the specific enthalpy h can be expressed as:

h = e + P ρ .
(2.10) By injecting (2.10) in (2.9) we obtain:

ρ Dh Dt = D Dt P + τ : D(⃗ u) -⃗ ∇ ⃗ x • ⃗ q T .
(2.11)

Let us recall that we must choose a pair of variables in thermodynamics to express all the thermodynamic quantities. We choose pressure P and temperature T , so that h = h(T, P ).

Equation (2.11) can be written as:

ρ ∂h ∂T P D t T + ∂h ∂P T D t P = D t P + τ : D(⃗ u) -⃗ ∇ ⃗ x • ⃗ q T .
And so: = α T by introducing the Gibbs energy g, expressed thanks to the second law of thermodynamics as g = h -T s, and the specific volume 1 ρ (≡ V ).

ρc p D t T = α T D t P + τ : D(⃗ u) -⃗ ∇ ⃗ x • ⃗ q T , ( 2

Three-dimensional Equations

Equations (2.4), (2.5) and (2.12) have as unknowns ρ, u, P, T . Let us introduce a law for the density of the gas, and we obtain the full compressible Navier-Stokes equations:

∂ρ ∂t + ⃗ ∇ ⃗ x • (ρ⃗ u) = 0, (2.13a) ∂(ρ⃗ u) ∂t + ⃗ ∇ ⃗ x • (ρ⃗ u ⊗ ⃗ u) + ⃗ ∇ ⃗ x P = ⃗ ∇ ⃗ x • τ + ρ⃗ g, (2.13b
)

ρc p ∂T ∂t + ⃗ u • ⃗ ∇ ⃗ x T = α T DP Dt + τ : D(⃗ u) -⃗ ∇ ⃗ x • ⃗ q T , (2.13c) ρ = f (P, T ). (2.13d)
Let us specify the τ terms. Thanks to the additional hypothesis of null bulk viscosity, we

have λ = -2 3 µ and τ = 2µ -1 3 ⃗ ∇ ⃗ x • ⃗ u Ī + D(⃗ u) .
We have:

⃗ ∇ ⃗ x • τ = ⃗ ∇ ⃗ x • µ - 2 3 ⃗ ∇ ⃗ x • ⃗ u Ī + ⃗ ∇ ⃗ x ⃗ u + ( ⃗ ∇ ⃗ x ⃗ u) T = µ 1 3 ⃗ ∇ ⃗ x ⃗ ∇ ⃗ x • ⃗ u + ⃗ ∇ 2 ⃗ x ⃗ u , τ : D(⃗ u) = 3 i=1 3 j=1 τij Dji = Tr τ D.
Now that we have the full three-dimensional equations, we focus on deriving a one-dimensional model.

Thin layer equations

We study the flow through a pipe-like domain as in figure 2.1 by considering the compressible Navier-Stokes equations written with a long wave (or thin layer) approximation. We express our variables in cylindrical coordinates so that, for example, the velocity reads:

⃗ u = u r ⃗ e r + u θ ⃗ e θ + u x ⃗ e x .
We assume axisymmetric flow so that the components of our vectors along the direction ⃗ e θ are null (we suppose no swirling flow, which may nevertheless appear in our configuration). We write equations (2.13) by components as follows: At this stage, adding some assumptions to simplify the equations is possible: the thin layer approximation. We suppose that the ratio between the radius and the length of the pipe is of the order of 10 -2 , and we obtain:

R L ≪ 1 =⇒ ∂ ∂r ≫ ∂ ∂x , u r = O R L u x .
Consequently, we can neglect some radial components and the second-order mixed derivatives.

Notice that the radial transport term for the temperature is not negligible since u r ∂T ∂r = O u x ∂T ∂x . Suppose we also neglect the second-order derivatives in spaces. In that case, we obtain that equation (2.15) reduces to τ : D(⃗ u) = µ ∂ux ∂r 2

and that the one-dimensional axisymmetric compressible thin layer equations are:

∂ρ ∂t + ∂ρu x ∂x + 1 r ∂ρru r ∂r = 0, ∂ρu x ∂t + ∂ρu 2 x ∂x + 1 r ∂rρu x u r ∂r + ∂P ∂x = µ 1 r ∂ r ∂ux ∂r ∂r + 1 3 µ r ∂ 2 ru r ∂x∂r -ρg sin θ, ρc p ∂T ∂t + u x ∂T ∂x + u r ∂T ∂r -α T ∂P ∂t + u x ∂P ∂x = µ ∂u x ∂r 2 + 1 r ∂ rk ∂T ∂r ∂r , ρ = f (P, T ).
This one-dimensional Boundary Layer equation is averaged across the section [START_REF] Herran-Gonzalez | Modeling and simulation of a gas distribution pipeline network[END_REF].

We define the general operator of integration across the pipe section I S (f ) := f dS. We assume that the pipe is circular, and in this case, the operator becomes R 0 2πf rdr. Given a quantity ξ, the first mean value theorem for definite integrals states that its mean value across the pipe section ξ reads:

ξ = 1 πR 2 R 0 2πξrdr.
(2.17)

We assume that the mean value of a product of n quantities is the product of their mean values:

n i ξ i = 1 πR 2 R 0 2π n i ξ i rdr ≈ 1 πR 2 R 0 2πξ 1 rdr ... 1 πR 2 R 0 2πξ n rdr = n i ξ i . (2.18)
Note that this relation becomes an equivalence if we add a constant coefficient depending on the shape of the velocity profile (this will be discussed later). We apply the integration operator to the mass equation to show the procedure to obtain an averaged model. The same argument can be applied to the other equations. The integrated mass equation reads:

∂ ∂t R 0 2πρrdr + ∂ ∂x R 0 2πρu x rdr + R 0 2π 1 r ∂ρru r ∂r rdr = 0.
Thanks to equations (2.17) and (2.18) we obtain:

∂ρπR 2 ∂t + ∂ρ u x πR 2 ∂x + 2πρru r R 0 = 0.
Classical no-slip conditions at the pipe walls entail that u r (R) = 0, so the averaged mass conservation equation is:

∂ρπR 2 ∂t + ∂ρ u x πR 2 ∂x = 0.
Remark 2 We understand that the radial velocity is absent in the averaged conservation equations by making similar computations for the other equations. Consequently, we will use the notation u x ≡ u.

Concerning the integration of the other conservation equation, we compute the following meaningful integrals: .

We define the heat flow through the lateral surface of the pipe q w = -k ∂T ∂r r=R

and the shear stress on the lateral surface of the pipe τ w = µ ∂ux ∂r r=R

. The integral of the viscous dissipation (τ ij D ij ) is proportional to u x τ w . We will give an expression to these quantities to close the system. The one-dimensional axisymmetric averaged Navier-Stokes equations are: • system (2.19) is a 1D motion in (x, t) due to the averaging across a section;

∂ ∂t ρS + ∂ ∂x ρ uS = 0, ( 2
• the unknowns are defined through integration across the cross-section of the pipe: pressure P (x, t), temperature T (x, t), density ρ(x, t) and average velocity u(x, t) (in the following we will remove the bar to lighten the notation);

• S = dS is the area of the pipe cross-section. It can be a function of both time and space. For a circular cross-section of radius R, S = R 0 2πrdr, but few extra hypotheses allow it to be extended to any cross-section; hence D is the hydraulic diameter (and R the hydraulic radius), θ is the angle of inclination of the pipe, g is the gravitational acceleration;

• q w is the parietal heat flow and τ w the parietal shear stress that, e.g., in the case of a turbulent flow, can also be expressed in function of the Fanning friction factor as:

τ w = f ρ u 2
2 . We will give more details about modeling these two quantities later.

The following will refer to the axial velocity as u to lighten the notation.

Closure of the system

Here we set the closure relations needed for our model to express quantities like q w and τ w .

We give a law for ρ suitable for studying ideal gases, clarify the physical meaning of τ and q w in the averaged equations, and give them expressions as functions of T and u.

The shape factor

As we said, (2.18) depends on the shape of the velocity profile. If the velocity is flat (plug flow), then (2.18) with n = 2 and ξ 1 = ξ 2 = u is an equality. If the profile is supposed to be Poiseuille shape, then if ξ 1 = ξ 2 = u, there is a "shape factor" of value 4 3 (when written with the flux Q = uS) [START_REF] Ghigo | A 2D nonlinear multi-ring model for blood flow in large elastic arteries[END_REF]. An empirical "shape factor" may be defined for other velocity profiles. Of course, the same argument can be carried on for the temperature.

The shear stress at the wall

We know that for x ≥ L entrance ≈ RRe, where L entrance is the dynamic entrance length, the flow is completely developed [Tooa] and so it could be seen as a Poiseuille flow [START_REF] Pfitzner | Poiseuille and his law[END_REF], at least in isothermal flows.

From the digression in Appendix (A), we can deduce that the velocity could be considered constant along the x-axis and parabolic along the radial axis (see (A.4)). By using the Poiseuille velocity, we can give an expression for τ at the wall:

τ w := µ du(r) dr r=R = 6µu D = 6ρu 2 Re D ,
where Re D = ρuD µ is the Reynolds dimensionless number. The general expression for the shear stress at wall is τ w = f 2 ρu 2 with f := 12 Re D . We focus on laminar flows, for which the expression of the shear stress at the wall reduces to τ w = f 2 ρu with f := 12ν D . Here, we suppose ν := µ ρ to be constant, a valid approximation in our configurations which will be useful for the analytical solution.

Let us compute the integral of the viscous dissipation τ : D(⃗ u) in the case of Poiseuille flow.

Recall that u(r) = 3 2 U max 1 -r R 2 and du(r) dr = -3 Umax R 2 r. We obtain that:

R 0 2πr τ : D(⃗ u)dr = R 0 2πrµ du(r) dr 2 dr = 18πµ U 2 max R 4 R 0 r 3 dr = 3 2 U max πRτ w .
Notice that u(R) = 3 2 U max so that the integral is proportional to u(R)τ w as previously mentioned.

The Graetz solution for the temperature

Let us consider the same geometrical configuration in which we have found the Poiseuille solution for the velocity. Let us suppose that for negative x, the temperature at the wall is constant and equal to T 0 and that at x = 0, there is an abrupt temperature change at the wall to the temperature T 1 . In Appendix (A) we find a solution for the dimensionless temperature θ of the form:

θ = i a i ϕ i (y)X i (x).
We find that ϕ i ≈ sin ((2i -1)πy) ∀i ∈ N, and that the first term of the sum gives a sufficient approximation of the solution. The non-dimensional temperature is given by θ(x, y) ≈ sin (πy)e -λ 2 1 x , with λ 1 a fundamental constant coming out from the application of the superposition method.

The Nusselt number

The Nusselt number is defined as the dimensionless temperature gradient at the surface, and it measures the convective heat transfer occurring at the surface compared with the conductive one. It is defined as:

N u := -k ∂T ∂r -k ∆T R .
For the Graetz problem, we compute Nusselt as:

N u := ∂T ∂r r=R
-2 ∂T ∂r r=R dx .

We obtain that the Nusselt number tends asymptotically to 3.77035 as x → ∞ in twodimensional plane coordinates.

The heat flow at the wall

To estimate q w for any configuration, we use the Nusselt number previously computed [C ¸e06].

We exploit the Nusselt number to define the heat transfer coefficient at the wall as h = N u k D . Given T ref the temperature at the wall, the Newton law gives the heat flux at the wall q w :

q w (x) = h(T (x) -T ref ).

Extra relation: the density law

Concerning the averaged model, in the ideal gas case, we can fix the law for ρ as:

ρ = P rT .
(2.20)

Consequently, the thermodynamic parameter α T is precisely 1, and we can give a more suitable expression for c p to simplify the model [Toob]. Let us introduce γ as the ratio of the heat capacity at constant pressure (c p ) to the heat capacity at constant volume (c v ):

γ := c p c v .
(2.21)

For an ideal gas, the specific enthalpy h and potential energy e are linearly dependent on the temperature through the heat capacities as follows: By deriving with respect to the temperature and exploiting the definition (2.21) of γ, we find the following expression for c p :

h = c p T e = c v T. ( 2
c p = γr γ -1 .
(2.23)

Dimensionless model

Let us take some characteristic quantities [START_REF] Langtangen | Scaling of Differential Equations[END_REF]:

u c the characteristic velocity, L c and R c two characteristic lengths such that R c ≪ L c , t c the characteristic time, ρ c the characteristic density, T c the characteristic temperature, P c the characteristic pressure, and q wc the characteristic q w . Set:

x = L c x, t = t c t, u = u c ũ, T = T c T , P = P c P , ρ = ρ c ρ, S = R 2 c S, R = R c R.
We define the dimensionless numbers:

Re = u c R c ρ c µ c the Reynolds number [tJMDM76]; M a 2 = u 2 c c 2 = ρ c u 2 c γP c the squared Mach number [YMOH10]; F r 2 = u 2 c
L c g the Froude number [START_REF] White | Fluid mechanics[END_REF];

P r = µc p k the Prandtl number [CR99]; St = L c u c t c the Strouhal number [Mas86].
Let us take q wc := kcTc Lc [START_REF] Bird | Transport Phenomena[END_REF] and the time t, so that: St = 1. The dimensionless model reads:

∂ S ρ ∂ t + ∂ S ρũ ∂ x = 0, (2.24a) ∂ S ρũ ∂ t + ∂ S ρũ 2 ∂ x + 1 γM a 2 ∂ S P ∂ x = - L c R c 1 Re f 2 π ρũ D - 1 F r 2 S ρ sin θ, (2.24b) ρ ∂ S T ∂ t + ũ ∂ S T ∂ x = P c T c ρ c c p α T D t ( S P ) + L c R c 1 Re u 2 c T c c p f 2 π ρũ 2 D - 2π R P rRe qw . (2.24c)
We observe that for ideal gases, we can set the relation ρ c = γ γ-1 Pc Tccp and α T = 1, so equation (2.24c) becomes:

ρ ∂ S T ∂ t + ũ ∂ S T ∂ x = γ -1 γ D t ( S P ) + L c R c 1 Re (γ -1)M a 2 f 2 π ρũ 2 D - 2π R P rRe qw .
(2.25)

The Boussinesq model

This section presents the Boussinesq model and highlights the main differences with the low Mach model. We refer to [Lage, Lagb, Lagd, Lagc, Laga, C ¸e98, Sca15, GB12] for further information. The main hypothesis is that the flow is slow, almost non-compressible; for this reason, we apply the Boussinesq approximation to give an estimate of the density ρ(T, P ): = O(M a 2 ). Notice that here we used the fact that c 2 = γ P ρ . We assume the translational invariance in every pipe so that the velocity is a radial function.

ρ = ρ ref + ∂ρ ∂T (T -T ref ) + ∂ρ ∂P (P -P ref ) = ρ ref (1 -α(T -T ref ) + β(P -P ref )) = ρ ref (1 -α(T -T ref )) + O(M a 2 ), with α = 1 Tc , β = 1 Pc for some characteristic ρ ref ,
Another assumption is the neglect of rotations in the corners and the effect of inertia. As a first approximation, the velocity profile remains Poiseuille with as the driving terms the ones of Boussinesq and the small variations of pressure with respect to the barometric level. We also suppose that the viscosity remains constant (generally, it depends on the temperature) and that the flow is incompressible (∇ • u = 0). The Boussinesq model assumes that the sum of two contributions gives the pressure as follows:

P = P ref -ρ ref gz sin θ + p,
where p is the dynamic contribution to the pressure, and ρ ref gz sin θ is the contribution due to the barometric level (the pressure varies with the height). We suppose that p(x) ≪ P 0 and p(x) ≪ ρ ref L. We neglect the inertia and average over the section by assuming Poiseuille velocity. Remember that in Poiseuille flows, we have the x-invariance for the velocity and the condition ∂ x u = 0.

Remark 3 In the Boussinesq assumption, a priori, we suppose that the density is linear as a function of the temperature variation. Still, the temperature variations could be considered so small ∆T T ≪ 1 that the density is assumed to be constant.

By analyzing the conservation equations, let us construct the Boussinesq model for onedimensional flows in pipes.

Mass

The equation for the mass is:

∂ρ ∂t + ∂ρU S ∂x = 0, (2.26)
where U is the average velocity of the flow. We define as Q := U S the mass flux and suppose the section S = πR 2 constant. Since ρ = ρ ref as first approximation, as a consequence, ρQ = C for some constant C, and Q = C, with C = C ρ ref , so that the velocity of the flow is constant.

Momentum

Since we consider little perturbations around the reference pressure P 0 , the equation for the conservation of the momentum reads:

ρ ∂u ∂t = - ∂p ∂x + α(T -T ref )ρ ref g sin θ - 6µ πR 4 Q.
(2.27)

Energy

The stationary equation for the energy integrated over the section gives:

ρ ref c p ∂ST ∂t + ∂ ∂x (ρ ref c p QT ) = -2πRq w , (2.28)
where the flux at the wall is given by q w = h(T -T ref ). This system will be discussed further in chapter 3.

The low Mach Expansion

The gas velocity can be so low that the Mach number can be considered tending to 0. This behavior could be an issue in (2.24b) in the pressure term. The idea is to use the perturbation theory tools [BOon] to rewrite equations (2.24) under this hypothesis of M a → 0 by following the procedure of [smi19]. Paolucci performs a similar procedure in [START_REF] Paolucci | On the filtering of sound from the Navier-Stokes equations[END_REF]. The asymptotic expansions of our variables read:

ũ(x, t) = ũ0 (x, t) + M aũ 1 (x, t) + O(M a 2 ), (2.29a) T (x, t) = T0 (x, t) + M a T1 (x, t) + O(M a 2 ), (2.29b) ρ(x, t) = ρ0 (x, t) + M aρ 1 (x, t) + O(M a 2 ), (2.29c) P (x, t) = P0 (x, t) + M a P1 (x, t) + M a 2 γ P2 (x, t) + O(M a 3 ), (2.29d)
where we assume that the densities at different order are functions of the corresponding variables at the same order or less, briefly ρi (x, t) := ρi ( T0 (x, t), ..., Ti (x, t), P0 (x, t), ..., Pi (x, t)).

They are the fundamental expansions; all the other terms appearing in the equations can expand using them. For example, the expansion of the terms involving density is the following:

(ρũ) = ρ0 ũ0 + M a(ũ 0 ρ1 + ũ1 ρ0 ) + O(M a 2 ), (2.30)

(ρũ 2 ) = ρ0 ũ2 0 + M a(2ũ 0 ũ1 ρ0 + ũ2 0 ρ1 ) + O(M a 2 ).
(2.31)

A general model

Let us substitute equations (2.29a) to (2.29d), (2.30) and (2.31) in (2.24). At the orders -1

and -2 we have terms only in the momentum equation: ∂ x P0 = 0, ∂ x P1 = 0. The two first terms of the pressure expansion are homogeneous in space and change in time. [START_REF] Paolucci | On the filtering of sound from the Navier-Stokes equations[END_REF] obtains the same result, while [START_REF] Klein | An applied mathematical view of meteorological modeling[END_REF], in meteorology, obtains a similar result with no time variations for these pressures. In the following, we give an equation for the time evolution of P0 , and we suppose P1 to be zero since there is no value for it in the boundary conditions.

At the zeroth-order, one obtains:

∂ S ρ0 ∂ t + ∂ S ρ0 ũ0 ∂ x = 0, (2.32a) ∂ S ρ0 ũ0 ∂ t + ∂ S ρ0 ũ2 0 ∂ x + ∂ S P2 ∂ x = - L c R c 1 Re f 2 π ρ0 ũ0 D - 1 F r 2 ρ0 S sin θ, (2.32b) ρ0 ∂ S T0 ∂ t + ũ0 ∂ S T0 ∂ x = γ -1 γ S P ′ 0 - 2π R P rRe q0 w , (2.32c) P0 = r T0 ρ0 .
(2.32d)

In the above equations, two terms of the pressure expansion appear: P0 and P2 . They appear in two completely different contexts since they play entirely different roles: P := P0 is the thermodynamic pressure while Π := P2 γ is the dynamic pressure. In a few words, we decouple the effects of pressure, which can now be analyzed separately.

Froude regimes

In the previous dissertation, we constructed a low Mach model without analyzing its relationship with the other dimensionless numbers. Suppose we find that another number is O(M a ι ) for some ι ∈ N + , ι ≥ 1, then we can construct a more accurate model. We find that the Froude number can assume values matching this requirement. The following expression gives the parameter we search for:

ι = ln u 2 c Lcg ln u c ρc γPc 1 2
.

We observe that the values it can assume depend on the values of the characteristic length L c . In contrast, the values of the characteristic velocity do not have a significant impact. We have the following values for ι:

ι(L c ) ≈                1 2 if L c = O(10 -1 ) or L c = O(1), 1 if L c = O(10) or L c = O(10 2 ), 3 2 if L c = O(10 3 ).
Moreover ι is exactly 2 if L c = γPc ρcg . If we take typical values for the physical parameters, P c equal to the atmospheric pressure, γ = 1.4 and ρ c = 1.2, we have that L c = 12050 is the characteristic length needed for the Froude number to be equal to the Mach number. In conclusion, the only admissible value for ι is 1, and it complies with characteristic lengths of value at least O (10). For little L c , the previously constructed model is still more accurate than the model we will construct here. Let us substitute F r 2 with M a in equation (2.24b) and insert the expansion of our variables. Equation (2.24b) at orders -2,-1 and 0 gives:

∂ x P0 = 0, (2.33) 1 γ ∂ S P1 ∂ x = -ρ0 S sin θ, (2.34) ∂ S ρ0 ũ0 ∂ t + ∂ S ρ0 ũ2 0 ∂ x + ∂ S P2 ∂ x = - L c R c 1 Re f 2 π ρ0 ũ0 D -ρ1 S sin θ, (2.35)
In equation (2.34), we notice that we have no more P1 homogeneous in space. The difference with the previous model is that now the effects of the gravity term on the dynamics of the problem are well described by the pressure P1 . In a few words, here we have an ulterior decoupling of the effects of the pressure with two different dynamic pressures. The main issue of this model is that we see ρ1 appearing in equation (2.35). To close the problem, we need the order 1 equations deriving from the conservation of mass and energy and the density law:

∂ S ρ1 ∂ t + ∂ S (ρ 0 ũ1 + ρ1 ũ0 ) ∂ x = 0, ρ0 D ũ0 t ( S T1 ) + ũ1 ∂ S T0 ∂ x = γ -1 γ D ũ0 t ( S P1 ) - ρ1 ρ0 S P ′ 0 - 2π R P rRe q1 w - ρ1 ρ0 q1 w , P1 = r T0 ρ1 + T1 ρ0 ,
where D v t is the total derivative with respect to the velocity v, D v t := ∂ t + v∂ x. Zeroth-order equations being the same as before, we do not report them. We use the first model in the following since it is simpler to handle, even if the interpretation of P2 will be more challenging.

The second model is imperative if a separation of dynamic effects is needed.

The Dimensional low Mach model

Here, we analyze the structure of equations (2.32) in the case in which we re-introduce the dimensional variables to have a dimensional low Mach model. We express the dimensionless variables as functions of the dimensional ones as follows:

x = x L c , t = t t c , (2.36a) T = T T c , P = P P c , Π = Π ρ c u 2 c , ρ = ρ ρ c , qw = q w q wc (2.36b) S = S R 2 c , R = R R c , D = D R c . (2.36c) Remark 4
The characteristic quantities corresponding to the two different pressures are different. Indeed we use the reference thermodynamic pressure for P and the dynamic quantity ρ c u 2 c for Π. See [START_REF] Clancy | Aerodynamics[END_REF] for more details.

We substitute the dimensionless variables with the relations in the expressions (2.36) in equations (2.32), and after little manipulation, we obtain:

∂Su ∂x = - S ρ D t ρ, (2.37a) ∂Sρu ∂t + ∂Sρu 2 ∂x + ∂SΠ ∂x = - f 2 πρuD -ρSg sin θ, (2.37b) ρc p ∂ST ∂t + u ∂ST ∂x = SP ′ (t) -2πRq w , (2.37c) ρ = P rT .
(2.37d)

The equation (2.37a) is identical to (2.19a) since the low Mach assumption does not affect it, while equation (2.37c) is an approximation of (2.19c) since with the low Mach assumption we lose the singular term that goes to 0 as Mach goes to 0.

We notice substantial differences with the Boussinesq system of equations (2.26),(2.26),(2.28).

In the low Mach model, the velocity divergence and the time variation of pressure are not null. Moreover, here, the density is not approximated to be linear in temperature variation.

Note also that there are two pressures contrary to Boussinesq.

Reformulation of the equations

We want to express the equations differently for a more suitable formulation for our variables.

In particular, we show how the velocity divergence is a function of the thermodynamics of the problem.

Weak compressibility relation

Since ρ = ρ(T, P ), equation (2.37a) can be rewritten in the following way:

∂Su ∂x = - S ρ D t T ∂ρ ∂T + D t P ∂ρ ∂P .
The total derivative of the temperature is given by equation (2.37c) while D t P = P ′ (t). We obtain that the right-hand terms of equations (2.37a) and (2.37c) have the same structure, in formulas:

∂Su ∂x = - S ρ P ′ (t) ρc p - 2πR ρc p S q w ∂ρ ∂T + P ′ (t) ∂ρ ∂P = Ā(T, P )P ′ (t) + B(T, P )q w , (2.38)
Where:

Ā(T, P ) = - S ρ 2 c p ∂ρ ∂T - S ρ ∂ρ ∂P , B(T, P ) = 2πR ρ 2 c p ∂ρ ∂T .
Thanks to equation (2.37d) we give a simpler expression of Ā(T, P ) and B(T, P ) for ideal gases:

Ā(T, P ) = P S ρ 2 c p rT 2 - S ρrT = S P r c p -1 = - S γP ≃ A(P ), B(T, P ) = - 2πRP ρ 2 c p rT 2 = - 2πR(γ -1) γP ≃ B(P ).
These coefficients will be useful for the expression of time variations of pressure.

The dynamic pressure equations

Let us give the expression of two equations involving Π. We can simplify equation (2.37b) by dividing it by ρS, we obtain:

∂ t u + u∂ x u + ∂ x Π ρ = - f 2 πu D S -g sin θ.
(2.39)

It is also possible to find a 2 nd order equation in space for Π that is a function of the thermodynamics of the system. We suppose that sin θ is a piece-wise constant function and that its derivative in a discontinuity point x is the delta of Dirac δ x. We obtain that

∂ x sin θ = N i=1 α i δ xi ,
with N the number of discontinuities. Applying the operator ∂ x to equation (2.39) we have:

-∂ x ∂ x Π ρ = ∂ t η + u∂ x η + η 2 + f πuη D S -g N i=1 α i δ xi .
(2.40)

In equation (2.40) we have used the quantity η := ∂ x u, and we will exploit that:

∂u ∂x = - 1 γP (t) P ′ (t) + 2πR(γ -1) S q w := η. (2.41)
The flow is compressible due to the thermodynamic influence on the velocity divergence. This η will be one of our main variables in the numerical part.

Closure relations

The set of equations we want to solve is made of equation (2.38) for the velocity, equation

(2.39) (or equivalently equation (2.40)) for the dynamic pressure Π, equation (2.37c) for the temperature T and the law for the density (2.37d) that relates the density ρ, T and the thermodynamic pressure P . The problem in solving this system of equations is that we have four equations and five variables (T, u, P, Π, ρ). We give more information about the thermodynamic pressure to find a solution to this problem. At this stage, it is necessary to distinguish between two families of problems depending on the features of the domain: the open domain problems and the closed domain ones. In the former case, the pressure P is not an unknown of the problem as the boundary conditions impose it. In the latter, we need to find another equation to understand how P evolves in time. In a closed domain, Ω periodic conditions naturally impose a constraint for the velocity, namely u • n = 0 in ∂Ω. In [smi19] this hypothesis together with equation (2.38) are combined in the following way:

∂Ω u • ndσ = Ω ∂ x (u)dx = Ω Ā(T, P ) S P ′ (t) + B(T, P ) S q w dx = 0.
We obtain the following equation for the thermodynamic pressure :

P ′ (t) = -Ω B(T, P )q w dx Ω Ā(T, P )dx = - 2πR(γ -1) S|Ω| Ω q w dxs. (2.42)
Notice that the global variation of P in time is proportional to the heat flux integral and increases through temperature variations. This dependence confirms that P is the expression of the thermodynamic phenomena.

A comparison between the previous models

We compare the models from the simplest, incompressible, to the richest, fully compressible.

Incompressible Navier-Stokes equations consist of a velocity divergence-free flow coupled with the momentum equation. The density is supposed to be constant, and it is possible to consider the energy conservation equation in the case of any temperature variations.

The Boussinesq model at the first stage assumes that the density is no longer constant but a linear function of the temperature. It introduces temperature feedback in the momentum equation so that momentum and energy are coupled. Let ε be the relative variation of temperature ε = ∆T T . The Boussinesq model works in the regime ε → 0. This assumption allows us to approximate the density with its reference value ρ ref . In this case, we still have an incompressible flow. The velocity divergence is null, and there is no variation of reference pressure either in time or space. The Mach number of the flow is assumed to be null.

Let us consider the case with no assumptions on the density behavior. Let M a be the Mach number. When M a is not null, but still M a << 1 (low Mach assumption), we obtain a model in which the reference pressure (previously indicated as the thermodynamic pressure) changes in time due to the thermodynamic effects, the density varies both in time and space and the velocity derivative is not null, due, also in this case, to the thermodynamic effects. Note that the energy equation is decoupled from the momentum equation in this case. Pressure and velocity variations are small, so the low Mach model is quasi-incompressible and tends to the Boussinesq model as the Mach number gets smaller and smaller. Both approaches give the same thing at a small temperature rise, but for Boussinesq, the pressure increase

P ′ 0 (t)

Summary

In this chapter, we derived and analyzed models for one-dimensional gas flows through pipes.

We expressed the compressible Navier-Stokes equations coupled with the energy conservation law in three-dimensional Cartesian and one-dimensional axisymmetric coordinates. We introduced the one-dimensional Navier-Stokes equations averaged across the cross-section of a pipe and closed the problem by proposing constitutive and closure laws for the density, heat flux, and shear stress at the lateral surface of the pipe. We introduced the Boussinesq model and showed how we can give a more accurate approximation of the equations in the presence of small velocities by using a low Mach model. We obtained a quasi-incompressible model in which we split the pressure into two terms: a thermodynamic pressure P and a dynamic pressure Π. We showed that the divergence of velocity and the variations of pressure depend on the thermodynamics of the problem. The low Mach model we constructed can capture flows driven by significant temperature gradients and describe the variations of pressure, contrary to the Boussinesq model. The set of equations we will solve is made of equation (2.38) for the velocity, equation (2.39) (or equivalently equation (2.40)) for the dynamic pressure Π, equation (2.37c) for the temperature T , equation (2.42) for the thermodynamic pressure P and the law for the density (2.37d) that relates the density ρ, T and P . At the time t = 0, we will suppose T , u, Π, and P to be homogeneous in space and be equal to given initial values. At the boundary, we will take Dirichlet boundary conditions for open domains and periodic boundary conditions for closed domains.

Extension: Gas mixture

More than one gas flowing in our pipeline configurations can be necessary for industrial purposes. This section aims to introduce the multi-species flow theory, with the perspective of elaborating on that in future works. We refer to [START_REF] Bermúdez | Numerical simulation of gas composition tracking in a gas transportation network[END_REF][START_REF] Embid | On the reactive and non-diffusive equations for zero Mach number flow[END_REF][START_REF] Prud'homme | Fluides hétérogènes et réactifs: écoulements et transferts[END_REF] for more details.

We consider N gas species homogeneously mixed inside a volume V . We call n k the number of moles, m k the mass, and V k the occupied volume of a species k in the mixture. The total mass, number of moles, and volume are given by:

m = N k=1 m k , n = N k=1 n k , V = N k=1 V k .
Recall that these quantities can vary both in space and time for a single species but globally maintain themselves constant. The mass and the number of moles of a species k are linked by the relation

m k = n k M k
, where M k is the molar mass. We define the average molar mass of the mixture as M := m n and the molar mass fraction of a species k as M k = M k M . For every species, we distinguish between the proper density ρ k = m k V k and the relative density

ρ * ,k = m k V . Define the volume fraction as V k := V k V .
The two densities are related by

ρ * ,k = V k ρ k .
The total density of the mixture is defined as:

ρ := N k=1 ρ * ,k .
For every species, we introduce the relative concentration C * ,k = n k V . We introduce the molar fraction X k and the mass fraction Y k for a species k as:

X k := n k n , Y k := m k m .
These quantities are dimensionless numbers between 0 and 1, which sum to 1. They are linked by the relation:

Y k = m k m = n k M k n M = M k X k .
Mass must be conserved for each mixture species, which implies the conservation of the relative densities. In the general conservation law, we take ϕ = ρY k for every species k. The equation we obtain is:

∂ρY k ∂t + ∂ρuY k ∂x + s = 0, (2.43)
where s is a source term to be defined case by case. Note that the density, the velocity, and the mass fraction are average quantities as defined in (2.17). Also, in this case, it is necessary to give closure relations, but this goes beyond our purposes. We insert the global mass conservation law in (2.43) and use the definition of the total derivative. The compact form of the conservation law is:

DY k Dt + 1 ρ s = 0.
In the case s = 0, we have pure transport of the initial information. The quantity s can also consider possible mass inlet or outlet. It is also common to insert in s a diffusive term employing the Fick law.

Chapter 3

The analytical solution for the thermosyphon This chapter aims to analyze the solutions of the low Mach model equations 2.37 under the assumption of a stationary laminar regime and neglecting the non-linear term ρu 2 over a thermosyphon-like domain. Remember that for our purposes we neglect the radial transport term for the temperature. We first give the analytical solutions for a simple open pipe, then present an extension for pipeline arrangements such as the thermosyphon.

Steady analytical solutions for an open pipe

We consider a pipe of length L with inlet temperature, flux, and dynamic pressure respectively

T IN , Q IN ,
ρC p Q∂ x T = -2πRq w , (3.1a) ∂ x Q = B(P ∞ )q w , (3.1b) ρQ S 2 ∂ x Q + ∂ x Π = -f πρQ D S 2 -ρg sin θ, (3.1c)
where we recall that B(P ) = -2πR(γ-1) γP and P ∞ is the stationary thermodynamic pressure. Equation (3.1a) can be reformulated by introducing B(P ∞ ):

Q ∂ x T T = B(P ∞ )q w . (3.2)
The particular form of equations (3.1b) and (3.2) implies:

∂ x T T = ∂ x Q Q . (3.3)
We introduce a parameter Γ representing the mass flow rate and an equivalent length λ representing the thermal entry length. They are as follows:

Γ := Q IN T IN , λ := - Γ B(P ∞ )h .
Notice that the stationary thermodynamic pressure P ∞ is known for an open pipe since the function P (t) is given.

Integrating equation (3.3) we deduce that ln

T = ln Q + C for some constant C, so Q = ΓT .
For ideal gases, B depends only on P , so it can be considered a constant from the point of view of the temperature. Equation (3.2) becomes:

Γ∂ x T = B(P ∞ )h(T -T ref ).
By integrating and imposing boundary conditions, one obtains:

T (x) = T ref + (T IN -T ref )e -x λ , Q(x) = Γ T ref + (T IN -T ref )e -x λ .
(3.4) Equation (3.1c) is more challenging to integrate. We report here the main steps. We compute the quantities ρQ and ∂ x Q as follows:

ρQ = P rT ΓT = P r Γ, (3.5) ∂ x Q = B(P ∞ )h(T IN -T ref )e -x λ . (3.6)
We write equation (3.1c) by inserting expressions (3.5) and (3.6) as follows:

∂ x Π = - P S 2 r ΓBh(T IN -T ref )e -x λ -f π P r Γ D S 2 -ρg sin θ.
We integrate on the interval [0, x]:

Π(x) -Π IN = P S 2 r Γ 2 (T IN -T ref )(1 -e -x λ ) -xf π P r Γ D S 2 - P r g sin θ x 0 1 T dx,
where the integral of the inverse of the temperature, after a bit of computation, is:

x 0 1 T dx = x 0 1 T ref + (T IN -T ref )e -x λ dx = 1 T ref x + λ T ref ln T (x) T IN .
In the end, we obtain the following:

Π(x) = P S 2 r Γ 2 (T IN -T ref )(1 -e -x λ ) -x P r f πΓ D S 2 + 1 T ref g sin θ - P rT ref λg sin θ ln T (x) T IN + Π IN .

Steady Analytical solutions to a simplified model

Our low Mach averaged model under the assumption of stationary laminar flow by neglecting the non-linear term ∂ x (ρu 2 ) is the following:

Q ′ (x) = B(P ∞ )q w (x), (3.7a)
Π ′ (x) = (aQ(x) -b)ρ(x), (3.7b) Q(x) T ′ (x) T (x) = B(P ∞ )q w (x), (3.7c)
where:

a := -f πD 2S 2 , b := g sin θ.
Remark 5 Let us call L entrance the dynamic establishment length; remember that it is natural to neglect the non-linear term if x ≥ L entrance , the same does not apply to the term ∂ x T .

Indeed, the difference between these two lengths is of the order of the Prandtl number. This difference is why we neglect one term and not the other.

A dimensionless analysis

We give a slightly different dimensionless form of the linear model to focus on the physical meaning of the dimensionless numbers and the characteristic quantities we introduce. We define the following dimensionless variables:

x = λx, S = πR 2 , Q = Q 0 Q = Su 0 Q ρ = ρ 0 ρ, T = (T ref -T 0 ) + T 0 T , Π = Π 0 Π, P = P 0 P .
Notice that we use λ for the space variable instead of L. We will show that λ is an intermediate scale between L and R and analyze its physical meaning. Notice also that we take two different sets of parameters to define the dimensionless pressures since the two pressures have different physical meanings. We define them by applying the dominant balance principle to the dimensionless equations:

Π 0 := µu 0 λ R 2 = λ R 1 Re R ρ 0 u 2 0 , P 0 := ρ 0 rT 0 .
Moreover, the coefficient of the gravity term in equation (3.7b) can be rewritten by exploiting the definitions of the Reynolds and Froude numbers. Recall that the Reynolds number is defined at the small scale while the Froude number is defined at the big scale.

We introduce the dimensionless number G defined as follows:

1 G := ρ 0 gR 2 µu 0 = R L gL u 2 0 ρ 0 u 0 R µ = R L Re R F r 2 L .
The dimensionless form of equation (3.7b) is:

G ∂ Π ∂ x = -6G Q -ρ sin θ. (3.8)
We introduce the modeling and definition of some quantities useful for the dimensionless form of the energy equation. The expression of qw is:

q w := h(T -T ref ) = hT 0 ( T -1).
We introduce the Peclet and Nusselt numbers as follows:

P e R := P rRe R = µC p k u 0 Rρ 0 µ = C p u 0 Rρ 0 k , N u := q w k(T -T ref ) 2R = h(T -T ref ) k(T -T ref ) 2R = 2 hR k .
We recall that the definition of the Nusselt number entails how we compute the heat coefficient at the wall h. By using the definition of qw we rewrite equation (3.7c) as follows:

ρ Q ∂ T ∂ x = - 2πRλh ρ 0 C p Q 0 ( T -1). (3.9)
The coefficient of the right-hand side can be rewritten by using the Peclet and Nusselt numbers:

2πRλh ρ 0 C p Q 0 = 2λh ρ 0 C p u 0 R = 2 k Ru 0 ρ 0 C p hR k λ R = N u P e λ R .
Since we have not chosen L as a big scale in space but an unknown quantity λ, we can fix its value by imposing the previous coefficient equal to 1:

λ := R P e N u .
In this way, we have given a physical expression of the coefficient λ. It is a function of both the thermodynamics (Nusselt and Prandtl) and the dynamics (Reynolds) of the problem.

Notice that the coefficient multiplying the radius is bigger than one, confirming that λ is a medium scale with values between those of the radius and the length of the pipes. Equation (3.9) becomes:

ρ Q ∂ T ∂ x = 1 -T .

The complete solution

In this case, the solutions for temperature and flux are the same as in section 3.1, while the form of Π changes. We give the analytic expression of the dynamical pressure, found by using the same procedure of section 3.1:

Π(x) = - bP λ rT ref (ln T (x) -ln T IN ) + P rT ref (aT ref Γ -b)x + Π IN .

A mixed linearized solution

Here, we show how to perform a hybrid linearization: we take the analytical solutions for the temperature and the flux and give a linearized solution for Π. We introduce the following small parameter:

ε = - T IN -T ref T ref ≪ 1
The analytical solutions for T and Q can be written as:

T = T ref (1 + εe -x λ ), Q = ΓT ref (1 + εe -x λ )
If we insert the ideal gas low in equation (3.7b), the equation for Π is the following:

Π ′ (x) = (aQ(x) -b)ρ(x) = (aQ(x) -b) P rT (x) = aP Γ r - bP rT (x) . (3.10)
We notice that, through the development in series around ε, we can easily find that:

1 T ≈ 1 T ref (1 -εe -x λ ).
We write equation (3.10) as:

Π ′ (x) = aP Γ r - bP rT ref (1 -εe -x λ ) = aP Γ r - bP rT ref + bP rT ref εe -x λ .
By integrating we obtain:

Π(x) = Π 0 - bP ελ rT ref + aP Γ r - bP rT ref x + bP ελ rT ref e -x λ .

A full linearized solution

Here, we use some linearization tools to find a good enough approximation of the dimensionless solutions of our model. We suppose that

T c = T b + ∆T, T f = T b -∆T, ∆T = εT b ,
where ε ≪ 1 is defined as ε :=

Tc-T f 2T b .
We linearize our variables exploiting this ε:

ρ ≈ 1 + ερ 1 , Q ≈ 1 + εQ 1 , T ≈ 1 + εT 1 , P ≈ 1, Π ≈ Π 0 + εΠ 1 .
We insert these developments in the dimensionless equations and obtain the following:

• at order 0, Π 0 is linear in x:

∂Π 0 ∂ x + 6 + G sin θ = 0 =⇒ Π 0 = -(6 + G sin θ) x;
• at order 1, we have the equations:

       ∂(ρ 1 +Q 1 ) ∂ x = 0, ∂T 1 ∂ x + T 1 = 0, ρ 1 + T 1 = 0, ∂Π 1 ∂ x + 6Q 1 + Gρ 1 sin θ = 0.
The first and last equations give that Q 1 = T 1 = -ρ 1 . The third equation gives that

T 1 = e -x . Π 1 is given by Π 1 = (6 -G sin θ) e -x .
The linearized solutions are:

Q = 1 + εe -x + O(ε 2 ), T = 1 + εe -x + O(ε 2 ), ρ = 1 -εe -x + O(ε 2 ), Π = -(6 + G sin θ) x + ε (6 -G sin θ) e -x + O(ε 2 ).
These solutions allow us to have a valid approximation of the reference solution. They could be a helpful alternative for more complex configurations.

The thermosyphon solutions

Here, we extend the analytical solutions to the thermosyphon. We will first introduce and describe its geometry. Then, we explain how the solutions over an open pipe can be extended to more complex configurations with interdependencies between pipes. and T c (heated, it is less dense and moves up). The inclination of the pipes θ depends on the geometry: in the heated pipe is π 2 , in the cooled one isπ 2 and in the others 0.

The thermosyphon configuration

The thermosyphon is a closed pipeline configuration of length 4L, forming a loop where the gas is confined at some mean pressure in the gravity field. The pipe at temperature T f cools the gas, making it denser and consequently fall, while the pipe at temperature T c heats the gas, making it less dense and moving up. In the adiabatic parts, gas experiences no heat transfer with its surroundings. We will study this configuration in curvilinear coordinates with the axial coordinate x, taking values in [0, 4L]. The point in which x = 0 will be the bottom left corner, coinciding with the inlet of the heated pipe.

The configuration we will analyze is a closed domain with periodic boundary conditions.

Consequently, the points x = 0 and x = 4L will coincide. Moreover, the outlet of every pipe will coincide with the inlet of the contiguous pipe. We will refer to the left heated pipe as the first pipe and the right cooled pipe as the third pipe. The second pipe will be the adiabatic pipe at the top, and the fourth will be the adiabatic pipe at the bottom.

The quasi-analytical solutions over a thermosyphon

The analytic solutions for every pipe composing the thermosyphon are given in section 3.2.2.

Once the values of the inlet boundary conditions and the pressure P ∞ are known, it is possible to construct the analytical solutions for each pipe.

In table 3.1, we report each pipe inlet temperature, flux, and dynamic pressure. P (t) is homogeneous in space, so its stationary value P ∞ will be the same for every pipe.

Table 3.1: The values of the inlet temperature, flux, and dynamic pressure for each pipe of the thermosyphon.

pipe

I pipe II pipe III pipe IV T IN T 0 T 1 T 1 T 0 u IN Q 0 Q 1 Q 1 Q 0 Π IN Π 0 Π 1 Π 2 Π 3
We notice that the local inlets are unknown due to the periodic boundary conditions on the global domain. P ∞ is also unknown since in a closed domain P (t) is an unknown. As a consequence, the solutions are quasi-analytical.

The conservation of the mass in space imposes the ratio between velocity and temperature to be constant throughout the thermosyphon, resulting in a constant mass flow rate:

Γ = Q 0 T 0 = Q 1 T 1 .
Consequently, Γ and λ are global unknowns with the same value on each pipe. This dependence on the boundary conditions on each pipe implies the necessity to find these three unknown parameters: Γ, λ, and P ∞ . In order to construct an algorithm to find the unknowns of the solution, we will combine the continuity of the dynamic pressure with the conservation of the mass in time.

We give an expression of T 0 and T 1 as functions of λ by solving the system:

       T 1 (λ) = T c (L) = T c + (T 0 -T c )e -L λ , T 0 (λ) = T f (3L) = T f + (T 1 -T f )e -L λ ,
This system results from the use of the solution (3.4) of the heat equation. The solution is:

T 1 (λ) = T c e L λ + T f e L λ + 1 , T 0 (λ) = T f e L λ + T c e L λ + 1 . (3.11)
We also have the following relations:

T 0 (λ) T 1 (λ) = T f e L λ + T c T c e L λ + T f .
(3.12)

1 T 0 (λ) + 1 T 1 (λ) = T 0 (λ) + T 1 (λ) T 0 (λ)T 1 (λ) = (e L λ + 1) 2 (T c e L λ + T f )(T f e L λ + T c ) T f (e L λ + 1) + T c (e L λ + 1) e L λ + 1 = (e L λ + 1) 2 T f + T c (T c e L λ + T f )(T f e L λ + T c ) , ( 3.13)

The continuity of Π in a thermosyphon

We impose the continuity of the dynamic pressure at the junctions between the pipes. We recall that on the heated pipe we have sin (θ c ) = 1, while on the cooled pipe sin (θ f ) = -1 and in the adiabatic pipes sin (θ a ) = 0. We obtain the following four conditions:

Π 2 = P aLΓ r + Π 1 , Π 0 = P aLΓ r + Π 3 , (3.14) Π 1 = gP Γ rB(P ∞ )hT c ln T 1 (λ) T 0 (λ) + P L rT c (aT c Γ -g) + Π 0 , (3.15) Π 3 = gP Γ rB(P ∞ )hT f ln T 1 (λ) T 0 (λ) + P L rT f (aT f Γ + g) + Π 2 . (3.16)
The structure of equations (3.14) to (3.16) allows us to reduce the equations to:

2 P aLΓ r + Π 1 + Π 3 = Π 2 + Π 0 , Π 1 + Π 3 = gP Γ rB(P ∞ )h 1 T f + 1 T c ln T 1 (λ) T 0 (λ) + 2 P aLΓ r + P gL r 1 T f - 1 T c + Π 2 + Π 0 .
By simple computations, we reduce these equations to an equation of the type z(Γ) = 0, where the function z is:

z( * ) = g * B(P ∞ )h ln T 1 (λ) T 0 (λ) 1 T c + 1 T f + 4a * L + Lg 1 T f - 1 T c .

The mass conservation equation in time for a thermosyphon

Usually, given a quantity of interest ζ(x, t) we define

ζ i (x) := ζ(x, t = 0) and ζ ∞ (x) := ζ(x, t = ∞).
We suppose T i (x) = T i = const. and P i (x) = P i = const. The mass conservation in time imposes that the mass on the domain at time t = ∞ is the same as at time t = 0, briefly:

4L 0 ρ ∞ dx = 4L 0 ρ i dx.
(3.17)

We suppose that the initial temperature is uniform all over the domain. The right-hand side term reads:

4L 0 ρ i dx = 4L 0 P i rT i dx = P i rT i 4L 0 dx = P i rT i 4L,
The left-hand side can be written in the following way:

4L 0 ρ ∞ dx = P ∞ r 4L 0 1 T ∞ dx,
where we decouple the values of T ∞ all over the domain as:

4L 0 1 T ∞ dx = L 0 1 T c + (T 0 (λ) -T c )e -x λ dx + 2L L 1 T 1 (λ) dx + 3L 2L 1 T f + (T 1 (λ) -T f )e -x λ dx + 4L 3L 1 T 0 (λ) dx.
We notice that in the adiabatic pipes, the temperatures T 1 (λ) and T 0 (λ) are homogeneous all over the interval. Hence, the integral computation is simple, as in the right-hand side term.

In the heated pipe, we compute the integral by a polynomial decomposition:

L 0 1 T c + (T 0 (λ) -T c )e -x λ dx = -λ e -L λ 1 1 y(T c + (T 0 (λ) -T c )y) dy = λ T c -[ln y] e -L λ 1 + [ln (T c + (T 0 (λ) -T c )y)] e -L λ 1 = λ T c L λ + ln T 1 (λ) T 0 (λ) .
For the cooled pipe, we obtain a similar result with the same procedure:

3L 2L 1 T f + (T 1 (λ) -T f )e -x λ dx = λ T f L λ -ln T 1 (λ) T 0 (λ) .
Equation (3.17) can be rewritten using the integrals computation. After simple computations, it reads:

P ∞ P i T i 1 T c + 1 T f + 1 T 0 (λ) + 1 T 1 (λ) + λ L ln T 1 (λ) T 0 (λ) 1 T c - 1 T f = 4. (3.18)

Final relation between the unknown parameters of a thermosyphon

Let us write the continuity of Π as:

g aΓ λ L ln T 1 (λ) T 0 (λ) 1 T c + 1 T f - 1 T f - 1 T c = 4. (3.19)
Equations (3.18) and (3.19) are highly non-linear in P ∞ and Γ, and there is no easy mean to decouple them due to the presence of λ that contains the product of our unknowns. Since the two equations have the same right-hand side, we combine them to generate an equation that is a function only of λ. From the definition of λ we have:

P ∞ = 2πRrhλ C p Γ . (3.20)
Let us note that:

P ∞ T i P i a g Γ = -6 h2πRrT i µ C p P i πR 4 ρ c g λ = - 1 G 1 λ D , where G 1 = C p ρ i R 2 ρ 2 c g 24hµ .
The parameter G 1 is dimensionless so that we can express it meaningfully as a function of dimensionless numbers. Let us suppose that ρ c = ρ i and define the Galilei number at the radius scale as: Ga :=

gD 3 ρ 2 i µ 2 [Kun12]
. By using the definition of the previous number and of N u and P r, it is possible to write:

1 G 1 = 96 N u D P rGa .
The equation for λ is the following:

- 1 G 1 λ D 1 T c + 1 T f + 1 T 0 (λ) + 1 T 1 (λ) + λ L ln T 1 (λ) T 0 (λ) 1 T c - 1 T f = λ L ln T 1 (λ) T 0 (λ) 1 T c + 1 T f - 1 T f - 1 T c .
In the previous equation T 0 (λ) and T 1 (λ) are functions of λ. Equations (3.11) to (3.13) allow to express the equation for λ in an explicit way. We obtain the following:

- 1 G 1 λ D 1 T c + 1 T f + (e L λ + 1) 2 T f + T c (T c e L λ + T f )(T f e L λ + T c ) = λ L ln T f e L λ + T c T c e L λ + T f 1 T c + 1 T f + 1 G 1 λ D 1 T c - 1 T f - 1 T f - 1 T c .
(3.21) Equation (3.21) is still with dimensions. A dimensionless version of this equation can be given by introducing the dimensionless quantity ε :=

Tc-T f
Tc+T f and remembering that tanh α = e 2α -1 e 2α +1 . Notice that 0 < ε < 1 by definition. We will prove in the following that the dimensionless equation is:

1 - G 1 D λ ε + 1 -ε 2 1 -ε 2 tanh 2 L 2λ - 1 L (λε -G 1 D) ln 1 + 2ε tanh L 2λ 1 -ε tanh L 2λ = 0. (3.22)
A possible procedure could consist in solving equation (3.21) as a fixed point value problem to find λ, then constructing T 0 (λ) and T 1 (λ) by using (3.11) and finally computing Γ and P ∞ by using equations (3.19) and (3.20). In the following, we will study two possible ways to estimate the unknown parameters: the fixed-point value problem and an approximation via linearization. Before that, we present the counterpart of (3.22) with the Boussinesq approximation.

Boussinesq on a thermosyphon

Here, we impose the continuity of the pressure to the Boussinesq model, and we compare the resulting equation to the low Mach model, expecting to find the same equation for little temperature variations. The steady Boussinesq model reads:

Q = C, ∂Q ∂x = 0, 0 = - ∂p ∂x + α(T -T ref )ρ ref g sin θ - 6µ πR 4 Q, ∂ ∂x (ρ ref C p QT ) = -2πRh(T -T ref ).
Note that the non-linear term ρu∂ x u in the momentum equation is strictly null in the Boussinesq model since the velocity divergence is null, while in our low Mach model, we neglected it.

We integrate the momentum conservation equation over the domain and impose the pressure continuity. As a first approximation, we can write:

                     0 = - p(s = L) -p(s = 0) L + αρ ref g L 0 (T c (s) -T ref )ds - 6µ πR 4 Q, on [0, L] 0 = - p(s = 2L) -p(s = L) L - 6µ πR 4 Q, on [L, 2L] 0 = - p(s = 3L) -p(s = 2L) L -αρ ref g 3L 2L (T f (s) -T ref )ds - 6µ πR 4 Q, on [2L, 3L] 0 = - p(s = 4L) -p(s = 3L) L - 6µ πR 4 Q, on [3L, 4L]
Where we defined T ref =

Tc+T f 2 . Since p(s = 4L) = p(s = 0) after a complete loop we have:

4 6µ πR 4 Q = αρ ref g L 0 (T c (s) -T ref )ds - 3L 2L (T f (s) -T ref )ds = αρ ref gI. (3.23)
We want to compute the integral I in equation (3.23). From the definition of T 0 (λ) (equation (3.11)) we have:

T 0 (λ) -T c = T f e L λ + T c e L λ + 1 -T c = T f e L λ + T c -T c e L λ -T c e L λ + 1 = (T f -T c ) e L λ e L λ + 1 .
For T 1 (λ), it is possible to make the same computations and find that T 1 (λ)-T f = -(T 0 (λ)-T c ). Thanks to (3.4) we have:

I = L 0 (T c -T ref + (T 0 (λ) -T c )e -s/λ )ds - 3L 2L (T f -T ref + (T L -T f )e -s/λ )ds (3.24) = (T c -T f )L + 2(T 0 (λ) -T c )(-λ)(e -L λ -1) = (T c -T f )L + 2λ(T f -T c ) e L λ e L λ + 1 (1 -e -L λ ) = (T c -T f )L -2λ(T c -T f ) tanh(L/2λ).
By using relation (3.24), the continuity of p reads:

1 G 2 = L 2λ -tanh L 2λ , (3.25) with: 1 G 2 = 4 6µ πR 4 1 αρ ref g 1 2λ(T c -T f ) Q = 96 N u D P rGr L R = 1 G 1 1 α∆T c L R = 1 G 1 ε L D ,
where we define the Grashof number at the radius scale:

Gr := α∆T c Ga and ∆T c = T c -T f .
G 2 is the Boussinesq counterpart of G 1 , and equation (3.25) is the counterpart of (3.22).

Comparison between the Boussinesq and the low Mach models

We expect that the low Mach model tends to the Boussinesq as the temperature gradient becomes negligible. This condition is equivalent to making the parameter ε approach 0. If we do so in equation (3.22) and we suppose that G 1 ε ≈ 1, we recover (3.25) indeed. Figure We see that for small enough values of ε, the results obtained for a low Mach model coincide with those of a Boussinesq model. The behavior of λ as a function of G 2 the asymptotic limits. We expect that for G 1 ε ≈ 1 and so G 2 ≈ D L the low Mach model tends to Boussinesq. Moreover, we find a polynomial asymptotic behavior as λ L → ∞. In this case, L 2λ → 0 and by exploiting the series expansion of the hyperbolic tangent, equation (3.25) gives:

λ L ≈ 1 3 √ 24 G 1 3 2 .
It is possible to see these limit behaviors in figure (3.3) where we take L = 1 and D = 10 -1 . for the Boussinesq one, we use a small ε. We show the asymptotic limit for λ L as G 2 → ∞.

The unknown parameters of a thermosyphon

To solve equation (3.22) numerically and find an approximated solution for λ, Γ and P ∞ , we explore two possible procedures. We first propose using an iterative method as, for example, the Newton method. Then, we show how it is possible to use the linearization tools.

The fixed point approach

In the following, we will give the expression of the function f of which we want to find the zeros. Then, we will show the idea of the method, and finally, we will explain the consequences of knowing λ.

The function f and its derivative

Let us define the function f (x):

f (x) = L x - 1 G 1 1 D x 1 T c + 1 T f + (e L x + 1) 2 T f + T c (T c e L x + T f )(T f e L x + T c ) - 1 T c - 1 T f -ln T f e L x + T c T c e L x + T f 1 G 1 1 D x 1 T c - 1 T f + 1 T c + 1 T f .
We define:

• the constants:

A ′ := -1 G 1 1 D , B ′ := 1 Tc -1 T f , C := 1 Tc + 1 T f ;
• the quantities:

D(x) := T f e L x + T c T c e L x + T f , F (x) := (e L x + 1) 2 T f + T c (T c e L x + T f )(T f e L x + T c )
.

A more compact form of f (x) reads:

f (x) = ln D(x)(A ′ B ′ x -C) + L x (A ′ x(C + F (x)) -B ′ ).
We must compute the f (x) derivative to apply Newton's method. The derivatives of D(x)

and F (x) are as follows:

D ′ (x) = - L x 2 e L x (T c e L x + T f ) 2 (T 2 f -T 2 c ), F ′ (x) = - L x 2 e L x (e L x + 1)(e L x -1) (T c e L x + T f ) 2 (T f e L x + T c ) 2 (T f + T c )(T c -T f ) 2 .
The derivative of f (x) is:

f ′ (x) = D ′ (x) D(x) (A ′ B ′ x -C) + A ′ B ′ ln D(x) + LA ′ F ′ (x) + B ′ L x 2 .

The procedure

The Newton method consists of constructing the function:

g(x) = x -f (x) f ′ (x)
. and solving iteratively g(x) = x. The problem with the Newton method is that it may diverge if the initial guess is not close enough to the solution we are searching for. A way for being sure to start with a reasonable guess is to use a dichotomy method: Start from two points a and b such that f (a) • f (b) < 0, evaluate the middle point m between them, control if either

f (a) • f (m) < 0 or f (m) • f (b) < 0,
reduce the interval accordingly and iterate this procedure for few iterations. The middle point between the two extremes of the last iteration will be the initial guess for Newton. The process is made with two stopping criteria: a tolerance on the error between two successive iterations and the number of iterations. The final iteration is assigned to gamma. In our case, the Newton method converges in a few iterations thanks to a good initial guess and a 2 nd order rate of convergence.

Summary

We have seen a numerical iterative method to find λ. Using the value of λ makes it possible to compute all other unknowns. We recall here how to compute them. T 0 (λ) and T 1 (λ) are given by equation (3.11):

T 1 (λ) = T c e L λ + T f e L λ + 1 , T 0 (λ) = T f e L λ + T c e L λ + 1 .
In equation (3.19), we can explicit Γ as a function of λ. We obtain:

Γ = gλ 4aL 1 T c + 1 T f ln T 1 (λ) T 0 (λ) - g 4a 1 T f - 1 T c .
Once Γ is known, we use the definition of fluxes and equation (3.20) to find:

Q 0 = ΓT 0 (λ), Q 1 = ΓT 1 (λ), P ∞ = 2πrRhλ ΓC p .
We have seen how finding one parameter to compute them all suffices.

The linearization

Here, we show how it is possible to use the linearization tools to find an approximate solution for λ, Γ, and P ∞ . We have previously introduced the parameter ε :=

Tc-T f
Tc+T f and the reference temperature

T ref = Tc+T f
2 . We express quantities as functions of ε. We consider the case ε ≪ 1 and linearize the equations. The temperatures imposed at the walls T c and T f can be written as follows:

T c = T ref (1 + ε) = T f 1 + ε 1 -ε , T f = T ref (1 -ε) = T c 1 -ε 1 + ε .
The temperature T 1 in the adiabatic pipe with as inlet the heated pipe as a function of ε read:

T 1 := T c e L λ + T f e L λ + 1 = T f 1 -ε 1 + ε e L λ -1 e L λ + 1 = T f 1 -ε 1 + ε tanh L 2λ .
Likewise the temperature T 0 reads:

T 0 = T f (1 -ε) 1 -ε tanh L 2λ .
We compute in the following some quantities useful for linearizing the equations of interest.

We have:

1 T c + 1 T f = T c + T f T c T f = 2T f 1 -ε 1 -ε T 2 f (1 + ε) = 2 T f (1 + ε) , (3.26) 1 T f - 1 T c = T c -T f T c T f = ε T c + T f T c T f = 2ε T f (1 + ε) , (3.27) T 1 T 0 = 1 + T 1 -T 0 T 0 = 1 + (T c -T f )(1 -e -L λ ) T 0 (1 + e -L λ ) = 1 + 2ε tanh L 2λ 1 -ε tanh L 2λ , (3.28) 1 T 0 + 1 T 1 = T c + T f T c T f T c T f T 0 T 1 = 2(1 -ε) T f (1 -ε 2 tanh 2 L 2λ )
.

(3.29) Suppose ε ≪ 1, we will find useful the following linearizations:

1 1 + ε = 1 -ε + ε 2 + O(ε 3 ), (3.30) 1 1 ± ε tanh L 2λ = 1 ∓ ε tanh L 2λ + ε 2 tanh 2 L 2λ + O(ε 3 ), (3.31) ln 1 + 2ε tanh L 2λ 1 -ε tanh L 2λ = 2ε tanh L 2λ + O(ε 3 ). (3.32)

Linearization for P ∞

We begin our analysis by estimating the stationary thermodynamic pressure P ∞ . We consider equation (3.18). We insert equations (3.26) to (3.29) and after a little manipulation we obtain:

1 + 1 -ε 2 1 -ε 2 tanh 2 L 2λ - λ L ε ln 1 + 2ε tanh L 2λ 1 -ε tanh L 2λ = 2 P i P ∞ T f T i (1 + ε).
Now by exploiting the equations (3.31) and (3.32) we linearize our equation as follows:

1 + (1 -ε 2 ) 1 + ε 2 tanh 2 L 2λ -2 λ L ε 2 tanh L 2λ = 2 P i P ∞ T f T i (1 + ε) + O(ε 3 ).
We order by growing powers of ε:

2 1 - P i P ∞ T f T i -2ε P i P ∞ T f T i + ε 2 -1 -2 λ L tanh L 2λ + tanh 2 L 2λ + O(ε 3 ) = 0.
We obtain a singular result; the coefficient of the ε order is different from zero. Our parameters must have values comparable with ε p for some p ≥ 1. If we suppose that:

P i P ∞ T f T i = O(ε),
we obtain at the zeroth-order that P ∞ = P i T f

T i and at the order ε 2 a transcendental equation for λ. We obtain an absurd since

P ∞ = P i T f T i =⇒ P i P∞ T f T i = O(1) ̸ = O(ε). If we rather suppose that 1 - P i P ∞ T f T i = O(ε),
we can give an estimation of P ∞ by making a balance between the first two terms, obtaining:

P ∞ = P i T f T i (1 + ε). (3.33)
Equation (3.33) is the linear estimation for P ∞ we were searching for. The total variation for P is given by:

∆P = P ∞ -P i = P i T f T i (1 + ε) -1 .
We obtain that the variation of the thermodynamic pressure is a function of the initial temperature T i . It will be negative if T i is big enough, for example if

T i = Tc+T f 2 we want that T f T i (1 + ε) -1 < 0.
By some computations, this condition is equivalent to (T c -T f ) 2 > 0, always true. In this case, the pressure globally decreases. The pressure variation is positive if T i is small enough; for example, in the case T i = T f it is equivalent to require that 1 + ε > 1, always true. In this case, the pressure globally increases.

The critical T i is the following:

T i = T f (1 + ε) = T f 1 + T c -T f T c + T f = 2 T f T c T c + T f = 2 1 Tc + 1 T f ,
the harmonic average between the reference temperatures. We notice that in this case, ∆P = O(ε 2 ), so the linear approximation is no longer valid. If we go further and also consider the second order for ε, we find a more accurate expression for P ∞ . The second-order coefficient contains terms with the hyperbolic tangent of L 2λ . If we assume that L is large enough to have L ≫ 2λ this coefficient reduces to:

-1 -2 λ L tanh L 2λ + tanh 2 L 2λ ≈ -1 -2 λ L + 1 = -2 λ L .
In the following, we will prove that in this case, λ can be approximated as λ ≈ RG 1 ε. We obtain that P ∞ can be approximated as the solution of:

2 1 - P i P ∞ T f T i -2ε P i P ∞ T f T i ≈ 2 RG 1 L ε 3 .
After some computations, remembering that

1 1-ζ = 1 + ζ + O(ζ 2
), we have the second-order approximation of the asymptotic pressure:

P ∞ = P i T f T i (1 + ε) 1 + RG 1 L ε 3 + O(ε 5 ).
We notice that the correction term is always positive.

Linearization for λ

We now give an estimation of the characteristic length λ. We consider equation (3.21).

We insert equations (3.26) to (3.29) and after a little manipulation we obtain:

λ L 1 - 1 G 1 λ D ε ln 1 + 2ε tanh L 2λ 1 -ε tanh L 2λ + 1 G 1 λ D -ε + 1 G 1 λ D (1 -ε 2 ) (1 -ε 2 tanh 2 L 2λ ) = 0.
It is an exact equation; up to now, there is no approximation in ε. Notice that we obtained equation (3.22) we used to compare with Boussinesq. Now by exploiting equations (3.31) and (3.32) we linearize our equation as follows:

λ L G 1 D λ -ε 2ε tanh L 2λ -2ε 2 tanh 2 L 2λ + 1 - G 1 D λ ε + (1 -ε 2 ) 1 + ε 2 tanh 2 L 2λ = O(ε 3 ).
We order by growing powers of ε:

2 G 1 λ D + ε 2 λ L tanh L 2λ -1 + ε 2 -2 λ L tanh 2 L 2λ + 1 G 1 λ D tanh 2 L 2λ - 2 G 1 λ D tanh L 2λ -1 = O(ε 3 ).
We find a result with the same singularity we found for the thermodynamic pressure. Now, the coefficient of the zeroth-order is different from zero. Our parameters must have values comparable with ε p for some p ≥ 1. If we suppose that:

2 G 1 λ D = O(ε),
we obtain the balance:

2 G 1 λ D + ε 2 λ L tanh L 2λ -1 = 0.
This relation proves that the Boussinesq model is the limit of the low Mach model as ε -→ 0 indeed, the equation reduces to:

1 G 1 ε L D = L 2λ -tanh L 2λ , (3.34)
which is exactly the Boussinesq continuity equation. We notice that we cannot explicit λ in equation (3.34). We can simplify this equation by considering the extreme values of the hyperbolic tangent.

Case L 2λ → 0 Under this assumption, we have that:

tanh L 2λ = L 2λ + O L λ .
As a consequence, the coefficient of ε is precisely zero. In this case, we would balance the zeroth-order term with the ε 2 coefficient. For our problem, this case is not physically feasible since it would require λ to be bigger than L or at least comparable. This requirement does not fit our physical environment since λ is a medium scale between the radius R and the length L.

Case L 2λ → ∞ Under this assumption, we have that:

tanh L 2λ = 1 + O L λ .
As a consequence, we obtain the following linearization for λ:

λ = RG 1 ε.

Linearization for Γ

We make the same analysis for the equation (3.19). To estimate the behavior of Γ as a function of ε.

We insert equations (3.26) to (3.29) and after a little manipulation we obtain:

gλ 2 T f (1 + ε) ln (1 + 2ε tanh L 2λ 1 -ε tanh L 2λ ) - L λ ε -4aΓL = 0.
We insert the developments (3.30) and (3.32). The linearized equation ordered by growing powers of ε:

-2 a g ΓT f L λ + ε 2 tanh L 2λ - L λ + ε 2 -2 tanh 2 L 2λ -2 tanh L 2λ + L λ + O(ε 3 ) = 0.
We find a result with the same singularity we found for λ. If we suppose that:

-2 a g ΓT f L λ = O(ε),
we obtain the balance:

-2 a g ΓT f L λ + ε 2 tanh L 2λ - L λ = 0.
If we exploit equation (3.34), we can express the coefficient of ε in a more compact form. We obtained that:

Γ = - g aT f λ 2L ε 2 G 1 ε L D = - g aT f λ G 1 D .
Under the assumption of L 2λ → ∞ we obtain that Γ is:

Γ = - 1 2 g aT f ε.
Notice that a is negative, so Γ is positive. Consequently u ∂u ∂x = O(ε 2 ) is indeed small. We end this section by giving the linearized version of equation (3.20). Indeed given Γ and λ we can express the thermodynamic pressure as:

P ∞ = 2πRrhλ C p Γ = - 4πR 2 rhG 1 aT f C p g = T f T i P i .
We recover the order zero of the linearization we found previously.

Summary

In this chapter, we analyzed the features of the stationary equations and their analytical solutions. We supposed the viscosity ν to be constant, we neglected the non-linear term in Then, we studied the thermosyphon configuration. We understood that the periodic bound-ary conditions make the inlet values for our variables unknowns and the solutions quasianalytical. We proposed two possible approaches to find these parameters: combining the continuity of the dynamic pressure and the conservation in time of the mass for constructing an equation for λ to be solved with a Newton iterative method and the linearization tools. We also compared our low Mach model with Boussinesq for a thermosyphon. This comparison allowed us to prove that our model tends to Boussinesq as the temperature variations tend to 0, which makes our model an extension of the Boussinesq one. We proved this result using both the analysis of the behavior of λ L as a function of G 1 and the linearization for λ. Notice that it is possible to study a thermosyphon in which the vertical pipes are adiabatic, the bottom pipe is heated, and the top pipe is cooled. This case resembles the Rayleigh-Benard problem but cannot be solved with our equations. To have an equilibrium in the solution, we have to re-add the term of longitudinal diffusion of temperature ∂ 2 T ∂x 2 . With this extra term, we recover the steady solution with linear temperature in the adiabatic pipes. A stability analysis would be needed in this case.

Chapter 4

The transmission conditions at the junction In the case of the thermosyphon, we have junctions of order two with an inlet and an outlet pipe. In this case, imposing the continuity of all the physical quantities at the junctions is straightforward. Here, we are interested in the transmission conditions arising when more than two pipes intersect, which will happen in networks. In the first stage, we will study the issue of transmission conditions in an open domain composed of three pipes and see how to adapt the analytical solutions at the junction. Then, we will consider the case of a threerung ladder, an extension of a thermosyphon. We will use this configuration to show how to adapt the transmission conditions to generic closed pipeline configurations. We will provide an analytical solution for this case as well. In the literature, Kirchhoff conditions are the prevalent means to describe the flow behavior at the junction, consisting of the conservation of the flux and the continuity of the pressure [BCG + 14]. These conditions do not take into consideration the geometry of the problem (such as angles or diameters) when the junction is assumed three-dimensional; for this reason, many studies such as [START_REF] Kozlov | One-dimensional model of flow in a junction of thin channels, including arterial trees[END_REF], [START_REF] Kozlov | Transmission conditions in a onedimensional model of bifurcating arteries with elastic walls[END_REF] and [START_REF] Berntsson | A modification to the Kirchhoff conditions at a bifurcation and loss coefficients[END_REF] carried out several modifications. We will treat the junction as one-dimensional and use Kirchhoff conditions whenever possible.

An open bifurcated domain

Another issue to consider is the pressure losses at the junction [START_REF] Li | Flow field and pressure loss analysis of junction and its structure optimization of aircraft hydraulic pipe system[END_REF].

Let us give an idea of how the Kirchhoff conditions arise naturally for the mean velocity of the flow. We construct a control volume Ω around the bifurcation such that the intersection of Ω We call inlet pipes for the junction, the pipes whose flow is directed toward the junction.

We call outlet pipes the others. For the inlet pipes, the velocity has the opposite direction with respect to the normal vector, while for the outlet pipes, it has the same direction. We obtain:

Ω ∇ • (ρ⃗ u) dV = 0.
By Stokes theorem, we can rewrite it as:

∂Ω ρ⃗ u • ⃗ n dΣ = 0.
Since the velocities vectors are parallel to the normal ones, we simplify as follows:

∂Ω (-ρ 1 u 1 + ρ 2 u 2 + ρ 3 u 3 ) dΣ = 0.
We obtain the following conditions:

ρ 1 u 1 = ρ 2 u 2 + ρ 3 u 3 . (4.1)
We remember that the low Mach equations for ideal gas flows with constant thermodynamic pressure P in each of the three pipes are:

∂u ∂x = - 2πR(γ -1)
γP S q w , (4.2a)

∂ t u + u∂ x u + ∂ x Π ρ = - f 2 πu D S -g sin θ, (4.2b) ρC p ∂ST ∂t + u ∂ST ∂x = -2πRq w , (4.2c) q w := h(T -T ref ), ρ = P rT . ( 4.2d)
In this case, the thermodynamic pressure P is given as a known physical parameter because

the domain is open. It is homogeneous in space and a function of time.

The adjacency matrix for an open bifurcation

We exploit a graph theory tool, the adjacency matrix, to deal with the conservation law for velocities at the junction. We can associate an equivalent graph to every pipe network with the extremes of pipes as nodes and the pipes themselves as arcs, oriented coherently with the velocity sign. For example, the graph in figure 4.3 corresponds to the configuration of the The adjacency matrix A is a matrix N × M , where N is the number of nodes and M is the number of arcs. Each arc has an inlet and an outlet node, so the matrix columns are filled with 1 in correspondence with the outlet nodes and -1 in correspondence with the inlet ones.

In the case of the graph (4.3) the adjacency matrix is:

A =          -1 0 0 1 -1 -1 0 1 0 0 0 1          .
Let us construct a source term b ∈ R N with coefficients equal to 0 in correspondence of the junction nodes. The coefficients are the velocities inlet or outlet boundary values in correspondence with the other nodes. For the graph (4.3) it is as follows:

b =          u A IN 0 u C OU T u D OU T         
.

Let ⃗ u ∈ R M be the vector of velocities at the junction. The second linear system equation A⃗ u = b is the Kirchhoff conservation law for the velocities. The matrix A helps determine the sign of velocities in the conservation laws and makes the code robust for changes in the signs of velocities. We will use it to individuate the junction laws in more complex configurations.

The analytical solution for an open bifurcation

In chapter 3, we have already given the local analytical solutions for each pipe. Here, we consider N pipes with a common junction point J. We construct the set of quasi-analytical We indicate with a subscript J the values of the variables at the junction. We impose inlet temperatures and velocities in inflow pipes T i in ,u i in ∀i and outlet dynamical pressures in outflow pipes Π j out ∀j. The analytical solutions are:

Q (+),i (x) = Γ i T (+),i (x), ∀i = 1, ..., n Q (-),j (x) = Γ j T (-),j (x), ∀j = 1, ..., m T (+),i (x) = T i ref + (T i in -T i ref )e x λ i , ∀i = 1, ..., n T (-),j (x) = T j ref + (T j J -T j ref )e -x-L λ j , ∀j = 1, ..., m Π (+),i (x) = Π i in + c i 1 (T i in , u i in )x + c i 2 (T i in , u i in ) ln T (+),i (x) T i in , ∀i = 1, ..., n Π (-),j (x) = Π j out + c j 1 (T j J , u j J )(x -2L) + c j 2 (T j J , u j J ) ln T (-),j (x) T (-),j | x=2L . ∀j = 1, ..

., m

Where:

Γ i = Q i in T i in , Γ j = Q j J T j J , λ k = - Γ k Bh , c k 1 (T, u) := P r aS u T - b k T k ref , c k 2 (T, u) := P r b k T k ref S Bh u T .
The unknowns in the solution are: Π i in ∀i = 1, ..., n, u j

The transmission conditions

First, we neglect the pressure losses at the junction and impose the continuity of the dynamic pressure. This condition gives us n + m -1 equations, schematically:

Π k J = Π k J k ∈ [1, N ] fixed, k ∈ [1, N ], k ̸ = k.
Using the same argument of conservation at the junctions for momentum and energy (as for mass), we obtain (supposing again no losses at the junctions):

n i=1 ρ (+),i J u (+),i J T (+),i J = m j=1 ρ (-),j J u (-),j J T (-),j J , (4.3) n i=1 ρ (+),i J u (+),i J = m j=1 ρ (-),j J u (-),j J . (4.4)
Furthermore, the temperature at the junction for outflow pipes has no reason to have different values in different pipes. From a physical point of view, at the entrance of the junction, the gases coming from all the inlet pipes mix and establish a mean temperature. The resulting temperature will be the same inlet for all the outflow pipes. This observation leads us to establish m -1 more conditions at the junction:

T s J = T s J s ∈ [1, m] fixed, s ∈ [1, m], s ̸ = s. (4.5)
Notice that we gave exactly 2m + n conditions at the junction, so we closed the problem.

Let us give a more suitable form to equations (4.3) and (4.4) in the case of ideal gas density law. Since ρ

(±),k J = P rT (±),k J
and the thermodynamic pressure is homogeneous in space, from equation (4.3) we recover the following condition on velocities:

n i=1 u (+),i J = m j=1 u (-),j J .
Equation (4.4) reduces to:

n i=1 u (+),i J T (+),i J = m j=1 u (-),j J T (-),j J .

The solutions for a three-pipe bifurcation

In the following, we will study further the configuration of a three-pipe bifurcation. We have two possibilities: the case of two inflow and one outflow pipe and the case of one inflow and two outflow pipes. Here, we show how to recover the unknowns at the junction.

Case n = 1, m = 2
In this case we have 5 unknowns: Π

(+),1 in , T (-),1 J , T (-),2 J , u (-),1 J , u (-),2 J .
The transmission conditions at the junction are the following:

Π (+),1 J = Π (-),1 J , (4.6) Π (+),1 J = Π (-),2 J , (4.7) T (-),1 J = T (-),2 J , (4.8) u (+),1 J = u (-),1 J + u (-),2 J , (4.9) u (+),1 J T (+),1 J = u (-),1 J T (-),1 J + u (-),2 J T (-),2 J . (4.10)
We notice that if we inject equations (4.8) and (4.9) in equation (4.10) we obtain that

T (+),1 J = T (-),1 J = T (-),2 J
, so the temperature is continuous on all the domain.

Case n = 2, m = 1

In this case we have 4 unknowns: Π

(+),1 in , Π (+),2 in , T (-),1 J , u (-),1 J .
The transmission conditions at the junction are the following:

Π (+),1 J = Π (-),1 J , (4.11) Π (+),1 J = Π (+),2 J , (4.12) u (+),1 J + u (+),2 J = u (-),1 J , (4.13) u (+),1 J T (+),1 J + u (+),2 J T (+),2 J = u (-),1 J T (-),1 J . (4.14)
In this case, the two unknown pressures can be found by using the pressure conditions; the velocity unknown is obtained straightforwardly from equation (4.13) and T (-),1 J can be found from equation (4.14) by exploiting equation (4.13). Let us write it more conveniently:

u (+),1 J T (+),2 J + u (+),2 J T (+),1 J T (+),1 J T (+),2 J = u (+),1 J + u (+),2 J T (-),1 J .
Let us define:

µ 1 := u (+),1 J u (+),1 J + u (+),2 J , µ 2 := u (+),2 J u (+),1 J + u (+),2 J ,
They are positive, less than 1, and sum to 1, so they are possible coefficients of a convex combination. By making some computation we can express T (-),1 J as:

T (-),1 J = T (+),1 J T (+),2 J µ 1 T (+),2 J + µ 2 T (+),1 J . (4.15)
So, the unknown temperature is obtained as a weighted harmonic mean with the velocities as weights.

The three-rung ladder

Here, we introduce a configuration that allows us to combine the analysis of the thermosyphon and the study of the transmission conditions: the three-rung ladder. We will describe the configuration and find the unknown parameters of the quasi-analytical solution with a procedure analogous to the one we used for the thermosyphon. We point out that the unknown parameters of the quasi-analytical solutions can be found for every closed pipeline configuration. We will understand that for configurations more complex than the three-rung ladder, the computation of these parameters is too demanding from a computational point of view. and are submitted to the gravity force ⃗ g. The extremities of every pipe are indicated with points x i , from x 0 = 0 up to x 7 . We will use these curvilinear coordinates to construct the analytical solutions. In the following chapters, we still use these coordinates for the numerical simulation, but we will prefer two-dimensional Cartesian coordinates in the results part. The arrows inside the pipes indicate the sense of direction of the flow for positive velocities. We count the pipes following the curvilinear coordinates: the bottom cooled pipe will be first, the bottom rung the second, and so on.

The three-rung ladder configuration

The stationary analytical solution

Here, we go directly to the essence of the contents and refer to chapter (3) for more details (remember that we neglect the term ρu 2 ). Let us recall that:

Γ i = Q i T i , λ i = - Γ i Bh .
Let us define:

c i 3 = P r aΓ i , c i 4 = - P r b i .
Let us point out that in the adiabatic pipes, c i 4 is null and that temperature and velocity are constant and given in table 4.1.

T in T 1 T 2 T 4 T 5 u in u 1 u 2 u 4 u 5
The velocity and temperature unknowns will be the 10 just introduced. Consequently we have 5 unknown Γ i , i = 1, 2, 4, 5, 7.

The inlet dynamic pressures at the junction for all pipes are given in table 4.3.

Π in Π 0 Π 1 Π 2 Π 3 Π 4 Π 5 Π 0
We have an additional unknown for the thermodynamic pressure. The total number of unknowns is 17. The quasi-analytical solutions for temperature, velocity, and dynamic pressure of the non-adiabatic pipes are:

T 1 (x) = T 1 f + (T 1 -T 1 f )e -x λ 1 , u 1 (x) = Γ 1 T 1 (x), T 3 (x) = T 3 c + (T 2 -T 3 c )e - x-L 1 -L 3 λ 2 , u 3 (x) = Γ 2 T 3 (x), T 4 (x) = T 4 c + (T 4 -T 4 c )e - x-2L 1 -L 3 λ 4 , u 4 (x) = Γ 4 T 4 (x), T 6 (x) = T 6 f + (T 5 -T 6 f )e - x-2L 1 -2L 3 -L 2 λ 5 , u 6 (x) = Γ 5 T 6 (x), Π 1 (x) = Π 0 + c 1 3 + c 1 4 T 1 f x + c 1 4 T 1 f λ 1 ln T 1 (x) T 1 , Π 2 (x) = Π 1 + c 2 3 (x -L 1 ), Π 3 (x) = Π 2 + c 2 3 + c 3 4 T 3 c (x -L 1 -L 3 ) + c 3 4 T 3 c λ 2 ln T 3 (x) T 2 , Π 4 (x) = Π 3 + c 4 3 + c 4 4 T 4 c (x -2L 1 -L 3 ) + c 4 4 T 4 c λ 4 ln T 4 (x) T 4 , Π 5 (x) = Π 4 + c 5 3 (x -2L 1 -L 3 -L 2 ), Π 6 (x) = Π 5 + c 5 3 + c 6 4 T 6 f (x -2L 1 -2L 3 -L 2 ) + c 6 4 T 6 f λ 5 ln T 6 (x) T 5 , Π 7 (x) = Π 0 + c 7 3 (x -2L 1 -2L 3 -2L 2 ).
Here we have six unknowns for the dynamic pressure plus an additional unknown for the thermodynamic pressure. We have a total of 17 unknowns. Let us see what are the conditions we can impose for closing the problem.

The conservation laws

We start by imposing conservation laws. At both junctions, we impose both the conservation of mass and energy:

u 3 (2L 1 + L 3 ) = u 4 -u 7 , u 6 (2L 1 + 2L 3 + 2L 2 ) = u 1 + u 7 , u 3 (2L 1 + L 3 ) T 3 (2L 1 + L 3 ) = Γ 4 -Γ 7 , u 6 (2L 1 + 2L 3 + 2L 2 ) T 6 (2L 1 + 2L 3 + 2L 2 ) = Γ 1 + Γ 7 .
They can be written using the definition of Γ and the analytical expressions of the velocities:

Γ 2 T 3 c + (T 2 -T 3 c )e - L 1 λ 2 = u 4 -u 7 , (4.16) Γ 5 T 6 f + (T 5 -T 6 f )e - L 2 λ 2 = u 1 + u 7 , (4.17) Γ 2 = Γ 4 -Γ 7 , (4.18) Γ 5 = Γ 1 + Γ 7 . (4.19)
Moreover, the conservation of mass on all the domain implies that:

Γ 1 = Γ 2 , Γ 4 = Γ 5 . (4.20)
Conditions (4.20) make us aware that only one between conditions (4.18) and (4.19) is admissible since they are the same equation. At this stage, we have 5 independent conditions.

The conditions on pressures

As previously, we can impose the continuity of the dynamic pressure at every junction. This law induces a continuity condition for each junction with two incident pipes and two continuity conditions for each junction with three incident pipes.

The total number of conditions is 8, and they are:

Π 0 + c 1 3 + c 1 4 T 1 f L 1 + c 1 4 T 1 f λ 1 ln T 2 T 1 = Π 1 , (4.21) Π 1 + c 2 3 L 3 = Π 2 , (4.22) Π 2 + c 2 3 + c 3 4 T 3 c L 1 + c 3 4 T 3 c λ 2 ln T 3 (2L 1 + L 3 ) T 2 = Π 3 , (4.23) Π 3 + c 4 3 + c 4 4 T 4 c L 2 + c 4 4 T 4 c λ 4 ln T 5 T 4 = Π 4 , (4.24) Π 4 + c 5 3 L 3 = Π 5 , (4.25) Π 5 + c 5 3 + c 6 4 T 6 f L 2 + c 6 4 T 6 f λ 5 ln T 6 (2L 1 + 2L 3 + 2L 2 ) T 5 = Π 0 , (4.26) Π 5 + c 5 3 + c 6 4 T 6 f L 2 + c 6 4 T 6 f λ 5 ln T 6 (2L 1 + 2L 3 + 2L 2 ) T 5 = Π 0 , (4.27) Π 2 + c 2 3 + c 3 4 T 3 c L 1 + c 3 4 T 3 c λ 2 ln T 3 (2L 1 + L 3 ) T 2 = Π 0 + c 7 3 L 3 . (4.28)
Notice that conditions (4.26) and (4.27) are the same and so count as only one constraint.

Notice also that (4.23) + (4.28) ⇐⇒ (4.23) + Π 3 = Π 0 + c 7 3 L 3 . The independent conditions are, after all, 7. There are two more conditions we can consider for pressures: we are still free to impose one of the unknowns Π i due to the degree of freedom we have on the dynamic pressure and the conservation of mass in time gives an equation for the thermodynamic pressure. The total number of conditions given by pressures is 9 with 7 unknowns.

The continuity of the temperature Imposing the temperature continuity at the points x 1 and x 4 and at the right junction point between the outlet junction temperatures is possible.

We obtain three more independent conditions:

T 7 = T 1 , (4.29) T 1 (L 1 ) = T 1 f + (T 1 -T 1 f )e - L 1 λ 1 = T 2 , (4.30) T 4 (2L 1 + L 3 + L 2 ) = T 4 c + (T 4 -T 4 c )e - L 2 λ 4 = T 5 . (4.31)
We obtain a total of 8 conditions with 10 unknowns for the temperature and the velocity. By summing conditions (4. 16) and (4.17) and using conditions (4.20) we have:

Γ 2 T 3 c + (T 2 -T 3 c )e - L 1 λ 2 + Γ 5 T 6 f + (T 5 -T 6 f )e - L 2 λ 5 = u 1 + u 4 = Γ 2 T 1 + Γ 5 T 4 . (4.32)
Moreover we can write conditions (4.30) and (4.31) as:

T 1 = T 1 f + (T 2 -T 1 f )e λ 1 L 1 , (4.33) T 4 = T 4 c + (T 5 -T 4 c )e λ 4 L 2 . (4.34)
By inserting (4.33) and (4.34) in (4.32) we obtain:

Γ 2 T 2 e L 1 λ 1 -e - L 1 λ 2 + Γ 5 T 5 e L 2 λ 4 -e - L 2 λ 5
= Ω, (4.35)

where

Ω := Γ 2 (T 3 c -T 1 f ) -Γ 5 (T 4 c -T 6 f ) -Γ 2 T 3 c e - L 1 λ 2 -Γ 5 T 6 f e - L 2 λ 5 + Γ 2 T 1 f e L 1 λ 1 + Γ 5 T 4 c e L 2 λ 4 .
Notice that for the thermosyphon Ω = 0 and it would be possible to find the ratio T 2 T 5 from (4.35). Here it is not possible.

The two remaining equations for T and u

We can find two more equations for the temperature and velocity unknowns by exploiting the continuity conditions for the dynamic pressure. One equation can be obtained by combining (4.21), (4.22), and (4.28), and the other by combining the remaining ones with still (4.28). We obtain:

-c 1 3 (2L 1 + L 3 ) + c 7 3 L 3 -c 1 4 1 T 1 f - 1 T 3 c L 1 + λ 1 1 T 1 f ln T 2 T 1 - 1 T 3 c ln u 4 -u 7 Γ 2 T 2 = 0, (4.36) -c 4 3 (2L 2 + L 3 ) -c 7 3 L 3 -c 4 4 1 T 4 c - 1 T 6 f L 2 + λ 4 1 T 4 c ln T 5 T 4 - 1 T 6 f ln u 1 + u 7 Γ 5 T 5 = 0.
(4.37)

The system for temperature and velocity unknowns Let us define:

 := T 3 c , B := L 1 Bh , Ĉ := T 6 f , D := L 2 Bh , Ê := T 1 f , F := T 4 c , K := - P r a S L 3 , Ĝ := -c 1 4 ( 1 T 1 f - 1 T 3 c )L 1 , Ĥ := -c 1 4 1 BhT 3 c , Î := c 1 4 1 BhT 1 f , Ĵ := P r a S (2L 1 + L 3 ), L := c 4 4 ( 1 T 6 f - 1 T 4 c )L 2 , M := -c 4 4 1 BhT 6 f , N := c 4 4 1 BhT 4 c , Ô := P r a S (2L 2 + L 3 ).
The equations for temperature and velocity unknowns can be summarized as follows:

 + (T 2 -Â)e B T 2 u 2 -T 2 u 4 -u 7 u 2 = 0, (4.38) Ĉ + (T 5 -Ĉ)e D T 5 u 5 -T 5 u 1 + u 7 u 5 = 0, (4.39) Ê + (T 1 -Ê)e B T 1 u 1 -T 2 = 0, (4.40) F + (T 4 -F )e D T 4 u 4 -T 5 = 0, (4.41) T 1 -T 7 = 0, (4.42)
-

u 1 T 1 + u 2 T 2 = 0, (4.43)
- u 4 T 4 + u 5 T 5 = 0, (4.44)
- u 4 T 4 + u 1 T 1 + u 7 T 7 = 0, (4.45) Ĵ + Ĥ ln u 4 -u 7 u 2 + Î ln T 2 T 1 + Ĝ T 1 u 1 + K u 7 T 7 T 1 u 1 = 0, (4.46) Ô + M ln u 1 + u 7 u 5 + N ln T 5 T 4 + L T 4 u 4 - K u 7 T 7 T 4 u 4 = 0. (4.47)
Let us notice that we can write all the variables as a function of u 1 , T 1 , u 4 and T 4 . The expressions of T 2 , T 5 , T 7 , u 2 , u 5 and u 7 that we obtain from equations (4.40), (4.41), (4.42), (4.43), (4.44) and (4.45) are :

T 2 = Ê + (T 1 -Ê)e B T 1 u 1 , T 5 = F + (T 4 -F )e D T 4 u 4 , T 7 = T 1 , u 2 = u 1 T 1 T 2 = u 1 T 1 Ê + (T 1 -Ê)e B T 1 u 1 , u 5 = u 4 T 4 T 5 = u 4 T 4 F + (T 4 -F )e D T 4 u 4 , u 7 = -T 1 - u 4 T 4 + u 1 T 1 .
The final system is:

 + ( Ê -Â)e B T 1 u 1 + (T 1 -Ê)e 2 B T 1 u 1 -T 1 u 4 u 1 1 - T 1 T 4 + 1 = 0, (4.48) Ĉ + ( F -Ĉ)e D T 4 u 4 + (T 4 -F )e 2 D T 4 u 4 -T 1 = 0, (4.49) Ĵ -K + Ĥ ln u 4 u 1 1 - T 1 T 4 + 1 + Î ln Ê + (T 1 -Ê)e B T 1 u 1 T 1 + Ĝ T 1 u 1 + K u 4 T 4 T 1 u 1 = 0, (4.50) Ô -K + M ln T 1 F + (T 4 -F )e D T 4 u 4 + N ln F + (T 4 -F )e D T 4 u 4 T 4 + L T 4 u 4 + K u 1 T 1 T 4 u 4 = 0. (4.51)
Moreover we can express T 1 and u 1 as functions of u 4 and T 4 thanks to equations (4.49) and

(4.51) as follows:

T 1 = Ĉ + ( F -Ĉ)e D T 4 u 4 + (T 4 -F )e 2 D T 4 u 4 , u 1 = - T 1 K u 4 T 4   Ô -K + M ln T 1 F + (T 4 -F )e D T 4 u 4 + N ln F + (T 4 -F )e D T 4 u 4 T 4 + L T 4 u 4   .
The equations to solve are (4.48) and (4.50) as functions of u 4 and T 4 . We will solve them with numerical algorithms to solve the analytical solution issue.

The application of the Newton method

Let x := T 4 and ȳ := u 4 , T 1 = h( x, ȳ) and u 1 = ḡ( x, ȳ). The functions f1 and f2 of which we want to find the zeros are:

f1 = Â + ( Ê -Â)e B h ḡ + ( h -Ê)e 2 B h ḡ -h ȳ ḡ 1 - h x + 1 = 0, f2 = Ĵ -K + Ĥ ln ȳ ḡ 1 - h x + 1 + Î ln Ê + ( h -Ê)e B h ḡ h + Ĝ h ḡ + K hȳ ḡx = 0.
The partial derivatives of h and ḡ are:

hx = D ȳ ( F -Ĉ)e D x ȳ + e 2 D x ȳ 1 + 2 D x - F ȳ , hȳ = - Dx ȳ2 e D x ȳ F -Ĉ + 2( x -F )e D x ȳ , ḡx = ḡ h hx - h x - h K ȳ x   (-M + N ) e D x ȳ 1 + ( x -F ) D ȳ F + ( x -F )e D x ȳ + M hx h - N x + L ȳ    , ḡȳ = ḡ h hȳ + h ȳ - h K ȳ x   ( M -N ) Dx ȳ2   1 - F F + ( x -F )e D x ȳ   + M hȳ h - L x ȳ2   .
The Jacobian of our system will be generated by:

f1, x = B(2( h -Ê)e B h ḡ + Ê -Â)e B h ḡ hx ḡ -hḡ x ḡ2 -hx ȳ ḡ 1 - h x + 1 -e B h ḡ -h - ȳḡ x ḡ2 1 - h x - ȳ ḡ hx x - h x2 , f1, ȳ = B(2( h -Ê)e B h ḡ + Ê -Â)e B h ḡ   hȳ ḡ -hḡ ȳ ḡ2   -hȳ ȳ ḡ 1 - h x + 1 -e 2 B h ḡ - h   ḡ -ȳḡ ȳ ḡ2 1 - h x - ȳ ḡ hȳ x   , f2, x = Ĥ -ḡx xȳ ḡ -hx ȳ + ḡx hȳ ḡ + hȳ x xȳ -ȳh + ḡx + Î     e B h ḡ hx + B( h -Ê) hx ḡ-hḡ x ḡ2 Ê + ( h -Ê)e B h ḡ - hx h     + hx ḡ -hḡ x ḡ2 Ĝ + K ȳ x - K h ḡ ȳ x2 , f2, ȳ = Ĥ xȳ 1 ȳ - ḡȳ ḡ 1 -h x -hȳ ȳ xȳ -hȳ + ḡx + Î     e B h ḡ hȳ + B( h -Ê) hȳ ḡ-hḡ ȳ ḡ2 Ê + ( h -Ê)e B h ḡ - hȳ h     + hȳ ḡ -hḡ ȳ ḡ2 Ĝ + K ȳ x + h ḡ K x .

Summary

In this chapter, we analyzed the transmission conditions at the junction and provided analytical solutions for configurations including at least one junction of order three. We first studied an open bifurcated domain. This analysis allowed us to introduce the concept of the adjacency matrix and to study the transmission conditions of the junction for a minimal configuration. At this stage, we understood how to integrate the conditions at the junction within the analytical solution. Then, we presented the three-rung ladder configuration.

We showed that this configuration is similar to the thermosyphon but with the additional presence of two junctions of order three. We provided the quasi-analytical solutions and understood that junctions of order greater than two increase the number of unknown parameters. We found two unknown independent parameters and used a Newton iterative method to find them. At this point, we know that constructing analytical solutions for more complex configurations is no longer feasible. Notice that extra pressure losses at the corner junctions could be integrated into our model.

Part II

Numerical approximation

In the previous part, we constructed a low Mach number model for pipeline configurations (chapter 2), dealt with the transmission conditions at the junctions (chapter 4), and provided analytical steady solutions for some configurations of interest ( chapters 3 and 4).

This part focuses on the main results achieved in the numerical modeling of laminar flows of ideal gases through general pipeline arrangements. We develop an algorithm of the first order to approach equations (2.37) on a domain composed of interior pipes and junctions.

The first issue we address is the presence of a discontinuous gravity term. This term becomes problematic when we differentiate the momentum conservation equation in space. Indeed, its derivative is a sum of Dirac deltas centered at the junction between two or more pipes.

We dedicate a chapter to explain how coping with such an issue is possible. We develop an elliptic solver for the dynamic pressure based on the finite-volume discretization, consisting of a linear system whose source term contains some modification to consider the presence of Dirac deltas [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF].

Then, we concentrate on the numerical discretization of the transmission conditions at the junction. We make this analysis for the open bifurcation configuration we presented previously in chapter 4. This choice allows us to validate numerically the conditions we established before applying them to the simulation of a general pipeline network. We choose to impose the conservation of mass when discretizing the temperature and integrate the energy conservation in the elliptic solver for the dynamic pressure.

At this stage, we also introduce the method of characteristics we conceived for temperature discretization. We want to use this method because it is unconditionally stable, allowing the choice of whatever stability condition, and so it has the potential to be a fast algorithm. We also study its limitations in cases where the order of the junction is high enough. That is why we then propose an alternative upwind method.

Finally, we give an algorithm for a general closed network with periodic boundary conditions. We use the finite-difference discretization coupled with the characteristic method and the finite-volume discretization. We couple the velocity and dynamic pressure discretization through a splitting method consisting of a prediction phase in which we compute an intermediate velocity and a projection phase in which we use the elliptic solver for the dynamic pressure. Our method differs from the common ones [START_REF] Chorin | Numerical solution of the navier-stokes equations[END_REF][START_REF] Temam | Sur l'approximation de la solution des equations de navierstokes par la m´ethode des fractionnarires ii[END_REF] since the velocity divergence is not null but depends on the thermodynamics. In the end, we give some ideas for extending our algorithm to the cases of variable physical and geometrical parameters and multi-species flow. We refer to [START_REF] Duchateau | Applied partial differential equations[END_REF] for more details on the discretization methods.

Chapter 5

An elliptic solver with Dirac deltas as source term

We dedicate this chapter to a critical issue, namely the presence of Dirac deltas in the source term of the elliptic equation obtained by differentiating the momentum conservation equation in space.

At first, we implement the system ∂ 2 x ψ = f (x) with the function f regular enough. Then, we introduce discontinuous source terms. The most common way to deal with singularities is the use of regularization techniques, such as the vortex method [START_REF] Chorin | Numerical study of slightly viscous flow[END_REF], the immersed boundary method [START_REF] Peskin | The immersed boundary method[END_REF], the front-tracking method [TBE + 01], and in connection to the level-set method the works of [START_REF] Osher | Level Set Methods and Dynamic Implicit Surfaces[END_REF], [START_REF] Sethian | Level Set Methods and Fast Marching Methods[END_REF] and [START_REF] Engquist | Discretization of Dirac delta functions in level set methods[END_REF]. An alternative to regularization in a finite-difference method consists of incorporating the jump conditions arising from the singular term into the numerical algorithm, as done in the immersed interface method [START_REF] Leveque | Immersed interface methods for stokes flow with elastic boundaries or surface tension[END_REF] and in [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF].

We will analyze these two approaches, first using a regularization approach and then a proper algorithm based on [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF].

The elliptical solver with a regular source term

We want to solve the generic problem:

               -∂ 2 x ψ = f (x), ψ(â) = 0, ψ( b) = 0.
(5.1)

This system is a stationary one-dimensional problem with the only space variable â ≤ x ≤ b.

Notice that this elliptic problem has the same nature as (2.40).

We will explain how we conceived the algorithm and show the results obtained with different source terms. We subdivide our domain in N -1 cells K i centered at nodes i with borders at the nodes i -1 2 and i + 1 2 . Suppose the cells have the same length ∆x = b-â N -1 . The scheme consists in approximating the values of the variable ψ at the nodes x i , denoted by ψ i , i = 0, ..., N -1.

ψ(â) = ψ( b) ≈ ψ N -2 + ψ 0 2 = 0 =⇒ ψ N -2 = -ψ 0 .
(5.2)

The linear system

Let us take the left-hand side term of equation (5.1) by components and discretize the two space derivatives separately through symmetric first-order finite differences. We construct a system of the type Aψ = b.

Interior nodes

First, use the quite standard symmetric first-order finite difference scheme around i for approximating the external derivative:

-[∂ x (∂ x ψ)] i ≈ - 1 ∆x [∂ x ψ] i+ 1 2 -[∂ x ψ] i-1 2 .
Then use symmetric first order finite difference schemes around i -1 2 and i + 1 2 for approximating the remaining derivative:

- 1 ∆x [∂ x ψ] i+ 1 2 -[∂ x ψ] i-1 2 ≈ - 1 ∆x ψ i+1 -ψ i ∆x - ψ i -ψ i-1 ∆x .
By reordering the terms :

- 1 ∆x ψ i+1 -ψ i ∆x - ψ i -ψ i-1 ∆x = 1 ∆x 2 (-ψ i-1 + 2ψ i -ψ i+1 ) . (5.3) Define: D -1 i = -1 ∆x 2 , D i = 2 ∆x 2 , D 1 i = -1 ∆x 2 .
The left-hand side term of the equation in (5.1) can be rewritten as:

-[∂ x (∂ x ψ)] i ≈ D -1 i ψ i-1 + D i ψ i + D 1 i ψ i+1 .

Boundaries

In this case, we proceed to a discretization similar to (5.3), and using (5.2), we obtain:

-[∂ x (∂ x ψ)] 0 = 1 ∆x 2 (3ψ 0 -ψ 1 ) , -[∂ x (∂ x ψ)] N -2 = 1 ∆x 2 (-ψ N -3 + 3ψ N -2 ) .

The matrices

The matrix A reads:

A 1 ∆x 2                  3 -1 • • • • • • • • • 0 -1 2 -
0 • • • • • • • • • -1 3                  .
We suppose f to be defined on the nodes for the source term. We obtain:

b i = f (x) i = f (x) i+ 1 2 + f (x) i-1 2 2 .

Numerical validation

We confront the numerical scheme by comparing the numerical and analytical solutions. We take the source term f (x) = x 2 + x to do so. Figure 5.2 reports the numerical results for â = 0, b = 1. The number of space nodes is N = 10000. The analytical solution in this case is Ψ(x) = -1 12 x 4 -1 6 x 3 + 1 4 x. Figure 5.3 provides a curve for the error, confirming that our algorithm is of order two.

The Dirac delta treatment: a regularization

Here, we describe a method to approximate a piece-wise constant function through a regular function. This technique allows us to use the elliptic solver we constructed in section 5.1 in case of discontinuous source terms. We show the regularization procedure on a thermosyphon; the extension to more complex configurations is straightforward.

Let us suppose we want to approximate a function defined on a one-dimensional domain of length 4L that assumes the following values (function in red in figure 5.4):

s(x) :                        1 if 0 ≤ x ≤ L 0 if L < x ≤ 2L -1 if 2L < x ≤ 3L 0 if 3L < x ≤ 4L .
We can approximate it with a function of the following type (function in blue at the left in figure 5.4):

p(x) :                                -1 2 tanh (ā(x -L)) + 1 2 if 0 ≤ x ≤ L + 1 2 1 2 tanh (-ā(x -2L)) -1 2 + b if L + 1 2 < x ≤ 2L + 1 1 2 tanh (ā(x -3L)) -1 2 + c if 2L + 1 < x ≤ 4L
.

Remark 6

The piece-wise hyperbolic tangents are chosen so that p(x) is continuous. The continuity is not imposed at the points of discontinuity of the function we want to approximate so that we are sure that p ′ (x) is still continuous. This fact is the reason for translating the extremes in which the hyperbolic tangents are defined.

In the expression of p(x), we see that the following constants appear:

• the constant ā, fixed a priori; the higher its value, the higher the precision of the approximation (ā = 200 in figure 5.4);

• the constants b and c obtained by imposing the continuity of p(x) at respectively L + 1 2 and 2L + 1. Their values are:

b = 1 - 1 2 tanh ā 2 - 1 2 tanh -ā 1 2 -L , c = b + 1 2 tanh (-ā) - 1 2 tanh (ā(1 -L)).
The values of these two constants are close to 0.

We can give a continuous approximation of the Dirac delta by taking the derivative of p(x)

(function in blue at the right in figure 5.4).

It reads:

p ′ (x) :                                -ā 2 (1 -tanh 2 (ā(x -L))) if 0 ≤ x ≤ L + 1 2 -ā 2 (1 -tanh 2 (-ā(x -2L))) if L + 1 2 < x ≤ 2L + 1 ā 2 (1 -tanh 2 (ā(x -3L))) if 2L + 1 < x ≤ 4L
. Suppose we now use this approximation of the Dirac delta as a source term for equations (5.1). In that case, we obtain a numerical solution for the dynamic pressure of a thermosyphon with constant temperature and velocity (see figure 5.5). This solution is validated through the analytical solution. In figure 5.6, we report the curves for the error of the scheme as a function of ∆x. We notice that the scheme for the regularized delta does not converge well, and it is of order 1 for sufficiently low values of ∆x. This method is not satisfying since it does not have a good convergence rate. In the next section, we study a direct approach.

The Dirac delta treatment: a direct approach

This section aims to construct an algorithm for the solution of the system:

               -∂ x ( k(x)∂ x ψ) = ĝ(x), ψ(â) = 0, ψ( b) = 0,
(5.4) with k(x) > 0 to avoid degeneracy. This is a stationary one-dimensional problem with the only space variable â ≤ x ≤ b in which the source term ĝ(x) has the special structure:

g(x) = f (x) + D l=1 ᾱl δ xl ,
where D ∈ N * is the total number of Dirac deltas.

The main reference for this section is [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF]; we will give a more detailed discussion of the algorithm in appendix E.

Here, we use the finite-volume method. We will explain how the algorithm has been conceived and show the results obtained with different source terms; in particular, we will compare these results with those obtained by regularizing the Dirac delta to better understand the main difficulties underlying the original problem.

The finite-volume discretization

Here, we construct the finite-volume scheme for the nodes without Dirac deltas.

Let us consider the mesh in figure 5.7 where the domain [â, b] is subdivided in cells

K i = [x i-1 2 , x i+ 1 2
]. Let us suppose that the cells are all of the same length ∆x = b-â N -1 . Let us integrate over a generic cell K i :

K i -∂ x ( k(x)∂ x ψ)dx = K i f (x)dx.
(5.5)

Let us define the average value of f on the cell K i as :

f i := 1 ∆x K i f (x)dx.
(5.6)

We can take equation (5.5), integrate the term at the left, and use the definition (5.6) at the right, obtaining:

-k(x i+ 1 2 )∂ x ψ(x i+ 1 2 ) + k(x i-1 2 )∂ x ψ(x i-1 2 ) = ∆xf i .
Let us define the fluxes at the border of the cells as follows:

F i+ 1 2 := -ki+ 1 2 ψ i+1 -ψ i ∆x , F i-1 2 := -ki-1 2 ψ i -ψ i-1 ∆x .
The idea is to approximate the derivatives of ψ through the over defined fluxes:

-k(x i+ 1 2 )∂ x ψ(x i+ 1 2 ) ≈ F i+ 1 2 , k(x i-1 2 )∂ x ψ(x i-1 2 ) ≈ -F i-1 2 .
(5.7) By using the approximations (5.7) and good approximations fi of the average of f (x), ki± 1 2 of k(x i± 1 2

) we can write the finite-volume scheme as:

F i+ 1 2 -F i-1 2 = ∆x fi .
(5.8)

Remember that boundary conditions imply:

ψ 0 = -ψ N -2 .
In the following, we give an expression of the approximations ki± 1 2 , and we study the modification to the scheme at the Dirac deltas nodes.

The values of k(x) at the faces

In general, k(x) is not constant everywhere but positive and continuous, and we discretize its values by assuming that in every cell, it is constant and equal to its average on the cell itself. Since its value is assumed to be ki on the cell K i and ki+1 on the cell K i+1 we have to find the good way to approximate k(x) at the faces. Indeed, the expression of the right flux on the cell K i is:

F i+ 1 2 = -ki+ 1 2 ψ i+1 -ψ i ∆x .
Let us define the fluxes from right and left:

F + i+ 1 2 := -ki+1 ψ i+1 -ψ i+ 1 2 ∆x 2 , F - i+ 1 2 := -ki ψ i+ 1 2 -ψ i ∆x 2
.

We can find an expression for ψ i+ 1 2 by imposing the continuity of the flux (F +

i+ 1 2 = F - i+ 1 2 ): -ki+1 ψ i+1 -ψ i+ 1 2 ∆x 2 = -ki ψ i+ 1 2 -ψ i ∆x 2
.

That implies:

ψ i+ 1 2 = ki+1 ψ i+1 + ki ψ i ki + ki+1 .
And so:

F i+ 1 2 = -ki+1 2 ∆x ψ i+1 - ki+1 ψ i+1 + ki ψ i ki + ki+1 .
After brief computation, we find:

F i+ 1 2 = -2 ki+1 ki ki+1 + ki ψ i+1 -ψ i ∆x .
Analogously:

F i-1 2 = -2 ki-1 ki ki-1 + ki ψ i -ψ i-1 ∆x .

Remark 7

We have find that the best approximation for ki+ 1 2 is the so called harmonic mean:

ki+ 1 2 := 2 ki+1 ki ki+1 + ki .

The scheme at the Dirac deltas nodes

Here, we discuss the case in which we have a Dirac delta at a point ā that we assume to be in the middle of a cell. The middle point case is the simplest one since we do not have to worry about the value of the discretization of k(x) inside the expression of the fluxes. We provide a discretization of the following equation:

[-k(x)∂ x ψ]( ā+ ) -[-k(x)∂ x ψ]( ā-) = ᾱ.
(5.9)

Let us introduce the unknown ψ ā, the value of ψ at the point ā, and define the fluxes as follows:

F + ā = -kj+1 ψ j+1 -ψ ā ∆x 2 , F - ā = -kj ψ ā -ψ j ∆x 2
. Equation (5.9) can be discretized as:

F + ā -F - ā = ᾱ.
Let us use this condition in order to find the value of ψ ā:

-kj+1

ψ j+1 -ψ ā ∆x 2 + kj ψ ā -ψ j ∆x 2 = ᾱ.
We obtain:

ψ ā = ᾱ ∆x 2 kj+1 + kj + kj ψ j + kj+1 ψ j+1 kj+1 + kj .
Now we can compute the fluxes:

F + ā = -kj+1 2 ∆x   ψ j+1 - ᾱ ∆x 2 kj+1 + kj - kj ψ j + kj+1 ψ j+1 kj+1 + kj   = ᾱ kj+1 kj+1 + kj -2 kj kj+1 kj+1 + kj ψ j+1 -ψ j ∆x = kj+1 kj+1 + kj ᾱ + F j+ 1 2 .
The procedure for F - ā is similar and we obtain:

F - a = - kj kj+1 + kj ᾱ + F j+ 1 2 .
The final scheme is:

               F i+ 1 2 -F i-1 2 = ∆x fi , ∀i ̸ = j, j + 1 F j+ 1 2 -F j-1 2 = ∆x fj + kj kj+1 + kj ᾱ, F j+ 3 2 -F j+ 1 2 = ∆x fj+1 + kj+1 kj+1 + kj ᾱ.

Remark 8

In general, it is always possible to find an admissible j such that ā ∈ [x j , x j+1 ] but ā is not necessarily at the middle point. The critical and delicate issue is giving a good approximation of k(x) inside the fluxes. In appendix E we will study the cases ā ∈ [x j , x j+ 1 2 ] and ā ∈ [x j+ 1 2 , x j+1 ] and find the expression of the fluxes.

Remark 9

In the presence of more than one Dirac delta, we apply the scheme we constructed here to every irregular point.

The application of the scheme

Here, we construct the linear system Aψ = b corresponding to the finite volume scheme we presented previously. We also compute the values of ᾱl in the case of the thermosyphon, and the extension to more complex configurations is straightforward. We validate the numerical solution of the system with the analytical solution, and we compare these results with the regularization of the delta.

Construction of the linear system

We now construct the linear system for finding the values of ψ at the center of the cells.

We take into consideration the general case with D Dirac deltas centered in a l = x j l + 1 2 of magnitude ᾱl , ∀l ∈ {1, 2, ..., D} .

Remark 10

The periodic boundary conditions imply ψ 0 = -ψ N -2 .

Interior nodes

In this case, we have the scheme:

F i+ 1 2 -F i-1 2
= ∆x fi . By substituting the expression for the fluxes:

-2 ki-1 ki ki-1 + ki ψ i-1 + 2 ki ki-1 ki-1 + ki + ki+1 ki+1 + ki ψ i -2 ki+1 ki ki+1 + ki ψ i+1 = ∆x 2 fi .
In the absence of Dirac deltas, we would have a linear system with a tridiagonal matrix whose diagonals are:

D -1 i = -2 ki-1 ki ki-1 + ki , D i = 2 ki ki-1 ki-1 + ki + ki+1 ki+1 + ki , D 1 i = -2 ki+1 ki ki+1 + ki ∀i ∈ [1, N -3]
The source term would be b

i = ∆x 2 fi ∀i ∈ [1, N -3].

Boundaries

In the extreme cells, periodic boundary conditions allow us to write the scheme as follows:

2 k0 2 kN-2 kN-2 + k0 + k1 k1 + k0 ψ 0 -2 k1 k0 k1 + k0 ψ 1 = ∆x 2 f0 , 2 kN-2 2 k0 kN-2 + k0 + kN-3 kN-2 + kN-3 ψ N -2 -2 kN-3 kN-2 kN-3 + kN-2 ψ N -3 = ∆x 2 fN-2 .
So:

D 0 = 2 k0 2 kN-2 kN-2 + k0 + k1 k1 + k0 , D 1 0 = -2 k1 k0 k1 + k0 , D -1 N -2 = -2 kN-3 kN-2 kN-3 + kN-2 , D N -2 = 2 kN-2 2 k0 kN-2 + k0 + kN-3 kN-2 + kN-3 .
The cells j l and j l + 1

In this case, the linear system does not change. We will have some changes at the level of term source:

b i =        0 if i = 0, N -2 ∆x 2 fi + ω i elsewhere
, where:

ω i =                  ᾱl ki ki+1 + ki if i = j l l ∈ {1, 2, ..., D} ᾱl ki+1 ki+1 + ki if i = j l + 1 l ∈ {1, 2, ..., D} 0 elsewhere

;

The magnitudes ᾱl

We compute the ᾱl corresponding to a thermosyphon. The extension to other configurations is a simple exercise. We want to use as Dirac delta the derivative in the sense of the distributions of the following function:

s(x) :=                1 if x < l or x > 4l -1 if 2l < x < 3l 0 elsewhere .
Let us compute the derivative of s(x) by taking a function q(x) ∈ C ∞ c (R):

⟨s x , q⟩ = -⟨s, q x ⟩ = - +∞ -∞ s(x)q x (x)dx.
(5.10)

By substituting the value of s(x), the integral can be rewritten as:

+∞ -∞ s(x)q x (x)dx = l -∞ q x (x)dx - 3l 2l q x (x)dx + +∞ 4l s(x)q x (x)dx.
By using the properties of q(x) and the decomposition of the integral, we can rewrite equation

(5.10) as:

⟨s x , q⟩ = -q(l) + q(3l) -q(2l) + q(4l) = ⟨-δ l -δ 2l + δ 3l + δ 4l , q⟩.
So, in a distributional sense, we obtain:

s x = -δ l -δ 2l + δ 3l + δ 4l .
This means that for the thermosyphon, we take:

ᾱ1 = -1, ᾱ2 = -1, ᾱ3 = 1, ᾱ4 = 1, x1 = l, x2 = 2l, x3 = 3l, x4 = 4l.

Validation of the algorithm

Here, we show the results obtained by the resolution of the linear systems previously constructed. We want to validate the linear system by comparing the results with the analytical solution. We limit this validation to the constant coefficient k(x). Figure 5.8 reports the curves for the problem solution with the exact delta and its regularization in relation to the exact solution. Figure 5.9 shows the curves for the scheme error as a function of ∆x when the source term is the exact delta and the domain length is 10.

We notice that the scheme for the exact delta converges with order 1 robustly with respect to the length of the domain.

Summary

In this chapter, we showed how we dealt with the elliptic solver required to discretize the equation for the dynamic pressure. We conceived an algorithm based on finite volumes capable of discretizing the Dirac deltas without approximations, and we compared it with an algorithm based on the regularization of the source term. As expected, our method has convergence of order 1 and is satisfying for the application of interest.

Chapter 6

The numerical approach to the open bifurcation Here, we construct numerical algorithms for the open bifurcated domain. To find a solution for equations (4.2), we will present the algorithms we developed for open domains and adapt them to specific transmission conditions at the junction.

The mesh grid

In the case of an open bifurcated domain, it is convenient to use a mesh grid in which the dynamic pressure Π and the velocity derivative in space η are placed at the nodes. This choice allows us to impose the continuity of the pressure at the junction. The velocity u, the temperature T , and the sin θ are placed in the shifted faces with the same optic of easing the conservation laws for both velocity and temperature at the junction. Moreover, the mesh will follow the same labeling as figure 6.1 from the first to the third pipe. In figure 6.2, we give an idea of how such a mesh appears. Let us note that:

• given the number of nodes on a pipe N pipe the total number of nodes is N = 3N pipe -2;

• the junction node between the first and the second pipe is the node N pipe -1 while the point through which the third pipe is linked to the junction is the node 2(N pipe -1); this is crucial because we will have to pay constant attention to the fact that the neighbors of this node include points that are in the pipe 1 but not in the pipe 2;

• the domain that we take into consideration has three points of inlet and outlet: the first and the last point of the mesh and the node 2(N pipe -1); we will have to treat these nodes carefully since depending on the sign of velocity we will impose either inlet velocity and temperature or outlet dynamical pressure.

The method of characteristics

Let us recall the method of characteristics [START_REF] Penel | Etude théorique et numérique de la déformation d'une interface séparant deux fluides non-miscibles à bas nombre de Mach[END_REF] and apply it to the equation for the temperature. Consider a general transport equation of the type:

∂y(x, t) ∂t + u(x, t) ∂y(x, t) ∂x = f (x, t), ∀x ∈ [0, L], t ∈ (0, T ] y(x, 0) = y i (x), ∀x ∈ [0, L] y(0, t) = y 0 (t). ∀t ∈ (0, T ] (6.1)
Where: y i ∈ L ∞ ([0, L]) and y 0 ∈ L ∞ ((0, T ]). Equations (6.1) can be solved through the method of characteristics.

Divide the interval [0, L] in N sub-intervals of length ∆x such that x i = i∆x, with i = 0, 1, ..., N .

Divide the interval [0, T ] in M sub-intervals of length ∆t such that t n = n∆t, with n = 0, 1, ..., M .

Characteristics discretization

χ(t n ; t n+1 , x) = x - t n+1 t n u(χ(τ ; t n+1 , x), τ )dτ.
We are now interested in knowing the foot at time t n of the characteristics that at time t n+1 passes through the mesh point x i . So a first-order full discretization in time of (6.2) is given by:

ζ n i := χ(t n ; t n+1 , x i ) ≈ x i -∆tu n i .

Interpolation

The next step is to find the values of y(x, t) at the foot of the characteristic, i.e., ŷn := y(ζ n i , t n ); indeed we know the field y n ≈ y(•, t n ) only at mesh points and we need to make an interpolation in order to estimate ŷn .

• Case i ∈ (0, N ]: ∀i ∈ (0, N ], ∃j ∈ [0, N ] s.t. x j ≤ ζ n i ≤ x j+1 , in other words j∆x < ζ n i < (j + 1)∆x Define λ n i = ∆tu n i
∆x , an expression for j can be obtained by:

       j > ζ n i ∆x -1 = x i -∆tu n i ∆x -1 = i∆x-∆tu n i ∆x -1 = i -λ -1, j < ζ n i ∆x = i -λ. =⇒ j = ⌊i -λ⌋ or equivalently j = ζ n i ∆x .
Moreover, the weight Θ i for the interpolation can be fixed at:

Θ i = x j+1 -ζ n i ∆x = (j + 1)∆x -i∆x -∆tu n i ∆x = j + 1 -i -λ ∈ [0, 1].
Remark 11 An other way to express Θ i is

Θ i = j + 1 - ζ n i ∆x .
Finally ŷn can be taken as:

ŷn i = Θ i y n j + (1 -Θ i )y n j+1 .
• Case i = 0:

In this case, it is impossible to make an interpolation because ζ n 0 is not (always) in the domain. In this case y n+1 1 will be directly computed as:

y n+1 1 = y i (t * ).
Where t * is the time the characteristic curve reaches x = 0. t * can be directly computed by:

0 = x 1 -u n i (t n+1 -t * ).
Remark 12 This method of characteristics is of the first order and unconditionally stable so that it is possible to have a CFL number bigger than one and change at every iteration ∆t by imposing:

∆t = CF L∆x max i u n i .
Moreover, under this assumption, the treatment at time t * must be extended to several cells.

Fully discretized scheme

Once having found the approximation of ŷn , in the non-critical case (i ̸ = 0), equations (6.1) can be solved by a simple Euler first order scheme with different possible choices in taking the variables in the function f either implicitly or explicitly.

A possible scheme is the following:

ŷn+1 i = ŷn i + ∆tf n+1 .
(6.4)

The characteristics at the junction

In the case of a junction, the method of characteristics must be adapted to the fact that the information transported by the characteristics is differently distributed at the junction depending on the number of inflow and outflow pipes.

Given N pipes, each pipe can be outflow or inflow, and the number of outflow and inflow pipes must be at least one for each type; this implies that 2(2 N -1 -1) possible configurations exist. The number of possible cases evolves exponentially with N , which is why we study the case of three pipes, in which there are only six feasible cases.

Let us indicate with I,II,III the three pipes. At the junction we will take into consideration the velocities u I , u II , u III and the weights Θ I , Θ II , Θ III .

We define the following coefficients:

µ κ σ,τ = |u σ | |u σ | + |u τ | , σ, τ, κ ∈ {I, II, III}, σ ̸ = τ ̸ = κ.
Given the junction index κ, the coefficients µ κ σ,τ and µ κ τ,σ are the coefficients of a convex combination which express the weight of the velocities of the other two pipes.

We have all the elements for constructing tables 6.1 and 6.2, which schematize all the possible cases.

Let us notice that most characteristics at the junction point are already considered in the characteristics implementation (for example, all the inflow characteristics). Moreover, in implementing characteristics, we need to pay attention to the type of pipe since, in inflow pipes, we have an imposed inlet. Table 6.1: The characteristics at the junction: pipes II and III are of different types, one is inflow and the other outflow.

Inflow I Outflow I

Inflow II ŷn

I = Θ I y n I + (1 -Θ I )y n I-1 ŷn I = Θ I y n I + (1 -Θ I )y n II Outflow III ŷn II = Θ II y n II + (1 -Θ II )y n II+1 ŷn II = Θ II y n II + (1 -Θ II )y n II+1 ŷn III = Θ III y n III + (1 - Θ III ) µ III I,II y n I + µ III II,I y n II ŷn III = Θ III y n III + (1 -Θ III )y n II Outflow II ŷn I = Θ I y n I + (1 -Θ I )y n I-1 ŷn I = Θ I y n I + (1 -Θ I )y n III Inflow III ŷn II = Θ II y n II + (1 - Θ II ) µ II I,III y n a + µ II III,I y n III ŷn II = Θ II y n II + (1 -Θ II )y n III ŷn III = Θ III y n III + (1 -Θ III )y n III+1 ŷn III = Θ III y n III + (1 - Θ III )y n III+1

The algorithm for T and u

We use the characteristic method to discretize equation (6.1) in which y is either the temperature or the velocity.

The temperature T

For the temperature, we consider the following term source:

f (x, t) = - 2πR C p ρS q w = - 2hπR(γ -1)T (x, t) SγP (t) (T (x, t) -T ref ).
We choose the following fully discretized implicit scheme:

T n+1 i = T n i + ∆tf (T n+1 i , P n , ρ n ) = T n i -∆t 2πR(γ -1)T n i h γSP (t n ) (T n+1 i -T ref ).
In the end, we make the scheme explicit due to linearity:

T n+1 i = T n i + T n i ∆t 2πR(γ-1)h γSP (t n ) T ref 1 + T n i ∆t 2πR(γ-1)h γSP (t n )
. (6.5)

The velocity u

Remark 13 The strength of one-dimensional low Mach models is that the velocity can be calculated directly by integrating the divergence. Ours is not the case here because of the periodic boundary conditions.

For the velocity, we take the term source:

f = - ∂ x Π ρ -f πu D S -g sin θ.
A possible discretization reads:

u n+1 i = ûn i + ∆tf (Π n+1 , T n+1 , P n+1 , u n+1 ) = ûn i + ∆t - rT n+1 i P (t n+1 ) Π n+1 i -Π n+1 i-1 ∆x - f S πu n+1 i D -g sin θ .
And so:

u n+1 i = ûn i + ∆t - rT n+1 i P (t n+1 ) Π n+1 i -Π n+1 i-1 ∆x -g sin θ 1 + ∆t f S πD
. (6.6)

The linear system for Π

In the following, we will develop an algorithm for giving to the derivative in space of equation (4.2b) an algebraic form of the type AΠ = b. In the first stage, we will take care of the interior points for which the algorithm is the same for every case.

Construction of A

Let us take the left-hand side term of the derivative in space of equation (4.2b) by components (let us not consider the extremities i = 0 and i = 3(N pipe -1) for now) at time n + 1 and discretize the two space derivatives separately through symmetric first order finite differences. First of all let us replace ρ by using equation (4.2d):

-∂ x ∂ x Π n+1 ρ n+1 i = - r P n+1 ∂ x T n+1 ∂ x Π n+1 i .
Now use a symmetric first-order finite difference scheme around i for approximating the external derivative:

∂ x T n+1 ∂ x Π n+1 i = 1 ∆x T n+1 i+ 1 2 ∂ x Π n+1 i+ 1 2 -T n+1 i-1 2 ∂ x Π n+1 i-1 2 .
Now use symmetric first order finite difference schemes around x i-1 2 and x i+ 1 2 for approximating the remaining derivative:

1 ∆x T n+1 i+ 1 2 ∂ x Π n+1 i+ 1 2 -T n+1 i-1 2 ∂ x Π n+1 i-1 2 = 1 ∆x 2 T n+1 i+ 1 2 (Π n+1 i+1 -Π n+1 i ) -T n+1 i-1 2 (Π n+1 i -Π n+1 i-1 ) .
Reorder the terms:

- 1 ∆x 2 T n+1 i+ 1 2 (Π n+1 i+1 -Π n+1 i ) -T n+1 i-1 2 (Π n+1 i -Π n+1 i-1 ) = - 1 ∆x 2 T n+1 i-1 2 Π n+1 i-1 -T n+1 i-1 2 + T n+1 i+ 1 2 Π n+1 i + T n+1 i-1 2 Π n+1 i+1 .
Define:

A i = - r P n+1 1 ∆x 2 T n+1 i-1 2 , B i = r P n+1 1 ∆x 2 T n+1 i-1 2 + T n+1 i+ 1 2 , C i = - r P n+1 1 ∆x 2 T n+1 i+ 1 2 .
The left-hand side term of the derivative in space of equation (4.2b) can be discretized as:

-∂ x ∂ x Π n+1 ρ n+1 i = A i Π n+1 i-1 + B i Π n+1 i + C i Π n+1 i+1 .

Construction of b

For the interior indices, we have b

i = ∂ t η n+1 + u n ∂ x η n+1 + (η n+1 ) 2 + f πη n+1 D S i
.

By using finite differences:

b i = η n+1 i -η n i ∆t + u n i-1 2 + u n i+ 1 2 2 η n+1 i -η n+1 i-1 ∆x + η n+1 i 2 + f πη n+1 i D S .
An alternative way to express the components of the source term consists in introducing the characteristics for the velocity; we obtain:

b i = ∂ x D t u n+1 + f πu n+1 D S i .
By performing a semi-discretization in time, we have:

b i = ∂ x u n+1 -ûn ∆t + f πu n+1 D S i .
The complete discretization is:

b i = η n+1 i - ∂ x ûn ∆t i + f πη n+1 i D S = η n+1 i 1 ∆t + f π D S - ûn i+1 -ûn i ∆t∆x .
The choice of this discretization allows b to be homogeneous since, as we will see in a few moments, the source term component at the junction contains the characteristics for the velocity. Additionally, b i does not contain non-linearities.

Inlet and outlet lines

In the first line and the two lines corresponding to the boundaries of the pipes, we impose different conditions depending on the type of pipe (inflow or outflow) with respect to the middle junction. In the case of inflow pipes, we can exploit the values of temperature and velocity at the inlet point x in :

Π x in ±1 ± Π x in := ±∆x∂ x Π| x in ,
where:

∂ x Π| x in = - P (t n+1 ) rT n+1 in u n in ∂ x u n+1 in + f 2S πu n in D + g sin θ| x in .
We impose an outlet Dirichlet condition for outflow pipes for Π.

Junction condition

The conservation law for velocity at the junction imposes:

u N pipe -2 = u N pipe -1 + u 2N pipe -2 . (6.7)
This law means by using the discretization of the velocity (6.6):

ûn+1 N pipe -2 + ∆t - rT n+1 N pipe -2 P (t n+1 ) Π n+1 N pipe -1 -Π n+1 N pipe -2 ∆x -g sin θ N pipe -2 1 + ∆t f S πD = ûn+1 N pipe -1 + ∆t - rT n+1 N pipe -1 P (t n+1 ) Π n+1 N pipe -Π n+1 N pipe -1 ∆x -g sin θ N pipe -1 1 + ∆t f S πD + ûn+1 2N pipe -2 + ∆t - rT n+1
2N pipe -2

P (t n+1 ) Π n+1 2N pipe -1 -Π n+1 N pipe -1 ∆x -g sin θ 2N pipe -2 1 + ∆t f S πD .
We define:

a i = r T i ∆t P (t n+1 )∆x , c i = ∆tg sin θ i .
The simplified version of (6.7) reads:

ûn+1 Npipe-2 -a Npipe-2 (Π n+1 Npipe-1 -Π n+1 Npipe-2 ) -c Npipe-2 = ûn+1 Npipe-1 -a Npipe-1 (Π n+1 Npipe -Π n+1 Npipe-1 ) -c Npipe-1 + ûn+1 2Npipe-2 -a 2Npipe-2 (Π n+1 2Npipe-1 -Π n+1 Npipe-1 ) -c 2Npipe-2 .
By ordering:

-a Npipe-2 Π n+1 Npipe-2 + (a Npipe-2 + a Npipe-1 + a 2Npipe-2 )Π n+1 Npipe-1 -a Npipe-1 Π n+1 Npipe -a 2Npipe-2 Π n+1 2Npipe-1 = b junc = ûn+1 Npipe-2 -ûn+1 Npipe-1 -ûn+1 2Npipe-2 -(c Npipe-2 -c Npipe-1 -c 2Npipe-2 ).

The global system

Let us consider the case of the first pipe inflow and the other two outflows to clarify the ideas.

For the construction of A we use the following N x -2 × N x -2 matrix :

A * i,j =                     B i C i 0 . . . . . . . . . 0 A i+1 B i+1 C i+1 0 . . . 0
0 A j-1 B j-1 C j-1 0 . . . . . . . . . 0 A j B j                    
.

The expression of the matrix A reads:

A =                                       -1 1 0 . . . 0 A 1 . . . 0 A * 1,Nx-2 0 ∅ ∅ . . . C Nx-2 0 . . . 0 -a Nx-2 i a i -a Nx-1 0 . . . 0 -a a 2Nx-2 0 . . . 0 A Nx . . . ∅ 0 A * Nx,2Nx-3 0 ∅ . . . C 2Nx-3 0 1 0 . . . . . . 0 A 2Nx-1 . . . 0 0 ∅ . . . ∅ A * 2Nx-1,3Nx-4 C 3Nx-4 0 1                                      
The source vector reads:

b = ∆x∂ x Π| 0 , b 1 , • • • , b Nx-2 , b junc , b Nx , • • • , b 2Nx-3 , Π 2 out , b 2Nx-1 , • • • , b 3Nx-4 , Π 3 out T .

Summary

In this chapter, we proposed an algorithm to simulate an open bifurcation. The aim was to study a minimal configuration containing a junction to validate the discretization of the transmission conditions. We first developed a characteristic method to deal with the transport equation for temperature and velocity. This method results in being unconditionally stable, allowing faster computations. We understood that for more complex junctions, this method is difficult to implement, and we searched for alternatives. This method allowed us to impose the mass conservation law at the junction. Then, we constructed a linear system to simulate the dynamic pressure using symmetric finite differences. We understood that particular treatment of the resulting system in correspondence with the junction allows us to impose the energy conservation law. We also imposed the continuity of the dynamic pressure at the junction.

Extension: junction conditions with variable mesh size

Here, we will analyze the main algorithm changes and the physical laws at the junction in case of a non-uniform space step over the domain. We will start by studying the difference for the derivative at the junction that intervenes in the algorithm for Π at the junction. We will notice that a change in the coefficient of the linear system matrix is needed. Then, we will analyze the change in the conservation laws at the junction and see how this will influence the algorithm for temperature.

Derivative discretization at the junction

Let us take a junction J and denote as C in (J) and C out (J) the sets of respectively the inlet and the outlet pipes. We define n := |C in (J)| and m := |C out (J)|. Let u i , T i , Π i i = 1, ..., n be the inlet variables and u j , T j , Π j j = 1, ..., m be the outlet ones. We define velocities and temperatures in cells and pressures in nodes. We use J as the index of the junction, k as the index of the most adjacent cell to the junction, k ± 1 2 will be the first node at the left/right of the junction, and so on. We assume that the pipe s has its own ∆x s . Let ζ be a generic variable defined at the center of cells; the following average will give its value at the junction:

ζ J = 2 ∆x sum   n i=1 ∆x i 2 ζ i k + m j=1 ∆x j 2 ζ j k   , ∆x sum := n+m s=1 ∆x s . (6.8)
where ζ k are the values of ζ in the cells adjacent to the junction. The value of the derivative of ζ on the adjacent cell K s in the pipe s is given by:

∂ x ζ in Ks = ζ J -ζ s avg,in ∆x s , ∂ x ζ out Ks = ζ s avg,out -ζ J ∆x s ,
where:

ζ s avg,in := ζ s k + ζ s k-1 2 , ζ s avg,out := ζ s k + ζ s k+1 2 .
The derivative of ζ at the junction will be given by:

∂ x ζ J = 1 ∆x sum   n i=1 ∆x i ∂ x ζ in K i + m j=1 ∆x j ∂ x ζ out K j   (6.9) = 1 ∆x sum   n i=1 (ζ J -ζ i avg,in ) + m j=1 (ζ j avg,out -ζ J )   . (6.10)
By inserting (6.8) in (6.9) we have that the numerator of the fraction becomes:

  n i=1 ∆x i ζ i k + m j=1 ∆x j ζ j k   n -m ∆x sum - n i=1 ζ i k + ζ i k-1 2 + m j=1 ζ j k + ζ j k+1 2 .
We obtain:

∂ x ζ J = 1 ∆x sum n i=1 (n -m) ∆x i ∆x sum - 1 2 ζ i k + m j=1 (n -m) ∆x j ∆x sum + 1 2 ζ j k - 1 2 n i=1 ζ i k-1 + 1 2 m j=1 ζ + k+1 .
As a consequence, we will have:

∂ x u * J = 1 ∆x sum n i=1 (n -m) ∆x i ∆x sum - 1 2 u * ,i k + m j=1 (n -m) ∆x j ∆x sum + 1 2 u * ,j k (6.11) - 1 2 n i=1 u * ,i k-1 + 1 2 m j=1 u * ,j k+1 , -∂ x rT P ∂ x Π J = - r P ∆x sum n i=1 (n -m) ∆x i ∆x sum - 1 2 T i k Π J -Π i k-1 2 ∆x i (6.12) + m j=1 (n -m) ∆x j ∆x sum + 1 2 T j k Π j k+ 1 2 -Π J ∆x j - 1 2 n i=1 T i k-1 Π i k-1 2 -Π i k-3 2 ∆x i + 1 2 m j=1 T j k+1 Π j k+ 3 2 -Π j k+ 1 2 ∆x j .
Let us develop in detail equation (6.12). We retire the coefficient r P ∆x 2 sum that goes into the source term, and we order the terms highlighting the coefficient for every value of Π :

  - n i=1 (n -m) - ∆x sum 2∆x i T i k + m j=1 (n -m) + ∆x sum 2∆x j T j k   Π J (6.13) + n i=1 (n -m)T i k - ∆x sum 2∆x i (T i k -T i k-1 ) Π i k-1 2 - n i=1 ∆x sum 2∆x i T i k-1 Π i k-3 2 + m j=1 -(n -m)T j k + ∆x sum 2∆x j (T j k+1 -T j k ) Π j k+ 1 2 - m j=1 ∆x sum 2∆x j T j k+1 Π j k+ 3 2 .
Notice that we recover the previous results for uniform ∆x.

Conservation laws

In the case of the variable space step, it is natural to consider that the information coming from the adjacent pipes is weighted with the size of the cell from which the information comes. This fact means that the conservation laws read:

n+m k=1 ∆x k u k = 0, n+m k=1 ∆x k u k T k = 0, T - t = T - s ∀t, s ∈ 1, ..., m.
Notice that there is no reason to consider the weight of the space step for the continuity of temperature in the outlet pipes. This fact allows us to write the generic outlet temperature as:

T inf o = n i=1 ∆x i u + i n i=1 ∆x i u + i T + i ,
The derivative of temperature in the outlet cell k adjacent to the junction is:

∂ x T adj = T k -T inf o ∆x k 2 .
So we have that the discretization of the total derivative in time is:

DT Dt n+1 k = T n+1 k -T n k ∆t + u k ∂ x T adj .
Chapter 7

The algorithm for closed pipeline configurations This chapter will assemble all the algorithms conceived for the numerical simulation of closed pipeline networks.

Figure 7.1 shows the collocation of our variables: the dynamic pressure is defined at the nodes, while the temperature and the velocity are defined in the centers of the cells. Moreover, the gradient of dynamical pressure is defined on the cells, while the pipe inclination and the velocity divergence are on the nodes.

Figure 7.1: The mesh and the distribution of nodes

We will show two possible algorithms for the temperature through the method of characteristics. Then, we will show how to compute the velocity divergence, the thermodynamic pressure, and the heat flux. Finally, we will present two ways to couple the computation of the velocity and the dynamical pressure. We will now take advantage of the algorithm for computing the dynamic pressure seen in chapter 5. We conclude this preamble by recalling the equations we want to solve on the domain [â, b]:

η := ∂u ∂x = - 1 γP (t) P ′ (t) + 2πR(γ -1) S q w , (7.1a) ∂ t u + u∂ x u + ∂ x Π ρ = - f 2 πu D S -g sin θ, (7.1b) -∂ x ∂ x Π ρ = ∂ t η + u∂ x η + η 2 + f 2 πη D S + g D i=1 α i δ xi , (7.1c) P ′ (t) = - 2πR(γ -1) S|Ω| Ω q w , (7.1d) ρC p ∂ST ∂t + u ∂ST ∂x = SP ′ (t) -2πRq w , (7.1e) q w : = h(T -T ref ), (7.1f) Π(x = â) = Π(x = b), u(x = â, t) = u(x = b, t), T (x = â, t) = T (x = b, t), (7.1g) P (x, t = 0) = P i , u(x, t = 0) = u i , T (x, t = 0) = T i . (7.1h)

Two different ways to compute T

To discretize the temperature, we can use the method of characteristics introduced in chapter 6. Another possibility is the use of the upwind discretization. Here, we will give a numerical algorithm for both schemes. We recall that once computed T n+1 i , equation (7.1f) allows us to discretize the heat flux through the lateral surface of the pipe as follows:

q n+1 w,i = h(T n+1 i -T ref ).

The method of characteristics for T

We take equation (7.1e) and apply the same procedure as in the previous chapter. The resulting discretization for T n+1 i is the following:

T n+1 i = T charac i + T n i ∆t (γ-1) γP (t n ) P ′ (t n ) + 2πR(γ-1)h γSP (t n ) T ref 1 + ∆t 2πR(γ-1)T n i h γSP (t n ) .
(7.2)

We notice that we have one more term than the temperature discretization for an open bifurcation in this case. This difference lies in the fact that, in this case, we have a closed domain and an equation for the evolution of P . We have seen that this method has important limitations in the case of junctions with many incident pipes. Indeed, it would require considering a large number of possible configurations. The next method we will present does not have these limitations.

The upwind method for T

In the case of a general network, it is harder to implement an algorithm valid for whatever cfl because there is high complexity in tracking the origin of information; that is why we limit our study to the case of cfl equal to 1. Consequently, the method of characteristics loses its interest, and we are forced to search for another algorithm for temperature. We introduce here a modified upwind scheme that considers the energy conservation at the junction. We discretize the total derivative of temperature as follows:

DT Dt n+1 i ≈ T n+1 i -T n i ∆t + |u n i | T n i -T inf o ∆x ,
where T inf o indicates the variable that contains the information about the temperature at time n in the cell(s) that precede(s) the cell i. While in the classical upwind scheme, it coincides with T n i-1 , in our case, its value depends on two factors: the sign of the velocity with respect to the prefixed sense of circulation and the possible presence of more than one preceding temperature to take into account, as it could happen at the junctions.

Interior cells

In interior cells, we only have to understand if the sign of the velocity agrees with the direction of circulation:

T inf o =        T n i-1 if u n i > 0, T n i+1 if u n i < 0.
Extreme cells Concerning the far left and the far right cells, we have two possible situations: the velocity is positive, so the right cell behaves as an interior cell, or the velocity is negative, and the left cell behaves as an interior cell. A far-left cell with positive velocity or a far-right cell with negative velocity has a different treatment for T inf o . In this case, we have that the information for the temperature comes from the effective inlet pipes to the junction directly linked to the cell we are interested in. Let us notice that a pipe P is effectively inlet for the junction J if:

• the pipe P is an inlet pipe by initial setting, and the velocity at the most right cell is positive;

• the pipe P is an outlet pipe by initial setting, and the velocity at the most left cell is negative.

Let us suppose that there are m effective inlet pipes, we can define T inf o as:

T inf o := m k=1 u n k T n k m k=1 u n k .
We can now define an analogue of T charac based on the discretization of the total derivative as:

T upwind := 1 -∆t |u n i | ∆x T n i + ∆t |u n i | ∆x T inf o .
It is possible to show that this quantity has the same structure as T charac if we define Θ := 1-∆t

|u n i | ∆x .
Although the stability condition is strict, this method applies to every closed pipeline configuration. We cannot have a cfl bigger than 1, while the method of characteristics is unconditionally stable. We will prefer the use of the method of characteristic whenever applicable.

The computation of η and P

Here, we compute the quantities that are only functions of the thermodynamics of the problem: the variation of velocity and thermodynamic pressure.

The integral of q w

Supposing the temperature is regular enough, a good approximation is given by the trapezoidal rule:

Ω q n+1 w = Ω h(T n+1 -T ref ) ≈ N -1 i=0 h(T n+1 i + T n+1 i+1 -2T ref )∆x 2 .

The algorithm for P

Once approximated the integral of q w the discretization of (7.1d) is performed via the following implicit Euler scheme:

P n+1 = P n -∆t 2πR(γ -1) S|Ω| Ω q n+1 w . (7.3)

The algorithm for η

Equation (7.1a) can be rewritten as:

∂u ∂x = 2πR(γ -1) γSP 1 |Ω| Ω q w -q w . (7.4)
Remember that η is defined in the nodes; this means that we need the mean value of q w at the node i + 1 2 :

q n+1 w i+ 1 2 := q n+1 w,i + q n+1 w,i+1
2 .

So a possible discretization for η is the following:

η n+1 i+ 1 2 = 2πR(γ -1) γSP n+1 1 |Ω| Ω q n+1 w -q n+1 w i+ 1 2 .

The computation of Π and u

We will construct two coupled algorithms for Π and u in the following.

An intuitive way to compute Π and u

The most intuitive way to compute the dynamic pressure is to take into consideration equation (7.1c) and use the elliptic solver we constructed for Π by taking:

fi = η n+1 i -η n i ∆t + u n i + u n i+1 2 η n+1 i+1 -η n+1 i ∆x + (η n+1 i ) 2 + f 2 πη n+1 i D S .
Then, we can compute the velocity simply by using the fact that:

∂u ∂x = η. (7.5)
With the finite difference scheme:

u n+1 i = u n+1 i-1 + ∆xη n+1 i-1 .
For this algorithm, we need the velocity u n+1 -1 as the starting point since (7.5) with periodic boundary conditions is ill-posed. For this purpose, we use equation (7.1b) combined with the method of characteristics.

First of all we compute the convected velocity ûn , so that we have:

∂ t u + u∂ x u = Du Dt ≈ u n+1 -ûn ∆t .
Then we can express u n+1 -1 as:

u n+1 -1 = ûn -1 -∆t rT n+1 -1 P n+1 Π n+1 -1 -Π n+1 -2 ∆x + g sin θ -1 1 + ∆t f 2 π D S .

The prediction-projection method for computing Π and u

An alternative to the previous algorithm is to couple velocity and pressure through a predictionprojection method [START_REF] Chorin | Numerical study of slightly viscous flow[END_REF] as follows:

• First of all, let us introduce the splitting method:

∂ t u ≈ u n+1 -u * ∆t + u * -u n ∆t , (7.6) u∂ x u ≈ u n η n+1 . (7.7)
An intermediate velocity u * has been introduced.

• Then let us take equation (7.1b):

∂ t u + u∂ x u + ∂ x Π ρ = - f 2 πu D S -g sin θ
The idea is to split this equation into two parts so that we can apply the algorithm previously implemented for the solution of Π:

∂ t u * + u∂ x u = - f 2 πu * D S , (7.8) ∂ t u = - ∂ x Π ρ -g sin θ.
(7.9)

• Let us give a splitting in time of equations (7.8) and (7.9) by exploiting the approximations given in equations (7.6) and (7.7) :

u * -u n ∆t + u n η n+1 = - f 2 πu * D S , u n+1 -u * ∆t = - 1 ρ ∂Π ∂x -g sin θ.
• Let us begin by finding an approximation for the intermediate velocity through the first decoupled equation:

u * = u n 1 -∆tη n+1 1 + ∆tf π R S .
• By taking the derivative in space of the second decoupled equation, we can find an equation for Π:

-∂ x 1 ρ ∂Π ∂x = +g D i=1 α i δ xi - 1 ∆t (∂ x u * -η n+1 ). (7.10)
It exactly fits the elliptic solver for Π, in this case the average f is:

fi = - 1 ∆t u * i+1 -u * i ∆x -η n+1 i .
• The velocity is also recovered from the second decoupled equation once Π is known:

u n+1 = u * + ∆t - 1 ρ ∂Π ∂x -g sin θ .

The linear system for Π

The equation (7.10) has a structure that fits the algorithm constructed in chapter 5. The linear system we want to solve is given by (E.14) and (E.15). In our case k(x) := r P T (x). Remember that:

• the null periodic boundary conditions consist in

Π 0 +Π N -2 2 = 0 that implies that Π 0 = -Π N -2 ;
• the term fj is the average over the cell j of the term source f , and it will be treated differently depending on the coupling of velocity and dynamic pressure;

• in the case of the absence of junctions, the matrix is effectively made of three diagonals, and we can use smarter methods to solve the linear methods that do not require the inversion of the matrix. For example, what we have implemented and used is the Thomas algorithm.

The resolution of the general linear system for Π

In the case of the presence of junctions, the linear system for the dynamic pressure can be generalized in the following form:

         T S S T D                   Π 1 Π 2          =          b 1 b 2         
, where Π 1 ∈ R N 1 represents the values of the dynamic pressure at the interior nodes of all pipes while Π 2 ∈ R N 2 represents the values of Π at the junctions, with N 2 ≪ N 1 . The resulting block matrix is composed by a tridiagonal matrix T ∈ R N 1 × R N 1 that represents the discretization at interior nodes, a diagonal matrix D ∈ R N 2 × R N 2 that represents the discretization at junctions and a sparse rectangular matrix S ∈ R N 1 × R N 2 that represents the interactions between interior nodes and junctions. We decided to represent the global system in this way since the distinction between interior nodes and junctions makes the code adaptable to every type of network and helps generalization. We do not report the elements of every matrix here since they are exactly the juxtaposition of the ones shown for both the thermosiphon and the open junction. What we want to focus on is to find a way to solve this linear system. Remember that in the case of a thermosiphon, the matrix reduces to T , and we can use the Thomas algorithm that is of complexity O(N 1 ). The presence of the sparse matrix S makes it impossible to use that method. Moreover, the matrix is not symmetric since T is not symmetric, so we cannot use gradient-type methods. Direct methods are O(N 3 1 ) so they are very expensive. A possible solution could be the use of iterative methods that are proven to be O(N 2 1 ), even if we have to pay attention to the conditions we must fulfill to guarantee their convergence. We decided to exploit the special properties of our matrix: T is tridiagonal, and N 2 is small. The linear system can be written as:

T Π 1 + SΠ 2 = b 1 , S T Π 1 + DΠ 2 = b 2 .
It is possible to explicit Π 1 from the first equation and insert it in the second equation. By reordering, we find the Schur complement:

(D -S T T -1 S)Π 2 = b 2 -S T T -1 b 1 . (7.11)
The advantage of solving the system (7.11) is that its complexity is O(N 3 2 ) and we can always set N 1 , N 2 such that N 3 2 ≤ N 1 , so that the resolution of this system is always at most O(N 1 ). The only matrix left to care of is T -1 , and we are lucky since it exists an algorithm that is

O(N 2
1 ) to compute it so that the overall complexity is still O(N 2 1 ). Let us suppose T is of the form:

T =              a 1 b 1 c 1 a 2 b 2 c 2 . . . . . . . . . . . . b n-1 c n-1 a n             
The elements of T -1 are given by [DF07, Usm94]:

(T -1 ) ij =                (-1) i+j j-1 k=i b k θ i-1 ϕ j+1 /θ n if i < j θ i-1 ϕ j+1 /θ n if i = j (-1) i+j i-1 k=j c k θ j-1 ϕ i+1 /θ n if i > j ,
where the θ i satisfy the recurrence relation:

θ 0 = 1, θ 1 = a 1 , θ i = a i θ i-1 -b i-1 c i-1 θ i-2 i = 2, 3, . . . , n,
while the ϕ i satisfy:

ϕ n+1 = 1, ϕ n = a n , ϕ i = a i ϕ i+1 -b i c i ϕ i+2 i = n -1, . . . , 1.

Summary

This chapter showed the algorithm we conceived for general closed pipeline networks. At first, we proposed an alternative to the method of characteristics for the temperature: the upwind method. This method is more flexible and allows us to overcome the problem encountered with the characteristics method. Unfortunately, it is stable only for the values of cfl< 1, so it is slower regarding computational time. Once the temperature we could construct the divergence of the velocity and the thermodynamic pressure through finite differences discretization. In the case of a closed domain, we understood that the boundary conditions on velocity give the temporal variation of the thermodynamic pressure. Ultimately, we developed a prediction-projection algorithm to couple the velocity and dynamic pressure simulation.

The procedure we used is different from the standard one since, in our case, we do not want to impose that the divergence of the velocity is null. Moreover, we could couple this approach with the elliptical solver we gave in chapter 5.

Extension: the algorithm for gas mixtures

We suppose our flow is a mixture of two gases g 1 and g 2 in a confined volume V . We know their average densities ρ g 1 and ρ g 2 , and their molar masses M g 1 and M g 2 . The relations we have presented previously are valid locally at the level of a cell, and the new variables are placed at the center of the cells for every pipe. We design as ζ k,l i,t the quantity ζ for the species k in the pipe l at the global node i at the time t.

We suppose to know the initial spatial distribution Y g 1 i,0 and Y g 2 i,0 of the mass fractions. We define the ratio ρ := ρ g 2 ρ g 1 and introduce the new vectors:

ρ * ,g 1 i , ρ * ,g 2 i , n g 1 i , n g 2 i , m g 1 i , m g 2 i , Y g 1 i , Y g 2 i
and Vi . They represent the relative density, the mole number, the mass, the mass fraction, and the volume ratio of each species in each cell of the domain. The volume ratio in each cell is given by:

Vi := V g 2 i V g 1 i = ρ * ,g 1 i m g 2 i ρ * ,g 2 i m g 1 i .
The total mass, mole number, density, and volume in the cell i are given by:

m i = 2 k=1 m g k i , n i = 2 k=1 n g k i , ρ i = 2 k=1 ρ * ,g k i , V i = 2 k=1 V g k i .
We show now how it is possible to compute the relative densities of species g 1 and g 2 at a node i, knowing the mass fractions. We express Y g 1 i as follows:

Y g 1 i = m g 1 i m i = ρ g 1 V g 1 i ρ g 1 V g 1 i + ρ g 2 V g 2 i = 1 1 + ρ Vi .
This means that the volume ratio is known at each cell with the value:

Vi = 1 ρ 1 Y g 1 i -1 (7.12)
We notice that it is well-defined since the inverse of the mass fraction is always bigger or equal to one, so the volume ratio is always positive. If we combine equation (7.12) with the fact that V g 2 i + V g 1 i = V i we obtain that the volumes of the two species are:

V g 1 i = V i 1 + Vi , V g 2 i = V i Vi 1 + Vi .
The densities read:

ρ * ,g 1 i = 1 1 + Vi ρ g 1 , ρ * ,g 2 i = Vi 1 + Vi ρ g 2 , ρ i = 1 1 + Vi ρ g 1 + Vi ρ g 2 . (7.13)
We need to highlight how the density ρ i is linked to the thermodynamics of the system. We know how to express the value of the density in the cell as a function of the temperature in the cell and the thermodynamic pressure. In the case of mixtures, the value of r is no longer constant; it varies in time and space. We use the values of ρ i to find the values of r i at each cell as r i = P ρ i T i . We now express the total number of moles and the mass at time t = 0. They are invariant of the problem, and at each time t, we can verify that they do not change value. At t = 0, we can compute ρ * ,g 1 i,0 and ρ * ,g 2 i,0 as in equation (7.13) and write:

n g 1 = Ntot i=1 n g 1 i,0 = Ntot i=1 V M g 1 ρ * ,g 1 i,0 = V M g 1 Ntot i=1 ρ * ,g 1 i,0 , m g 1 = n g 1 M g 1 , ( 7.14
)

n g 2 = Ntot i=1 n g 2 i,0 = Ntot i=1 V M g 2 ρ * ,g 2 i,0 = V M g 2 Ntot i=1 ρ * ,g 2 i,0 , m g 2 = n g 2 M g 2 , ( 7.15)
At this point, we can analyze how the global algorithm is modified. Schematically:

• r i,n -→ compute T ; • compute Y g k i,n+1
∀k by solving equation (2.43);

• compute Vi,n+1 ∀i by relation (7.12);

• compute ρ * ,g 1 i,n+1 ∀i, ρ * ,g 2 i,n+1 ∀i, and ρ i ∀i by relations (7.13;

• set r i,n+1 =

P n+1 ρ i,n+1 T i,n+1 ∀i;
• compute the number of moles and mass in all cells at time n + 1 as in equations (7.14) and (7.15);

• compute Π;

• compute u.

Conservation law

We want the quantity ρuY g k to be conserved at the junction. Moreover, we want the mass fraction at the effective outlets to be the same for all pipes and equal to a weighted average of the mass fractions in inlet. We suppose to have a junction J with n effective inlet pipes and m effective outlet pipes. The expression for the outlet mass fraction is the following:

Y out,g k = n i=1 µ i Y g k , ( 7.16)
with 0 ≤ µ i ≤ 1 ∀i and n i=1 µ i = 1. Their expression is:

µ i = ρ i u i m j=1 ρ j u j = ρ i u i n j=1 ρ j u j , ( 7.17)
where we have used the conservation of the quantity ρu at the junction, saying that the sum of the inlet quantities is equal to the sum of the outlet quantities, we notice that the µ i represent the fractions of total inlet ρu.

Extension: general physical parameters

We suppose to have a network composed of N p pipes and N j junctions. Until now, we have taken pipes with identical physical parameters. In general, we have to introduce new vectors of length N p so that each pipe can have its proper parameters. Each pipe has a length L p , a cross-section S p , and a perimeter of the cross-section P p . As a consequence the hydraulic diameter D p h and the volume of each pipes are given by:

D p h = 4 S p P p , V p = S p L p .
Each junction is supposed to have a proper volume V j . The global volume is:

V = N p p=1 V p + N j j=1 V j .
We recall that in our simulation, the junctions have 0 dimensions, so the volume V j will be equally divided into the d pipes linked to the junction j, where d is the degree of the junction.

Part III

Results

In the preceding parts, we provided a comprehensive overview of our approach to modeling closed pipeline configurations and junctions, covering various aspects, including physical principles, mathematical formulations, and numerical techniques. We now illustrate the practical implementation of our algorithms through a series of numerical simulations. The implementation of our algorithms involved the use of two programming languages, namely Python and C++. While we abstain from examining intricate details regarding the code itself, we provide an outline of the underlying structure of the objects created in C++, which were designed to capture the essential features of the fluid flow. To begin, we focus on the numerical

simulation of an open bifurcation to validate the effectiveness of our algorithm in handling intersections involving more than two pipes. With careful consideration given to both isothermal and temperature-varying gas flows, we examine the conservation laws at the junction and establish the first-order convergence of the algorithm with respect to spatial discretization.

Moving forward, we present our solver specifically tailored for closed pipeline configurations.

To validate its accuracy and reliability, we compare its results against the reference analytical solutions we constructed, emphasizing two pipeline arrangements: the thermosyphon and the one-peg ladder. In the case of the thermosyphon, we also validate the asymptotic limit for the thermodynamic pressure. Moreover, we analyze the numerical outcomes by varying the physical parameters, providing a comprehensive understanding of their impact on the flow dynamics. We also derive dimensionless numbers that are associated with the flow characteristics. The resulting Reynolds number corroborates our assumption of laminar flow, while the resulting Mach number substantiates the validity of the low Mach hypothesis. Furthermore, the obtained Froude number aligns with our expectations, demonstrating a proportional relationship with the squared Mach number. In the case of the three-rung ladder, we verify the transmission conditions at the junctions, thereby ensuring the accuracy of our solver.

To enhance the clarity of our findings, we introduce a two-dimensional Cartesian coordinate system to visually represent the temperature and velocity profiles. Furthermore, we conduct a detailed investigation into the influence of the central peg's position on the overall flow behavior. In both cases, we confirm the first-order convergence of our algorithm through careful evaluation of its spatial discretization. Finally, we expand our investigation to cover more complex pipeline networks, allowing us to explore a broader range of scenarios. While we neither undertake direct comparisons with reference solutions nor analyze the convergence properties, we present the numerical results in temperature and velocity profiles within a two-dimensional Cartesian coordinate system. Nonetheless, we assess the coherence of our results with the fundamental laws governing the junctions.

Chapter 8

Numerical simulation of an open bifurcated domain

Here, we show the numerical results obtained for an open bifurcation. They prove the validity of the numerical discretization of the transmission conditions at a junction. Figure 8.1 shows the configuration we consider.

The isothermal flow simulation

In the following, we show the results obtained by implementing an isothermal flow through an open bifurcation composed of three pipes. We take N pipe = 10 and consider seven possible scenarios. The first pipe is defined on the left half of the domain, while the other two are defined on the other half. Table 8.1 resumes each pipe temperatures, inclinations, and inlet/outlet pressures in every scenario.

θ 1 0 0 0 0 0 0 0 θ 2 π 4 -π 4 π 4 π 4 π 4 π 4 π 4 θ 3 π 4 π 4 -2 3 π -π 4 -π 4 -π 4 -π 4 Π 1 in (Pa) 1 1 1 10 1 1 2 Π 2 out (Pa) 0 0 0 0 0 0 1 Π 3 out (Pa) 0 0 0 0 0 0 0
At first, we take the temperature homogeneous over the entire domain and the same outlet

θ π 2 π 2 0 T in (K) 240 240 X u in (m/s) 0.1 -0.0125 X Π out (Pa) X X 0 T | t=0 (K) 240 240 240 u| t=0 (m/s) 0.1 0.1 0.1 Table 8.

Two outflow pipes

In this case, we will assume the three pipes adiabatic and horizontal for simplicity. We take pipes with the same length L = 1m, the same number of space nodes N pipe = 298, and CF L = 0.9. Table 8.4 shows the inlets, the outlets, and the initial temperature and velocity values for each pipe.

T in (K) X 240 X u in (m/s) X -0.1 X Π out (Pa) 0 X 3 T | t=0 (K) 240 240 240 u| t=0 (m/s) -0.1 -0.1 0
It is possible to verify the transmission conditions at the junction. Table 8.5 shows the values of velocities and dynamic pressures at the junction.

Table 8.5: The transmission laws at the junction for the two outflows case: the Π J (Pa) 0.14 0.14 0.14

The mass and energy conservation conditions at the junction are fulfilled. The continuity of the dynamic pressure is also respected.

Figure 8.12 shows the temperature, velocity, and dynamic pressure profiles compared with the reference solution we constructed. The curves are superposed. Notice that in this case, the temperature and the velocity are constant on the entire domain thanks to the assumption of adiabatic pipes. Moreover, we obtain a configuration where all the flow passes from the second pipe to the first without entering the third pipe. This situation is not uncommon in more complex configurations. Indeed, sometimes, the geometry of the network makes the flow not interested in separating itself in more than one pipe.

Figure 8.12: The open bifurcation simulation with two resulting outflow pipes: the temperature, velocity and dynamic pressure for the three pipes with N pipe = 298 and CF L = 0.9 in the adiabatic case with no gravity.

Summary

In this chapter, we tested the numerical simulation of an open bifurcation. The aim has been to validate the algorithm for the numerical simulation of the junction. At first, we studied the case of isothermal flow and studied the dependence of dynamical pressure and velocity on the imposed boundary conditions and the pipe inclination. Then, we considered the general flow and proved that our algorithm preserves the conservation of mass and energy laws. The results coincide with the exact solution, and the error converges of order 1 in space as expected.

Chapter 9

Numerical simulation of closed pipeline networks

This chapter will introduce the main features of the code we conceived to simulate the flow through closed pipeline arrangements. We will focus our attention on the data structures. We will then proceed with testing this new code on complex networks. We start with studying the thermosyphon, in which we first overcame the difficulties of periodic boundary conditions and Dirac deltas at the corners. Then, we give a numerical simulation of a three-rung ladder, which adds to the difficulty of transmission conditions at the junction. We will give the results of the simulation of this configuration for different positions of the central bar. Then, we will study generic ladders with an arbitrary number of pegs by giving a numerical solution without a comparison with an analytical solution. The last step is to study a general network consisting of the juxtaposition of ladders that share vertical pegs. The number of corners will always remain set to 4, while the number of incident pipes at the same point will change according to the junction type. We will distinguish between boundary junctions with 3 incident pipes and interior junctions with 4. In the following, we will study the juxtaposition of two one-peg ladders to study how to deal with interior junctions. The extension to a general network is left as an exercise to the reader.

The new data structures

We have created the class Network, and every configuration we want to study is a child of it:

the idea is to have the possibility to construct your network. To do this, we introduced the Pipe and Junction classes so that every network is identified by a list of Pipe objects and a list of Junction objects. Every pipe has proper physical parameters such as the reference temperature, the length, or the inclination. Additionally, we fixed the sense of circulation and the axes by associating a left and a right junction to each pipe. Every pipe is divided into cells, keeps a trace of the local numbering of nodes and cells, and provides a function that converts local indexing to global indexing. This feature is crucial since we defined our variables on the global indexing, temperature and velocity on cells, and dynamic pressure on nodes. Every junction has a set of inlet pipes and a set of outlet pipes, so it is easy to understand how the exchange of information at each junction works. These structures allow us to implement the algorithms for our variables in a more general way.

The numerical simulation of the thermosyphon

Let us briefly show the methodology used to analyze the numerical results obtained by implementing our algorithms on a standard Linux i7-9850H CPU. We start by showing the convergence results in both time and space. Then, we compare the numerically computed T, u, ρ, P and Π with the reference solution. We do that at the final time the numerical curves converge to a stationary solution. Finally, we analyze what happens by varying some physical parameters of the problem. We summarize in table (9.1) the physical parameter we used.

Table 9.1: The values of the physical parameters we consider for the numerical results. 9.2 shows the values of the dimensionless number characteristic of the problem. Notice that the value of Reynolds matches the assumption of laminar flow and that the value of the Mach number is small. Given that the relative temperature difference ε is 0.0345, the values of G 1 and G 2 tell us how far we are from the Boussinesq regime. This is confirmed by the product G 1 ε which is of order 10 2 , far from 1 and by the ratio diameter to length D/L, which is 0.03, far from G 2 . Notice that, thanks to the low Mach model, we can take a temperature difference as large as we want, and, thanks to the characteristics method, we can take a cfl bigger than 1. Figure 9.1 compares the computing times and the order of convergence of our two algorithms.

L (m) D (m) T c (K) T f (K) k ( kgm s 3 K ) µ ( kg ms ) C p ( m 2 s 2 K ) γ cfl 0.
It confirms that our algorithms are of the first order in space for temperature and velocity. for computing velocity and dynamic pressure (we report the results for one of them, and for the other, it is the same). Let us notice that the numerical solution is well-superposed to the reference one, the profile of temperature and velocity is the same up to a scale factor, and the global variation of speed is small, as expected. We also notice that the dynamic pressure in the adiabatic pipes is linear with a small slope, almost constant. This slope becomes more significant with smaller values of the radius.

Moreover, the dynamic pressure in the other pipes is linear, so the logarithmic contribution is negligible. Figure 9.6 shows the behavior of the thermodynamic pressure P as a function of time. In this case, we change some physical parameters. We take T c = 300.15K and T f = 290.15K so that ε is small enough. We take L = 8m to assure that the condition L > 2λ. We consider two different sets of initial values for thermodynamic pressure and temperature. In a first case P i = 202650P a, T i = 293.07K so that P ∞ > P i . In a second case P i = 205416P a, T i = 297.07K so that P ∞ < P i . We have chosen the initial values so that the ratio P i T i is the same. This choice allows us to have the same asymptotic stationary estimates. We see that for large enough values of t, they tend asymptotically at the stationary value we computed through the linearization.

The simulation of a symmetrical three-rung ladder

L 1 = L 2 = L 3 (m) 0.22 D (m) 0.03 T 3 c = T 4 c (K) 290.
15

T 1 f = T 6 f (K) 260.15K k ( kgm s 3 K ) 0.0224 µ ( kg ms ) 1.66 10 -5 C p ( m 2 s 2 K ) 1039 γ 1.4 cfl 1
We consider the case in which

L 1 = L 2 = L 3 = L, T 1 f = T 6 f = T f and T 3 c = T 4 c = T c .
We take a total number of nodes N T OT = 14000. We analyze the behavior of temperature, velocity, and dynamic pressure by using two systems of coordinates. At first, we consider curvilinear coordinates with origin in x 0 , the right junction of order three. The domain is traversed clockwise. Then, we introduce a two-dimensional Cartesian domain in which the values of our variable are expressed through colors on a xy grid representing the domain of interest. This second representation will be used for all the other configurations since the curvilinear coordinates are of interest only in the case we have an analytical solution. We introduce here a convention we will also use in the following. We refer to the junctions as J i , i = 0, ..., N J -1 where N J is the total number of junctions. We will indicate as J 0 the junction at the left bottom corner, and the others will be labeled clockwise. For each junction k, we will refer to the incident pipes at the junction as pipe j j = 1, ..., O k , where O k is the order of the junction J k . We will indicate as pipe 1 the bottom vertical pipe, and the others will be labeled clockwise. Figures 9.9, 9.10, and 9.11 show the numerical results compared to the analytical solutions we constructed. Figures 9.12, 9.13, and 9.14 show the same results on a two-dimensional grid. We notice that the numerical simulations and the analytical solutions match, validating our algorithm. The novelty with respect to the thermosyphon is that here, velocity and temperature are discontinuous a priori. The dynamic pressure is still continuous. Let us analyze the junctions J 1 and J 4 . The values of the velocities and the ratios between velocity and temperature at the junction are reported in table 9.4. They verify the conservation laws at the junction. The values of the ratios between velocity and temperature confirm that for the three-rung ladder, we have two independent Γ: Γ b = 4.12010 -4 m sK and Γ t = 4.0510 -4 m sK . Figures 9.15 and 9.16 show the numerical errors for both temperature and velocity. We notice that for sufficiently small ∆x, we obtain the expected order 1 of convergence in space.

The simulation of an asymmetrical three-rung ladder

In the previous section, we have seen that the constant velocity in the middle rung is small and negligible with respect to the velocities in the other pipes. In the case of a symmetric ladder, the symmetry of the domain makes the flow prefer to ignore the middle rung. Here, we analyze the flow behavior when the symmetry is broken. We expect that the velocity u 7 of the middle rung changes sign as a function of the ratio l := L 1 L 2 . We guess that:

u 7                < 0 if l > 1 = 0 if l = 1 > 0 if l < 1 . Figure 9
.17 confirms our assumption. It shows the behavior of the velocity u 7 as a function of l. Notice that its absolute value reaches the greatest value when the middle rung is near the top or bottom rung. Notice also that the velocity is close to 0 m s when l ≈ 1.

Figure 9.17: The constant velocity in the middle rung as a function of the ratio l := L 1 L 2 for a laminar flow at small velocities through an asymmetrical three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L3 = 1m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. We notice that near l = 1 we have u 7 = 0 m s .

Let us use the same parameters we took for the symmetrical three-rung ladder, excluding the lengths of the pipes. We fix L 3 = 1m and consider two case: L 1 = 1m and L 2 = 9m(l < 1)

and L 1 = 9m and L 2 = 1m(l > 1). Figures 9.18 Let us analyze the junctions J 1 and J 4 in both cases. The values of the velocities and the ratios between velocity and temperature at the junction are reported in tables 9.5 and 9.6.

They verify the conservation laws at the junction.

Table 9.5: The transmission laws at the junction for the asymmetrical three-rung ladder with L 3 = 1m,L 1 = 1m,L 2 = 9m (l < 1): the values of velocities and ratios between velocity and temperature at the junctions J 1 and J 4 .

pipe Notice that in the case l < 1, the junction J 1 has two inlets that mix, generating the outlet, while the junction J 4 has two outlets, making the temperature continuous. In the case l > 1, the contrary happens. Notice also that in both cases, the inlet pipes always have the same ∆x; in the following, we will analyze cases in which ∆x appears in the conservation laws.

More complex networks

This section shows how the algorithm we conceived and the code we developed can be applied to more complex configurations and whatever network. At first, we study the generalization of the ladder by taking an arbitrary number of rungs. Then, we consider a juxtaposition of two three-rung ladders sharing vertical cold pegs and introduce internal junctions of order greater than 3. We also consider a variation of this configuration in which we present the insertion of an inclined pipe. At the end, we show an example of a general network. In this section, we take N pipe = 100. Notice that the computational time is proportional to the number of pipes.

The n-rung ladder

In this case, the reference temperatures we consider are T c = 300.15K and T f = 250.15K. We

show the two-dimensional Cartesian results for a 6-rung ladder with horizontal pipes of length 1m and vertical pipes of length 1m or 4m. Figure 9.22 shows the convention of directions for positive velocities. Table 9.7 reports the values of the velocities and ratios between velocity and temperature at the junctions. Notice that all the conservation laws are fulfilled, even in the internal junction with four incident pipes. Moreover, at this junction, we have two inlets, and consequently, the ∆x of the pipes must be considered to verify the conservation laws. Now, we complexify the problem by inserting an inclined adiabatic pipe between the junctions J 3 and J 5 . Its inclination angle is π 4 and its length is 4 √ 2. Its velocity is positive from J 3 to J 5 . Notice that all the conservation laws are fulfilled at junctions J 3 and J 5 . We also notice that in the inclined adiabatic pipe, the temperature is no longer constant but linear. This behavior is explained by the fact that the gravity term in the momentum equation is now different from zero, and the velocity is no longer constant but linear.

A general network

Here, we report the results obtained for a more complex network we can see as the superposition of three four-rung ladders. The vertical pipes alternate between heated and cooled, and the horizontal pipes are adiabatic. Figures 9.29 and 9.30 show the computed numerical velocity and temperature on a two-dimensional Cartesian grid. We do not report the values of velocities and ratios between velocity and temperature, but we still recognize some flow features we observed for the other configurations. Junctions J 2 and J 8 have continuous temperatures as observed in the asymmetric three-rung ladders. Between the internal junctions of order four, the left bottom and the top right have continuous temperatures according to the juxtaposition of two three-rung ladders.

Summary

In this chapter, we showed the application of the algorithms conceived for temperature-driven flows through closed domains with periodic boundary conditions. At first, we studied the thermosyphon configuration. The results coincide with the exact solution, and the error converges of order 1 in space as expected. Then, we added a pipe to the thermosyphon to study the three-rung ladder. This configuration allowed us to understand how junctions interact within closed domains. We verified the conservation laws at the junction and made a comparison with the analytical solution. Ultimately, we tested and verified our code on more complex configurations, including junctions of the fourth order and inclined pipes.

Chapter 10

Conclusion

This work aimed to construct a model for low mach gas flow in pipeline networks and a numerical program implementing it. We adopted averaged one-dimensional equations for mono-phasic flows of ideal gases.

The model

The model has proven capable of characterizing the flow in any pipeline configuration and with greater accuracy due to the non-zero velocity divergence; in fact, our model is a generalization of the Boussinesq approximation, allowing for a broader spectrum of temperature gradients and pressure variations. In addition, the divergence of velocity and the variations of pressure depend on the thermodynamics of the problem. Our model has shown great scalability, and it can be applied to an arbitrary configuration of pipes. We proved that our model tends to Boussinesq as the temperature variation tends to 0 using both the analysis of the behavior of λ L as a function of G 1 and the linearization for λ. Remember that λ is the entry length, and G 1 ∝ P rGa N u D . We obtained a quasi-incompressible model in which we split the pressure into two terms: a thermodynamic pressure P and a dynamic pressure Π.

Starting from the model, we constructed the reference solutions for closed configurations used to validate our program. The periodic boundary conditions make the inlet values for our variables unknown and the solutions quasi-analytical.

The numerical algorithm

The numerical algorithm we constructed combines different discretization techniques and introduces some novelties: u(x + h) ≈ u(x) + h∂ x u. We have u = u(r) and we can reduce equation (A.1) to ∂ r (rv) = 0. This equation means that the radial velocity v is constant, so it is null since it must fulfill the boundary conditions mentioned. A consequence of this is that equation (A.3) reduces to p = p(x) and equation (A.2) becomes:

1 r ∂ r ∂u ∂r ∂r = 1 µ ∂p ∂x = -ξ.
Indeed, since we have that derivatives with respect to different variables are equal, the only possibility is that they must be equal to a constant -ξ. By successive integrations, we obtain that the profile is of the type:

u(r) = -ξ r 2 4 + ξ 0 ln r + ξ 1 .
Boundary conditions allow us to compute the integration constants. We want the velocity finite at r = 0, so ξ 0 must be null. If we impose that the velocity is zero at r = ±R, we obtain that:

u(r) = ξ 4 R 2 1 - r R 2 .
We want to get rid of ξ in the expression of the velocity. We find a relationship between ξ and the averaged velocity ū that is also the maximum velocity U max for symmetry. The average velocity reads:

ū = 1 R R 0 udr = ξR 4 R 0 1 - r R 2 dr = ξR 2 4 1 0 (1 -r2 )dr = ξR 2 6 .
So, the velocity can be expressed as:

u(r) = 3 2 U max 1 - r R 2 . (A.4)
The corresponding τ at the wall is:

τ w = µ ∂u ∂r r=±R = ∓ 6µU max D .
Remark 14 Let us consider a two-dimensional plane frame in which we have an y-axis at the place of the r-axis, with 0 ≤ y ≤ h 0 and null velocity at y = 0 and y = h 0 . The velocity is ⃗ u = u⃗ e x + v⃗ e y and with the same procedure we obtain:

u(y) = 6U max 1 - y h 0 y h 0 . τ w = µ ∂u ∂y y=0(h 0 ) = +(-) 6µU max h 0 .
We obtain an analogous description of the flow.

A.2 The Graetz solution

We introduce the Graetz problem to find a pseudo-analytical expression for the temperature.

The study of this problem is crucial for understanding thermodynamic numbers, coefficients, and quantities like the Nusselt number, the heat coefficient, and the parietal heat flow.

Moreover, it will be useful since it will give an analytical solution with whom to compare the thermosyphon resolution in FreeFem++.

Let us consider a two-dimensional pipe and fix a coordinate system with the x-axis coinciding with the pipe axis. This axis origin is at the pipe entrance, reaching the value x = L at the exit. The y-axis is taken centered at the bottom of the pipe, reaching the value y = h 0 at the top pipe wall .

Let us suppose that for negative x, the temperature at the wall is constant and equal to T 0 and that at x = 0, there is an abrupt temperature change at the wall to the temperature T 1 .

Let us find a solution for the temperature.

The equation for the temperature reads:

ρC p u P ois. ∂T ∂x = k ∂ 2 T ∂x 2 + ∂ 2 T ∂y 2 .
Let us give a dimensionless form to the equations by imposing y = h 0 ȳ, x = Lx, T =

T 1 + (T 0 -T 1 )θ: 6ρC p U max L ȳ(1 -ȳ) ∂θ ∂ x (T 0 -T 1 ) = k L 2 (T 0 -T 1 ) ∂ 2 θ ∂ x2 + L 2 h 2 0 ∂ 2 θ ∂ ȳ2 .
It simplifies in:

ȳ(1 -ȳ) ∂θ ∂ x = 1 P e ∂ 2 θ ∂ x2 + L 2 h 2 0 ∂ 2 θ ∂ ȳ2 .
Where we have introduced the Peclet number given by:

1 P e := k 6ρC p U max L .
Remark 15 It is easy to prove that P e = P rRe.

Very far from the abrupt change of wall temperature, we can even more simplify the equations.

Indeed we can suppose x = Xε with ε << 1 so that we can rewrite our equation as:

ȳ(1 -ȳ)ε ∂θ ∂X = 1 P e ∂ 2 θ ∂X 2 + ε L 2 h 2 0 ∂ 2 θ ∂y 2 .
At the first order, we obtain a more simplified equation in which we remove the bars for simplicity:

y(1 -y) ∂θ ∂X = 1 P e L 2 h 2 0 ∂ 2 θ ∂y 2 , (A.5) θ(X = 0, 0 ≤ y ≤ 1) = 1,
θ(X > 0, y = 0) = θ(X > 0, y = 1) = 0.

Equation (A.5) can be solved by using the method of superposition by setting:

θ = i a i ϕ i (y)X i (x) (A.6)
By inserting (A.6) inside equation (A.5) we have ∀i:

y(1 -y)ϕ i ∂X i ∂x = 1 P e L 2 h 2 0 X i ∂ 2 ϕ i ∂y 2 .
Then, by separating the variables:

P e h 2 0 L 2 1 X i ∂X i ∂x = 1 y(1 -y)ϕ i ∂ 2 ϕ i ∂y 2 = -λ 2 i .
The two terms are one function of only X and the other only function of y so they are both constant and equal to -λ 2 i where λ i is real and positive. We can easily deduce that:

X i = e -1 P e L 2 h 2 0 λ 2 i x
.

For finding ϕ i , we have to deal with the equation:

∂ 2 ϕ i ∂y 2 = -λ 2 i y(1 -y)ϕ i .

Remark 16

It is also possible to use a two-dimensional axisymmetric frame to study the behavior of the temperature. In this case, we maintain the x-axis and introduce the radial axis with 0 ≤ r ≤ R. We suppose r = Rr. The dimensionless equation for the temperature becomes:

1 -r2 ∂θ ∂ x = 1 P e   ∂ 2 θ ∂ x2 + L 2 R 2 1 r ∂ r ∂θ ∂ r ∂ r   .
Then the equation far from the abrupt change of wall temperature is:

1 -r2 ∂θ ∂X = 1 P e L 2 R 2 1 r ∂ r ∂θ ∂ r ∂ r . θ(X = 0, 0 ≤ r ≤ 1) = 1, θ(X > 0, r = 0) = θ(X > 0, r = 1) = 0.
By using the same method of superposition, we find that:

X i = e -1 P e L 2 R 2 λ 2 i x .
And the equation for the ϕ i is:

∂ 2 ϕ i ∂ r2 + 1 r ∂ϕ i ∂ r = -λ 2 i 1 -r2 ϕ i .
In the following, we will use the two-dimensional plane description.

A.2.1 The computing of ϕ i

For finding the ϕ i we have used Mathematica with the conditions ϕ i (0) = 0 and ϕ i ( 1 2 ) = 1. We find a solution that depends on special functions called Parabolic Cylinders. The problem is that ϕ i = ϕ i (y, λ i ) so, in order to find the λ i we have evaluated ϕ i in y = 1, knowing that ϕ i (1, λ i ) = 0 by boundary condition. This allows us to see the λ i by seeing the zeros of ϕ i (1, λ i ) as in the following figure.

How to compute the a i

The coefficients a i can be computed by noticing the following.

Let us multiply the equation for ϕ i by ϕ j :

∂ 2 ϕ i ∂y 2 ϕ j = -λ 2 i y(1 -y)ϕ i ϕ j . (A.7)
Let us multiply the equation for ϕ j by ϕ i :

∂ 2 ϕ j ∂y 2 ϕ i = -λ 2 j y(1 -y)ϕ j ϕ i . (A.8)
Let us subtract them:

ϕ j ∂ 2 ϕ i ∂y 2 -ϕ i ∂ 2 ϕ j ∂y 2 = -y(1 -y)(λ 2 i -λ 2 j )ϕ i ϕ j . (A.9)
By integration by parts:

-

1 0 ∂ ∂y ϕ j ∂ϕ i ∂y -ϕ i ∂ϕ j ∂y dy = (λ 2 i -λ 2 j ) 1 0 y(1 -y)ϕ i ϕ j dy. (A.10)
Since ϕ i = 0 at the border, the left-hand side term is null, and we obtain that: Remark 17 The computation of the λ i shows that the difference between two consecutive λ i tends to be constant and equal to 6.53196.

Let us now report the curves for ϕ 1 , ϕ 2 , ϕ 3 and ϕ 4 and become aware that the solution is very close to the function sin ((2i -1)πy). Notice that the profile of the temperature is comparable with the Poiseuille profile.

Then let us see how many modes are necessary for giving a good approximation: Let us notice that starting from x = 0.05, one only mode is a good approximation for the temperature. Let us verify that sin(πy)e -λ 2 1 x is a good approximation of the first mode temperature:

A.2.4 The Nusselt number

The Nusselt number is defined as the dimensionless temperature gradient at the surface, and it measures the convective heat transfer occurring at the surface.

In our case, a first approximation of Nusselt can be given as follows:

N u := ∂T ∂y 0 = i a i ϕ ′ i (0)X i (x). (A.16)
In reality, Nusselt must be pondered by the value of the mean temperature T m that can be defined as: And so:

T m = 1 0 u(y)θ(x,
T m = -2 ∂θ ∂y 0 dx. (A.20)
conditions in terms of primitive variables are the following:

      ρ L P L u L       =       1.0 1.0 0.0       ,       ρ R P R u R       =       0.125 0.1 0.0       . (B.1)

B.1 Equations

In this part, we will give an expression of the Euler equations both in conservative and primitive form since we will prefer to use the first form for the numerical simulation and the second one for the exact solution. Then, we will introduce eigenvalues and eigenvectors of the problem since the originated shocks are linked to them.

B.1.1 The two different formulations

The Euler equations in the conservative form are

U t + F (U ) x = 0, (B .2)
where:

U =       u 1 u 2 u 3       =       ρ ρu 1 2 ρu 2 + P γ-1       , F =       ρu ρu 2 + P u 1 2 ρu 2 + 1 γ-1 + 1 P      
.

By manipulation of these equations, we obtain an equivalent system with the same structure for the primitive variables

W t + AW x = 0,
where:

W =       ρ u P       , A =       u ρ 0 0 u 1 ρ 0 γP u       .

B.1.2 Eigenvalues and eigenvectors

Studying the eigenvalues of the matrix A of the previous subsection allows us to understand the structure of the exact solution. We introduce the speed of sound a defined as:

a := γP ρ .
The determinant of the matrix A -λI is:

det             u ρ 0 0 u 1 ρ 0 γP u             = (u -λ) (u -λ) 2 -a 2 .
By imposing the determinant equal to 0, we find the following equations:

       u -λ = 0, λ 2 -2λu + u 2 -a 2 = 0.
The resulting eigenvalues and corresponding eigenvectors are:

⃗ λ =       u -a u u + a       ,       ρ ρ ρ -a a 0 ρa 2 ρa 2 0       .

B.2 Exact solution

In the previous section, we computed the problem eigenvalues, providing information about the solution. In particular, it has a three waves structure like in figure B.2, and by making more computations [START_REF] Toro | Riemann Solvers and Numerical Methods for Fluid Dynamics[END_REF], it is possible to find that the left wave is a rarefaction, the central wave is a contact one, and the right wave is a shock. The left and right states W L and W R are known, so we have to compute:

• the states W * L and W * R in the region between the tail of the rarefaction and the shock, the so-called star region;

• the states inside the rarefaction, the so-called fan;

• the speeds of the waves.

B.2.1 The star region

The presence of a contact wave in the star region imposes the continuity of the values of velocity and pressure from the left and the right, namely:

u * L = u * R = u * , P * L = P * R = P * .
These conditions allow us to have only four unknowns to compute: P * , u * , ρ * L , and ρ * R . From the properties of the rarefaction and the shock, we can compute two special functions:

f L (p, W L ) = 2a L γ -1 p P L γ-1 2γ -1 , f R (p, W R ) = (p -P R ) A R p + B R .
Where:

A R = 2 (γ + 1)ρ R , B R = γ -1 γ + 1 P R .
It can be proven that:

• P * is the zero of f L + f R and can be found by an iterative algorithm;

• u * = 1 2 (f R (P * ) -f L (P * )).
Concerning the computation of the densities, exploiting the properties of the left and right waves suffices. We know that in the case of rarefaction, pressure and density are linked by: P = Cρ γ , Where C is a constant that we compute at the head of the rarefaction by using the initial left states, namely:

C = P L ρ γ L
. This property of rarefactions allows us to compute the density ρ * L at the tail of the rarefaction as:

ρ * L = ρ L P * P L 1 γ .
At the shock, we can use information about the initial right states for computing ρ * R :

ρ * R = ρ R   P * P R + γ-1 γ+1 γ-1 γ+1 P * P R + 1   .

B.2.2 The numerical computation of P *

To compute iteratively P * , we use the Newton method. We remember that the initial guess for this method is crucial, and for this reason, we have chosen the following initial guess:

P T R =     a L + a R a L P γ-1 2γ L + a R P γ-1 2γ R     2γ γ-1 .
We also report the derivatives of f L and f R , useful in the application of the iterative method:

f ′ L = a L γP L p P L -γ+1 2γ , f ′ R = 1 2 A R p + B R 3 2 p + P R + 2B R A R .

B.2.3 The fan

After a bit of computation, it is possible to find that the states inside the fan are as follows:

ρ f an = ρ L 2 γ + 1 - γ -1 (γ + 1)a L x t 2 γ-1 , u f an = 2 γ + 1 a L + x t , p f an = P L 2 γ + 1 - γ -1 (γ + 1)a L x t 2γ γ-1 .

B.2.4 The speeds

From left to right, we have:

1. the velocity of the head of the rarefaction, determined by the initial left data:

S HL = u L -a L ;
2. the velocity of the tail of the rarefaction, determined by the star region data:

S T L = u * -a * ;
3. the velocity of the contact wave, that is simply the velocity in the star region u * ; 4. the velocity of the shock given by: S R = a R γ + 1 2γ • as an initial condition:

P * P R + γ -1 2γ .

B.3 The hllc simulation

⃗ U (x, 0) =        ⃗ U L if x < 0 ⃗ U R if x > 0 ;
• as boundary conditions:

⃗ U (x min , t) = ⃗ U L , ⃗ U (x max , t) = ⃗ U R .
Let us divide the x-domain into volumes of dimension ∆x so that each node x i is at the center of a volume and the extrema of each volume are the "phantom" nodes x i+ 1 2 and x i-1 2 .

The idea under the introduction of these "phantom" nodes is that of introducing some fluxes

⃗ F i+ 1 2 and ⃗ F i-1 2 to discretize equation (B.
2) in the following way:

⃗ U n+1 i = ⃗ U n i - ∆t ∆x ⃗ F i+ 1 2 -⃗ F i-1 2 .
We must find an algorithm to compute the flux in the "phantom" nodes.

Here, we will take into consideration the idea of Godunov: at time n for each "phantom" node, we know the values of ⃗ U n in the real nodes immediately at the left and the right of this "phantom" node. These two values are generally different, so we can imagine solving a Riemann problem centered in the "phantom" node with these values as initial conditions. The flux at the "phantom" node will be the flux evaluated in the solution of this Riemann problem in 0, namely:

⃗ F i± 1 2 = ⃗ F ( ⃗ U i± 1 2 (0)).
The hllc algorithm allows one to approximate this flux without computing the complete solution of each of these Riemann problems. It consists in:

1. to give an estimate of P * :

P * ≈ max{0, 1 2 (P L + P R ) -(u R -u L )( 1 2 (ρ R + ρ L ))( 1 2 (a R + a L )) };
2. to give an estimate of speeds:

       S L = u L -a L q L S R = u R + a R q R , q k =        1 if P * ≤ P k 1 + γ+1 2γ P * P k -1 otherwise , S * = P R -P L + ρ L u L (S L -u L ) -ρ R u R (S R -u R ) ρ L (S L -u L ) -ρ R (S R -u R ) ;
3. to give an estimate of the flux in the star region:

⃗ F * k = S * (S k ⃗ U k -⃗ F k ) + S k P LR ⃗ D * S k -s * ,
Where:

P LR = 1 2 (P R + P L + ρ L (S L -u L )(S * -u L ) + ρ R (S R -u R )(S * -u R )), ⃗ D * =       0 1 S *       ;
4. to give an expression of the flux at the "phantom " nodes as follows:

⃗ F hllc =                        ⃗ F L if 0 ≤ S L ⃗ F * L if S L ≤ 0 ≤ S * ⃗ F * R if S * ≤ 0 ≤ S R ⃗ F R if 0 ≥ S R .

B.4 Numerical results

The following shows the curves for the exact solution and the hllc solver to B.6 show that the hllc algorithm is highly dependent on the value of ∆t; the smaller the time step, the more considerable the precision of the method as if the numerical solutions tend to be the exact ones as N t → ∞. We notice that the numerical solutions give an accurate approximation of the discontinuities of the analytical ones.

Remark 18 Moreover, notice that the numerical solution will never coincide with the exact ones since the exact solution is discontinuous while the numerical one is continuous. Let us remember that the characteristic law for a resistor of resistance R in which a current I flows between the potentials V a and V b is:

V b -V a := RI. (C.1)
Moreover, the Kirchhoff law at a node where n currents I i converge gives:

i+n i=0 I i . (C.2)
If we suppose to know the resistances and the inlet potential V 0 , we can find a solution to the circuit by applying the previous laws.

The system to be solved is given by:

I 1 = I 2 + I 3 , (C.3) V 0 -V a R 1 := I 1 , (C.4) V a -V b R 2 := I 1 , (C.5) V b -V c R 3 := I 2 , (C.6) V b -V d R 4 := I 3 , (C.7) V c R 5 := I 2 , (C.8) V d R 6 := I 3 . (C.9)
We have a system of seven equations with seven unknowns, so we can solve it. Let us first eliminate the currents for studying the behavior of the potentials. In order to do this let us Moreover let us inject equations (C.4),(C.8) and (C.9) in equation (C.3). We obtain:

V 0 -V a R 1 = V a -V b R 2 , (C.10) V b -V c R 3 = V c R 5 , (C.11) V b -V d R 4 = V d R 6 , (C.12) V 0 -V a R 1 = V c R 5 + V d R 6 . (C.13)
By simple manipulations, we obtain:

-1 + R 1 R 2 V a + R 1 R 2 V b = -V 0 , (C.14) - 1 R 3 V b + 1 R 3 + 1 R 5 V c = 0, (C.15) - 1 R 4 V b + 1 R 4 + 1 R 6 V d = 0, (C.16) V a + R 1 R 5 V c + R 1 R 6 V d = V 0 .
(C.17)

The linear system AV = b is given by:

A =          R 1 R 2 -1 + R 1 R 2 0 0 -1 R 3 0 1 R 3 + 1 R 5 0 -1 R 4 0 0 1 R 4 + 1 R 6 0 1 R 1 R 5 R 1 R 6          ; V =          V b V a V c V d          ; b =          -V 0 0 0 V 0          . (C.18)
Remark 19 We notice that the first column and the last row represent the intersection, while the diagonal submatrix represents the characteristic laws of the components far from the intersection.

For the currents we firstly express the potentials V a , V c and V d in function of the currents in equations (C.4), (C.8) and (C.9):

V a = V 0 -R 1 I 1 , V c = R 5 I 2 , V d = R 6 I 3 .
Then we inject them in equations (C.5), (C.6) and (C.7) and we find three expressions of V b in function of the currents:

V b = V a -R 2 I 1 = V 0 -(R 1 + R 2 )I 1 , (C.19) V b = R 3 I 2 + V c = (R 3 + R 5 )I 2 , (C.20) V b = R 4 I 3 + V d = (R 4 + R 6 )I 3 . (C.21)
We compare these three equations by pairs and coupling with equation (C.3) we obtain:

I 1 -I 2 -I 3 = 0, (C.22) (R 1 + R 2 )I 1 + (R 3 + R 5 )I 2 = V 0 , (C.23) (R 1 + R 2 )I 1 + (R 4 + R 6 )I 3 = V 0 . (C.24)
The linear system reads:

A ′ =       1 -1 -1 (R 1 + R 2 ) (R 3 + R 5 ) 0 (R 1 + R 2 ) 0 (R 4 + R 6 )       ; I =       I 1 I 2 I 3       ; b ′ =       0 V 0 V 0       ; A ′ I = b ′ . (C.25) Let us define R2 := (R1 + R2 + R3 + R5)(R1 + R2 + R4 + R6) -(R 1 + R 2 ) 2 .
By inverting the matrices, we find:

V a = 1 -R 1 R 3 + R 4 + R 5 + R 6 R2 V 0 , (C.26) V b = (R 3 + R 5 )(R 4 + R 6 ) R2 V 0 , (C.27) V c = R 5 (R 4 + R 6 ) R2 V 0 , (C.28) V d = (R 3 + R 5 )R 6 R2 V 0 , (C.29) I 1 = R 3 + R 4 + R 5 + R 6 R2 V 0 , (C.30) I 2 = R 4 + R 6 R2 V 0 , (C.31) I 3 = R 3 + R 5 R2 V 0 . (C.32)
For example, in the case in which all the resistances are equal to 1Ω and the inlet potential V 0 is 1V , we obtain:

V = 1 3 , 2 3 , 1 6 , 1 6 V, Ī = 1 3 , 1 6 , 1 6 A. (C.33)
Let us end the paragraph with the analysis of a more complex circuit since the idea is to apply electrical parallelism by taking a different resistance for each cell. The circuit with many more resistances in series is of the type: If we pursue the same strategy as before, we can find the matrix for the potentials. Let us define the matrices A j with j = 1, 2, 3 where A j is the matrix for the potentials on the branch j:

A 1 =       1 R 1 + 1 R 2 -1 R 2 0 0 -1 R 2 1 R 2 + 1 R 3 -1 R 3 0 0 -1 R 3 1 R 3 + 1 R 4 -1 R 4       , (C.34) A 2 =       -1 R 5 1 R 6 + 1 R 5 -1 R 6 0 0 -1 R 6 1 R 7 + 1 R 6 -1 R 7 0 0 -1 R 7 1 R 11 + 1 R 7       , (C.35) A 3 =       -1 R 8 1 R 8 + 1 R 9 -1 R 9 0 0 -1 R 9 1 R 10 + 1 R 9 -1 R 10 0 0 -1 R 10 1 R 12 + 1 R 10       . (C.36)
If we decide to write the conservation of the currents as:

V 0 -V 1 R 1 = V 7 R 11 + V 10 R 12 , (C.37)
We have the following expression for A:

A =                               A 1 11 A 1 12 0 0 0 0 0 0 0 0 A 1 21 A 1 22 A 1 23 0 0 0 0 0 0 0 0 A 1 32 A 1 33 A 1 34 0 0 0 0 0 0 0 0 0 A 2 11 A 2 12 A 2 13 0 0 0 0 0 0 0 0 A 2 22 A 2 23 A 2 24 0 0 0 0 0 0 0 0 A 2 33 A 2 34 0 0 0 0 0 0 A 3 11 0 0 0 A 3 12 A 3 13 0 0 0 0 0 0 0 0 A 3 22 A 3 23 A 3 24 0 0 0 0 0 0 0 0 A 3 33 A 3 34 -1 R 1 0 0 0 0 0 -1 R 11 0 0 -1 R 12                               . (C.38)
In the case in which all the resistance are equal to 1Ω, we will have:

A =                               2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 0 0 0 0 0 0 1 0 0 0 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 1 0 0 0 0 0 -1 0 0 -1                               . (C.39)

Remark 20

The previous matrix has no remarkable properties that can help in solving the linear system.

In the following, we will introduce two different choices for the equation at the intersection that will give the matrix A a more suitable form. For example if we substitute equation (C.37) with the following:

V 3 -V 4 R 4 = V 5 -V 4 R 5 + V 10 R 12 , (C.40)
We obtain:

A =                               2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 11 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 0 0 0 0 0 0 -1 0 0 0 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2                               . (C.41)
Remark 21 Let us remark that in this, A is not symmetric, but it is at least almost tridiagonal (see the red coefficients), with the elements on the diagonals almost all equal in each diagonal (see the blue coefficients).

The question now is if there is a possible substitution in the conservation of the currents for which we gain the symmetry for A. The answer is yes if we use the following condition:

V 3 -V 4 R 4 = V 4 -V 5 R 5 + V 4 -V 8 R 8 , (C.42)
We obtain: This means that the matrix is also positive definite.

A =                               2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 3 -1 0 0 -1 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2 0 0 0 0 0 0 -1 0 0 0 2 -1 0 0 0 0 0 0 0 0 -1 2 -1 0 0 0 0 0 0 0 0 -1 2                               . ( C

C.2 A brief overview on the iterative methods

In the case we want to solve a linear system, several iterative methods exist in the literature that allow us to find a solution. Let us take the linear system Ax = b. The idea is to give an initial guess x 0 and then to solve iteratively:

x k+1 = Bx k + f. (C.45)
Where we call B the iteration matrix. In general, we can always split the matrix A as:

A = M -N. (C.46)
Then, the linear system can be rewritten as:

M x = N x + b, (C.47)
so that the iterative method can seen as:

x k+1 = M -1 N x k + M -1 b. (C.48)
In this way, the iteration matrix B and the term source f can be defined as:

B = M -1 N, f = M -1 b. (C.49)
An important result is that every iterative method is convergent if and only if the spectral radius of the iteration matrix is less than 1 in formulas:

ρ(B) < 1. (C.50)
Let us also give the definitions of matrices we will use: we call L the strictly lower triangular part of A, U the strictly upper triangular part of A, and D the diagonal part of A.

In the following, we will analyze the characteristics of some methods, and then we will apply the method to our problem.

C.2.1 The Jacobi method

The Jacobi method consists of taking M = D, so the iterative method will be given by:

x k+1 = D -1 (-(L + U )x k + b). (C.51)
The element-based formula is:

x k+1 i = 1 a ii   b i - n j=1 j̸ =i a ij x k j   i = 1, ..., n. (C.52)
For establishing the convergence, we can always use the condition (C.50). If the matrix A is symmetric and definite positive (SDP ), there are no certainties about the convergence of this method unless we make a relaxation; in that case, SDP implies convergence. Let us then introduce the over-relaxed Jacobi method (JOR). Let us take a parameter 0 < ω ≤ 1, the method JOR is given by:

x k+1 = ωD -1 (-(L + U )x k + b) + (1 -ω)x k . (C.53)
Remark 23 Let us notice that we recover the Jacobi method in the case ω = 1.

In this case the condition (C.50) translates in:

0 < ω < 2 λ max (D -1 A) . (C.54)
It can be proved that the spectral radius reaches its minimum if ω is equal to [START_REF] Yousef | Iterative Methods for Sparse Linear Systems[END_REF]:

ω opt = 2 λ min (D -1 A) + λ max (D -1 A) . (C.55)
Remark 24 The problem with this method is that we can't overwrite x k i with x k+1 i , as the rest of the computation will need that value.

C.2.2 The Gauss-Seidel method

The Gauss-Seidel method consists in taking M = D + L so the iterative method will be given by [START_REF] Golub | Matrix Computations[END_REF]:

x k+1 = (D + L) -1 (-U x k + b). (C.56)
The element-based formula is:

x k+1 i = 1 a ii   b i - i-1 j=1 a ij x k+1 j - n j=i+1 a ij x k j   i = 1, ..., n. (C.57)
The computation of x k+1 uses the elements of x k+1 that have already been computed and only the elements of x k that have not been computed in the k + 1 iteration. This means that, unlike the Jacobi method, only one storage vector is required as elements can be overwritten as they are computed, which can be advantageous for large problems. However, unlike the Jacobi method, the computations for each element are generally much harder to implement in parallel since they can have a very long critical path and are thus most feasible for sparse matrices. Furthermore, the values at each iteration depend on the order of the original equations. It is always convergent for SDP and strictly diagonally dominant matrices.

C.3 Solution of the circuit

Let us now see how it is possible to apply the iterative methods we introduced in the previous section to the matrix (C.43) to find a solution for the circuit. Let us begin by introducing the following matrices extracted from A. D is the diagonal part of the matrix with as diagonal: We can also construct the iterative matrices of Jacobi and Gauss-Seidel methods.

d =                     2 . . . 2 3 2 . . . 2                     . (C.58) L :=                               0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0                               . (C.59) U :=                               0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0
B GS = -(D + L) -1 U (C.61)
The expression of B GS can be easily found. Notice that condition (C.50) is fulfilled:

ρ(B GS ) = 2 + √ 2 4
≈ 0.85 < 1 (C.62)

B J = -D -1 (L + U ) = -                               0

Remark 26

The spectral radius of Gauss-Seidel is smaller, so it will converge more rapidly.

Given this, we can assure the convergence of the methods; moreover, A is SDP , so the JOR method will converge. In particular, we will have that:

0 < ω < 2 λ max (D -1 A)
≈ 1.04, (C.65)

ω opt = 2 λ min (D -1 A) + λ max (D -1 A) = 1. (C.66)
The fact that the optimum ω is one means that the spectral radius reaches its minimum when we apply the Jacobi method without relaxation. If we use as term source b = [V 0 , 0, ..., 0] T with V 0 = 1V , after the implementation in Python with stopping criterion: We have 433 iterations for Jacobi, while for Gauss-Seidel, only 4. Let us notice that the potentials V 5 , V 6 , V 7 are equal to the potentials V 8 , V 9 , V 10 as we expected from the symmetries of the problem. Concerning the currents, we will have the following:

e k = x k+1 -x k < tol = 10
I 1 = V 0 -V 1 R 1 = 1 -5 6 1 =

C.4 Isothermal flow through an open bifurcation

We consider a junction with three pipes as in figure (C.1). We refer to the left pipe as the first pipe, to the upper right as the second, and to the bottom right as the third. We suppose that the temperature is uniform on each pipe and that they have the same length L. Table (C.1) reports the values of temperature, density, and inclination of the pipes.

Table C.1: T, ρ and θ values for the three pipes bifurcation.

Pipe I Pipe II Pipe III

T T 1 ref = T 1 T 2 ref = T 2 T 3 ref = T 3 θ θ 1 θ 2 θ 3 ρ ρ 1 = P rT 1 ρ 2 = P rT 2 ρ 3 = P rT 3
The equations (4.2) reduce to:

u 1 = u 1 = const., u 2 = u 2 = const., u 3 = u 3 = const., ∂ x Π 1 = - f 2 πρ 1 u 1 D S -ρ 1 g sin θ 1 , ∂ x Π 2 = - f 2 πρ 2 u 2 D S -ρ 2 g sin θ 2 , ∂ x Π 3 = - f 2 πρ 3 u 3 D S -ρ 3 g sin θ 3 .

C.5 Numerical approach

We give a numerical algorithm for the solution of the equations (4.2). The equation for the dynamic pressure for the pipe j is the following:

∂ x Π j = - f 2 πρ j u j D S -ρ j g sin θ j .
Let us subdivide each pipe in N -1 intervals such that ∆x = L N -1 . The total number of nodes will be 3N -2 since the bifurcation point is common to the three pipes. Moreover we will impose an inlet pressure Π 0 at the entrance of the left-hand side pipe and a 0 valued outlet pressure at the exit of the other two pipes. The vector of Π will be: Π = Π 0 , Π 1 1 , . . . , Π N -1 , Π 2 N , . . . , Π 2 2N -3 , 0, Π 3 2N -1 , . . . , Π 3 3N -5 , 0 T .

Remark 27 Π N -1 is in correspondence of the bifurcation point.

Let us discretize the pressure:

- Π j i-1 -Π j i ∆x = - f 2 πρ j u j D S -ρ j g sin θ j .
Let us define the resistance:

R j := f 2 πρ j ∆x D S = 8µ 2ρ j R πρ j ∆x 2R πR 2 = 8πµ A i ∆x.
We obtain that:

(Π j i-1 -Π j i ) = R j u j + ρ j g sin θ j ∆x.

(C.72)

The system we have to solve is given by the imposition of equation (C.72) in each interval and by imposing that the velocity is the same in two adjacent intervals of the same pipe. Let us show how it works by taking into consideration, for example, the first two intervals. In the first interval of the first pipe we have:

(Π 0 -Π 1 1 ) = R 1 u 1 + ρ 1 g sin θ 1 ∆x.
While in the second interval:

(Π 1 1 -Π 1 2 ) = R 1 u 1 + ρ 1 g sin θ 1 ∆x.

And so:

(Π 0 -Π 1 1 ) -ρ 1 g sin θ 1 ∆x = R 1 u 1 = (Π 1 1 -Π 1 2 ) -ρ 1 g sin θ 1 ∆x.

This reduces to:

2Π 1 1 -Π 1 2 = Π 0 .
This means that the global matrix is made up of three tridiagonal sub-matrices, one for each pipe as in appendix [C]. The line corresponding to the bifurcation deserves a separate treatment. At the junction we impose the condition u 1 = u 2 + u 3 , where we express the velocities by using the equation (C.72) in the intervals adjacent to the bifurcation:

u 1 = Π 1 N -2 -Π N -1 R 1 - ρ 1 R 1 g sin θ 1 ∆x, (C.73) u 2 = Π N -1 -Π 2 N R 2 - ρ 2 R 2
g sin θ 2 ∆x, (C.74)

u 3 = Π N -1 -Π 3 2N -1 R 3 - ρ 3 R 3 g sin θ 3 ∆x. (C.75)
So the balance will be:

- Π 1 N -2 R 1 + 3 i=1 1 R i Π N -1 - Π 2 N R 2 - Π 3 2N -1 R 3 = - ρ 1 R 1 sin θ 1 + ρ 2 R 2 sin θ 2 + ρ 3 R 3 sin θ 3 g∆x.
The expression of the matrix will be:

A =                                          0 . . . A * 0 ∅ ∅ -1 0 . . . 0 -1 R 1 3 i=1 1 R i -1 R 2 0 . . . 0 -1 R 3 0 . . . 0 -1 ∅ 0 A * ∅ . . . 0 -1 0 ∅ . . . ∅ A * 0                                         
, where we introduced the following matrix N -2 × N -2: where b J = -ρ 1 R 1 sin θ 1 + ρ 2 R 2 sin θ 2 + ρ 3 R 3 sin θ 3 g∆x.

A * =                  2
Remark 28 Notice that in the case in which R 1 = R 2 = R 3 we have the simpler condition:

-Π 1 N -2 + 3Π N -1 -Π 2 N -Π 3 2N -1 = (-ρ 1 sin θ 1 + ρ 2 sin θ 2 + ρ 3 sin θ 3 ) ρg∆x.

We solve the linear system AΠ = b through the iterative algorithm of Gauss-Seidel and compute the velocities by using equations (C.73), (C.74) and (C.75). We notice that the temperature varies smoothly and with continuity from left to right in every configuration. Moreover, we notice that the upper part of the domain tends to have higher temperatures while the lower part tends to have lower temperatures. Concerning the velocity, we notice the same behavior of the one-dimensional simulation: the flow tends to increase with a growing magnitude of velocity near the heated wall. It has the opposite trend near the cooled wall. Moreover, for more complex configurations, the velocity intensity is higher near the walls and very small at the interior of the domain as it prefers to flow as in the thermosyphon. This behavior is no longer valid for a great enough number of pipes, as we see in the Sierpinski fractal carpet of order 3. In the following, we will show the main results obtained in the simplified case where the function k(x) is constant. We will give finite-volume schemes in different situations and the results obtained.

E.1.1 The case of no Dirac deltas

Let us recall the finite-volume method for the equation -∂ ]. Let us suppose that the cells are all of the same length ∆x = b-â N -1 . Let us integrate over a generic cell K i :

K i -∂ 2 x ψdx = K i f (x)dx. (E.2)
Let us define the average value of f on the cell K i as :

f i := 1 ∆x K i f (x)dx. (E.3)
We take equation (E.2), integrate the term at the left, and using (E.3) obtain:

-∂ x ψ(x i+ 1 2 ) + ∂ x ψ(x i-1 2 ) = ∆xf i .
Let us define the fluxes at the border of the cells as follows:

F i+ 1 2 := - ψ i+1 -ψ i ∆x , F i-1 2 := - ψ i -ψ i-1 ∆x .
The idea is to approximate the derivatives of ψ through the over defined fluxes:

-∂ x ψ(x i+ 1 2 ) ≈ F i+ 1 2 , ∂ x ψ(x i-1 2 ) ≈ -F i-1 2 . (E.4)
By using the approximations (E.4) and a good approximation fi of the average of f (x) we can write the finite-volume scheme as:

F i+ 1 2 -F i-1 2 = ∆x fi . (E.5)
Remember that boundary conditions imply:

ψ 0 = -ψ N -2 .
For the first and last cells, we will use the fluxes:

F -1 2 = F N -3 2 := - ψ 0 -ψ N -2 ∆x = - 2 ∆x ψ 0 = 2 ∆x ψ N -2 .

E.1.2 The case of one Dirac delta centered in x j+ 1 2

In the case D = 1 we have g(x) = f (x) + ᾱδ x and equations (E.1) can be rewritten as follows: . At the same time, if we put the Dirac delta at the border between two cells j and j + 1, we will lose the conservation property, and the difference between these two fluxes will be exactly the amplitude ᾱ of the delta.

                       -∂ 2 x ψ = f (x), if x ∈ [â,
In this case let us introduce the unknown ψ j+ 1 2 and give a definition of the two fluxes: The equation (E.9) allows us to find an expression for ψ j+ 1 2 :

F +
ψ j+ 1 2 = ψ j+1 + ψj 2 + ᾱ 4 ∆x.
In this way we can express the two fluxes at j + 1 2 as:

F + j+ 1 2 = - 2 ∆x ψ j+1 - ψ j+1 + ψj 2 - ᾱ 4 ∆x = - ψ j+1 -ψj ∆x + ᾱ 2 , F - j+ 1 2 = 2 ∆x ψ j - ψ j+1 + ψj 2 - ᾱ 4 ∆x = - ψ j+1 -ψj ∆x - ᾱ 2 .
So the final scheme is given by:

               F i+ 1 2 -F i-1 2 = ∆x fi , ∀i ̸ = j, j + 1 F j+ 1 2 -F j-1 2 = ∆x fj + α 2 , F j+ 3 2 -F j+ 1 2 = ∆x fj+1 + α 2 .

E.1.3 The case of one Dirac delta not at the center of a cell

Sometimes, the hypothesis of the previous method is not feasible; in this case, we can give a more general procedure (see [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF] for more details).

Let us suppose without loss of generality that the Dirac Delta is placed in one point ā and that ∃j such that ā ∈ [x j , x j+1 ]. In this case, the flux discontinuity equation is no more necessary at the point x j+ 1 2

, and it will be:

F + ā -F - ā = ᾱ. (E.10)
The procedure for computing the two fluxes is analogous to the previous one. Let us introduce ψ ā, the variable at the point ā, and define the two fluxes as:

F + ā := - ψ j+1 -ψ ā x j+1 - ā , F - ā := - ψ ā -ψ j ā -x j .
Equation (E.10) becomes:

- ψ j+1 -ψ ā x j+1 - ā + ψ ā -ψ j ā -x j = ᾱ.
We obtain the following expression for ψ ā:

ψ ā = ᾱ + ψ j+1 x j+1 - ā + ψ j ā-x j 1 ā-x j + 1 x j+1 - ā
.

By some manipulations: ψ ā = 1 ∆x ᾱ(x j+1 -ā)( ā -x j ) + ψ j+1 ( ā -x j ) + ψ j (x j+1 -ā) .

Now we can rewrite the fluxes by substituting the value of ψ ā:

F + ā = - ψ j+1 -
ᾱ(x j+1 -ā)( ā-x j )+ψ j+1 ( ā-x j )+ψ j (x j+1 -ā) ∆x

x j+1 - ā = ᾱ ā -x j ∆x + ψ j ∆x - ψ j+1 x j+1 - ā + ψ j+1 (∆x -(x j+1 -ā)) ∆x(x j+1 -ā) = ᾱ ā -x j ∆x - ψ j+1 -ψ j ∆x = F j+ 1 2 + ᾱ ā -x j ∆x .
Analogously, it can be proven that:

F - ā = F j+ 1 2 - ᾱ x j+1 - ā ∆x .
Remark 30 The result obtained previously is a particular case of this since it could be recovered in the case of â =

x j +x j+1 2 :

x j+1 -â ∆x = x j+1 -

x j +x j+1 2 ∆x = 1 2 = x j +x j+1 2 -x j ∆x = â -x j ∆x .
So the final scheme is:

               F i+ 1 2 -F i-1 2
= ∆x fi , ∀i ̸ = j, j + 1

F j+ 1 2 -F j-1 2 = ∆x fj + ᾱ ā-x j ∆x , F j+ 3 2 -F j+ 1 2 = ∆x fj+1 + ᾱ x j+1 - ā ∆x ,

E.1.4 The case of several Dirac deltas

In the case D > 1 we have ĝ(x) = f (x) + D l=1 ᾱl δ xl and equations (E.1) can be rewritten as follows: By using the same technique as before, we have the following scheme:

                       -∂ 2 x ψ = f (x), if x ∈ [â
               F i+ 1 2 -F i-1 2
= ∆x fi , ∀i ̸ = j l , j l + 1 ∀l ∈ {1, 2, ..., D},

F - j l + 1 2 -F j l -1 2
= ∆x fj l , ∀l ∈ {1, 2, ..., D},

F j l + 3 2 -F + j l + 1 2
= ∆x fj l +1 , ∀l ∈ {1, 2, ..., D}.

E.2 The case k(x) generic

Usually, k(x) is not constant everywhere but positive and continuous, and we discretize its values by assuming that in every cell, it is constant and equal to its average on the cell itself.

Since its value is assumed to be ki on the cell K i and ki+1 on the cell K i+1 we have to find the good way to approximate k(x) at the faces. Indeed, the expression of the right flux on the cell K i is:

F i+ 1 2 = -ki+ 1 2 ψ i+1 -ψ i ∆x .
Let us define the fluxes from right and left:

F + i+ 1 2 := -ki+1 ψ i+1 -ψ i+ 1 2 ∆x 2 , F - i+ 1 2 := -ki ψ i+ 1 2 -ψ i ∆x 2
.

We can find an expression for ψ i+ 1 2 by imposing the continuity of the flux (F +

i+ 1 2 = F - i+ 1 2 ): -ki+1 ψ i+1 -ψ i+ 1 2 ∆x 2 = -ki ψ i+ 1 2 -ψ i ∆x 2
.

That implies:

ψ i+ 1 2 = ki+1 ψ i+1 + ki ψ i ki + ki+1 .
And so:

F i+ 1 2 = -ki+1 2 ∆x ψ i+1 - ki+1 ψ i+1 + ki ψ i ki + ki+1 .
After brief computation, we find:

F i+ 1 2 = -2 ki+1 ki ki+1 + ki ψ i+1 -ψ i ∆x .
Analogously:

F i-1 2 = -2 ki-1 ki ki-1 + ki ψ i -ψ i-1 ∆x .

Remark 31

We have find that the best approximation for ki+ 1 2 is the so called harmonic mean:

ki+ 1 2 := 2 ki+1 ki ki+1 + ki .
Once we have found the proper way to express the fluxes, the scheme is the same as before.

The next stage is the extension of the scheme for the Dirac delta.

E.2.1 The case of one Dirac delta centered in x j+ 1 2

Here, we discuss the case in which we have a Dirac delta at a point ā that we assume to be in the middle of a cell. The middle point case is the simplest one since we do not have to worry about the value of the discretization of k(x) inside the expression of the fluxes. We provide a discretization of the following equation:

[-k(x)∂ x ψ]( ā+ ) -[-k(x)∂ x ψ]( ā-) = ᾱ. (E.12)
Let us introduce the unknown ψ ā, the value of ψ at the point ā, and define the fluxes as follows:

F + ā = -kj+1 ψ j+1 -ψ ā ∆x 2 , F - ā = -kj ψ ā -ψ j ∆x 2
.

Equation (E.12) can be discretized as:

F + ā -F - ā = ᾱ. (E.13)
Let us use this condition in order to find the value of ψ ā:

-kj+1 ψ j+1 -ψ ā ∆x 2

+ kj ψ ā -ψ j ∆x 2 = ᾱ.

We obtain: The procedure for F - ā is similar and we obtain:

F - a = - kj kj+1 + kj ᾱ + F j+ 1 2 .
The final scheme is:

               F i+ 1 2 -F i-1 2
= ∆x fi , ∀i ̸ = j, j + 1

F

E.2.2 The case of one Dirac delta not at the center of a cell

In general, it is always possible to find an admissible j such that ā ∈ [x j , x j+1 ] but ā but not necessarily at the middle point. The critical and delicate issue is how to give a good approximation of k(x) inside the fluxes. In the following we will study firstly the case in which ā ∈ [x j , x j+ 1 2 ] and then the case in which ā ∈ [x j+ 1 2 , x j+1 ]. In both cases, the final scheme will be:

               F i+ 1 2 -F i-1 2 = ∆x fi , ∀i ̸ = j F - ā -F j-1 2 = ∆x fj , F j+ 3 2 -F + ā = ∆x fj+1 .
The only treat is to find the expression for the fluxes.

Remark 32 The case of many deltas will not be studied since it is straightforward to extend from one delta to several ones.

Case ā < x j+ 1 2

In this case, the best approximation of k(x) is given by kj in the flux from the left while in the flux from the right is the following weighted average:

k( ā+ ) ≈ kj+1 ∆x 2 + kj ∆x 2 -( ā -x j ) x j+1 - ā .
As before, we can define the fluxes as:

F + ā = - kj+1 ∆x 2 + kj ∆x 2 -( ā -x j ) x j+1 - ā ψ j+1 -ψ ā x j+1 - ā , F - ā = -kj ψ ā -ψ j ā -x j .
So by substituting in equation (E.13):

-

kj+1 ∆x 2 + kj ∆x 2 -( ā -x j ) x j+1 - ā ψ j+1 -ψ ā x j+1 - ā + kj ψ ā -ψ j ā -x j = ᾱ.
We obtain that ψ ā is:

Ψψ ā = ᾱ + kj ā -x j ψ j + kj+1 + kj 2
∆x -kj ( ā -x j ) (x j+1 -ā) 2 ψ j+1 , where:

Ψ := kj ā -x j + kj+1 + kj 2 ∆x -kj ( ā -x j ) (x j+1 -ā) 2 = kj (x j+1 -ā) 2 -kj ( ā -x j ) 2 + kj+1 + kj 2 ∆x( ā -x j ) ( ā -x j )(x j+1 -ā) 2 = kj ∆x 2 -2∆x kj ( ā -x j ) + kj+1 + kj 2 ∆x( ā -x j ) ( ā -x j )(x j+1 -ā) 2 = kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ( ā -x j )(x j+1 -ā) 2 .

So:

ψ ā = ( ā -x j )(x j+1 -ā) 2
kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ᾱ + kj (x j+1 -ā) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ψ j + ( ā -x j ) kj+1 + kj 2 ∆x -kj ( ā -x j ) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ψ j+1 .

We can prove that: kj (x j+1 -ā) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ψ j -ψ j = -( ā -x j ) kj+1 + kj 2 ∆x -kj ( ā -x j ) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ψ j .

This allows us to write: ∆x -k2 j ( ā -x j ) kj ∆x 2 + ∆x( ā -x j ) kj+1-3 kj 2 (ψ j+1 -ψ j ).

F - ā = -
Then for the computation of the flux F + ā it suffices to use equation (E.13) and we obtain:

F + ā = kj+1 + kj 2
∆x( ā -x j ) -kj ( ā -x j ) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 ᾱkj kj+1 + kj 2 ∆x -k2 j ( ā -x j ) kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 (ψ j+1 -ψ j ).

Case ā > x j+ 1 2

In this case, the best approximation of k(x) is given by kj in the flux from the left while in the flux from the right is the following weighted average:

k( ā-) ≈ kj ∆x 2 + kj+1 ∆x 2 -(x j+1 -ā) ā -x j .
As before, we can define the fluxes as:

F + ā = -kj+1 ψ j+1 -ψ ā x j+1 - ā , F - ā = - kj ∆x 2 + kj+1 ∆x 2 -(x j+1 -ā) ā -x j ψ ā -ψ j ā -x j .
As before, we can obtain the following expression for the fluxes:

F + ā = kj+1 ( ā -x j ) 2
kj+1 ∆x 2 + ∆x(x j+1 -ā) kj -3 kj+1 2 ᾱ -kj+1 kj+1 + kj 2 ∆x -k2 j+1 (x j+1 -ā) kj+1 ∆x 2 + ∆x(x j+1 -ā) kj -3 kj+1 2 (ψ j+1 -ψ j ). ∆x -k2 j ( ā -x j ) kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2 (ψ j+1 -ψ j ).

E.3 The application of the scheme

Here, we construct the linear system Aψ = b corresponding to the finite volume scheme we presented previously. We also compute the values of ᾱl in the case of the thermosyphon, and the extension to more complex configurations is straightforward. We validate the numerical solution of the system with the analytical solution, and we compare these results with the regularization of the delta.

E.3.1 Construction of the linear system

We now construct the linear system for finding the values of ψ at the center of the cells. We take into consideration the general case with D Dirac deltas centered in a l of magnitude ᾱl , ∀l ∈ {1, 2, ..., D} .

Remark 33

The periodic boundary conditions imply ψ 0 = -ψ N -2 .

The case k(x) = 1

We distinguish between the general index i and the indices of the deltas j l ∀l ∈ {1, 2, ..., D}:

1. for the general index i, let us remember that the scheme is:

F i+ 1 2 -F i-1 2 = ∆x fi .
By substituting the expressions of the fluxes, we have:

- ψ i+1 -ψ i ∆x + ψ i -ψ i-1 ∆x = ∆x fi .
By making some manipulations:

-ψ i+1 + 2ψ i -ψ i-1 = ∆x 2 fi ;

2. In every cell j l we have:

F j l + 1 2 -F j l -1 2
= ∆x fj l + ᾱl x j l +1 -a l ∆x .

It becomes:

-ψ j l +1 + 2ψj l -ψ j l -1 = ∆x 2 fj l + ᾱl (x j l +1 -a l );

3. In each cell j l + 1 we have:

F j l + 3 2 -F j l + 1 2 = ∆x fj l +1 + ᾱl a l -x j l ∆x .
It is equivalent to:

-ψ j l +2 + 2ψ j l +1 -ψ j l = ∆x 2 fj l +1 + ᾱl (a l -x j l ).

So, the final system is given by a tridiagonal matrix A of the type:

A :=                     3 -1 • • • • • • • • • • • • 0 -1 2 -1 0 • •
0 • • • • • • 0 -1 2 -1 0 • • • • • • • • • • • • -1 3                     .
The source term b will be given by:

b i =        0 if i = 0, N -1 ∆x 2 fi + ω i elsewhere
, where

ω i =               
ᾱl (x j l +1 -a l ) if i = j l l ∈ {1, 2, ..., D} ᾱl (a l -x j l ) if i = j l + 1 l ∈ {1, 2, ..., D} 0 elsewhere .

The case k(x) not constant

In this case, we see how the values of the function k(x) appear in our linear system. Let us remember that depending on where the delta is located, the discretization of k(x) changes, and so we analyze the three possible cases. Let us start from the general index i. In this case, we have the scheme: This case is analogous to the previous one, so we will report only the final schemes, the first for the cell j l and the other for the cell j l + 1: ∆x(x j+1 -a l ) -kj+1 (x j+1 -a l ) 2 kj ∆x 2 + ∆x(a l -x j ) kj+1-3 kj

F i+ 1 2 -F i

  : écoulement 1-D de gaz, réseau de tuyaux, hypothèse de Mach faible, simulation d'un thermosiphon, simulation d'une échelle à trois barreaux, lois à la jonction, solution de référence, conditions périodiques, gradient de température, mécanique des fluides, modélisation numérique, CFD. An example of a GTT ship transporting liquefied natural gas. . . . . . . . . . 1.2 An example of a GTT ship transporting liquefied natural gas by highlighting the interior tanks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Two people working in an empty tank ship designed by GTT. This ship carries liquefied natural gas. The control network is visible on the walls of the tank. 1.4 A particular of the control network supervising the exchanges of the liquefied natural gas with its surroundings inside the GTT transport ships. . . . . . . 1.5 The two-dimensional grid corresponding to the control network supervising the exchanges of the liquefied natural gas with its surroundings inside the GTT transport ships. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.6 A sketch of the geometry of the thermosyphon: a closed pipe of length 4L where the gas is confined and flows between the temperatures T f and T c . . . 1.7 A sketch of an open domain made of three pipes, two inlets, and one outlet. .

  Navier-Stokes, Boussinesq, and low Mach models with increasing complexity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 A sketch of the geometry of the thermosyphon: a closed pipe of length 4L where the gas is confined and flows between the temperatures T f (cooled, it is denser, and falls) and T c (heated, it is less dense and moves up). The inclination of the pipes θ depends on the geometry: in the heated pipe is π 2 , in the cooled one isπ 2 and in the others 0. . . . . . . . . . . . . . . . . . . 3.2 Behavior of the characteristic length λ as a function of the characteristic dimensionless number G 1 by varying the relative temperature rise ε for both the low Mach and the Boussinesq models. . . . . . . . . . . . . . . . . . . . . . . XVI 8.9 The open bifurcation simulation: the temperature error for different space steps.136 8.10 The open bifurcation simulation: the ratio of velocity to temperature with

N

  x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. The curves are superposed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XX 9.

  of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 1m,L 2 = 9m (l < 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXI 9.19 A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 1m,L 2 = 9m (l < 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.20 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 9m,L 2 = 1m (l > 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.21 A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 9m,L 2 = 1m (l > 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.22 A sketch of the geometry of the 6-rung ladder. . . . . . . . . . . . . . . . . . 9.23 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through a six-rung ladder with as a number of nodes N x = 1600, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 250.15K, cf l = 1. . . . . . . . . . . . . . 9.24 A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through a six-rung ladder with as a number of nodes N x = 1600, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 250.15K, cf l = 1. . . . . . . . . . . . . . 9.25 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with as a number of nodes N x = 1200, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.26 A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with as a number of nodes N x = 1200, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1. 9.27 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with an inclined adiabatic pipe, with as a number of nodes N x = 1300, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . XXII 9.28 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with an inclined adiabatic pipe, with as a number of nodes N x = 1300, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1. . . . . . . . . . . . . . . . . . . . . 9.29 A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of three four-rung ladders with as a number of nodes N x = 2400, final time T = 10s, pipe lengths L = 1m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1. 9.30 A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through the juxtaposition of three four-rung ladders with as a number of nodes N x = 2400, final time T = 10s, pipe lengths L = 1m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1. A.1 Behavior of the function ϕ i (1, λ i ) compared with the behavior of cos λ 2 2 B.2 structure of the exact solution of a shock tube problem . . . . . . . . . . . . . 190 B.3 Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.05. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 B.4 Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.005. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 B.5 Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.0005. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 B.6 Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.00005. . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 C.1 An example of open bifurcation. . . . . . . . . . . . . . . . . . . . . . . . . . 197 C.2 The equivalent circuit for an open bifurcation with imposed pressures at the inlet and the outlet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 C.3 The equivalent circuit for an open bifurcation with imposed pressures at the inlet and the outlet with several resistances in series. . . . . . . . . . . . . . . 201 D.1 Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a thermosyphon. The color indicates the magnitude. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 D.2 Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a thermosyphon. The arrows indicate the direction and the color the magnitude. . . . . . . . . . . . . . . . . . . . . . 215 D.3 Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a more complex configuration. The color indicates the magnitude. . . . . . . . . . . . . . . . . . . . . . . . . . . 215 D.4 Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a a more complex configuration. The arrows indicate the direction and the color the magnitude. . . . . . . . . . . . 216 D.5 Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 2. The color indicates the magnitude. . . . . . . . . . . . . . . . . . . . . . . . 216 XXIV D.6 Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 2. The arrows indicate the direction and the color the magnitude. . . . . . . . . . . . D.7 Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 3. The color indicates the magnitude. . . . . . . . . . . . . . . . . . . . . . . . D.8 Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 3. The arrows indicate the direction and the color the magnitude. . . . . . . . . . . . E.1 The mesh and the distribution of nodes . . . . . . . . . . . . . . . . . . . . . List of Tables 2.1 The values of the conserved quantity ϕ, its associated flux J ϕ and supply ψ ϕ for each conservation law. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 The values of the inlet temperature, flux, and dynamic pressure for each pipe of the thermosyphon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 velocity and temperature values for the adiabatic pipes in the three-rung ladder configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Inlet velocity and temperature values for all non-adiabatic pipes in the threerung ladder configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Inlet dynamic pressure values for all pipes in the three-rung ladder configuration. 6.1 The characteristics at the junction: pipes II and III are of different types, one is inflow and the other outflow. . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 The characteristics at the junction: pipes II and III are of the same type, either inflow or outflow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 The values of the temperatures, inclinations, and inlet/outlet pressures for different scenarios of an isothermal flow through an open bifurcation of three pipes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Case of two inflows: the values of the reference temperatures, the inclinations, the inlets, the outlets, and the initial values of temperature and velocity for each pipe of a varying-temperature flow through an open bifurcation of three pipes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3 The transmission laws at the junction for the two inflows case: the values of Γ S , velocity and dynamic pressure at the junction for each pipe of a varyingtemperature flow through an open bifurcation of three pipes. . . . . . . . . . 8.4 Case of two outflows: The values of the inlets, the outlets, and the initial values of temperature and velocity for each pipe of a varying-temperature flow through an open bifurcation of three pipes. . . . . . . . . . . . . . . . . . . . 8.5 The transmission laws at the junction for the two outflows case: the velocity and dynamic pressure values at the junction for each pipe of a varyingtemperature flow through an open bifurcation of three pipes. . . . . . . . . . XXV XXVI 9.1 The values of the physical parameters we consider for the numerical results. . 9.2 The values of the dimensionless numbers characteristic of a laminar flow at small velocities through a thermosyphon with total length L = 1m, diameter D = 0.03m, and imposed temperatures at the walls T c = 300.15K and T f = 280.15K. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 The values of the physical parameters we consider for the numerical results of a symmetrical three-rung ladder. . . . . . . . . . . . . . . . . . . . . . . . . . 9.4 The transmission laws at the junction for the symmetrical three-rung ladder: the values of velocities and ratios between velocity and temperature at the junctions J 1 and J 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

junctions J 1 1 Introduction

 11 , ..., J 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.10 The transmission laws at the junction for the juxtaposition of two three-rung ladders with an inclined adiabatic pipe: the values of the velocities at the junctions J 1 , ..., J 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.11 The transmission laws at the junction for the juxtaposition of two three-rung ladders with an inclined adiabatic pipe: the values of the ratios between ve-ChapterModeling gas flows in pipeline arrangements is crucial in many engineering applications.Within fossil fuel exploitation, the industrial application we focus on is transporting liquefied natural gas across oceans via ships. Among others, the company Gaztransport & Technigaz (GTT) has developed technologies to carry the gas liquefied on ships like, for example, the one in figure1.1.

Figure 1 . 1 :

 11 Figure 1.1: An example of a GTT ship transporting liquefied natural gas.

Figure 1 . 2 :

 12 Figure 1.2: An example of a GTT ship transporting liquefied natural gas by highlighting the interior tanks.

Figure 1 . 3 :

 13 Figure 1.3: Two people working in an empty tank ship designed by GTT. This ship carries liquefied natural gas. The control network is visible on the walls of the tank.

Figure 1

 1 Figure 1.4: A particular of the control network supervising the exchanges of the liquefied natural gas with its surroundings inside the GTT transport ships.

Figure 1 . 5 :

 15 Figure 1.5: The two-dimensional grid corresponding to the control network supervising the exchanges of the liquefied natural gas with its surroundings inside the GTT transport ships.

Figure 1

 1 Figure 1.7: A sketch of an open domain made of three pipes, two inlets, and one outlet.

Figure 1

 1 Figure 1.8: A sketch of the geometry of the three-rung ladder: a closed pipe where the gas is confined and flows between the temperatures T f (cooled, it is denser, and falls) and T c (heated, it is less dense and moves up).

Figure 1

 1 Figure 1.9: A sketch of the geometry of a more complex configuration, an n-rung ladder: a closed pipe where the gas is confined and flows between the temperatures T f (cooled, it is denser, and falls) and T c (heated, it is less dense and moves up).

Remark 1

 1 .12) where we introduce the expansion coefficient α T := -It can be proven that 1-ρ ∂h ∂P T

Figure 2 . 1 :

 21 Figure 2.1: Sketch of an oriented inclined pipe with axial velocity u(x).

  is missing; that is the main difference. To sum up, the low Mach model introduced by Paolucci is an extension to the Boussinesq model, which is a more accurate approximation of Navier-Stokes equations. The compressible Navier-Stokes equations describe the flow behavior for general values of the Mach number.

  Figure 2.2 shows a resume of the hierarchy of models according to M a.

Figure 2 . 2 :

 22 Figure 2.2: Comparison between the Navier-Stokes, Boussinesq, and low Mach models with increasing complexity.

  and Π IN . We set a reference temperature at the wall T ref for non-adiabatic pipes. The axial coordinate x takes values in the interval [0, L]. We define the flux Q := Su and consider a laminar steady flow. This means that the shear stress term is linear with the velocity, and we neglect the time derivatives. The averaged low Mach model (2.37) reads:

Figure 3

 3 Figure 3.1: A sketch of the geometry of the thermosyphon: a closed pipe of length 4L where the gas is confined and flows between the temperatures T f (cooled, it is denser, and falls)

  3.2 shows how λL varies as a function of G 1 for different values of ε for a low Mach model.

Figure 3

 3 Figure 3.2: Behavior of the characteristic length λ as a function of the characteristic dimensionless number G 1 by varying the relative temperature rise ε for both the low Mach and the Boussinesq models.

Figure 3 . 3 :

 33 Figure 3.3: Behavior of the characteristic length λ as a function of the characteristic dimensionless number G 2 by varying the relative temperature rise ε for both the low Mach and the Boussinesq models. For the low Mach model, we consider several admissible values of ε, while

  the velocity, and we considered laminar friction. In the first stage, we took into consideration an open pipe with inlet temperature, flux, and dynamic pressure, respectively T IN , Q IN , and Π IN . Studying the open pipe allowed us to understand the physical meaning of λ and how the linearization tools can provide satisfying solutions.

  Figure 4.1: An example of open bifurcation.

Figure 4

 4 Figure 4.2: An example of open bifurcation with control volume Ω.

  figure 4.1.

Figure 4 . 3 :

 43 Figure 4.3: The open bifurcation equivalent graph.

  solutions and use the transmission conditions at the junction to close the solution. Let us assume n pipes flowing into J and the remaining m = N -n flowing out in the graph theory sense we used in the previous section. For clarity, we define the n pipes on a domain [0, L] and the other m on a domain [L, 2L]. We indicate temperatures, velocities, and pressures in the inflow pipes with superscripts (+) and identify each with the indices i = 1, ..., n. We use superscripts (-) and indices j = 1, ..., m for the outflow pipes. We identify quantities common to both inlet and outlet pipes with the indices k = 1, ..., m + n.

J

  ∀j = 1, ..., m, T j J ∀j = 1, ..., m. This means that the unknowns of the problem are 2m + n. The following will give the right amount of equations to close the problem.

A

  three-rung ladder is a configuration like the one shown in figure (4.4). It consists of seven pipes, three horizontal and four vertical. The rungs are adiabatic and have the same length L 3 . The left vertical pipes are heated with different reference temperatures T 3 c and T 4 c . The right vertical pipes are cooled with reference temperatures T 1 f and T 6 f . The upper vertical pipes have length L 2 , and the others have length L 1 . All pipes have the same diameter D

Figure 4

 4 Figure 4.4: The three-rung ladder configuration.

Figure 5 . 1 :

 51 Figure 5.1: The mesh and the distribution of nodes

Figure 5

 5 Figure 5.2: The solution of the elliptic solver obtained with â = 0, b = 1, N = 10000 and f (x) = x 2 + x.

Figure 5 . 3 :

 53 Figure 5.3: The error curve as function of ∆x for the solution of the elliptic solver obtained with â = 0, b = 1, N = 10000 and f (x) = x 2 + x. The error is of order 2.

Figure 5 . 4 :

 54 Figure 5.4: The approximation of s(x) at the left and of its derivative at the right for L = 10.

Figure 5 . 5 :

 55 Figure 5.5: The solution of the elliptic solver obtained with â = 0, b = 1, and f (x) = p ′ (x).

Figure 5 . 6 :

 56 Figure 5.6: The error for the elliptic solver with the regularization of the exact delta as a function of ∆x.

Figure 5 .

 5 Figure 5.7 shows the indices of cells and fluxes. They are the same as section 5.1.

Figure 5 . 7 :

 57 Figure 5.7: The mesh and the distribution of nodes

Figure 5 . 8 :

 58 Figure 5.8: The solution of the elliptic solver obtained with â = 0, b = 10 and N = 20000; in green the solution with f (x) = p ′ (x) and in blue the solution for the exact delta.

Figure 5 . 9 :

 59 Figure 5.9: The error for the elliptic solver with the exact delta as a function of ∆x. The order of convergence is 1.

Figure 6 . 1 :

 61 Figure 6.1: An example of open bifurcation.

Figure 6 . 2 :

 62 Figure 6.2: The open bifurcation mesh grid.

Figure 8

 8 Figure 8.1: A sketch of an open domain made of three pipes, two inlets, and one outlet.

  pressures. Scenarios II and III test the dependence of the flow on the variations of the inclinations, while scenarios IV and V test the dependence on the variations of inlet pressure and temperature. Then scenarios V I and V II show what happens if we impose different temperatures and outlet pressures on different pipes.

Figure 8 .

 8 Figure 8.2 reports the results of the first scenario. As expected, the pressure has a piece-wise linear behavior, and the pressure profiles in the second and third pipes coincide. Since the two inclined pipes have the same angle, their velocities have the same value.Figures 8.3 and 8.4 report the results of the second and third scenarios. The behavior of the pressure remains similar to the previous simulation. We see no more equality between the velocity values and that the three velocities sum up to 0. Notice that scenario II simulates a symmetrical configuration while scenario III simulates an asymmetrical arrangement. Figures 8.5, 8.6, and 8.7 show that changing the inlet pressure and the values of temperature does not significantly alter the behavior of the flow.

Figure 8 .

 8 Figure 8.8 shows that different outlet pressures generate different pressure profiles in the outlet pipes.

Figure 8 . 2 :

 82 Figure 8.2: Pressure and velocity of an open bifurcation with N pipe = 10, temperature constant and everywhere imposed at 280K, the inlet pressure of 1P a and null outlet pressures, left-hand side pipe not inclined, upper right-hand side pipe inclined of π 4 and lower right-hand side pipe inclined of π 4 .

Figure 8 . 3 :

 83 Figure 8.3: Pressure and velocity of an open bifurcation with N pipe = 10, temperature constant and everywhere imposed at 280K, the inlet pressure of 1P a and null outlet pressures, left-hand side pipe not inclined, upper right-hand side pipe inclined of π 4 and lower right-hand side pipe inclined ofπ 4 .

Figure 8 . 4 :

 84 Figure 8.4: Pressure and velocity of an open bifurcation with N pipe = 10, temperature constant and everywhere imposed at 280K, the inlet pressure of 1P a and null outlet pressures, left-hand side pipe not inclined, upper right-hand side pipe inclined of π 4 and lower right-hand side pipe inclined of -2 3 π.

Figure 8 . 5 :

 85 Figure 8.5: Pressure and velocity of an open bifurcation with N pipe = 10, temperature constant and everywhere imposed at 280K, the inlet pressure of 10P a and null outlet pressures, left-hand side pipe not inclined, upper right-hand side pipe inclined of π 4 and lower right-hand side pipe inclined ofπ 4 .

Figure 8 . 6 :

 86 Figure 8.6: Pressure and velocity of an open bifurcation with N pipe = 10, temperature constant and everywhere imposed at 260K, the inlet pressure of 1P a and null outlet pressures, left-hand side pipe not inclined, upper right-hand side pipe inclined of π 4 and lower right-hand side pipe inclined ofπ 4 .

Figure 8 . 7 :

 87 Figure 8.7: Pressure and velocity of an open bifurcation with N pipe = 10, temperature constant imposed at 280K, 250k, 200K, the inlet pressure of 1P a and null outlet pressures, left-hand side pipe not inclined, upper right-hand side pipe inclined of π 4 and lower right-hand side pipe inclined ofπ 4 .

Figure 8

 8 Figure8.9 shows the curves of the error for the three pipes for the temperature. We notice that the order of convergence is 1, as expected. Figure8.10 shows the ratio of velocity to temperature. Let us notice that the ratio of velocity to temperature ( Γ S ) for the open bifurcation is piece-wise constant, and it is possible to verify the transmission conditions at the junction.

Figure 8

 8 Figure 8.9: The open bifurcation simulation: the temperature error for different space steps.

Figure 8 . 10 :

 810 Figure 8.10: The open bifurcation simulation: the ratio of velocity to temperature withN pipe = 600, T 1 ref = 300K,T 2 ref = 280K,T 3 ref = 260K, sin θ 1 = 1,sin θ 2 = 1,sin θ 1 = 0, CF L = 0.9 and the convention that pipe 1 is an inflow and pipes 2 and 3 are outflows if velocities are all positives.

Figure 8 .

 8 Figure 8.11 shows the temperature, velocity, and dynamic pressure profiles compared with the reference solution we constructed. Since the curves are superposed, we have our algorithm validated.

Figure 8 .

 8 Figure 8.11: The open bifurcation simulation: the temperature, velocity and dynamic pressure for the three pipes with N pipe = 4798, T 1 ref = 300K,T 2 ref = 280K,T 3 ref = 260K, sin θ 1 = 1,sin θ 2 = 1,sin θ 1 = 0, CF L = 0.9 and the convention that pipe 1 is an inflow and pipes 2 and 3 are outflows if velocities are all positives.

Table 8. 4 :

 4 Case of two outflows: The values of the inlets, the outlets, and the initial values of temperature and velocity for each pipe of a varyingtemperature flow through an open bifurcation of three pipes. pipe I pipe II pipe III

  velocity and dynamic pressure values at the junction for each pipe of a varyingtemperature flow through an open bifurcation of three pipes.

Figure 9 . 1 :

 91 Figure 9.1: Performance analysis for both the moments and the projection method: Error profile for temperature and velocity and computing time comparison for a laminar flow at small velocities through a thermosyphon with total length L = 0.25m, diameter D = 0.03m, and imposed temperatures at the walls T c = 300.15K and T f = 280.15K.

Figure 9 . 2 :

 92 Figure 9.2: Comparison between the reference solution (in green) and the converged numerical solution (in red) for the temperature for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed.

Figure 9 . 3 :

 93 Figure 9.3: Comparison between the reference solution (in green) and the converged numerical solution (in red) for the velocity for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed.

Figure 9 . 4 :

 94 Figure 9.4: Comparison between the reference solution (in green) and the converged numerical solution (in red) for the dynamic pressure for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed.

Figure 9 . 5 :

 95 Figure 9.5: Density profile for a laminar flow at small velocities through a thermosyphon with as a number of nodes N x = 25597, final time T = 10s, length L = 0.25m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K, cf l = 4. The curves are superposed.

Figure 9 . 6 :

 96 Figure 9.6: Two examples of thermodynamic pressure profiles for a laminar flow at small velocities through a thermosyphon as a function time with as a number of nodes N x = 25597, final time T = 150s, total length L = 8m, imposed temperatures at the walls T c = 300.15Kand T f = 290.15K, so that ε = 0.017. For the orange pressure P i = 202650P a and T i = 293.07K, while for the blue one P i = 205416P a and T i = 297.07K.

Figure 9 .

 9 Figure 9.7 shows how the temperature varies with the conductivity k. The reference temperatures are reached faster as k becomes bigger. Notice that only for values of k big enough the reference temperatures are attained. Moreover, the Péclet number varies between 42.29 and 178.70 for values of k between 0.0124 and 0.0524. Notice that the larger the Peclet, the larger the entrance length. Here, we have L = 1m.

Figure 9

 9 Figure 9.7: Temperature profile for a laminar flow at small velocities through a thermosyphon by varying the conductivity k with as the number of nodes N x = 3997, final time T = 10s, length L = 1m, imposed temperatures at the walls T c = 300.15K and T f = 280.15K. The Péclet number varies between 42.29 and 178.70 for values of k between 0.0124 and 0.0524.

Figure 9 .

 9 Figure 9.8 reminds us of the configuration we consider in this section. Table 9.3 summarizes the physical parameters we used.

Figure 9

 9 Figure 9.8: A sketch of the geometry of the three-rung ladder .

Figure 9 . 9 :

 99 Figure 9.9: Comparison between the reference solution (in green) and the converged numerical solution (in red) for the temperature for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. The curves are superposed.

Figure 9 . 10 :

 910 Figure 9.10: Comparison between the reference solution (in green) and the converged numerical solution (in red) for the velocity for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. The curves are superposed.

Figure 9 .

 9 Figure 9.11: Comparison between the reference solution (in green) and the converged numerical solution (in red) for the dynamic pressure for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1. The curves are superposed.

Figure 9 .

 9 Figure 9.12: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figure 9 .

 9 Figure 9.13: A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figure 9 .

 9 Figure 9.14: A two-dimensional numerical simulation of the dynamic pressure for a laminar flow at small velocities through a symmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, length L = 0.22m, imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figure 9 .

 9 Figure 9.15: Error profile of the temperature for a laminar flow at small velocities through a three-rung ladder with total length L = 0.22m, diameter D = 0.03m, and imposed temperatures at the walls T c = 290.15K and T f = 260.15K.

Figure 9 . 16 :

 916 Figure 9.16: Error profile of the velocity for a laminar flow at small velocities through a threerung ladder with total length L = 0.22m, diameter D = 0.03m, and imposed temperatures at the walls T c = 290.15K and T f = 260.15K.

  , 9.19, 9.20 and 9.21 show the computed temperature and velocity for both cases.

Figure 9 .

 9 Figure 9.18: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 1m,L 2 = 9m (l < 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figure 9 .

 9 Figure 9.19: A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 1m,L 2 = 9m (l < 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figure 9 .

 9 Figure 9.20: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 9m,L 2 = 1m (l > 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figure 9 .

 9 Figure 9.21: A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through an asymmetric three-rung ladder with as a number of nodes N x = 14000, final time T = 10s, lengths L 3 = 1m,L 1 = 9m,L 2 = 1m (l > 1), imposed temperatures at the walls T c = 290.15K and T f = 260.15K, cf l = 1.

Figures 9 .

 9 Figures 9.23 and 9.24 show the computed numerical velocity and temperature on a twodimensional Cartesian grid. Notice that the part of the ladder above y = 5.5 behaves as the asymmetric three-rung ladder with l > 1 with continuous temperature at the left junctions.Moreover, the part under y = 5.5 behaves as the asymmetric three-rung ladder with l < 1 with continuous temperature at the right junctions.

Figure 9 .

 9 Figure 9.22: A sketch of the geometry of the 6-rung ladder.

Figure 9 .

 9 Figure 9.23: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through a six-rung ladder with as a number of nodes N x = 1600, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 250.15K, cf l = 1.

Figure 9 .

 9 Figure 9.24: A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through a six-rung ladder with as a number of nodes N x = 1600, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 250.15K, cf l = 1.

  ladder: going up in the heated pipes, going down in the cold pipes, going from the heated pipes to the cold ones in the top and bottom adiabatic pipes, going from the cold pipes to the heated ones in the central rung. Figures 9.25 and 9.26 show the computed numerical velocity and temperature on a two-dimensional Cartesian grid.

Figure 9 .

 9 Figure 9.25: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with as a number of nodes N x = 1200, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1.

Figure 9 .

 9 Figure 9.26: A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with as a number of nodes N x = 1200, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1.

  Figures 9.27 and 9.28 show the computed numerical velocity and temperature on a twodimensional Cartesian grid.

Figure 9 .

 9 Figure 9.27: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with an inclined adiabatic pipe, with as a number of nodes N x = 1300, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1.

Figure 9 .

 9 Figure 9.28: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of two three-rung ladders with an inclined adiabatic pipe, with as a number of nodes N x = 1300, final time T = 10s, pipe lengths either 1m or 4m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1.

Figure 9 .

 9 Figure 9.29: A two-dimensional numerical simulation of the temperature for a laminar flow at small velocities through the juxtaposition of three four-rung ladders with as a number of nodes N x = 2400, final time T = 10s, pipe lengths L = 1m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1.

Figure 9 .

 9 Figure 9.30: A two-dimensional numerical simulation of the velocity for a laminar flow at small velocities through the juxtaposition of three four-rung ladders with as a number of nodes N x = 2400, final time T = 10s, pipe lengths L = 1m, imposed temperatures at the walls T c = 300.15K and T f = 290.15K, cf l = 1.

Figure A. 1 :

 1 Figure A.1: Behavior of the function ϕ i (1, λ i ) compared with the behavior of cos λ 2

  -y)ϕ i ϕ j dy.(A.11)

Figure A. 4 :

 4 Figure A.4: Behaviour of ϕ(y, λ 1 ) compared with the function sin (πy).

Figure A. 5 :

 5 Figure A.5: Behaviour of ϕ(y, λ 2 ) compared with the function sin (3πy).

Figure A. 6 :

 6 Figure A.6: Behaviour of ϕ(y, λ 3 ) compared with the function sin (5πy).

Figure A. 7 :

 7 Figure A.7: Superposition of ϕ(y, λ 1 ), ϕ(y, λ 2 ) and ϕ(y, λ 3 ).

Figure A. 8 :

 8 Figure A.8: The temperature at x = 0 as a function of y obtained with the sum of the first 5 modes.

Figure A. 9 :

 9 Figure A.9: The temperature at x = 0 as a function of y obtained with the sum of the first modes.

Figure A. 10 :

 10 Figure A.10: The temperature at x = 0 as a function of y obtained with the sum of the first modes.

Figure A. 12 :

 12 Figure A.12: The temperature at x = 0.1 as a function of y obtained with the sum of the first 1, 2, 3, 4, 5 modes.

Figure A. 13 :

 13 Figure A.13: The temperature at x = 0.05 as a function of y obtained with the sum of the first 1, 2, 3, 4, 5 modes.

Figure A. 14 :

 14 Figure A.14: The temperature at x = 0.1 as a function of y obtained with the sum of the first 1, 2, 3, 4, 5 modes.

Figure A. 15 :

 15 Figure A.15: The temperature at x = 0.5 as a function of y obtained with the first mode compared to the temperature obtained with the first mode and ϕ approximated with the sinus function.

Figure

  Figure B.2: structure of the exact solution of a shock tube problem

  Let us take a rectangular domain [x min , x max ] × [0, T ]. Let us take the initial data in terms of primitive variables (B.1) and convert them into conserved variables ⃗ U L and ⃗ U R . Let us impose the following:

  . The results are provided with N x = 400, T = 10, x min = -40 and x max = 40 by varying ∆t. Figures B.3

Figure B. 3 :

 3 Figure B.3: Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.05.

Figure B. 4 :

 4 Figure B.4: Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.005.

Figure B. 5 :

 5 Figure B.5: Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.0005.

Figure B. 6 :

 6 Figure B.6: Comparison between the exact solution in blue and the hllc simulation in red for a shock tube. At the left, we show the density; at the center, the pressure; and at the right, the velocity. We took N x = 400, T = 10, x min = -40, x max = 40 and ∆t = 0.00005.

  merge equation (C.4) with (C.5), equation (C.6) with (C.8) and equation (C.7) with (C.9).

Figure C. 3 :

 3 Figure C.3: The equivalent circuit for an open bifurcation with imposed pressures at the inlet and the outlet with several resistances in series.

Remark 25

 25 Remember that A = D + L + U .

.

  The source vector will be:b = -Π 0 0 . . . 0 b J 0 . . . 0 ,

Figures D. 1

 1 Figures D.1, D.3, D.5, and D.7 show the numerical results obtained for the temperature on meshes with increasing complexity. The color indicates the magnitude. Figures D.2, D.4, D.6, and D.8 show the numerical results obtained for the velocity on meshes with increasing complexity. The vectors indicate the direction and the color the magnitude.

Figure D. 1 :

 1 Figure D.1: Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a thermosyphon. The color indicates the magnitude.

Figure D. 2 :

 2 Figure D.2: Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a thermosyphon. The arrows indicate the direction and the color the magnitude.

Figure D. 3 :

 3 Figure D.3: Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a more complex configuration. The color indicates the magnitude.

Figure D. 4 :

 4 Figure D.4: Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a a more complex configuration. The arrows indicate the direction and the color the magnitude.

Figure D. 5 :

 5 Figure D.5: Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 2. The color indicates the magnitude.

Figure D. 6 :

 6 Figure D.6: Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 2. The arrows indicate the direction and the color the magnitude.

Figure D. 7 :

 7 Figure D.7: Temperature ContourPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 3. The color indicates the magnitude.

Figure D. 8 :

 8 Figure D.8: Velocity StreamPlot for a two-dimensional temperature-driven flow with T l = 1K, T r = 0K and p(0, 0) = 0P a on a Sierpinski fractal carpet of order 3. The arrows indicate the direction and the color the magnitude.

Figure E. 1 :

 1 Figure E.1: The mesh and the distribution of nodes

  2 x ψ = f (x). Let us consider the mesh in figure (E.1) where the domain [â, b] is subdivided in cells K i = [x i-1 2 , x i+ 1 2

Remark 29

 29 x[∩]x, b] ψ(â) = 0, ψ( b) = 0, [∂ x ψ](x + ) -[∂ x ψ](x -) = ᾱ. (E.6)Let us suppose that x ≡ x j+ 1 2 for some j admissible (this is a strong hypothesis on which the work [EGH00] is based); this allows us to discretize the last equation in the system (E.6) through the following condition: In the case of continuous source term, the flux is conserved, and so F +

  (E.8) in the jump condition (E.7) we obtain:

  , b] \ ∪ l {x l } ψ(â) = 0, ψ( b) = 0, [∂ x ψ]( xl + ) -[∂ x ψ]( xl -) = ᾱl . ∀l ∈ {1, 2, ..., D} (E.11)Let us suppose that xl ≡ x j l + 1 2 for some j l , l admissible, this allows us to discretize the last equations in the system (E.11) through the conditions F +j l + 1 2 -F - j l + 1 2 = ᾱl . ∀l ∈ {1, 2, ..., D}

  kj ā -x j ( ā -x j )(x j+1 -ā) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1-3 kj 2 ᾱ + ( ā -x j ) kj+1+ kj 2 ∆x -kj ( ā -x j ) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1-3 kj 2 (ψ j+1 -ψ j ) = -kj (x j+1 -ā) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1-

F

  - ā = -kj+1 + kj 2 ∆x(x j+1 -ā) -kj+1 (x j+1 -ā) 2 kj ∆x 2 + ∆x( ā -x j ) kj+1 -3 kj 2

-1 2 =ψ j+1 = b j+1 ; 3 .

 23 ∆x fi . By substituting the expression for the fluxes: of Dirac deltas, we would have a linear system with a tridiagonal matrix whose diagonals are:D -1 i = -2 ki-1 ki ki-1 + ki , D i = 2 ki ki-1 ki-1 + ki + ki+1 ki+1 + ki , D 1 i = -2 ki+1 ki ki+1 + ki ∀i ∈ [1, N -3]In the cell j l + 1 we have:F j+ 3 2 -F + a l = ∆x fj+1 . So the scheme is: -kj kj+1 + kj 2∆x -k2 j (a l -x j ) kj ∆x 2 + ∆x(a l -x j ) kj+1 -j (a l -x j ) kj ∆x 2 + ∆x(a l -x j ) kj+1 -3 kj 2 Case a l > x j+ 1 2

  j+1 (x j+1 -a l ) kj+1 ∆x 2 + ∆x(x j+1 -a l ) kj -3 kj+1 2 j+1 (x j+1 -a l ) kj+1 ∆x 2 + ∆x(x j+1 -a l ) kj -3 kj+1 2 ψ j+1 = kj+1 (a l -x j ) 2kj+1 ∆x 2 + ∆x(x j+1 -a l ) kj -j (a l -x j ) kj ∆x 2 + ∆x(a l -x j ) kj+1-j (a l -x j ) kj ∆x 2 + ∆x(a l -x j ) kj+1-

  T ref , P ref , T c and P c of the flow. Notice that P ref is here a reference pressure ( the equilibrium for example) around which there

	is motion, so that ⃗ ∇ ⃗ x P ref = 0 and -⃗ ∇ ⃗ x P ≈ ρ⃗ u ⃗ ∇ ⃗ x ⃗ u so that P = O ρ|⃗ u| 2 . Consequently
	β(P -P ref ) = O ρ|⃗ u| 2 P

Table 4 .

 4 1: velocity and temperature values for the adiabatic pipes in the three-rung ladder configuration.

		Pipe II	Pipe V	Pipe VII
	T	T 2	T 5	T 7
	u	u 2	u 5	u 7
	The inlet velocities and temperatures at the junction for all non-adiabatic pipes are given in
	table 4.2.
	Table 4.2: Inlet velocity and temperature values for all non-adiabatic pipes in the three-rung
	ladder configuration.
	Pipe I	Pipe III	Pipe IV	Pipe VI

Table 4 .

 4 3: Inlet dynamic pressure values for all pipes in the three-rung ladder configuration.

	Pipe I	Pipe II	Pipe III	Pipe IV	Pipe V	Pipe VI	Pipe VII

  Let us introduce the characteristic curve χ(t; t n+1 , x) which passes through point x at time

	t n+1 ; it satisfies the following:
	dχ(t; t n+1 , x) dt	= u(χ(t; t n+1 , x), t),	(6.2)
	χ(t n+1 ; t n+1 , x) = x.	(6.3)
	Integrating (6.2) over the interval [t n , t n+1 ] we obtain:

Table 6 .

 6 2: The characteristics at the junction: pipes II and III are of the same type, either inflow or outflow.

		Inflow I	Outflow I
	Inflow II		ŷn I	=	Θ I y n I	+ (1 -
			Θ I ) µ I II,III y n II + µ I III,II y n III
	Inflow III	/	ŷn II = Θ II y n II + (1 -Θ II )y n II+1
			ŷn III = Θ III y n III + (1 -Θ III )y n III+1
	Outflow II ŷn I = Θ I y n I + (1 -Θ I )y n I-1
	Outflow	ŷn II = Θ II y n II + (1 -Θ II )y n
	III

I / ŷn III = Θ III y n III + (1 -Θ III )y n I

Table 8 .

 8 1: The values of the temperatures, inclinations, and inlet/outlet pressures for different scenarios of an isothermal flow through an open bifurcation of three pipes.

		case I	case II	case III case IV case V	case VI case VII
	T 1 (K)	280	280	280	280	260	280	280
	T 2 (K)	280	280	280	280	260	250	250
	T 3 (K)	280	280	280	280	260	220	220

Table 9 .

 9 2: The values of the dimensionless numbers characteristic of a laminar flow at small velocities through a thermosyphon with total length L = 1m, diameter D = 0.03m, and imposed temperatures at the walls T c = 300.15K and T f = 280.15K.

	Re	M a	P r	N u	P e	Ga	Gr	G 1	G 2
	128.48 1.67 10 -4 0.77 3.66	95.08	1.38 10 6	9.52 10 4	2.27 10 3	2.35

Table 9 .

 9 4:The transmission laws at the junction for the symmetrical three-rung ladder: the values of velocities and ratios between velocity and temperature at the junctions J 1

	and J 4 .
			pipe I	pipe II	pipe III
	u J 1 (m/s)	0.1119	0.1100	-0.001943
	u J 1 T J 1	(m/s K)	4.120 10 -4	4.051 10 -4	-6.978 10 -6
	u J 4 (m/s)	0.1147	-0.001943	0.1128
	u J 4 T J 4	(m/s K)	4.120 10 -4	-6.978 10 -6	4.052 10 -4

  Table9.6: The transmission laws at the junction for the asymmetrical three-rung ladder with L 3 = 1m,L 1 = 9m,L 2 = 1m (l > 1): the values of velocities and ratios between velocity and temperature at the junctions J 1 and J 4 .

			I	pipe II	pipe III
	u J 1 (m/s)	0.3379	0.6018	0.2638
	u J 1 T J 1	(m / s K)	1.2184 10 -3	2.2304 10 -3	1.0123 10 -3
	u J 4 (m/ s)	0.3175	0.2638	0.5814
	u J 4 T J 4	(m /s K)	1.2184 10 -3	1.0123 10 -3	2.2308 10 -3
			pipe I	pipe II	pipe III
	u J 1 (m/ s)	0.6439	0.3410	-0.3029
	u J 1 T J 1	(m / s K)	2.2228 10 -3	1.1773 10 -3	-1.0456 10 -3
	u J 4 (m / s)	0.6238	-0.3029	0.3209
	u J 4 T J 4	(m / s K)	2.2224 10 -3	-1.0456 10 -3	1.1774 10 -3

Table 9 .

 9 7:The transmission laws at the junction for the 6-rung ladder: the values of velocities and ratios between velocity and temperature at the junctions J 1 , ..., J 10 .

			pipe I	pipe II	pipe III
	u J 1 (m/ s)	0.4332	0.8130	0.3792
	u J 2 (m/ s)	0.8905	0.9889	0.09824
	u J 3 (m/ s)	0.9985	0.8588	-0.1398
	u J 4 (m/ s)	0.8775	0.4391	-0.4385
	u J 7 (m/ s)	0.8457	-0.4385	0.4078
	u J 8 (m/ s)	0.9089	-0.1398	0.7693
	u J 9 (m/ s)	0.8010	0.09824	0.8994
	u J 10 (m/ s)	0.4021	0.3792	0.7814
	u J 1 T J 1	(mm/ s K)	1.5876	3.0844	1.5001
	u J 2 T J 2	(mm/ s K)	3.0844	3.4346	0.37918
	u J 3 T J 3	(mm/ s K)	3.4346	2.9525	-0.48085
	u J 4 T J 4	(mm/ s K)	2.9525	1.4767	-1.4744
	u J 7 T J 7	(mm/ s K)	2.9539	-1.4744	1.4769
	u J 8 T J 8	(mm/ s K)	3.4718	-0.48085	2.9539
	u J 9 T J 9	(mm/ s K)	3.0927	0.37918	3.4718
	u J 10 T J 10	(mm/ s K)	1.5905	1.5001	3.0927

Table 9 .

 9 Table9.8 reports the values of velocities at the junctions.Table9.8: The transmission laws at the junction for the juxtaposition of two three-rung ladders: the values of the velocities at the junctions J 1 , ..., J 8 . 9 reports the values of the ratios between velocities and temperatures at the junctions. Table9.9: The transmission laws at the junction for the juxtaposition of two three-rung ladders: the values of the ratios between velocities and temperatures at the junctions Notice that the velocities are taken positive following the same convention we gave for the

		pipe I	pipe II	pipe III	pipe IV
	u J 1 (m/ s)	0.09853	0.1338	-0.0352
	u J 3 (m/ s)	0.2202	0.1354	0.08492
	u J 5 (m/ s)	0.06494	0.0186	0.08359
	u J 7 (m/ s)	0.09613	0.1593	0.06317
	u J 8 (m/ s)	0.1595	-0.0352	0.2135	0.0186

Table 9 .

 9 Table (9.10) reports the values of velocities at the junctions. 10: The transmission laws at the junction for the juxtaposition of two threerung ladders with an inclined adiabatic pipe: the values of the velocities at the junctions

	J 1 , ..., J 8 .
		pipe I	pipe II	pipe III	pipe IV
	u J 1 (m / s)	0.09789	0.1329	-0.03495
	u J 3 (m / s)	0.2205	0.1345	0.08332	-0.002802
	u J 5 (m / s)	0.06517	0.01973	-0.002882	0.08203
	u J 7 (m / s)	0.09553	0.1589	0.06339
	u J 8 (m / s)	0.1592	-0.03495	0.2139	0.01973

Table 9 .

 9 11 reports the values of the ratios between velocities and temperatures at the junctions.

Table 9 .

 9 11: The transmission laws at the junction for the juxtaposition of two three-rung ladders with an inclined adiabatic pipe: the values of the ratios between velocities and temperatures at the junctions J 1 , ..., J 8 .

			pipe I	pipe II	pipe III	pipe IV
	u J 1 T J 1	(mm / s K)	0.32846	0.44580	-0.12018
	u J 3 T J 3	(mm / s K)	0.73546	0.44812	0.27752	-9.3974
	u J 5 T J 5	(mm / s K)	0.21784	0.067826	-9.7756	0.27795
	u J 7 T J 7	(mm / s K)	0.32893	0.54721	0.21827
	u J 8 T J 8	(mm / s K)	0.54727	-0.12018	0.73529	0.067826
	Figures 9.27

Table A .

 A 1: The values of the a i .

	i	a i
		1.20083
		-0.299161
		0.160826
		-0.107437
		0.0796461
		-0.0627757
		0.0515192
		-0.0435107
		0.0375418
		-0.0329333
		0.0292752
		-0.026306
		0.0238513
		-0.0217905

Figure A.3: Behaviour of the parameters λ i , we notice that it is linear.

Table A .

 A 2: The values of the λ i and their gap.

	i	λ i	λ i -λ i-1
		2.74603	-
		9.25884	6.5128
		15.7882	6.52934
		22.3192	6.53102
		28.8507	6.5315
		35.3824	6.5317
		41.9142	6.53179
		48.446	6.53185
		54.9779	6.53188
		61.5098	6.5319
		68.0417	6.53192
		74.5737	6.53193
		81.1056	6.53194
		87.6376	6.53194
		94.1695	6.53195
		100.701	6.53195
		107.233	6.53196
		113.765	6.53196
		120.297	6.53196
		126.829	6.53196

The general flow simulation

In the following, we show the results obtained by implementing a flow with varying temper-

atures through an open bifurcation composed of three pipes. The results will be shown in a grid 9X9 having from the top to the bottom temperature, velocity, and dynamical pressure and from the left to the right the first, the second, and the third pipe. We will give the results obtained with the same inclinations we will use in the following chapter. At first, we study the case in which the velocities in pipes 1 and 3 are positive while the velocity in pipe 2 is negative, resulting in two effective inflows and one effective outflow pipe. Then, we show the results obtained in the case of two effective outflows and one effective inflow pipe.

Two inflow pipes

We take pipes with the same length L = 1m, the same number of space nodes N pipe = 600, and CF L = 0.9. Table 8.2 shows each pipe reference temperatures, inclinations, inlets, outlets, and initial temperature and velocity values.

Chapter 10. Conclusion

• We conceived an elliptical solver based on finite volumes for discretizing the Dirac deltas arising at the junction between the pipes due to the gravity field;

• We developed a characteristic method to deal with the transport equation for temperature and velocity. This method is unconditionally stable, allowing faster computations, and allows us to impose the mass conservation law at the junction. For more complex junctions with more than three incident pipes, The upwind method is more flexible and allows us to overcome the problem encountered with the characteristics method, but it is stable only for the values of cfl< 1, resulting in an increase of computational time;

• We developed a prediction-projection algorithm to couple the velocity and dynamic pressure simulation. The procedure we used is different from the standard one since, in our case, we do not want to impose that the velocity divergence is null; additionally, this approach could be coupled with the elliptical solver. The implementation through the numerical program, validated against the reference analytical solutions, has also proven accurate and scalable.

We obtained results of order one in space and time.

Perspectives

From the numerical point of view, it would be possible to enrich the algorithms to make them more accurate and efficient, for example, by using second-order schemes. It could also be possible to adopt techniques like finite elements or finite volumes methods instead of finite differences. Concerning the modeling aspect, we have developed an averaged one-dimensional model under the strong assumption of a low Mach regime and implemented only the equations in the laminar regime. The exact solution was possible through the hypothesis of constant kinematic viscosity. Possible future developments could be the analysis of a turbulent regime, which presents no difficulties in the 1D framework, and extending the algorithm to different configurations. Moreover, we must also consider an extension to a non-ideal gas, to nonconstant C p (T ) or ν(T ), to the non-constant cross-section and non-cylindrical pipes.

Appendices

Appendix A

Velocity and temperature profiles in pipe flows

In this chapter, we remind the Poiseuille and Graetz problems to fix the velocity and temperature profile on a cross-section.

A.1 The Poiseuille flow

We refer to [Mason] and [START_REF] Douglas | Fluid Mechanics[END_REF] for more details.

Consider a two-dimensional axisymmetric flow in a pipe and fix a coordinate system with the axis x coinciding with the pipe axis. We take as x = 0 the pipe entrance and as x = L its exit. Suppose the radial axis centered at the center of the pipe reaching the value r = R at the pipe wall. We neglect the effect of gravity and consider incompressible flow. We write the vector of velocity as ⃗ u = v⃗ e r + u⃗ e x . The two-dimensional axisymmetric steady Navier-Stokes equations by components read:

We have as boundary conditions that the velocities at the wall are null.

The flow is homogeneous along the x-direction since it can be assumed completely developed;

this implies that u(x) = u(x + h) ∀h. A consequence is that ∂ x u = 0 from the relation This means that the ϕ i are orthogonal with respect to the inner product induced by the Poiseuille velocity. Then we have the other boundary condition for which:

If we multiplicate both the sides by y(1 -y)ϕ j (y) and then we integrate:

We have by orthogonality that only the term in which i = j at the left-hand side is not null, and finally:

So that the a i are:

A.2.2 The computed λ i , a i and ϕ

In order to find the values of λ i , we have found the roots of the function ϕ i (1, λ i ) while for the coefficients a i we have used equation (A.15). Let us notice that finding the zeros of ϕ i (1, λ i )

is not so straightforward since, in this case, the sensibility linked to the initial guess for the iterative method is very high. In the following, we will show some tables and plots of the computed quantities. As we have predicted previously, starting from x = 0.05, there is a change of Behavior in the temperature, which is reflected in the fact that Nusselt is constant.

Appendix B

The Riemann solver

This chapter presents one of the most common Riemann problems, the shock tube problem.

We develop a numerical algorithm based on the hllc solver and show how to use this tool to approach more general problems. In the first stage, we will handle the issue of transmission conditions in the case in which three pipes intersect. We will give a possible modeling of the bifurcation through a parallelism with the electrical circuits.

C.1 The electric parallelism

Let us assume that the temperature is constant; this means that the divergence of the velocity is null and so that the velocity is constant.

Let us assume that the relation between velocity and pressure is the same relation between current and potential, so from now on, velocities will be equivalent to currents, pressures to

Appendix D

A 2 D and 3 D analysis through

Mathematica

Here, we give an idea of the results obtained for the fluid flow through closed two-dimensional pipeline networks. We use the finite-elements method in Mathematica. Our goal will be to study the flow driven by temperature gradients by coupling the Navier-Stokes equations with energy conservation on an adequately refined mesh. We intend to study different meshes, including fractal ones, like the Sierpinski carpet. The mesh we use is composed of triangular elements and is more refined at the domain borders.

Let us assume that the density of the flow is constant. We set ρ = 1 and µ = 10 -4 . The values we use for the simulations of the temperature parameters are c p = 4200 kgm 2 s 2 K and k = 0.54 w mK . We consider two-dimensional Navier Stokes equations coupled with the energy equation:

These equations are coupled with time-independent boundary conditions for closed domains.

We impose no-slip conditions on all boundary edges for the velocity, the temperature at the left wall T l = 1K, the temperature at the right wall T r = 0K, and p(0, 0) = 0P a. The system is at rest at t = 0s. Our numerical algorithm consists of two steps: first, perform a semidiscretization in time, then solve in space at each time step using the function NDSolveValue.

Appendix E

The direct approach for the treatment of Dirac deltas

This chapter aims to give a more detailed discussion of the direct approach to treating the Dirac deltas. The aim is to construct an algorithm for the solution of the system:

with k(x) > 0 to avoid degeneracy. This is a stationary one-dimensional problem with the only space variable â ≤ x ≤ b in which the source term ĝ(x) has the special structure:

where D ∈ N * is the total number of Dirac deltas.

The main reference for this section is [START_REF] Boyer | Méthodes de volumes finis pour les écoulements en milieux poreux[END_REF].

Here, we use the finite-volume method. Here, we construct our algorithm step by step. We start with k(x) = 1, and ĝ(x) = f (x) (D = 0). Then we deal with the case ĝ(x) = f (x)+ ᾱ1 δ x1 (D = 1). Finally we treat the general case of D Dirac deltas. The source term would be b i = ∆x 2 fi ∀i ∈ [1, N -3]. In the extreme cells periodic boundary conditions allow us to write the scheme as follows:

So:

kN-2 + k0 + kN-3 kN-2 + kN-3 .

Remark 34 If we suppose k(x) = const., we recover the previous expressions.

Let us now analyze the cells j l and j l + 1 in the three possible cases:

1. Case a l = x j+l+ 1 2

In this case, the linear system does not change. We will have some changes at the level of term source:

Where: ∆x -k2 j (a l -x j ) kj ∆x 2 + ∆x(a l -x j ) kj+1 -3 kj 2 ψ j+1 = b j .