# Simcryogenics: a Library to Simulate and Optimize Cryoplant and Cryodistribution Dynamics

F. Bonne, S. Varin, A. Vassal, P. Bonnay, C. Hoa, Francois Millet, J.-M. Poncet

► To cite this version:

F. Bonne, S. Varin, A. Vassal, P. Bonnay, C. Hoa, et al. Simcryogenics: a Library to Simulate and Optimize Cryoplant and Cryodistribution Dynamics. Cryogenic Engineering Conference (CEC) 2019, Jul 2019, Hatford, United States. IOP Conference Series: Materials Science and Engineering, 755 (1), pp.012076, 2020, 10.1088/1757-899X/755/1/012076. cea-04811338

HAL Id: cea-04811338

https://cea.hal.science/cea-04811338v1

Submitted on 2 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Simcryogenics: a Library to Simulate and Optimize Cryoplant and Cryodistribution Dynamics

F. Bonne, S. Varin, A. Vassal, P. Bonnay, C. Hoa, F. Millet and J.-M. Poncet

UMR-E 9004 CEA/UJF-Grenoble 1

INAC, SBT, 17 rue des Martyrs, 38054 Grenoble, France

E-mail: francois.bonne@cea

**Abstract.** In many fields of engineering, conception and operation teams need to perform simulations in order to design systems fulfilling the user requirements and to operate the systems efficiently. To simulate a cryogenic plant and its distribution to the end-users, a large number of commercial or homemade tools are nowadays available. However, there is a lack of available solutions for rapid dynamic simulations either for control with model-based design and for design optimization through parametric studies. This article presents the Simcryogenics library that has been developed at the CEA Cryogenic Engineering Department for several years. This library aims at generating model-based control schemes for cryogenic plants that are subject to high disturbances (such as the pulsed heat loads in fusion reactors or particle accelerators). The library is based on Simscape, the modelling language extension of the Matlab/Simulink software suite, which is very flexible and well documented. This paper introduces how Simcryogenics works, how to use it as well as it provides examples of applications such as the modelling of warm compression stations and cold boxes, the simulation of the cooling of superconducting magnets and RF cavities, the generation of control schemes.

## 1. Introduction

The fields of cryogenics and cryogenic engineering have come to maturity since the air was for the first time liquefied in the early 20th century, and has become particularly important with the construction of the first practical superconducting magnets in the 1960s. In fact, helium cryogenic systems are crucial components of any device using superconductors as these need to be cooled down and kept at a very low temperature (several kelvins for metallic superconductors). The flagship applications are electromagnets capable of producing high magnetic fields, used in instruments such as elementary particle colliders (such as LHC and future ILC), large research test facilities (the future research facility XFEL which will generate extremely intense X-ray to be used by researchers from all over world, or the accelerator test facility FAIR which is a unique international accelerator facility for the research with antiprotons and ions [11]), experimental and future nuclear fusion tokamak reactors (JT-60SA in Japan, ITER in France, DEMO), and also in magnetic resonance imaging.

The spectrum of cryogenic applications, in terms of refrigeration power and supplied temperature, is illustrated graphically in figure 1. These areas, ranging from fundamental physical research, (potentially) clean and cheap energy generation, to medical diagnosis tools, make evident the current and future benefits that cryogenics and efficient cryogenic systems can bring to society.

Cryogenics is a very high energy consuming application field, with efficiency ratios higher than 250 electric watts needed to produce one useful cooling watt at 4.5 K in steady operation. All refrigeration systems need electrical energy to operate, and the refrigerating powers required by major scientific

<figure><img src="image_2.png" /></figure>
<figure><img src="image_3.png" /><figcaption>**Figure 1.** Cryocooler applications and operating regions [8]</figcaption></figure>

programs (LHC: 150 kW at 4.5 K, XFEL: 15 kW at 4.5K, FAIR: 40 kW at 4 K, ITER: planned 75 kW at 4.5 K and 1300 kW at 80 K) have today reached extremely high values. The energy consumption of such installations is becoming comparable to that of an average-size town (40MW). For example, the electrical power consumed by a large scientific infrastructure like the LHC in CERN is of the order of 150 MW, with helium refrigeration taking up 40 MW of this power (3.2MW for XFEL, 10MW for FAIR). In addition, stability is crucial for the processes that use cryogenic fluids because of their high sensitivity to temperature variations. For example, even a very small increase of temperature over the nominal operating value can make the superconducting condition of a material to be lost (quench) and this can result in severe damages to superconductor-based circuits, in an extremely short delay. Other than the economical aspect of these damages, the procedures to warm-up, repair and cool down cryogenic plants and systems require large amounts of time and energy, thus increasing operational costs and reducing the availability of these facilities. Large cryogenic plants have to adapt their cooling production to the duty cycle of the research infrastructures with variable cooling needs. A particular control case to be considered is a scenario in which the refrigerator is subject to pulsed heat loads resulting from the operation of the tokamak device (ITER or JT-60SA). The regulation of those thermal loads while keeping the whole refrigerator as close as possible to the equilibrium is a requirement to be taken into account in the design of the cryogenic system. Given the complexity of the refrigerator unit, which is a nonlinear and interactive system, tight control can only be obtained with model-based advanced multivariable control.

Up to now energy consumption and energy efficiency have not been the main priority in the design of cryogenic facilities, due to their singularity of utilization, mainly in scientific or applied research. However, the negative environmental impacts of energy production require an optimization of the efficiency of all human activities, including cryogenic facilities, whose applications are expected to increase in quantity, nominal power and variety in the coming years. Any improvements allowing to reduce the costs of operation of cryogenic systems, and to increase their availability would be extremely useful. Moreover, it is highly desirable that any proposed solution be flexible and easily adaptable to different technologies, products and environments. These rising requirements have led to an increase in system complexity resulting in greater needs for automatic control and simulation to manage all stages of operation and ensure operating safety.

To these aims, this paper introduces the Simcryogenics library design, simulation and control library for MATLAB / Simulink / Simscape. It is organized as follows, section 2 presents the philosophy of the modelling library and describes briefly how it works while section 3 gives details on some dynamical
models of components. Section 4 shows some examples of what have already been performed with the library. Section 5 summarizes the contribution and gives ideas for future work.

## 2. The Simcryogenics library

This section presents the Simcryogenics library of cryogenics components that can be used for different purposes (parametric studies, mono or multivariable control design, etc.).

### 2.1. Philosophy

This library has been developed at first for control (both design and validation) purposes: the aim was to have a model available to generate model-based control scheme (example of this application can be found in [1] or [4]). However, the models can be useful also for other purposes such as dynamic simulation for design or preparation of operation. Some control applications of the library are presented in section 3. The library is object oriented. Like it is presented hereafter, the components are dragged and dropped on a Simulink worksheet and connected together according to certain rules. There are two types of connections : fluid and thermal. The fluid domain is made to deal with fluid circulation and thermodynamics transformation while the thermal domain is made for heat exchange and transfer.

### 2.2. Available components

The main available components in the Simcryogenics library are listed below while some of them are illustrated in Figure 2:

- Screw compressors

- Cold compressors

- Valves

- Immersed heat exchanger (that works associated the phase separator)

- Phase separators

- Heat exchangers (from 2 to 4 fluids)

- Pipes (0D (Fluid Volume) and 1D, Cable in Conduit Conductors, ...)

- Turbines

- Pressure drop

- Heat loads

- Thermal links (thermal conductance)

- Thermal masses (thermal inertia)

- Sources/sinks (both fluid and thermal)

<figure><img src="image_4.png" /><figcaption>**Figure 2.** Example of components available in the Simcryogenics library</figcaption></figure>
- Sensors

- ...

This list of components comes with utilities that are helpful to build a model:

- Fluid properties (Helium, Nitrogen)

- Flow multipliers / divider (to help simulate parallel channels)

- ...

With those components, a cryogenics refrigerator or a cryodistribution system can be modelled (see section 3). As the paper will not give more details on heat exchangers and 1D pipes model, key features will be given here. Their models are space discretized into the helium flow direction (to model the fluid displacement) while their pressure drop is modelled through simple proportional formulas, or with correlation (or it is user-defined). Heat exchangers can exchange heat between different fluids and every branch can be used with co-current or counter-current mass flow as they possess back-flow capabilities.

## 2.3. *How does it work?*

Once the components needed to model the cryogenic system of interest are selected and placed into a Simulink worksheet, one has to connect to represent the flow distribution such as illustrated in a Process Instrumentation Diagram (P&ID). One rule is to be followed to connect the components: components that impose the flowrate/enthalpy flow (valves, pressure drop, ...) must be connected to a component that imposes pressure/ specific enthalpy (pressure/temperature source, fluid capacity, phase separator, ...). Figure 3 illustrates how to connect components. This figure illustrates that it is possible to connect several components imposing the flowrate to the same component that impose the pressure. At each node,

<figure><img src="image_5.png" /><figcaption>**Figure 3.** Example of connections between several valves, pressure/temperature sources and fluid volume components. Several valves are connected to the same component that impose the pressure. Fluid properties is given by the *Fluid prpts* component. The 'C' blocks provide valve opening values.</figcaption></figure>

balances are done on two quantities : mass and enthalpy flow. On figure 3, there is 3 nodes. The node 2 that connects the 3 valves and the fluid volume will be described in details. On this node, the 3 valves calculate their mass flow as a function of their inlet and outlet pressure (and inlet specific enthalpy), and the corresponding enthalpy flow. These quantities are signed : if the mass flow is going out of the valve, it is counted as positive to the node (same for the enthalpy flow). If the mass flow is going into the valve, it is counted as negative to the node (same for the enthalpy flow). The balances on the mass and enthalpy flow that are calculated at this node are then received by the *fluid volume* component in which the evolution of the pressure and specific enthalpy are calculated, according to the equations given in the next section.
## 2.4. Example of component models

In this section, two components of our library will be described to illustrate the way of modelling dynamic phenomena. This way, the reader may appreciate the level of details used in the Simcryogenics library. The component "Valve" will be detailed first, because it does not show any dynamics behaviour (i.e. no differential equations). The fluid volume component in which dynamics appears is to be presented after.

### 2.4.1. Valve

The Valve component has to calculate the mass flow and the enthalpy flow that passes through node A to node B of figure 4.

<figure><img src="image_6.png" /><figcaption>Figure 4. Valve representation in Simcryogenics</figcaption></figure>

Its behaviour will be considered without any dynamic and consist only in algebraic equations. First the mass flow $\dot{m}$ passing through the valve is calculated according to [9, 7] and can be expressed by equation (1):

$$ \dot{m} = \text{sign}(A.p - B.p) \cdot 2.4 \times 10^{-5} \cdot C_v \cdot \left(1 - \frac{X}{3 \cdot X_c}\right) \sqrt{\rho \cdot HP \cdot X} \quad (1a) $$

$$ C_v = \frac{C_{vmax}}{R_v} \left( \exp\left(\frac{Pos}{100} \log R_v\right) - \left(1 - \frac{Pos}{100}\right) \right) \quad (1b) $$

$$ X = \min \left( \frac{HP - LP}{HP}, X_c \right), \quad X_c = \frac{\gamma}{1.4} X_t \quad (1c) $$

where $\gamma$ is the heat capacity ratio and $\rho$ the density of the inlet fluid, both under pressure $HP$ and specific enthalpy $h_{in}$. $X_t$ is a constant given by the valve manufacturer depending on the valve type. $R_v$ and $C_{vmax}$ are valve sizing constants, respectively the rangeability and the flow coefficient. The variable $Pos$ is the control variable. It represents the valve opening in percent. $A.p$ and $B.p$ are respectively the pressure at node A and B. The $HP$, $LP$ and $h_{in}$ quantities are calculated through the following logical equations:

$$ HP = A.p \quad \text{if} \quad (A.p \geq B.p), \quad B.p \quad \text{otherwise} \quad (2a) $$

$$ LP = A.p \quad \text{if} \quad (A.p < B.p), \quad B.p \quad \text{otherwise} \quad (2b) $$

$$ h_{in} = A.h \quad \text{if} \quad (A.p \geq B.p), \quad B.h \quad \text{otherwise} \quad (2c) $$

These equations show that the component can deal with multi directional mass flow (from node A to B or the opposite). If the mass flow is going from node A to node B, it is considered positive, otherwise negative. It works the same way for the enthalpy flow which is calculated as follows:

$$ \dot{Q} = h_{in} \cdot \dot{m} \quad (3) $$

The Simcryogenics Valve model has been introduced. To calculate the mass and enthalpy flow, it uses the pressure and specific enthalpy available at its node A and B. The following section will detail how this pressure and specific enthalpy can be made available (by using a Fluid Volume component in this case).
2.4.2. Fluid Volume The fluid volume component presented by figure 5 has two nodes of different kind: A and H. The port A is to be connected to the fluid domain (i.e. to other components) while the port H is (optionally) to be connected to an thermal domain (e.g. a power source or thermal resistance).

<figure><img src="image_7.png" /><figcaption>Figure 5. Fluid Volume representation in Simcryogenics</figcaption></figure>

The fluid volume calculates the pressure and the specific enthalpy imposed at its node A as a function of the mass and enthalpy flow balances. One can see that it works complementary to the valve that calculates the mass and enthalpy flows as a function of pressure and specific enthalpy. To calculate the pressure and the specific enthalpy, the following couple of differential equations is used :

$$ \dot{\rho}V = \dot{m}_{balance} \qquad (4) $$

$$ (u\dot{\rho} + \dot{u}\rho) \cdot V = \dot{Q}_{balance} + \dot{Q}_{ext} \qquad (5) $$

in which u and ρ stand for the internal energy and density of the fluid inside the Fluid Volume component. V depicts the fluid volume that is a parameter of this component. Respectively, $\dot{Q}_{balance}$ and $\dot{m}_{balance}$ stand for the energy and the mass balance calculated at the node A. $\dot{Q}_{ext}$ is the heat received through the thermal port H. the differential equations are integrated by the modelling tool Simulink and their resolution is out of the scope of this paper. Supposing that u and ρ are available all along the simulation, pressure and specific enthalpy at node A and temperature at node H, are calculated through interpolations into the fluid property tables.

### 3. Applications

This section summarizes the work that has already been performed using the Simcryogenics library. Details are not presented in this section as they have already been given into the corresponding bibliography. This section illustrates the variety of possible applications offered by the library.

#### 3.1. SBT's Cold box model and simulation

One of the first application of our modelling work was to model the DSBT 400 W @ 1.8 K (in the 4.4 K configuration) refrigerator to work on model-based control. The library has improved since these firsts models but the differential algebraic equations were almost the same. The article [2] presents the refrigerator that is modelled and associated comparison of predicted behaviour versus experimental results while the refrigerator was submitted to pulsed heat load. The model shown a good agreement with the experience in the case of transient heat load applied to the helium bath.

#### 3.2. Boundary condition estimation

Based on the work presented by the article cited in the previous section, it has been possible to build a so-called "virtual sensor" which is a boundary condition estimator. The heat load being used to disturb the cryoplant to make comparison to experimental data has been estimated in real-time with a non-linear observer based on the thermal-hydraulic model. It means that without the knowledge of the load applied to the refrigerator, it is possible to estimate it accurately and make it available for the operator for monitoring purposes or to set up alarms if the estimated value reaches certain limit for example. The
details of the model that has been used and the real-time dynamic estimation algorithm is presented in
[1].

### 3.3. *Control scheme design*

The model designed with the Simcryogenics library can be used to generate control scheme. These control scheme can be mono (PI, ...) or multi variable (LQ, MPC, ...), based on the plant linearization performed by Simulink. For mono-variable control, the PID block of Simulink can be used to automatically linearize and tune the PID parameters to get the required time response. Details on this technique and how to use it with Simcryogenics are presented in [5]. It is also possible to design advanced control scheme such as linear quadratic (LQ) or model predictive control (MPC) using linearized model made with Simcryogenics. Two kinds of multi-variable controllers have been designed for warm compression station (WCS) : a LQ for the CERN's one [4] and a model predictive controller for the DSBT's one[3]. Both papers shown that it is possible to use a multi variable controller based on a model of the system to potentially improve performance in terms of disturbance rejections and stability.

### 3.4. *Process Optimization*

The simulation library can also be used for process optimization. In [6], the optimization of the thermal hydraulics parameters of a supercritical helium loop subject to constraints is performed. The idea was to minimize the power consumption of a DEMO cable in conduit conductor (CICC) by playing on the inlet temperature of the cooling loop (closely linked to the bath temperature) and the mass flow passing thought the CICC. Many solutions (in terms of inlet temperature and mass flow) are compliant with the requirements in term of temperature margin (the CICC temperature must be kept below the current sharing temperature by 1.5 K ) but only one was optimal from an energetic point of view. The article presents the model and the algorithm used to find the optimal parameters.

### 3.5. *The SPIRAL2 cryomodule*

In [11], the Simcryogenics library is used to model the cryomodules and valve boxes of the SPIRAL2 accelerator. A cryomodule being the word used to designate a superconducting accelerating cavity and its associated cryogenic system. The paper shows the agreement between simulated and measured data. As the model was precise enough, it has been used to develop a "virtual sensor" of the heat load extracted by the helium bath in which the cavity is submerged [10]. It has also been shown that this heat load could be used to calculate the quality factor which is a key indicator of the cavity state.

## 4. Conclusion and future work

This paper has presented the Simcryogenic library, how it works and has summarized the work already performed with it. We have seen that it can be used to model refrigerator (including the compression station) or cryodistribution. Once the model is done, it can be used to simulate its behaviour or to optimize some parameters. The model can also be used to design or to verify controllers. In the future, the library will be used for new applications : model a HELIAL cryoplant in order to connect the model to the associated PLC program through OPC.

## Acknowledgment

Authors would like to deeply thanks the students involved in this project for the past few years and the co-workers of the cryogenic engineering department who supported us in this developments. We would also like to thanks nationals and Europeans funding agencies since this work has been partially supported through the European Fusion Development Agreement (EFDA) Goal Oriented Training Program, task agreement WP10-GOT-GIRO, through the French National Research Agency (ANR), task agreement ANR-13-SEED-0005 and ANR-07-BLAN-0307 and JT-60SA.
**5. References**

[1] F. Bonne, M. Alamir, and P. Bonnay. Nonlinear observer of the thermal loads applied to the helium bath of a cryogenic Joule–Thomson cycle. *Journal of Process Control*, 24(3):73–80, 2014.

[2] F. Bonne, M. Alamir, and P. Bonnay. Physical control oriented model of large scale refrigerators to synthesize advanced control schemes. design, validation, and first control results. *AIP Conference Proceedings*, 1573(1):1594–1601, 2014.

[3] F. Bonne, M. Alamir, and P. Bonnay. Control of warm compression stations using model predictive control: Simulation and experimental results. *IOP Conference Series: Materials Science and Engineering*, 171(1):012135, 2017.

[4] F. Bonne, M. Alamir, P. Bonnay, and B. Bradu. Model based multivariable controller for large scale compression stations. design and experimental validation on the lhc 18 kW cryorefrigerator. *AIP Conference Proceedings*, 1573(1):1610–1617, 2014.

[5] F. Bonne, P. Bonnay, C. Hoa, G. Mahoudeau, and B. Rousset. Modelling and model-based-designed PID control of the JT-60SA cryogenic system using the simcryogenics library. *IOP Conference Series: Materials Science and Engineering*, 171(1):012028, 2017.

[6] F. Bonne, C. Hoa, Q. Le Coz, L. Zani, B. Lacroix, and J.-M. Poncet. Optimization of the cooling capacity of the cryomagnetic system for eu demo at the pre-conceptual design phase. *Fusion Engineering and Design*, 2019.

[7] Emerson. *Control Valve Handbook*. Fischer, fourth edition edition, 2005.

[8] M J. Gouge, Jonathan Demko, Benjamin Mcconnell, and J M. Pfotenhauer. Cryogenics assessment report. 01 2002.

[9] P. Thomas. *Simulation of Industrial Processes for Control Engineers*. Butterworth-Heinemann, 1999.

[10] A. Vassal, P.-E. Bernaudin, P. Bonnay, F. Bonne, A. Ghribi, and F. Millet. SPIRAL2 cryogenic system thermodynamic behavior prediction through dynamic modeling. *Proc. 29th Linear Accelerator Conference (LINAC'18), Beijing, China, 16-21 September 2018*, (29):366–369, 2018.

[11] A. Vassal, F. Bonne, A. Ghribi, F. Millet, P. Bonnay, and P. E. Bernaudin. Dynamic modeling and control of the SPIRAL2 cryomodules. *IOP Conference Series: Materials Science and Engineering*, 502(1):2–6, 2019.