EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 15, No. 4, 2022, 2022-2031 ISSN 1307-5543 – ejpam.com Published by New York Business Global Numerical Assessment of Gravity for Sloshing in Tank Using OpenFOAM Dilheen Sabri1,∗, Hussein Zekri2,3 1 Department of Mathematics, Faculty of Science, University of Zakho, Zakho, Kurdistan Region-Iraq 2 College of Engineering, The American University of Kurdistan, Duhok, Kurdistan Region-Iraq 3 Department of Mechanical Engineering, College of Engineering, University of Zakho, Zakho, Kurdistan Region-Iraq Abstract. We numerically study gravity’s effect on sloshing in a two-dimensional tank which is highly filled by water (95% water and 5% air). Both fluids are considered to be incompressible and inviscid. The surface tension and phase change are neglected. OpenFOAM software is used for the simulation. A standing wave of water impacting the lid of the tank at its center and a symmetric wetted region starts to advance along the lid. The simulation carried out (only on the right-half side of the tank due to symmetric geometry of the impact) with and without gravity to investigate the influence of gravity on this impact. The numerical results are validated by comparing to published data. The effect of gravity on the size of the wetted region, free-surface elevation and on the pressure distribution has been analyzed. It is shown that gravity is affecting the free-surface elevation and consequently the size of the wetted region. These effects growth as time goes. Pressure distribution along the wetted region of the lid is also influenced by gravity. 2020 Mathematics Subject Classifications: 76B10, 76B15, 76-10 Key Words and Phrases: Sloshing, standing wave, gravity, OpenFOAM 1. Introduction The motion of a Liquefied Natural Gas (LNG) carrier can be destabilized due to the sloshing in containers, see [13] and [14]. As the fact that operations in the transport of liquefied natural gas is growing, due to the increase in natural gas demand (see [12]), sloshing has become a very significant practical concern in recent years. A theoretical and experimental study of the sloshing in LNG tanks can be found in [1] for different filling levels and tank geometries. They also explored the scaling of the LNG loads on ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v15i4.4608 Email addresses: dilheen.sabri @stud.uoz.edu.krd (D. Sabri), hussein.zekri@auk.edu.krd (H. Zekri) https://www.ejpam.com 2022 © 2022 EJPAM All rights reserved. Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2023 the tank from model to full scale. [15] semi-analytically coupled the LNG sloshing with the hydro-elasticity of the tank’s walls. Recently Open Field Operation and Manipulation (OpenFOAM) which is an open source for performing Computational Fluid Dynamics (CFD) has been widely used by researchers to study the LNG sloshing. For example it is used by [11] to study the coupling of LNG sloshing and carrier motion. They found that the sloshing flow plays small role on the heave and pitch motions of the LNG carrier while its role is important on the roll motion. Also [4] used OpenFOAM to numerically investigate who liquid sloshing is influenced by each of filling level, excitation frequency and amplitude. In this study we also used OpenFOAM to investigate the influence of gravity on sloshing in a container which is 95% filled by water. In low filing level, sloshing is more violent compared to high filling level. This is observed in [5] when they experimentally worked on a movable tank with two different filling levels, 95.2% and 30%. Their recorded data showed a significantly higher pressure in the low filling level than high filling level. In addition, they found that the nature of the flow is unlike. A standing wave pattern was observed in high filling level. This standing wave which is impacting the center of the lid of the tank was studied by [17], see also [18]. In a highly filled tank (95%) they used asymptotic methods to show how gravity is affecting the standing wave’s impact on the lid. Their asymptotic approach depends on two small parameters, one named ϵ ≪ 1 which is the ratio of the vapor over the liquid’s depth and it is responsible for linearity, and the other named δ ≪ 1 which is responsible to the correction due to gravity. The latter was introduced as a stretched variable used to stretch the time during which the impact is at its early stage. They found that the velocity of the moving contact point (the point at the free-surface where the tangent line is vertical) is reduced by gravity. The maximum pressure occurs at this point as there is a square-root singular behavior for the velocity potential observed in analytical solution, see [7]. Therefore it is important to locate this point as accurate as possible. They also analyzed free surface, size of the wetted region, and the pressure distribution along the wetted region with and without gravity. In this study we investigate the effect of gravity of the two-dimensional sloshing of a standing wave within a tank which is impacting symmetrically the center of the lid. In this study we consider inviscid and incompressible fluids, water and air. Surface tension and phase change are neglected. For the effect of the phase change on sloshing see [2] and [3]. The tank is 95% filled with water and its equilibrium level set at y=0. The impact numerically studied using OpenFOAM to investigate the influence of gravity during the early stage of impact. The structure of this paper is designed as follows. The formulation set up in Open- FOAM and volume of fluid method are explained in section 2. The details regarding the geometry of the problem and its mesh set in OpenFOAM are provided in section 3. The validation of the simulation is shown in section 4. In section 5 the numerical results are drawn and at the end, section 6, the conclusions are provided. Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2024 2. Numerical Model The analytical approach is not always possible in multiphase flow due to the complexity of the formulation. CFD is considered a powerful tool to deal and study unsteady and nonlinear fluid problems. Recently OpenFOAM toolbox, which is an open source CFD, has been widely used for simulation in fluid and in particular multiphase flows, [9]. In this section the formulation set-up in Open-FOAM and volume of fluid method are explained. 2.1. Continuity and Momentum Equations In OpenFOAM, solvers are designed to use the finite volume method to simulate the governing equations. The interFoam solver uses the following continuity and the momen- tum equations, respectively: ∇.U = 0, (1) ∂ρU ∂t + ∇. ( ρU ⊗ U ) = −∇p+ ρg + Sp. (2) Here in (1)-(2) ∇ is the gradient vector operator, U represents the velocity vector, ρ is the density, p is the pressure, g is the gravitational acceleration vector which is defined as (0,−9.81, 0) in our solver, Sp represents viscous and surface tension forces and ⊗ is outer product. In this study we ignored both viscosity and surface tension. 2.2. Volume of Fluid Method To track the interface the volume-of-fluid (VOF) method is employed in InterFoam solver. The function of volume fraction, α, (see [6]) is used in the VOF method to prescribe the two immiscible phases. The interface is where the value of α, which is defined in (3), (the volume fraction of both fluids) is between zero and unity. α =  1 for a cell in water , 0 < α < 1 for a cell on the interface, 0 for a cell in air . (3) The average value for the density, ρ, of both fluids are expressed as: ρ = αρw + (1− α)ρa. (4) where ρw and ρa (4) indicate the density of water and air, respectively. In cases when other parameters are counted, e.g. viscosity, the same formula is used to find the average value of that parameter. For volume fraction α, the modified form of continuity equation can be expressed as: ∂α ∂t +∇. ( αU ) = 0 (5) It is challenging to approximate the gradient of α because as a result, the interface gets deformed. To avoid this, a modified version of α equation is solved to transport volume Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2025 of fraction of liquid in the domain. ∂α ∂t +∇.Uα+∇.U r (α (1− α)) = 0. (6) Where U r is the artificial velocity vector field that is normal to the interface and suitable to compress the interface. In OpenFOAM, this value can be specified by using cAlpha parameter in fvSolution file. In this work, cAlpha is taken as one, which means that the compression is conservative and obeys mass conservation. 3. Model and Mesh Setup We consider a two-dimensional tank with dimensions L × L (L = 30m) located sym- metrically about the vertical axis, the y-axis. The horizontal axis is the x-axis. The tank is 95% filled with water and 5% by air where both are considered incompressible and inviscid. The tank’s walls are rigid and therefore no elasticity. Also surface tension and phase change are neglected. The equilibrium water level set at y = 0 as shown in Figure 1 and the tank’s top and bottom are set at y = 1.5 and y = −28.5, respectively. In Figure 1: Geometry of the problem. pre-processing the geometry file, blockMeshDict, is made by one block and a mesh grid of 1/2× 106 square cells created, each axis discretized into 1000 nodes. In interFoam solver an aspect ratio (∆x/∆y) of unity is recommended (see [8]). This utilized by bloskMesh command. The boundary walls which are named leftWall, rightWall, topWall and bot- tomWall are supplemented with boundary condition for each parameter. In setFieldsDict file the fluids’ fields are set and created using setFields command. The simulation starts from a given initial profile of the free-surface is described in non-dimensional variables Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2026 (with hat) as ŷ = 1− ϵ+ ϵ ( f1 cos (π λ x̂ ) + f2 cos ( 2π λ x̂ )) , (7) In (7) ϵ stands for non-dimensional coefficient (L− 28.5)/L, λ= 1, and the constants f1 and f2 are given and defined in [18], Chapter Two, equations (41)-(43). Due to the geometry we need to set λ = 15. Therefore to modify the free surface from its equilibrium level to the profile given by (7) we need to add a file in the system folder which is named setExprFieldsDic, and rebuild the fields with setExprFields command. See Figure 2. Figure 2: Initial profile of the free-surface elevation. To save the computational time, the simulation carried out on the right-half side of the tank. That is due to the geometry of the two-dimensional standing wave which is symmetric about the y-axis and it moves up vertically against the lid, impacting the center of the lid. Therefore symmetryPlane condition on the leftWall, x = 0, applied for pressure (p rgh), velocity (U) and alpha.water which are located in files in the zero folder. On the other three walls, fixedFluxPressure, slip, and zeroGradient conditions are set for p rgh, U, and alpha.water, respectively. The Courant number set at 0.5. Finally, the settings are combined to create a relatively ideal setup by modifying the sloshingTank2D case which is convenient to our work. 4. Validation In this section we verify the accuracy and reliability of our model that is set as men- tioned in the previous sections. The aim of this study is to numerically study the effect of gravity on this particular sloshing problem. This problem studied in a semi-analytical approach by [18], Chapters two and three. In Chapter two they solved the problem in absence of gravity first by removing the lid and then they found the correction due to Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2027 adding the lid into their formulation. In Chapter three they drew a mixed-boundary value problem in terms of displacement potential [10] using the Wagner condition [16]. They used the asymptotic techniques to find the effect of gravity on the moving contact point, surface elevation, and pressure distribution along the wetted part of the lid during the early stage of impact. To validate our numerical scheme, we display the comparison between our numerical data and the semi-analytical data. The comparison is shown in Figure 3. It shows a good agreement between the numerical results of the size of the moving contact point (xc) versus semi-analytical results by [18] in non-dimensional variables. Where the time and the size of the moving contact point in this study are non-dimensionalized by dividing the aforementioned variables by √ L/g and L, respectively. Figure 3: A comparison between the moving contact point by [18] versus the moving contact point of the current study. 5. Numerical Results In this section we plot the simulation’s data for the surface elevation and pressure distribution along the wetted surface of the lid with and without gravity to show gravity’s influence on impact during the early stage when the wetted zone is still rapidly expanding. The simulation starts at t=0 s, the initial profile shown in Figure 2. The time step-size, which is called deltaT in controlDic, is considered to be 1 × 10−5 to keep the courant number less than 0.5 during the simulation. Both simulations, with and without gravity, take around 22 hours. The data are kept for every 0.01 time interval. During the very early stage of impact, the acceleration of the fluid is much higher than the gravitational acceleration and therefore the gravity has no significant influence on any parameter. In Figure 4, the results of the free-surface elevation with and without gravity are plotted at the very early stage of impact, at the instant t = 1.1 s. The instant of impact is around t = 1.06 s. No visible difference on both free surfaces (with and without Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2028 gravity) can be observed at this stage. The same is true for pressure distribution. Figure 4: Free-surface elevation, with and without gravity at t = 1.1 s. However, as times moves, the difference due to gravity appears on the physical param- eters that are considered in this study during the early stage of sloshing impact, in which the size of the wetted region is still rapidly expanding. In Figures 5-6, at two different time instants, at t = 1.2 s and t = 1.3 s, respectively, gravity shows its effect on both the free surface and the moving contact point. The effect of gravity on the moving contact point is significant and this is very important to be addressed as the maximum pressure is analytically found to be at this point. In both figures, Figures 5-6, the influence of gravity is insignificant on the jets, which is due to its high speed. However, in both figures it is shown that the speed of the moving contact point (and consequently its position) is decreased by gravity. In addition to the effect of gravity on the free surface, also gravity’s effect on the pressure distribution along the wetted region on the lid of the tank is also analyzed. In Figures 7-8, at the same time instants, Figure 7 at t = 1.2 s and Figure 8 at t = 1.3 s, the influence of gravity on the pressure distribution is pictured. They are shown from the center of the lid to the position of the moving contact point, where the maximum pressure occurs. It is clear from both figures that gravity decreases the maximum pressure which is found to be at the moving contact point. Gravity’s influence on the moving contact point is also visible through these two graphs. This behavior of gravity and its influence on the free-surface elevation, the moving contact point, and the pressure distribution for the considered standing wave which is impacting vertically the center of the lid also found analytically in [18]. 6. Conclusions A two-dimensional standing wave impacting vertically the center of the lid in a rigid tank (30m×30m) which is symmetric around the y-axis is considered in this study. The tank is 95% filled with water and 5% by air. See Figure 1. The fluids are incompressible and inviscid. No effect of surface tension and phase change are counted in this simulation which is carried out using OpenFOAM. In a study by [18] this problem analytically (in non- dimensional variables using the asymptotic methods) analyzed and he found how gravity Dilheen H. Sabri / Eur. J. Pure Appl. Math, 15 (4) (2022), 2022-2031 2029 Figure 5: Free surface, with (blue dots) and without (black dots) gravity at t = 1.2 s. Figure 6: Free surface, with (blue dots) and without (black dots) gravity at t = 1.3 s. Figure 7: Pressure distribution, with (blue line) and without (black line) gravity at t = 1.2 s. is contributing to this impact and its parameters. In this study we numerically approached this problem. Our computational scheme is validated as good agreement with results by [18] is shown in Figure 3. In this figure the moving contact point with gravity found by [18] is compared by our numerically found moving contact point in non-dimensional form. Due to the symmetrical shape of the wave computations are carried out only for the right half side of the tank and figures are only plotted accordingly. Numerical results have shown that during the very early stage of impact gravity has invisible contribution to the values of physical parameters (pressure distribution and the free-surface elevation). As an example, results related to free-surface elevation are shown REFERENCES 2030 Figure 8: Pressure distribution, with (blue line) and without (black line) gravity at t = 1.3 s. in Figure 4. It is pictured that gravity gives insignificant contribution to the shape of the free-surface elevation. However, as time moves, graphs in Figures 5-6 show that gravity alters the position of the contact point by shifting it to the right to create a longer size of the wetted region along the lid. This also means that gravity changing the profile of the free-surface elevation as it is shown in Figures 5-6 and it increases the speed of the moving contact point. In figures which are plotted in Figures 7-8. the influence of gravity on pressure distribution along the wetted region is manifested. A higher pressure on the lid at the contact point and an expanded wetted region are detected without gravity. References [1] H Norman Abramson, RL Bass, O Faltinsen, and HA Olsen. Liquid slosh in lng carriers. In Symposium on Naval Hydrodynamics, 10th, Proceedings, Pap and Discuss, Cambridge, Mass, June 24-28, 1974., number Proceeding, 1976. [2] J-P Braeunig, L Brosset, F Dias, and J-M Ghidaglia. On the effect of phase transition on impact pressures due to sloshing. In The Twentieth International Offshore and Polar Engineering Conference. OnePetro, 2010. [3] Javier Calderon-Sanchez, Daniel Duque, and Jesus Gómez-Goñi. Modeling the effect of phase change on lng impact with open-source cfd. In International Conference on Offshore Mechanics and Arctic Engineering, volume 51203, page V001T01A028. American Society of Mechanical Engineers, 2018. [4] Yichao Chen and Mi-An Xue. Numerical simulation of liquid sloshing with different filling levels using openfoam and experimental validation. Water, 10(12):1752, 2018. [5] Mateusz Graczyk. Experimental investigation of sloshing loading and load effects in membrane LNG tanks subjected to random excitation. NTNU, 2008. [6] Cyril W Hirt and Billy D Nichols. Volume of fluid (vof) method for the dynamics of free boundaries. Journal of computational physics, 39(1):201–225, 1981. REFERENCES 2031 [7] SD Howison, JR Ockendon, and SK Wilson. Incompressible water-entry problems at small deadrise angles. Journal of Fluid Mechanics, 222(1):215–230, 1991. [8] Niels G Jacobsen, David R Fuhrman, and Jørgen Fredsøe. A wave generation toolbox for the open-source cfd library: Openfoam®. International Journal for numerical methods in fluids, 70(9):1073–1088, 2012. [9] Hrvoje Jasak. Openfoam: open source cfd in research and industry. International Journal of Naval Architecture and Ocean Engineering, 1(2):89–94, 2009. [10] AA Korobkin. Formulation of penetration problem as a variational inequality. Din. Sploshnoi Sredy, 58:73–79, 1982. [11] Yu-long Li, Ren-chuan Zhu, Guo-ping Miao, and FAN Ju. Simulation of tank sloshing based on openfoam and coupling with ship motions in time domain. Journal of Hydrodynamics, Ser. B, 24(3):450–457, 2012. [12] LNG-Journal. Exxonmobil sees global demand for lng and natural gas rising by 50 percent. 2016. [13] Olav F Rognebakke and Odd M Faltinsen. Coupling of sloshing and ship motions. Journal of Ship Research, 47(03):208–221, 2003. [14] Yan Su and ZY Liu. Coupling effects of barge motion and sloshing. Ocean Engineering, 140:352–360, 2017. [15] I Ten, Š Malenica, and A Korobkin. Semi-analytical models of hydroelastic slosh- ing impact in tanks of liquefied natural gas vessels. Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 369(1947):2920–2941, 2011. [16] Herbrt Wagner. Über stoß-und gleitvorgänge an der oberfläche von flüssigkeiten (Phe- nomena associated with impacts and sliding on liquid surfaces). ZAMM-Journal of Applied Mathematics and Mechanics/Zeitschrift für Angewandte Mathematik und Mechanik, 12(4):193–215, 1932. [17] HJ Zekri, AA Korobkin, and MJ Cooker. Liquid sloshing and impact in a closed container with high filling. IWWWFB, Bristol, UK, 2015. [18] Hussein Jebrail Zekri. The Influence of Gravity on Fluid-Structure Impact. PhD thesis, University of East Anglia, 2016.