Before digging into the detailed analysis of the program mathematical model, we will start with a qualitative description and illustrate its actual implementation on a simple application case (003.dat) involving the complete PWR system

Despite of the major simplifying assumptions set up at the genesis of the project, the exact resolution of the system of tightly coupled, non-linear, balance equations remains a difficult task.

We will have recourse to a decomposition method: it consists in splitting the composite physical transformation undergone by the fluid in the course of the time-step, into an iterated sequence of partial transformations in each of which a part only of the physical variables is allowed to vary.

As explained earlier, thanks to the implicit solution scheme, the severe restrictions imposed by the Courant numerical stability criterion are avoided, which makes it feasible to accept large time-steps and volumes without jeopardizing stability and also allows evaluating solution accuracy by simply decreasing node volumes.

Furthermore, as the resolution method does not resort to any preliminary linearization (through Jacobian calculation) and as the converged solution strictly verifies the original field balances, it is feasible to check the solution by directly substituting it into the original balance equations.

At last, as we are not faced with having to solve large linear equation systems, the calculation time increases only linearly (as opposed to a 2.5 power) with the number of nodes.

More explicitly, as far as the primary side is concerned, the system of **m**ass, ent**h**alpy and **b**oron balance equations (in short "**m,h,b**-balances") is firstly solved under the assumption that the (global) primary pressure **p3** and the primary pumps volumetric flows **wvpl** are available.

The **m,h,b**-balances route starts from the core outlet **o**, which plays the important role of primary system cross-road point.

Starting with the current values of **(w,h,b)el** at **loop_1** inlet, implicit Euler (**m,h,b**) balances are firstly carried out on the successive nodes

`li(1:i9l(l))`

of the current loop (loop_l), following the fluid displacement.Next, through *dowcomer* **a**, core *bottom* **b**, the successive nodes of the *core* **c** and the *dome* **d**.

Back to core outlet, the enthalpy balance becomes necessarily explicit there, insofar as the enthalpy **hel** of the fluid outgoing **o** and feeding the loops was already assumed at initiation of loops balances.

Actually**O** processing is the only exception to implicitness in balance calculations.

In order to avoid the possible numerical instability which could result thereof, an under-relaxation factor**omo** [OMega;Outlet] has been provided.

Actually

In order to avoid the possible numerical instability which could result thereof, an under-relaxation factor

As already mentioned, it is possible that the primary balances need to be repeated, in case of large time-step, if instability is observed for the **o**-balance.

In such a situation, the detailed balances processing (*do, component-name*) are not repeated, but can be replaced by a simplified node balance (*redo, component-name*) making use of the isobaric **h**-derivatives **vmh** of **vm** saved along the *do, component_name* route.

It should be pointed up that the local field conservation is not affected by incomplete convergence.

In such a situation, the detailed balances processing (

It should be pointed up that the local field conservation is not affected by incomplete convergence.

"**oxp**" stands for: core **O**utlet + e**X**pansion branch of the pressu + compressible vapor-water mixture of the **P**ressu.

The (**m,h,b**)balance on **o** generates the flow **wso** escaping **o** towards **x**. **wso** actually represents the accumulation rate of the mass dilatation/contraction of the successive nodes along the **m,h,b**-balances route, including **o** itself.

If **wso > 0** , **hso = h2o ** and **bso=b2o** according to the implicit scheme.

On the contrary, if **wso < 0** a "special balance of **o** must be performed wherein **hso** cannot result from the **o**-balance but is taken as the current **h** value at the foot of **x**, and the balance solved for **wso** in place of **hso**.

Next, the balances are carried out though the successive nodes **xm=1,i9m** of the expansion line

The balances calculations are, at last, completed by a **m,h,b,v**-balance on **p** .

As no fluid can escape from**p**, which is the dead end of the balances **ox** route, we must accept that the **p**-volume varies freely (**v2p /= v1p**) /= [means "not equal to"] and this will result in a volume error **v2p**: eos volume, **vp**: geometrical volume).

As no fluid can escape from

`v2p-vp`

(At last, the mass flow at loops entry (**wel**), pressurizer spray (**wspr**) and dome by-pass (**wed**) are updated by solving the fluid kinetic momentum balance equations, making use of the dilatation rates calculated along the nodal balances.

The SG deserves a reasonably realistic modeling in view of the important potential reactivity release, caused by a cooling accident, at of cycle, when the temperature coefficient is large.

The simplified model implemented for the SG is inspired from that of the primary model. It features modelling water natural recirculation, level regulation and vapor-water separation in the dome. This should provide a fair prediction of mass and enthalpy inventories and heat-exchange through the SG tubes.