Feasibility of Deep Neural Network Surrogate Models in Fluid Dynamics

This paper studies reduced-order-models for the ﬂuid ﬂow problem of a digital valve, and whether it may eﬃciently be formulated by a deep Artiﬁcial Neural Network (ANN) to model e.g. the valve ﬂow, ﬂow-induced force, stiction phenomena and steep local pressure gradients that arise before plunger impact, which may otherwise require CFD to be accurately modeled. Several methodologies are investigated to evaluate both the required computation time and the accuracy. The accuracy is benchmarked against CFD solutions of ﬂows and forces. As basis for comparison an analytical model is proposed where some ﬁtting parameters are allowed, and the equation is tested outside its ﬁtting range. A similar model is built as a deep ANN which is trained with data from the analytical model to investigate the amount of data required for an ANN and its ﬁtting capabilities. The results show that in higher dimensions the required training data can be maintained low if data is structured by a Latin Hypercube, otherwise the amount becomes infeasible. This makes an ANN surrogate feasible when compared to a look-up table, and may be expanded to higher dimension where dynamical eﬀects are included. However, the required data and computational cost for this is too extensive for the valve design considered as basis for the analysis. Instead, for this speciﬁc problem, the derived analytical model is suﬃcient to describe the valve dynamics and reduces the computation time signiﬁcantly.


Introduction
Design of non-linear multi-domain dynamical systems, such as hydraulic valves, requires numerical simulation to study the complex multi-physical phenomena governing the performance.To alleviate the computational burden of these simulations a wide range of Reduced-Order-Model (ROM) techniques have been proposed in the literature (Benner et al., 2015) which have their strengths in different types of problems.For example, the Proper Orthogonal Decomposition is used to reduce a high-dimensional problem where over 2 million Degrees Of Freedom (DOF) in the CFD analysis of a F16 fighter is reduced to a model of just 90 DOF in Lieu et al. (2006), or using the collocation method to analyse fluid flow through an open channel by rewriting the governing equations Jinasena et al. (2018).The ROM methods essentially consist of an offline stage where the parameters are sampled (i.e.performing numerical analysis of the system) and data-fits or projection-based reduced models (e.g. by Proper Orthogonal Decomposition, Rational Interpolation or Balanced Truncation) can be constructed from the data, otherwise the physical equations are simplified by assumptions (i.e.omitting terms based on experience to be of little influence) or by excluding certain terms (i.e. a steady-state or quasi-static analysis).The latter is the 'simplified physics' technique and is doi:10.4173/mic.2019.2.1 c 2019 Norwegian Society of Automatic Control used opportunistically (Benner et al., 2015).The online stage is when the derived ROM is solved, e.g. in optimization, design, control or uncertainty quantification.Essentially, a benefit in total reduced computation time of both offline and online stages compared to change in model fidelity must be achieved by the ROM for it to be feasible.
This article proposes a ROM methodology applied to a digital valve that combines the advantages of simplified physics (analytical) and data-fitting (surrogate) by Artificial Neural Network (ANN) where CFD data samples are used to construct both parts.In this manner certain parts are non-intrusive while retaining the underlying structure of the model, which is beneficial for dynamical systems.The objective thus becomes to determine where it is feasible to apply analytical methods and where surrogates are more appropriate.Practically, this means that data must be generated in an efficient manner, the analytical model form established, and an appropriate surrogate must be formulated.Therefore, state-of-the-art insight to these areas are provided.
The movement and force interaction of fluids are normally modeled by Navier-Stokes (NS) equations and solved by numerical methods where the state-of-theart approach to handle turbulence and discretization is the Computational Fluid Dynamics (CFD) framework with a Reynolds Averaged NS (RANS) form.For hydraulic systems see e.g.(Amirante et al., 2014;Noergaard et al., 2018;Zardin et al., 2017;Zhang et al., 2018).The first published full 3D CFD RANS analysis of a hydraulic valve was presented in Amirante et al. (2007) where the flow and flow-induced force in a proportional valve were calculated.The authors applied the RNG k − model which resulted in correspondence between simulation and experiment.Various studies of spool type valves with small geometrical modifications have been presented in the literature where a good correspondence between theory and experiment has been reported.For example Simic and Herakovic (2015) showed that the SST k − ω model predicts the flow-induced force most accurately out of the tested models.A full 3D simulation of similar systems with similar flow phenomena may therefore serve as a reliable model.
A series of static CFD analyses are used to establish a surrogate in Forrester et al. (2006).The authors reduce the required amount of function evaluations by applying partially converged CFD simulations and construct a surrogate model.The required size of Design of Experiments (DoE) to construct a sufficient surrogate is studied as well as the required level of convergence when solving the drag coefficient of an aerofoil by static CFD.Application of a similar method in dy-namic fluid flow problems is untreated territory and therefore intriguing.
The relevant outputs of a digital valve are the integrated quantities of flow and force related to this flow, also the switching time and expected lifetime are important performance metrics.The Lumped Parameter Model (LPM) of flow-induced forces in hydraulic valves goes back to Lee and Blackburn (1952) with the momentum theory, where the force is equal to the mass times acceleration of fluid.This theory has been applied widely in text-books and for valve modeling/design see e.g.Mahrenholz and Lumkes (2009); Roemer et al. (2013); Knutson and Van de Ven (2016) to mention some of the latest.However, when optimizing the flow -characteristics and -forces, several studies have applied CFD methodologies to validate hypotheses about relevant design changes (Amirante et al., 2014;Simic and Herakovic, 2015;Lugowski, 2013Lugowski, , 2015;;Leati et al., 2016;Zardin et al., 2017).In fact Lugowski (2013Lugowski ( , 2015) ) presents experimental evidence that the actual steady flow-force does not correspond to that of momentum theory when the jet angle in a spool valve is both 69 • and 90 • , and a purely Newtonian consideration of reaction forces is not sufficient.This is argued to be due to the Coanda effect, causing the jet to attach the nearest wall which is normally disregarded.CFD simulations and pressure measurements show how the pressure near the Vena Contracta (VC) rises due to accelerating fluid and high velocity field, and this is argued to be the actual cause of the so called flowinduced force.A similar discovery is made in this article, where CFD simulations are applied strategically to reveal how much the pressure change in the VC affects flow forces.
The prediction of a pressure driven flow normally takes the form of the quasi-static orifice equation.Depending on the flow condition, either a purely turbulent form or a form correcting for laminar conditions can be applied (Borutzky et al., 2002;Valdés et al., 2014).The flow characteristics of an annular seat valve as the one of interest in this research has been investigated by Noergaard et al. (2018), where CFD and experimental analyses were applied to show static flow force and pressure/flow relations.A parametric study illustrates the importance of seat width and radius to avoid excessive -actuating energy and -throttling losses.However, the evaluation of flow and forces relies on 2Dstatic CFD simulations with the only model reduction being assuming axisymmetry, i.e. no dynamical considerations or LPM alternatives are presented.The present research adds to the knowledge provided by Noergaard et al. (2018) and will apply the experimental data to coarsely verify the constructed CFD model.The CFD model was applied in Bender et al. (2019) to achieve knowledge about the parameters that influence the performance criteria.This spans the choice of relevant parameters, the range of these and production tolerances.
The parametrization includes flow, pressure drop, fluid density/viscosity and flow area, which may be applied to aid in the design procedure even though empirical parameters such as discharge coefficient and jet angles are required.However, the LPMs may be of too low-fidelity for innovative valve designs and more sophisticated models may be necessary.This structure of a sufficient model is only seldom known a priori, despite the required accuracy and time-frame may be known.In this study the feasibility of various modeling methodologies to achieve a parametric model reduction is investigated, encapsulating; analytical-, CFD-and a surrogate model utilising the deep ANN methodology trained by CFD data.An ANN is a universal approximator, and if a sufficient surrogate can be constructed in a reasonable time-frame this will speed up the design process significantly.Furthermore, this type of surrogate may be extended to represent dynamical systems in the structure of the non-linear autoregressive exogenous input ANN.
For the considered valve design the main challenge occurs when the valve plunger is moving in a fluid which also has external dynamics affecting the flow conditions around the plunger.A prediction of the flow and forces during such a dynamic switching of the valve is required when a design for durability is desired, but the required modeling effort is increased significantly.This study therefore investigates methods that can be applied to reduce the computational burden, while evaluating the specific accuracy that can be achieved as function of computation time required.The evolution of these models (from high-to low-fidelity) goes from: 3D static CFD → 2D axisymmetric static CFD which is then formulated as 2D axisymmetric dynamic CFD → an analytical formulation, which can be aided by surrogates such as ANN-or look-up tables.
The article is structured in the following sections.Section 2 presents the system of interest and simulation results are used to elaborate the possible complications that may arise when introducing assumptions and simplifications.The feasibility of applying ANN as a surrogate is studied by LPM data and is found to provide sufficient accuracy at around 400-500 samples structured as a Latin Hypercube with four parametric inputs and two integrated quantities as output.The optimal size of the ANN is tuned by a trade-off of function evaluation time and fitting accuracy.In section 3 the most relevant model predictions are displayed, and a comparative analysis of the LPM and dynamic CFD models shows that the LPM performs sufficiently also without an ANN surrogate, at least in the investigated parameter set and with the system characteristics found by CFD.The findings and expected consequences are discussed in section 4 and this is followed by concluding remarks in section 5.A hydraulic valve is a flow control component which can be formed in several different shapes depending on desired actuation and the specific requirements.The models presented here are for an annular shaped seattype digital valve with switching times around 2 ms.The applied .mscripts and ANSYS workbench files to simulate valve behaviour and do CFD analysis, have been uploaded and can be freely accessed by anyone 1 .

System Analysis
The functionality of a digital hydraulic valve is simple: open and close a fluid gateway.However, describing its dynamic requires detailed knowledge about actuating forces and interacting fluid forces.The magnitude of the flow-force is mainly dominating when the plunger is close to the seat, but in this region it is of uttermost importance if the impact sequence is to be modeled sufficiently.
The analysed valve is shown in Figure 1 and comprises an annular seat geometry to allow fluid through two flow edges.Furthermore, it allows a spring assembly in the center of the valve.The area of interest of the valve design is assumed axisymmetric with parameters as denoted in the middle of Figure 2. The figure illustrates a practical implementation of the valve plunger (the black color) in a hydraulic manifold setting.The velocity vectors in the 3D fluid domain and volume contours of the velocities are shown to illustrate that the actual problem will not necessarily be symmetric.The plunger is able to move in the direction of the axis of rotation and is denoted z as indicated by the 2D schematic.The plunger is mechanically stopped at z = 0 (off) and z = l s (on).These symmetry breaking phenomena may give rise to inaccurate predictions when using simplifications which makes this the first introduction of simplified physics to realize a ROM.The results of a 2D CFD at two opposite flow directions are illustrated to the right in the Figure 2  The valve is open.
gives ∆p = 0.89 bar and F f = 48 N with v max = 16.9 m/s.The flow-force is thus predicted to a sufficient degree but some viscous losses are omitted due to the simplification.For a design of the actual valve the absolute energy loss is less critical as long as the tendency is correct and hereafter the actual significance of this loss may be compared to the additional ones of the hydraulic manifold and valve which does require these full scale 3D CFD simulations (that runs for about 4 hours).The predicted F f is directly used for dimensioning of the spring/latching force required to maintain the valve open while conducting flow.
The forces acting when z = 1 mm at four different flow rates are given in Noergaard et al. (2018) where the authors find a good fit with both 3D and 2D CFD.To verify the model used here the same measurements are plotted in Figure 3   of the annular restriction is 765).Computation times can be reduced marginally by using a laminar solver.
As discussed in the introduction the most popular LPM approach for spool type valves is the momentum theory, which works well when the VC occurs on known locations independent of the stroke.However, moving the plunger changes the interaction with the VC, potentially reducing the interaction between flow and plunger to none for the considered design.The notion of a jet angle is therefore not necessarily applicable, although some function that describes how much the VC depends on plunger position (z) is relevant to know if high fluid velocities are present near the plunger, thus creating lower pressures.This work therefore proposes a parametric flow-force scaling factor in positive flowdirection based on CFD data.

Analytical Methodology
The analysis of required physics will to some extent depend on the chosen topology.Essentially, the valve should be able to control hydraulic energy as efficiently as possible, while also being ale to do fast switching from on to off.The basic framework used to describe this motion and energy conversions, referred to as the LPM, are given in the following.
The primary states of the plunger are position, velocity and acceleration and for the fluid they are pressures and spatial velocities.Also, parameters such as temperature, density and viscosity play a significant role in how the system behaves.These are coupled by a series of PDEs and ODEs and turbulence from viscous effects can cause chaotic solutions.For the sake of brevity the fluid is assumed single phase, incompressible, isoviscous and isothermal which means only pressure and velocities must be solved.The most important PDE in this research is the momentum equation for an ndimensional, incompressible and inviscid fluid where ρ is the fluid density, u and p denote the fluid velocity and static pressure respectively, ∇ is the gradient and t is the time.The form reveals that change in pressure are related to changes in fluid velocity (transient term) and the square of the velocity (steady term), which for a valve relates to the flow rate and flow area (Borghi et al., 2000).Regions of accelerating or high velocity fluids thus create negative gradients on pressure which is essential to understand 'flow-forces'.Furthermore, when the fluid is viscous an additional term is added (the NS equations) potentially leading to chaotic behaviour.A specific solution to Equation ( 1) is only feasible when the geometry is simple and is not solved for an annular seat valve.The plunger movement is governed by Newtons second law of motion, where the force contributions ideally can be divided into; mechanical contact, an actuator, a spring and a fluid.This work solely focuses on the forces related to the interaction of the plunger and the fluid.

Valve Fluid Flow
The energy lost across an orifice is the product of the flow and the pressure drop.This is thus a relevant performance metric of a valve, and it is normally predicted by the orifice equation which is valid under turbulent conditions where ∆p ∝ Q 2 , i.e. at large flow rates where the losses grow to the second power.Recognizing that the valve can operate at either laminar, turbulent, or transitional conditions flow models that take this into account have also been expressed, e.g.Valdés et al. (2014).
Most formulations are quasi-static, but Funk et al. (1972) proposed a LPM including the transient conditions for the pressure-driven flow in an orifice, which then combines to (2) where A o is the narrowest flow area of the orifice, D H is the hydraulic diameter of the orifice, ρ and µ are the fluid density and dynamic viscosity respectively, λ is either 0 or 1 and thus used to activate the part describing laminar flow.Re t is the transition Reynold's number and C d is the discharge coefficient, c.f. Figure 2 for relevant notations.The coefficients k f 1 , k f 2 account for either turbulent or laminar flow conditions and k f 3 is the inductance of the valve.All include the flow area and are used to describe the pressure differential (∆p = p 2 − p 1 ) required to deliver the flow (Q).This LPM requires knowledge about the actual discharge coefficient (C d ) and the transition number from laminar to turbulent flow (Re t ).These may be determined based on common values, CFD simulations or from measurement.The actual value of C d is normally 0.6-0.7 but is a function of the Reynolds number and thus can span in a wide range, where Re t is typically around 40-50 for sharp edged orifices.Therefore, it does make sense to apply CFD analysis to understand both flow conditions and the above parameters.The form of Equation ( 2) can thus be used as comparison.
The above considers only a static plunger.However, as the plunger moves in the fluid this interaction will in-duce flow in various directions.This phenomenon was studied by CFD in Bender et al. (2018) which quantified this Movement-Induced Flow (MIF).The MIF is added by superposition and the total flow is thus The pressure driven flow (Q) in Equation ( 2) is solved by isolating the time-derivative of the Q.This value is numerically integrated and the coupled equations solved with a fixed step-size of 8 µs.The area A M IF is a fraction of the plungers shadow area, which determined how much fluid is displaced in and out of the total control volume.Due to continuity this means that the remaining fluid from the compressed volume fills the expanded volume, i.e. when closing the valve some fraction of the fluid flows around the plunger and the remaining flows in from the inlet boundary.

Valve Fluid Forces
The sum of fluid forces acting on the plunger is essentially the local pressure distribution integrated on the surface of the plunger.This force can be summarized by the contributions The forces, F s and F t describe the steady-state and transient effects acting on the plunger as a reaction to moving fluid, F M I is the force related to moving the plunger in the z-direction.These three contributions govern the total ∆p acting on the plunger.These boundary wall pressure changes are consequences of conservation of energy and from the momentum equation a high velocity or change in velocity leads to pressure gradients that will manifest itself as a force acting on the moving parts.The steady force, F s is known as: "flow-induced force", "Bernoulli force" or "hydraulic force" (Merritt, 1967).This force has been formulated with small variations in the literature, but is for seat type valves normally connected with the static pressure plus a contribution from the mass of the moving fluid times the acceleration of this fluid.The relevant contribution is in the z-direction and it depends on how near the jet stream is to the moving part.This is normally given as a jet angle, but this angle depends on the stroke length/value of z.It is possible that the jet does not interact with the plunger.Negative flow conditions have been found to be linear with ∆p and no significant dependency on z.I.e. the jet stream does not interfere significantly with the pressure field surrounding the plunger.However, for a positive flow there exists a dependency on z, which causes the combined F f to go towards zero as z is increased.Physically this means that the pressure loss occurs on the p 1 side of the valve and thus reduces the force acting on the plunger.The above considerations are based on experience from CFD analysis, with examples as shown in Figure 2 and 15-17.Therefore, a trigonometric relation between z and w is introduced to create a non-linear jet angle function.The exact shape of this function can be changed by tuning the coefficients c 1 • • • c 3 scaling the importance of z and w.The form of F s was also investigated in Bender et al. (2018) with an attempt to describe the jet angle as the angle between the vectors of z and w (only z was varied in that study).In this work a slightly different model form is proposed due to a more comprehensive use of static CFD simulations with more flow conditions and design points.For a positive flow the Bernoulli force reduces the F s by altering the pressure field near the plunger. where where γ is the angle used to describe the influence of the VC as illustrated by Figure 2. The VC coefficient C c ≈ 1 is chosen since this is normally true when viscous effects do not dominate.The force F p occurs from having a differential pressure across the valve.This force is analytically correct when the valve is closed (γ = 0 → sin(0) = 0) in this situation the pressures on the surfaces are uniform and exactly ∆p which acts on the equivalent area.
The tuning parameters (c 1 , c 2 , c 3 ) are determined from minimizing the relative Mean Absolute Error (MAE) of F f between LPM and CFD simulation, also C d , Re t , λ are fitted from CFD to get the correct pressure/flow relation (values 0.67,58,1 respectively) and the remainders are purely defined by the plunger's dimensions and fluid density.The coefficients are found by using a GDE algorithm, which finds the best fit for both F f and Q (the MAE are 3 N and 10 L/min respectively).The values of the cosine function over the valve stroke domain and at three design points are plotted in Figure 4.
The transient force is a consequence of change in flow, i.e. change in momentum means change in pressure.This is studied in spool type valves in Merritt (1967) where the change in flow and the fluid density along with a certain damping length (l d ) governs the Figure 4: Scaling factor for F s when Q is positive.force magnitude.Normally the orifice equation is differentiated w.r.t time to get the flow gradient.This gives a damping term proportional to the moving velocity.Transient CFD simulations have shown that F t does give a reduction of F f even when the plunger is stationary.Therefore, the change in flow is found from Equation (2).The damping length in valves is normally equal to the hydraulic diameter which for an annulus is 2 times the width of the port.
Finally, movement of the plunger itself will react with the surrounding fluid causing a so-called Movement-Induced (MI) force.This was studied by CFD in Bender et al. ( 2017) and a sufficient performance obtained by using a form of Added mass where A in = 2π(R + l/2 − w/2) and A out = 2π(R + l/2 + w/2) are areas of the inner and outer contact surfaces, l is the length of the contacting surface, l g = 0.1l is the length at which the Reynolds equation is valid, k a , k v , k d depend on z and the drag is also velocity dependent, see the source for actual values.The downside by the above described LPM is that it ignores history effects and the coefficients cannot be determined solely from the known geometry and therefore has some obvious shortcomings.In the region near end-stop, the movement-induced force is dominated by squeeze-film damping or stiction, which is the reason for the two switch cases in the above.The relative pressure in the gap between two flat plates is derived from the Reynolds equation where constant pressure boundary conditions are applied to arrive at Roemer et al. ( 2015) where x is the radial position w.r.t. the reference point at the center of the flat surfaces.This expression ignores convective and local acceleration which for high viscosity fluids is a fair assumption, but as pointed out in Lang et al. (2019) the contribution of inertial effects makes up half of the pressure change when water is used.

Computational Fluid Dynamics Methodology
A Computational Fluid Dynamical (CFD) analysis is in this study applied to locate zones with undesired flow profiles, e.g.circulation-or stagnation zones.Furthermore, it is used to obtain specific values of viscous losses and boundary pressures on walls which possibly translates to actuating forces.The fluid domain is axisymmetric with two pressure boundaries (see Figure 5), a moving body (the valve plunger) is marked and the pressure acting on these walls govern the value of F f .The mass-flow is evaluated at the pressure boundaries and the analysis is assuming incompressible flow, thus the conservation of mass means that the inlet flow equals the outlet flow.A sample of the fluid flow problem is illustrated in Figure 5 where the various boundary conditions, the mesh and the parameters are shown.
The solutions are found by RANS formulations with the settings in Table 1.These settings have been found to give the most numerically stable results at small z values.High order discretizations schemes are used to maintain a coarser mesh and reduce time required for meshing.The system states are solved by the coupled scheme to include the multi-physical couplings (the transport equations are inherently coupled in CFD).
Example of spatial pressure and flow velocities are shown in Figure 6.The characteristics in the inlet tube vary depending on the applied solver even though the predicted flow-induced force is almost identical (Figure 3).This shows how turbulence and viscous effects can be the reason for different solutions.The flow direction is affected by the value of z and w which is also the reason for including these as the governing parameters of the angle γ.The pressure distribution also reveals that 6 bar occurs on top of the plunger, and the pressure below the plunger is only marginally affected by the flow.
The difference in the location of the VC is clear when the flow is reversed as seen by the results of Figure 6a      VC occur on both sides of the plunger and the velocity reaches 14.7 m/s which will result in local pressure drops as shown.This lower pressure is not significant when compared to the area it acts on, hence A p ∆p is a fair approximation for the fluid force c.f. Equation ( 7) and Figures 15-17.
The discharge coefficient used in Equation ( 2) can be estimated by using pressure/flow results predicted by CFD.A series of evaluations have been made both varying flow direction (±120 L/min) and changing the lift of the plunger.The corresponding C d values are found to range in between 0.45-1 for various design points (R, w, z) and a modeling error is thus evident if a constant C d is applied.

Switching Dynamics
While the valve switches state, the plunger will interact with the fluid causing Movement-Induced Flow (MIF) and force.This can be studied by a transient and dynamic CFD framework, where various flow conditions can be tested while switching with some actuating force.This framework is elaborated in Bender et al. (2018) and the results of one switching instant is shown in Figure 8 where dynamic CFD and the force components of the LPM are compared.
The valve is on initially and after 20 ms the flow has reached steady-state where the plunger is actuated towards the seat, i.e. switched off.This movement induces additional flow from Q M IF and Q starts to decrease as A o decreased.The total flow of Q CF D and Q t,LP M fits to a sufficient degree although the accuracy becomes lower as the switching progresses.
The fluid force (F f,CF D ) starts at a value corresponding to F s = F p plus F t , since F M I = 0 and Q = 0 initially this is obvious from Equation ( 4) and ( 5).Due to the positive flow gradient, F t acts opposite of F s .F t goes to zero near 20 ms and the static force predicted by the ANN fits with CFD, where the LPM follows the correct tendency but with a bias error.As the plunger starts moving F f,CF D grows until the plunger reaches the seat where squeeze-film damping gives a rapid negative force.The LPM force prediction gets more negative as the valve closes, i.e. the resisting force is largest in the LPM.The exact reason is unknown, but is arguably due to transient effects in the flow field.The consequence is that a softer landing will be predicted while using the LPM.
The idea of applying partially converged CFD sim- ulations for this type of dynamic system has not been studied before.The complications of such an approach for a dynamic problem is that the error of partially converged results will propagate to the next time-step etc. and the solver needs smaller time-steps to give meaningful results.It is thus interesting to study at what amount of iterations the additional convergence does not contribute to modeling accuracy and gives the fastest convergence.A series of dynamic simulations where the plunger goes from z = l s → 0 was finished after a period, t comp evaluated at z = 0.2 mm to ensure a solution.At this point the instant velocity is evaluated and is, in retrospect, compared to the value of the highest fidelity simulation.The absolute velocity error (v e ) and computation time (t comp ) are shown in Figure 9 as a function of amount of maximum allowed iterations per time-step.Each time-step also has a convergence criterion of 1e-6 on all transport variables which means fewer iterations will be performed if the solution converges, i.e. computation time does not necessarily scale linearly with amount of allowed iterations.
Figure 9: Time period and velocity error (v e ) for switching a valve, evaluated by CFD analysis.
The graph illustrates that around 100-120 iterations per time-step is optimal both for fidelity and computation time of this specific dynamic fluid problem.Regarding model fidelity the error is below numerical uncertainty and is irrelevant.The difference in computation time is at a maximum 50%, but this is not enough to avoid a time-consuming sweep of the design space.Furthermore, it was learned that too few allowed iterations cause time-step-sizes to approach zero (goes to 1e-8 s which is defined as the minimum allowed), which means around 40 iterations are minimal in order to obtain a useful solution.

Artificial Neural Network Surrogate Methodology
The first model structure to describe Q and F f are derived from an analytic approach and a part of the LPM, but is at risk of omitting relevant characteristics.The formulation of such a model requires assumptions and system analysis, and this effort can be eliminated by constructing an Input/Output (I/O) surrogate based on either experimental data or CFD analysis.In this study the focus is on CFD aided by deep Artificial Neural Network (ANN), and this approach thus aims at reducing the drawback of time required for pre-, interand pro-processing of CFD.The first study thus attempts to replace F steady of Equation ( 4) with a surrogate so An ANN model may be built in a similar manner as a grid-based Look-Up Table (LUT).The LUT does not require much memory or computational power (besides generating data) and is therefore an attractive approach for many practical problems.However, the LUT is restricted to static analysis and to low dimensional space (above 3D is normally troublesome).The task is to determine the required amount of data to build a sufficient model in one or the other form.This research therefore focuses on an ANN surrogate, because it can potentially replicate both dynamic and high-dimensional problems.
The training of an ANN can only achieve what the available data allows.Highly non-linear systems with a lack of diversified and sufficient samples cannot be expected to yield sufficient results, and an infinite number of solutions that fit the data may exist.Therefore, the actual performance of an ANN must be evaluated after the training with a testing set (unseen data), in order to know if the function is representable of the actual system.
The feasibility of applying ANN as a surrogate with the structure shown in Figure 10 has been investigated by using Equation (2) and Equation ( 4) to create input (∆p, z, R, w) and output (F f , Q) samples.The solution is in steady-state.This makes it possible to change the sample size and the input dimensions rapidly without using CFD data, and since the LPM contains the same non-linearities as predicted in CFD this is a valid way of validating the ANNs feasibility.An example of the function evaluations of both the LPM models and the ANN surrogate are shown in Figure 11.
The plots show that both F f and Q are predicted accurately by the ANN and in conclusion the 2D input vector means that around 500 samples are required.
The trained ANN for a 2D model uses ∆p and z as input, keeping R and w constant, in 3D w is kept constant and 4D utilizes all.The ANN is trained by minimizing the Mean Squared Error (MSE), but when evaluating the model performance instead the Mean of the Absolute Error (MAE) of the two outputs are computed as Equation ( 13).The reason being that this preserves more information about the actual performance.
where x i is the output solution to sample i and xi the model prediction of same sample.The amount of test samples in each dimension (s t ) is raised to the amount of dimensions (d) since the samples are structured as a linear grid.Furthermore, a surrogate may be sufficiently correlated to the actual system but still give a significant MAE, thus the correlation coefficient For-rester et al. (2006) is also computed as The most simple and effective parameter sampling method for surrogate models is by Latin HyperCube (LHC) and the correlation coefficient (r 2 ) is computed to evaluate how well the surrogate correlates to the data.Other adaptive methods are also available but not considered here since LHC is sufficient for the specific problem.The reason for applying MAE as a further evaluation is to achieve a deeper insight into the model accuracy.These metrics of the ANN and LUT as function of samples are summarized in Figure 12.
The correlation coefficients of Figure 12 reach almost perfect correlation for both ANN and LUT surrogates and the training period is not severe.The training is only necessary to do once for the entire design space.When d = 4 this does however result in longer training periods and the required sample size starts to cause infeasible surrogates with poor performance.The residuals reveal that a high level of accuracy is achieved by the LUT and the ANN structure is not as accurate.In fact the ANN does fluctuate a lot in performance before a sufficient s is reached.Various forms of the ANN have been tested to find the optimal fit for accuracy and computation effort for each function call.In a dynamic simulation the ANN model will be called several thousand times and for optimization another several thousand dynamic simulations must be carried out meaning milliseconds will add up to hours in the overall picture.The function evaluations of the optimal ANN structures are displayed in Figure 13 and the optimal point is marked resulting in an ANN structure of 4 layers and a moderate amount of neurons 14, 15, 5, and 16 neurons and d o neurons in the output layer.
The LUT performs best, but has the major shortcoming that data must be structured monotonously, meaning a lot of data is required in higher dimensions.This is not a requirement of ANN models and by using a 4D LHC to construct the data, s can be reduced significantly.Using this to train the ANN and testing the model in the entire domain gives the results that are presented in Figure 12d.This reduction in data and more strategic distribution results in sufficient surrogates in 4D and with samples around a few hundreds yielding some potential for this type of approach.
The ANN surrogate is only feasible if a model can be established within a certain time-frame.The computation cost of a CFD evaluation with meshing, computations and post-processing is around 2 min, but if meshing must be verified manually for each design point the approach is infeasible.The next logical step  is therefore to investigate if the approach is scalable to describe the system dynamics.

Model Predictions
To validate the developed LPM in more operation points, a series of CFD simulations are used to achieve a range of expected flows (Q) and flow-induced forces (F f ).The solution is obtained by enforcing pressure BC and the corresponding flow plus force are found in pro-processing.The values predicted by the LPM-, ANN-and CFD-methodologies are summarized in A positive flow means the fluid goes from p 2 to p 1 .The graphs show that positive Q gives positive F f (a closing force) and vice-versa.The force is significantly more dependent on z when Q is positive, but as the width of the seat (w) is increased this difference becomes less significant.This corresponds perfectly with the fact that w = z gives a VC in the annular tube (on the side of BC1) rather than around the plunger, thus less local pressure changes occur at the plunger.Reversing the flow direction does not yield the same tendency, the flow reacts less with the plunger and F f is almost independent on z.It was expected that an amount of energy would stagnate on the plunger as is also seen in the pressure results from CFD in   The ANN model, being a universal approximator, has a low prediction error and is fully capable of handling this 4D task of limited samples.Over-fitting is mostly avoided as indicated by the outlying data points in the graphs, e.g.F f at z = 2.5 mm where the algorithm fitted function follows the tendency and not the exact data-points.The main benefit of this surrogate is that the engineering effort is limited when the ndimensional space grows and reasoning cannot be applied.Even for the case of 4D the LPM does struggle to describe F f at positive ∆p and the ANN is a more accurate alternative.
Simulation of CFD below 0.05 mm causes numerical instability, but for static simulations this range is not particularly interesting as observed from Q going to zero at z = 0.1 mm and F f does not change significantly.However, when the flow is kept constant and z is low, the pressure differential will grow and produce a significant closing force.This is of particular importance when predicting the motion near mechanical impact that is correlated to durability.The static evaluations are within reasonable accuracy and in Bender et al. (2018) it was demonstrated that the dynamic forces (F M I ) can also be represented in the LPM.Therefore, it is of interest to check how this model holds up against dynamic CFD simulations with different flow conditions than those validated in Fig- ure 8.
The severity of the introduced simplifications is determined based on the discrepancy in the velocity profile of the plunger.Several simulations of valve closing have been conducted for different flow conditions.The velocity profiles have been interpolated to yield the graphs in Figure 14.The CFD simulations break down before actual impact due to numerical instabilities (solver divergence) when a high flow rate is forced through a narrow gap.Two LPMs are presented where one omits the flow that is induced from moving the plunger, the MIF.Also, the results of using an ANN surrogate are given.The graphs clearly show that the MIF causes a significant dampening effect, causing velocity reductions of around 1 m/s, which is most significant as R is increased.This means that, as A p and A o are increased, the lower ∆p and increased MIF cre- ates more damping.The plunger mass and F M I are also affected by these geometric changes and it is not obvious how to create the optimal design due to the many couplings between the governing forces, the mass and throttling losses.This is an example of the importance of knowing the system dynamics when proposing a valve design.
The LPM model fidelity is sufficient compared to the dynamic CFD in the chosen design points, however, the log scale on z exposes the variations that do exist and the fact that the CFD solution breaks down means that no conclusions can be made about the motion just before impact, which could be a topic of further research.

Discussion
Recent advances in computational power, data availability and ANN algorithms/tools have lead to a hype like trend in the amount of publications in the field of applied ANN in engineering.The results of this study reveals that an ANN surrogate may also serve a purpose in a dynamic fluid flow problem by using e.g. a Latin Hypercube data structure as training data.This type of structure yielded superior performance to an evenly distributed grid which grows in size to the power of d.However, the approach is of limited effect when it is possible to derive the model structure analytically or when data is computationally too expensive and thus not only training time must be considered.In the analysis of flow and forces the dependencies are as expected, although a positive flow does cause a nonlinear relation to z and w which is only partially represented by the LPM.In most optimization tasks this is however not a significant error, but since the entire design space cannot be validated it is unknown if some designs are significantly different from what the LPM predicts.The non-intrusive nature of surrogate models is not an issue when used as a sub-function in the dynamic framework, but the application of ANN will mostly be powerful if a relatively high amount of inputs are required and when data is computationally cheap.During valve switching a highly non-linear force was observed with transient effects that were not entirely predicted by the LPM.However, the presented model structure is considered successful in the sense that the physical systems understanding is maintained and that the computational burden is reduced from hours to seconds.

Conclusion
A brief validation of the developed Computational Fluid Dynamics (CFD) and Lumped Parameter Model (LPM) was presented based on previously published data of the same valve configuration as studied here.After the validity was confirmed, a comprehensive simulation study showed that deep Artificial Neural Network (ANN) may be applied as a surrogate in a static problem with four inputs and two outputs.Around 400 samples were necessary to map the I/O relation.Several constellations of the Artificial Neural Network (ANN) was tested all yielding similar requirements to training data, although a deeper structure with a modest amount of neurons gave the most accurate results without scaling function-call requirements accordingly.In comparison a look-up table solution yielded high accuracy, but with the drawback that data-structures in high-dimensional space will cause the size of the dataset to become infeasible.The valve is a dynamic and coupled system, which means there will be a high amount of input-dimensions meaning a comprehensive amount of CFD simulations would be required to establish a surrogate.An attempt to reduce computation time was done by partially converged solutions, which showed marginal reductions in computation time and actually showed that too few iterations will result in an unstable solution.Therefore, the quasi-static LPM was compared to a set of dynamic CFD simulations, which indicated that the proposed LPM is able to predict the critical dynamic quantities to a degree sufficient for optimization, and that this will for the given problem be a better approach than utilizing a model also including an ANN surrogate.

Figure 1 :
Figure 1: Cropped view of the digital valve switched by conducting a current in the coil (gives rise to the magnetic field marked by green lines).The valve is open.

Figure 2 :
Figure 2: Left: Full 3D simulation of the plunger and seat with tube inlet and outlet where mass flow is 125 L/min and outlet pressure boundary is 5 bar.Middle: A simplified axisymmetric model of the flow domain and solid bodies of importance in the annular seat valve.Right: CFD solutions of velocity when a pressure differential (∆p) of ±1 bar is applied to illustrate the Vena Contracta (VC).

Figure 3 :
Figure 3: Measurement and simulation comparison of the flow-induced force, F f .

Figure 5 :
Figure 5: Velocity solution of the fluid flow problem from CFD (ANSYS Fluent 18) R = R in + 0.5w = 15 mm, w = 5 mm and z goes from l s → 0.

Figure 6 :
Figure 6: One sample of the spatial pressure solutions as contours and velocity field as vector of magnitude and direction for the fluid flow problem.z = 1 mm, BC1 = 6 bar and BC2 = 5 bar and two different solvers have been used.

Figure 7 :
Figure 7: Negative flow condition reveal two VC which almost do not interfere with the plunger.

Figure 8 :
Figure 8: CFD analysis with a constant boundary pressure differential of 0.1 bar leading to a buildup of flow.The valve is initially open and initiates closing after 20 ms.F f,AN N relates to the ANN model described in the next section.

Figure 10 :
Figure 10: Deep Artificial Neural Network (ANN) with s samples of d dimensions and output dimension d o .The size of input and output layer are governed by d and d o .The hidden layers (grey boxes) have n neurons, and each neuron consists of a weight, bias and activation function.

Figure 11 :
Figure 11: Normalized flow and flow force values from the LPM and 2-dimensional ANN where R = 15 & w = 5 mm.These are used to compute the residuals of Figure 12 defined by Equation (13).
Figure 14 (dynamic simulation) and Figures 15-17 (static simulation), where three different points in the design space are evaluated over z and ∆p.
Figure 6a.However, this amount is insignificant and the jet stream and VC are almost uncorrelated to the forces acting on the plunger.The magnitude of F f is relevant since it governs the dimensioning of the mechanism that maintains a normally open valve (when flow is positive).The flow results show a quadratic relation between

Figure 12 :
Figure 12: Relation between amount of samples s, residuals of flow and force (x) and the correlation coefficient (r 2 ).The time periods required for training an ANN (t AN N ) are shown in the bottom graphs (in second for 2D).The ANN structure is as shown in Figure 10 with l = 4, where each hidden layer has 14, 15, 5, and 16 neurons respectively.LU T denotes Look-Up Tablesurrogateand is not displayed for the 4D case.The improvements from using a LHC structure is visible in Figure12dwhere samples are proportional to d not raised in d.

Figure 14 :
Figure 14: Simulation results of plunger movement with varying shaft angles (θ) (change of flow conditions) and three increments of plunger radius.Q = k θ sin(θ) since this emulates the flow conditions of a rotating fluid power machine.

Figure 15 :
Figure 15: The graphs show static flow force (F f ) and flow (Q) as function of ∆p = p 2 − p 1 .The results of various methodologies are plotted, and this is repeated for various increments of the plunger position.CFD settings are given in Table1and R = 10 mm & w = 2.5 mm.

Figure 16 :
Figure 16: Same as in Figure 15 but with R = 15 mm & w = 5 mm.

Table 1 :
Summarized setting and applied values for the static CFD analyses, certain mesh metrics are given as approximate values.
Table surrogate and is not displayed for the 4D case.The improvements from using a LHC structure is visible in Figure12dwhere samples are proportional to d not raised in d.Q and ∆p.Furthermore, the results depend directly on z as expected from Equation (2).The values of C d and Re t resulting in the lowest RMS are 0.66 and 54 which is in the expected range from theory and the solution with lowest RMS value chooses λ = 1.