Challenge on Gearbox Sloshing effect
Part 1:
Aim: To perform the following simulations in the Gearbox:
- 20% Immersion, Fluid - Engine oil.
- 30% Immersion, Fluid- Engine oil.
- 20% Immersion,Fluid-n-heptane (c7h16).
- 30% Immersion,Fluid-n-heptane (c7h16).
Introduction: For this project, transient simulation with dynamic meshing and UDF (user-defined function) has been performed for the cases mentioned and the simulation results are compared.
Theory: Theory related to this challenge is covered in Part 2.
Geometry: The geometry of the gearbox is imported to SpaceClaim as shown in Figure 1.
Figure 1. Gearbox
Geometry Preparation- The imported geometry is not sufficient for the simulation, it is necessary to extract the fluid volume to perform the simulation. For this, edges of the gearbox are selected after selecting the volume extract option. Now, the fluid volume is obtained as shown below in Figure 2.
Figure 2. Fluid Volume
As it is required to perform the 2D simulation, the Fluid volume is cut from the middle to extract the 2D geometry. This is done by creating mid-plane and removing one part of the geometry present on the either side of plane by using the 'split body' command. The obtained cut section of the geometry can be observed in Figure 3.
Figure 3. Cut-Section of Fluid Volume
From the cut-section, the yellow highlighted part of the geometry is selected and recreated as a new 2D Geometry as shown in Figure 4 to perform the 2D simulation.
Figure 4. 2D Geometry
Meshing- After Geometry Preparation, the geometry has been imported for meshing. To mesh the 2D Geometry, all triangle method is selected with the element size of 1 mm. The total number of nodes and elements are 15875 and 28327 respectively. Also, proximity was enabled with a minimum size of 0.001 mm with 1 cell across the gap which can be observed in Figure 5.
Figure 5. Meshing
As the simulation is performed for transient motion with dynamic mesh. It is very important to check the mesh quality. The value 0.4 was set as target skewness for the mesh with high smoothing. Mesh metric was observed to check the quality of the mesh. Values for mesh metrics are tabulated in Table 1 and different mesh metrics can be observed in Figure 6, Figure 7, and Figure 8.
Table 1. Mesh Metrics
|
Mesh Metrics |
Aspect Ratio |
Element Quality |
Skewness |
|
Minimum Value |
1.0007 |
0.68048 |
8.2308e-07 |
|
Maximum Value |
2.2747 |
1 |
0.52602 |
|
Average Value |
1.2041 |
0.962 |
5.7496e-02 |
|
Standard Deviation |
0.13829 |
3.7241e-02 |
5.7509e-02 |
|
Plot |
Figure 6 |
Figure 7 |
Figure 7 |
Figure 6. Aspect Ratio
Figure 7. Element Quality
Figure 8. Skewness
Boundary Conditions- After meshing, the geometry is imported into Fluent Solver. Multiphase - Volume of Fluid model with Implicit Formulation has been selected. The 'standard k-epsilon' model with 'standard wall function' is selected for Transient solver. For the simulation Gravity is enable towards negative Y-axis. Momentum equation was changed to first-order upwind and relaxation factor of pressure and momentum was changed to 0.1 and 0.4 respectively as shown in Figure 9.
Figure 9. Settings for Simulation Methods and Controls
The user-defined function for the motion of gears was imported for the simulation which can be observed in Figure 10. Also, Engine oil for case 1 and Case 2 and n-heptane (c7h16) fore case 3 and case 4 were imported from fluents material database as a second phase, the first phase being the air for all cases. The properties of fluids are tabulated in Table 2 below.
Figure 10. User-Defined Function for the Motion of Gears
Table 2. Fluid Properties
|
Fluids |
Air |
Engine Oil |
n-heptane |
|
Density (kg/m3) |
1.225 |
889 |
684 |
|
Viscosity (kg/m-sec) |
1.7894e-05 |
1.06 |
0.000409 |
As the simulation performed is a multiphase simulation, it is important to define the fluid region for the second phase fluid. It is done based on the calculations for the height of fluid as per the required percentage of fluid for the simulation.
Calculation:
Total Height of the Gearbox enclosure: 135mm
20% of the Gearbox enclosure : 0.2 * 135 = 27mm (from base)
30% of the Gearbox enclosure : 0.3 * 135 = 40.5mm (from base)
Based on the calculations, the region is marked for the second phase based on the required percentage of fluid by putting the coordinates for the rectangular region which can be observed in Figure 11. Also, Figure 12 and Figure 13 of contours before starting the simulation will make clear the 20% and 30% level of another fluid.
Figure 11. Coordinates for the second phase for 20% and 30% immersion
Figure 12. Contours for 20% immersion
Figure 13. Contours for 30% immersion
Results- Following are the results of Simulation:
20% Immersion, Fluid - Engine oil
Figure 14. Residuals
Animation 1. 20% engine oil
30% Immersion, Fluid- Engine oil
Figure 15. Residuals
Animation 2. 30% engine oil
20% Immersion,Fluid-n-heptane (c7h16)
Figure 16. Residuals
Animation 3. 20% n-heptane
30% Immersion,Fluid-n-heptane (c7h16)
Figure 17. Residuals
Animation 4. 30% n-heptane
Conclusions- After assessing the simulation results, the following conclusions are made:
- The sloshing effect is less in case of engine oil as compared to n-heptane as engine oil is more viscous.
- The highest sloshing is shown by n-heptane with 30% immersion. The reason for the highest sloshing is less viscosity and more immersion.
- Engine oil with 30% immersion is the best-suited option for gearbox among the above cases as engine oil has more viscosity and the immersion is highest which will be responsible for providing more lubrication to the gears.
Part 2:
Dynamic Meshing- In ANSYS Fluent the dynamic mesh capability is used to simulate problems with boundary motion, such as check valves and store separations.
The dynamic mesh model allows to move the boundaries of a cell zone relative to other boundaries of the zone and to adjust the mesh accordingly. The boundaries can move rigidly with respect to each other (that is, linear or rotational motion). The motion of the boundaries can be rigid, such as pistons moving inside an engine cylinder or a flap deflecting on an aircraft wing, or deforming, such as the elastic wall of a balloon during inflation or a flexible artery wall responding to the pressure pulse from the heart. In either case, the nodes that define the cells in the domain must be updated as a function of time, and hence the dynamic mesh solutions are inherently unsteady.
The building blocks for dynamic mesh capabilities within ANSYS Fluent are three dynamic mesh schemes, namely, smoothing, layering, and remeshing. A combination of these three schemes is used to tackle the most challenging dynamic mesh problems. However, for simple dynamic mesh problems involving linear boundary motion, the layering scheme is often sufficient. For example, flow around a check valve can be simulated using only the layering scheme. The three dynamic mesh schemes are explained below:
1. Smoothing- When smoothing is used to adjust the mesh of a zone with a moving and/or deforming boundary, the interior nodes of the mesh move, but the number of nodes and their connectivity does not change. In this way, the interior nodes “absorb” the movement of the boundary.
2. Layering- The dynamic layering method is used to split or merge cells adjacent to any moving boundary if all cells adjacent to the moving face zone are either wedges or hexahedra (quadrilaterals in 2D) even though the cell zone may contain mixed cell shapes. The cell layers must be completely bounded by one-sided face zones, except when sliding interfaces are used.
3. Remeshing- When the boundary displacement is large compared to the local cell sizes, the cell quality can deteriorate or the cells can become degenerate if only mesh smoothing is used. This will invalidate the mesh (for example, result in negative cell volumes) and consequently, will lead to convergence problems when the solution is updated to the next time step. Hence, for such problems, remeshing is used.
Following are some examples of problems in which dynamic meshing is required which are already mentioned in the above theory:
1. Flow around check valve
2. Pistons moving inside an engine cylinder
3. Flap deflecting on an aircraft wing
4. A flexible artery wall responding to the pressure pulse from the heart.
The dynamic mesh model in ANSYS Fluent can be used to model flows where the shape of the domain is changing with time due to motion on the domain boundaries. The dynamic mesh model can be applied to single or multiphase flows (and multi-species flows). The update of the volume mesh is handled automatically by ANSYS Fluent at each time step based on the new positions of the boundaries. To use the dynamic mesh model, it is required to provide a starting volume mesh and the description of the motion of any moving zones in the model. ANSYS Fluent allows user to describe the motion using either boundary profiles, user-defined functions (UDFs), or the six degrees of freedom solver.
Following are some advantages and disadvantages of dynamic meshing:
Advantages-
1. Its easy to adjust the mesh by moving the boundaries of a cell zone relative to other boundaries of the zone.
2. The boundaries can move rigidly with respect to each other i. e. linear or rotational motion.
3.Mesh zones moving adjacent to one another can be linked across one or more non-conformal interfaces.
Disadvantages-
1. It works efficiently only for the triangular mesh.
2. When the boundary displacement is large compared to the local cell sizes, the cell quality can deteriorate.
3. Convergence problems, when the solution is updated for negative cell volume.
Fluid Sloshing Effect- In fluid dynamics, slosh refers to the movement of liquid inside another object (which is, typically, also undergoing motion).
Strictly speaking, the liquid must have a free surface to constitute a slosh dynamics problem, where the dynamics of the liquid can interact with the container to alter the system dynamics significantly. Important examples include propellant slosh in spacecraft tanks and rockets (especially upper stages), and the free surface effect (cargo slosh) in ships and trucks transporting liquids (for example oil and gasoline). However, it has become common to refer to liquid motion in a completely filled tank, i.e. without a free surface, as "fuel slosh".
Such motion is characterized by "inertial waves" and can be an important effect in spinning spacecraft dynamics. Extensive mathematical and empirical relationships have been derived to describe liquid slosh. These types of analyses are typically undertaken using CFD and FEA to solve the fluid-structure interaction problem, especially if the solid container is flexible. Relevant fluid dynamics non-dimensional parameters include the Bond Number, the Weber number, and the Reynolds number.
Slosh is an important effect for spacecraft, ships, and some aircraft. Slosh was a factor in the Falcon 1 second test flight anomaly, and has been implicated in various other spacecraft anomalies, including a near-disaster with the Near Earth Asteroid Rendezvous (NEAR Shoemaker) satellite.
Figure 18. Fuel Tank Sloshing
Whether the sloshing effect is good or bad depends on the application of sloshing. Following are some good and bad applications of sloshing:
Good Application- 1. In gearbox sloshing the movement of viscous liquid is an essential requirement to reduce the temperature and friction losses by providing lubrication to gears. Sloshing is responsible for an increase in the life of the gearbox and its effective working.
2. Use of anti-slosh devices such as baffles to limit the adverse liquid slosh effect on directional performance and stability of tank vehicles.
Bad Application- 1. Liquid sloshing strongly influences the directional dynamics and safety performance of highway tank vehicles in a highly adverse manner. Hydrodynamic forces and moments arising from liquid cargo oscillations in the tank under maneuvers like steering or braking or both simultaneously reduce the stability limit and controllability of partially filled tank vehicles.
UDF- A user-defined function, or UDF, is a function that you program that can be dynamically loaded with the FLUENT solver to enhance the standard features of the code. UDFs are written in the C programming language. They are defined using DEFINE macros that are supplied by Fluent Inc. They access data from the FLUENT solver using predefined macros and functions also supplied by Fluent Inc. Every UDF contains the udf.h file inclusion directive (#include "udf.h") at the beginning of the source code file, which allows definitions for DEFINE macros and other Fluent-provided macros and functions to be included during the compilation process. UDFs are executed as either interpreted or compiled functions in FLUENT. Values that are passed to the solver by a UDF or returned by the solver to a UDF must be specified in SI units.
UDFs allow you to customize FLUENT to fit your particular modeling needs. UDFs can be used for a variety of applications, some of which are listed below:
1. Customization of boundary conditions, material property definitions, surface and volume reaction rates, source terms in FLUENT transport equations, source terms in user-defined scalar (UDS) transport equations, diffusivity functions, etc.
2. Adjustment of computed values on a once-per-iteration basis.
3. Initialization of a solution.
4. Asynchronous execution of a UDF (on demand).
5. Post-processing enhancement.
6. Enhancement of existing FLUENT models (e.g., discrete phase model, multiphase mixture model, discrete ordinates radiation model).
Limitation- Although the UDF capability in FLUENT can address a wide range of applications, it is not possible to address every application using UDFs. Not all solution variables or FLUENT models can be accessed by UDFs. Specific heat values, for example, cannot be modified; this would require additional solver capabilities.
Errors in the Simulation-
A] 'Dynamic Mesh Failed' error- This error occurs due to unsuitable settings of Smoothing, Meshing, and Remeshing. Due to wrong settings of dynamic mesh, the following conditions are not met:
- The boundary of the cell zone moves predominantly in one direction (i.e., no excessive anisotropic stretching or compression of the cell zone).
- The motion is predominantly normal to the boundary zone.
- The faces are triangular (or linear in 2D).
- The faces to be remeshed are all adjacent to moving loops (i.e., moving nodes).
- The faces are on the same face zone, and form an annular (i.e., closed loop).
- The faces are not part of a symmetry or conformal periodic boundary.
Settings that are applied for the dynamic mesh can be observed in Figure 19. In dynamic mesh only smoothing and remeshing were enabled. Layering was not enabled as the geometry was in 2D. The values for smoothing were kept at default. Values for the remeshing were changed for the solution, maximum length scale was set to 1.5 mm (a bit bigger than element size),maximum cell skewness was set to 0.4, and size remeshing interval was set to 2. It is very important to keep the size remeshing interval minimum as for longer intervals the skewness of cell surpasses the maximum skewness value and then cells get collapsed due to which the mesh fails.
Figure 19. Dynamic Mesh Settings
B] 'Negative Cell Volume Detected' error- Negative cell volume detected error occurs due to the distance moved by a cell per timestep is greater than the cell size in the dynamic region. This problem can be resolved by changing the dynamic mesh settings which are explained above in the 'Dynamic Mesh Fail' error. Another way by which we can resolve the error is by changing the mesh parameters to optimum setting by checking the mesh metrics.
Following are some parameters of mesh metrics used in this simulation to obtain the optimum mesh.
Aspect Ratio: Aspect ratio is the measure of a mesh element's deviation from having all sides of equal length. A high aspect ratio occurs with long, thin elements. Entering an overly large value for the Minimum Element Size mesh control may cause the mesh generator to create solid elements with high aspect ratios. In all triangles method it is always good to keep the value of aspect ratio close to 1 for the better mesh quality. Following Figure 20 shows the triangle for aspect ratio of 1 and 20.
Figure 20. Aspect Ratio
Element Quality: The Element Quality option provides a composite quality metric that ranges between 0 and 1. This metric is based on the ratio of the volume to the sum of the square of the edge lengths for 2D quad/tri elements, or the square root of the cube of the sum of the square of the edge lengths for 3D elements. A value of 1 indicates a perfect cube, square, or triangle while a value of 0 indicates that the element has a zero or negative volume.
Skewness: Skewness is one of the primary quality measures for a mesh. Skewness determines how close to ideal (equilateral or equiangular) a face or cell is. Figure 21 shows the ideal and skewed triangles and quadrilaterals.
The following Table 3 lists the range of skewness values and the corresponding cell quality.
Table 3. Range of Skewness
| Value of Skewness | Cell Quality |
|---|---|
| 1 | degenerate |
| 0.9 — <1 | bad (sliver) |
| 0.75 — 0.9 | poor |
| 0.5 — 0.75 | fair |
| 0.25 — 0.5 | good |
| >0 — 0.25 | excellent |
| 0 | equilateral |
According to the definition of skewness, a value of 0 indicates an equilateral cell (best) and a value of 1 indicates a completely degenerate cell (worst). Degenerate cells (slivers) are characterized by nodes that are nearly coplanar (colinear in 2D).
Highly skewed faces and cells are unacceptable because the equations being solved assume that the cells are relatively equilateral/equiangular.
References:
1. https://davis68.github.io/me498cf-fa16/resources/flec09/lab-dynamic-meshing.pdf
2. https://en.wikipedia.org/wiki/Slosh_dynamics
3. http://jullio.pe.kr/fluent6.1/help/pdf/udf/fl61udf.pdf (Fluent 6.1 UDF Manual)