• No results found

Our aim is to learn closure terms for a limited parameter space encasing the standard test case described in section 5.2. This test case is plotted as a cross in Figure 4.4b, where it is shown to be well in the well-posed stable regime of the two-fluid model. This means that we can safely apply perturbations to this case, with confidence that the waves will damp out with time, so that our simulations will remain limited to stratified, small perturbation flow. In the long wavelength limit, 2D inviscid stability analysis gives a stability boundary equal to the ill-posedness boundary for the two-fluid model (also shown in Figure 4.4b). Therefore we can be confident that our 2D simulations will be similarly stable. Because our standard parameter set is deep in the well-posed stable area, we can safely conduct simulations with a parameter range around this point.

Our parameter ranges are shown in Table 7.1. Two of the three varied parameters are axes of the stability map shown in Figure 4.4b, the third parameter ∆hint has no influence on this plot. We

choose to vary only three parameters as opposed to the seven varied in chapter 6, because now we are using space- and time-dependent simulation data as opposed to analytical steady state data, so that we require much more computation time per parameter set. This makes it infeasible to sufficiently fill out a

Table 7.1: The ranges for the parameters of our wavy unsteady high fidelity simulations, used as training data. The remaining parameters are kept constant and equal to the standard parameters of Table 5.1. We start simulations with two different types of initial conditions; one where the fluids are completely at rest, and one where at each position along s the theoretical steady state is calculated, corresponding to the local interface height hint.

Initialization hint[H] ∂p/∂s [Pa/m] ∆hint[H] N

zero wavy [0.05, 0.95] [0, −3] [0.00, 0.04] 30 developed wavy [0.05, 0.95] [0, −3] [0.00, 0.04] 30

seven-dimensional parameter space with the available computational resources, while a three-dimensional space remains manageable.

The parameters of Table 7.1 are sampled using Latin Hypercube Sampling (LHS) [157], with N = 30 samples per initial condition. With this sampling method, the input space of each variable parameter is divided into N sections. Then a random sample is taken within each of these sections, for each variable. The random samples taken per parameter are randomly coupled with the random samples of the other variables. With this method we ensure that the input space of all parameters is representatively sampled, and that values of the parameters are never repeated over multiple samples. As is noted in the original article by McKay et al. [157], this is an advantage when the output of the model is dominated by only one or a few of the varying parameters, which was hypothesized to be a problem with the uniform sampling method described in section 6.7.

Out of all the parameters that we can vary, we choose to vary hint, ∂p/∂s, and ∆hint, with regard

for practical application. If the fluids and pipe geometry are set, these parameters are all that remain, besides perhaps the wavelength of the wave. Having a closure model trained on data in which these parameters are varied allows dynamic low fidelity simulation of flow in a fixed pipe with fixed fluids, without running much risk (determined only by the chosen ranges) that the model might enter a regime for which the closure model has not been trained.

We limit the parameter ranges as to not consider very thin layer flow (at low and high hint), which is

difficult to resolve with our 2D code, leads to different effects in our 1D code (see top of Figure 4.4b), and which nears single-phase flow, the transition to which our codes cannot handle.

The dynamics of our test case were studied in subsection 5.5.2. For both initial conditions we get ‘standing’ waves which travel at low speeds, and damp out after some time. For the developed wavy case the waves travel a bit faster from the beginning. The standing wave behavior arises because two waves traveling in the opposite direction are generated from the initial perturbation. In practical pipeline applications, the velocities will be higher and the traveling behavior will be more prominent than the oscillating behavior. However, our test case does include both behaviors and serves as an example of low Reynolds and low Froude number behavior.

Varying the parameters as given in Table 7.1 will give rise to many different velocity profiles, and stresses. Performing unsteady simulations means we will acquire many data points per parameter set, equal to the number of grid cells along the s-axis multiplied by the number of snapshots that we take, as opposed to just one steady state per parameter set as in chapter 6. Though we can increase the amount of data by increasing the spatial and temporal resolution, if the resolutions are high the data points might be nearly identical and not actually add extra information. This also depends on the state of the flow; in the initial unsteady phase of the simulations different points will contain more information than in the eventual steady and fully developed phase. Therefore we take the approach to take many snapshots (40 per second, over 10 second simulations) and take data from each horizontal position (spatial resolution from chapter 5 is H/64, with L = 12H making 768 points along the s-axis). We aggregate the ∼ 300000 data points per simulation to form our data set, resulting in over 9 million points per initial condition, and then randomly sample a small portion (5–10%) of it.

In this chapter, we train networks on the initial conditions of Table 7.1 separately, and we train networks on a data set in which the data for the two initial conditions is combined. We refer to these networks as

• ‘zero wavy net’, • ‘developed wavy net’, • ‘zero + developed wavy net’.