Simulation of Fluid Sloshing effect inside a Gear-box
REPORT
Gearbox Simulation
OBJECTIVE
- To simulate the Fluid Sloshing effect inside a Gearbox through four different cases.
- Discuss highlighted terminology of this simulation and answer a few questions related to them.
CASE
Gearbox
The gearbox is a mechanical method of transferring energy from one device to another and is used to increase torque while reducing speed.
Gearboxes/Gear reducers or enclosed speed reducers are used in many electromechanical drive systems. Gearboxes are essentially multiple open gear sets contained in the housing. The housing supports bearings and shafts hold in lubricants and protects the components from surrounding conditions. Gearboxes are available in a wide range of load capacities and speed ratios. The purpose of a gearbox is to increase or reduce speed. As a result, torque output will be the inverse of the speed function.
Here, the gearbox consists of two spur gears in housing. The gears would be immersed in the liquid filled up to a certain height in the gearbox. The gears are run at 200 radians per second. When the gear set is running, this liquid is carried by the teeth thus resulting in self-lubrication of the gearbox. Liquid sloshing also occurs as the result. Considering the complete 3D simulation of the gearbox would be computationally expensive in terms of mesh and time taken a 2D simulation is conducted. A transient simulation is performed to capture two complete rotations of the gear. At industry standards, gearbox simulations capture two complete rotations of the gear. At industry standards, gearbox simulations would be run typically up to 6-7 rotations. The gear ratio is equal to one and both the gears are of the same size.
There are four cases considered as follows,
Case
- 20 % Immersion, Fluid – Engine oil.
- 30 % Immersion, Fluid – Engine oil.
- 20 % Immersion, Fluid – n-heptane (c7h16).
- 30 % Immersion, Fluid – n-heptane (c7h16).
PROCEDURE TO SET UP THE CASE
SpaceClaim
- Geometry preparation in SpaceClaim.
- Fluid volume is extracted.
- Body split was performed to extract 2D geometry in the middle plane.
- Final 2D geometry is obtained.
Gearbox 3D model

Extracted Fluid Volume

Sectional view

2D geometry (Final Geometry)

Mesh
- Name selection is done by selecting individual edges for the respective gear in the geometry.
- Generate mesh with the assigned triangle method for the whole geometry. Element size is kept as 2mm.
- Capture proximity is enabled.
- Statistics
- Nodes 10420
- Elements 17754
Mesh Details

Name selection

Mesh

Mesh metric

Setup
Dynamic meshing
Methods
- Smoothing: Diffusion
- Remeshing: Local Cell
- Minimum Length Scale: 0.0001
- Maximum Length Scale: 0.002
- Maximum Cell Skewness: 0.7
- Size Remeshing Interval: 5
The motion of assigned using User-defined functions and centre of gravity location for both the gears as gathered i.e. (0, 0) and (0.115, 0).
Adapt
- Automatic – Cell Registers
- Options: Inside
- Shapes: Quad
For 20% immersion
- Xmin = - 0.054 m
- Xmax = 169 m
- Ymin = - 0.0405 m
- Ymax = - 0.0675 m
For 30% immersion
- Xmin = - 0.06183 m
- Xmax = 17683 m
- Ymin = - 0.027 m
- Ymax = - 0.0675 m
Solver
General
- Type – Pressure based
- Velocity Formulation – Absolute
- Time – Transient
- Gravity with acceleration at y-axis = -9.81
Models
Multiphase
Volume of fluid
- Implicit method
- Volume fraction cutoff = 1e – 06
- Number of Eulerian Phases = 2
Phases
- Primary phase – air
- Secondary phase – Engine Oil/n-heptane-liquid
Viscous
- Turbulence
- k-omega (2 equation)
- Model – Realizable
- Near-Wall Treatment – Enhanced Wall Treatment
Material
- Air
- Density – 1.225 kg/m3
- Viscosity – 1.7894e – 05 Ns/m2
- Engine Oil
- Density – 889 kg/m3
- Viscosity – 1.06 Ns/m2
- N- heptane-liquid
- Density – 684 kg/m3
- Viscosity – 0.000409 Ns/m2
User-Defined
Functions – Compiled
UDF
#include "udf.h"
DEFINE_CG_MOTION(right_motion, dt, vel, omega, time, dtime)
{
vel[0] = 0.0;
vel[1] = 0.0;
vel[2] = 0.0;
omega[0] = 0.0;
omega[1] = 0.0;
omega[2] = 2.0e2; /* [rad/s]*/
}
DEFINE_CG_MOTION(left_motion, dt, vel, omega, time, dtime)
{
vel[0] = 0.0;
vel[1] = 0.0;
vel[2] = 0.0;
omega[0] = 0.0;
omega[1] = 0.0;
omega[2] = -2.0e2; /* [rad/s]*/
}
Solution
- Define necessary contours for tracking the result.
- Initialization using hybrid
- Patch
- Phase – Engine Oil/n-heptane-liquid
- Variable - Volume Fraction
- Value = 1
- Calculating with 0.0001-time step size, 700 number of time steps.
CALCULATION
- Angular velocity = mu = 200 rad/s
As, mu = (2*3.14*N)/60
Therefore, N = 31.83 rps i.e. 0.0314s
For minimum of 2 rotations; N = 2*0.0314 s = 0.0628 s
To find the number of time steps
(Time step size) * (Number of time steps) = (Total flow time)
Time step size = 0.0001
Therefore,
Number of time step * 0.0001 = 0.0628
Number of time step = 628 (approximately 700)
OUTPUT
- 20 % Immersion, Fluid – Engine Oil
Residuals

Contour at 0.07 flow time

Animation
- 30 % Immersion, Fluid – Engine Oil
Residuals

Contour at 0.07 flow time

Animation
- 20 % Immersion, Fluid – n-heptane (c7h16).
Residuals

Contour at 0.07 flow time

Animation
- 30 % Immersion, Fluid – n-heptane (c7h16).
Residuals

Contour at 0.07 flow time

Animation
CONCLUSION
- For the case of 30% immersion, the number of immersed gear teeth in the lubricant is more when compared with the 20% immersion.
- In 30% immersion, the availability of lubricant is more because the gear teeth are more in contact with lubricant and with a further increased number of rotations lubricant can reach all the teeth of the gear.
- With 20% immersion, the sloshing effect is more in the case of n-heptane-liquid as a lubricant for gearbox when compared with the same percentage of immersion of gears in engine oil as a lubricant. This is due to another fact that the viscosity and the density of the n-heptane liquid are lower than that of the engine oil. But the formation of lubricant film over the gear teeth is more stable with engine oil than the n-heptane liquid (reasons being the same i.e. difference in the properties).
- So it is better to choose higher immersion and lubricant with lower viscosity for the best possible conditions.
TERMINOLOGY
Dynamic Meshing
The dynamic mesh model allows you 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 concerning each other, mainly linear or rotational motion, or can deform. 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. Combined with the six degrees of freedom (6 DOF) solver, dynamic mesh allows the trajectory of a moving object to be determined by the aero or hydrodynamic forces from the surrounding flow field. The dynamic mesh model in ANSYS Fluent can be used to model flows where the shape of the domain changes with time due to motion on the domain boundaries. The dynamic mesh model can be applied to single or multiphase flows. The volume mesh update is automatically handled by ANSYS Fluent at each time step based on the new positions of the boundaries.
Application
A good use case for dynamic meshing is rigid body motion where boundaries or internal walls move relative to each other. The dynamic mesh capability is used to simulate problems with boundary motion, such as checking valves and store separations. Dynamic meshes can also be used in simulating the movement of pistons inside a cylinder, flap detecting on an aircraft wing, and deformation of an elastic wall of a balloon on a rigid surface.
The building blocks for dynamic mesh capabilities within ANSYS FLUENT are three dynamic mesh schemes: smoothing, layering, and re-meshing.
Fluid Sloshing Effect
Sloshing refers to any motion of the free liquid surface inside its container. It is caused by any disturbance to partially filled liquid containers. 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. Slosh is an important effect on spacecraft, ships, some land vehicles and some aircraft.
Advantages
- 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 an important factor for the increase in the life of the gearbox and its effective working.
- The effect of slosh is used to limit the bounce of a roller hockey ball. Water slosh can significantly reduce the rebound height of a ball but some amounts of liquid seem to lead to a resonance effect. Many of the balls for roller hockey commonly available contain an eater to reduce the bounce height.
Drawbacks
- Sloshing or shifting cargo, water ballast, or other liquid (e.g. leaks or fire fighting) can cause disastrous capsizing in ships due to the free surface effect; this can also affect aircraft.
- In water ballast tanks, the sloshing motion of seawater inside ballast tanks brings large fluid pressures and impact loads, which destroys the structure of tanks.
- 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 manoeuvres like steering or braking or both simultaneously reduce the stability limit and controllability of partially filled tank vehicles.
UDF (User-Defined Function)
A user-defined function is a C function program that can be dynamically loaded with the ANSYS FLUENT solver to enhance the standard features of the code.
One can use a UDF to,
- Customise boundary conditions, material property definitions, surface and volume reaction rates, source terms in ANSYS Fluent transport equations, source terms in user-defined scalar (UDS) transport equations, diffusivity functions, and so on.
- Adjust computed values on a once-pre-iteration basis.
- Initialize a solution.
- Perform asynchronous (on-demand) execution of a UDF.
- Execute at the end of the iteration, upon exit from ANSYS Fluent, or upon loading of a compiled UDF library.
- Enhance post-processing.
- Enhance existing ANSYS Fluent models (such as discrete phase model, multiphase mixture model, discrete ordinates radiation model).
ERROR
‘Dynamic mesh failed’ error
Dynamic meshing failed refers to situations in which the computational grid changes dynamically during the run of the computational fluid dynamics simulation. This opens up the possibility to simulate flows where the geometry changes with time.
To use the dynamic mesh model, one needs to provide a starting volume mesh and a description of the motion of any moving zones in the model. ANSYS Fluent allows one to describe the motion using either boundary profiles, user-defined functions (UDFs), or the six degrees of freedom solver.
ANSYS Fluent expects the description of the motion to be specified on either face or cell zones. If the model contains moving and non-moving regions, one needs to identify these regions y grouping them into their respective face or cell zones in the starting volume mesh that you generate. Furthermore, regions that are deforming due to motion on their adjacent regions must also be grouped into separate zones in the starting volume mesh. The boundary between the various regions need not be conformal. One can use the non-conformal or sliding interface capability in ANSYS Fluent to connect the various zones in the final model.
‘Negative cell volume detected’ error
Negative cell volume detected occurs when the meshed cell moves too far in a time step such that the cell collapses. To avoid this, use the re-meshing and reduction of the time step can be done.
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 resulting in negative cell volume and consequently, will lead to convergence problems when the solution is updated to the next time step.
To circumvent this problem, ANSYS Fluent agglomerates cells that violate the skewness or size criteria and locally re-meshes the agglomerated cells or faces. If the new cells or faces satisfy the skewness criterion, the mesh is locally updated with the new cells (with the solution interpolated from the old cells). Otherwise, the news cells are discarded and the old cells are retained.
Floating-point exception error
Floating point exception means that the solver detects an arithmetic operation, which it cannot compute, for example, division by zero, or if the numbers exceed the bounds for the numerical data or types used in the code. Mathematically speaking, we are dealing with a divergence here.
Ways to avoid the error:
- Use upwind convection schemes
- Double-check the initial and boundary conditions
- Limit the time step
- Apply under-relaxation
- Use coupled implicit solver
- Running series or parallel with a single processor
- Mesh Quality