Skip to content

Commit 1362b1b

Browse files
committed
docs(ThrustPad ): add tolerance_force_moment and residual_force_moment to docstring
1 parent 759c298 commit 1362b1b

File tree

1 file changed

+99
-78
lines changed

1 file changed

+99
-78
lines changed

ross/bearings/thrust_pad.py

Lines changed: 99 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,69 @@
1313
class ThrustPad(BearingElement):
1414
"""Thermo-Hydro-Dynamic (THD) Tilting Pad Thrust Bearing.
1515
16-
This class implements a comprehensive thermo-hydro-dynamic analysis for
17-
tilting pad thrust bearings, calculating pressure and temperature fields,
18-
equilibrium position, and dynamic coefficients (stiffness and damping).
16+
This class provides a **comprehensive numerical model** for tilting pad thrust
17+
bearings using thermo-hydro-dynamic (THD) analysis. Each pad is analyzed with
18+
its own pressure and temperature fields, pivot mechanics, and load distribution.
1919
20-
The analysis solves the Reynolds equation for pressure distribution and
21-
the energy equation for temperature field, considering viscosity variations
22-
with temperature and turbulent effects.
20+
**Theoretical Approach:**
21+
22+
The model solves the **complete THD problem** for each pad using:
23+
24+
1. **Reynolds Equation** (for pressure field):
25+
- 2D finite volume method on a structured grid (n_radial × n_theta)
26+
- Accounts for pad rotation and surface velocities
27+
- Enforces atmospheric pressure at pad edges (cavitation boundary)
28+
- Viscosity varies spatially due to temperature field
29+
30+
2. **Energy Equation** (for temperature field):
31+
- 2D finite volume with upwind scheme
32+
- Includes viscous dissipation and heat conduction
33+
- Models turbulent effects using Reynolds number-dependent viscosity
34+
- Oil supply temperature as boundary condition
35+
36+
3. **Equilibrium Calculation**:
37+
- Iterative optimization to find pad equilibrium position
38+
- Two modes: calculate film thickness or use imposed thickness
39+
- Minimizes residual forces and moments using Nelder-Mead optimization (fmin)
40+
- Determines radial and circumferential inclination angles
41+
42+
4. **Dynamic Coefficients** (stiffness and damping):
43+
- Uses virtual perturbations of displacements and speeds to determine the coefficients
44+
- Applies small perturbations to axial position and velocity
45+
- Solves complete THD problem for each perturbation state
46+
- Extracts coefficients from force differences
47+
48+
For reference check :cite:`barbosa2016`, :cite:`heinrichson2007` and :cite:`nicoletti1999`.
2349
2450
Parameters
2551
----------
2652
n : int
2753
Node number for the bearing element.
28-
pad_inner_radius : float or Quantity
54+
pad_inner_radius : float
2955
Inner radius of the pad. Default unit is meter.
30-
pad_outer_radius : float or Quantity
56+
pad_outer_radius : float
3157
Outer radius of the pad. Default unit is meter.
32-
pad_pivot_radius : float or Quantity
58+
pad_pivot_radius : float
3359
Radius of the pivot point. Default unit is meter.
34-
pad_arc_length : float or Quantity
60+
pad_arc_length : float
3561
Arc length of each pad. Default unit is degrees.
36-
angular_pivot_position : float or Quantity
62+
angular_pivot_position : float
3763
Angular position of the pivot point. Default unit is degrees.
38-
oil_supply_temperature : float or Quantity
39-
Oil supply temperature. Default unit is degrees Celsius.
64+
oil_supply_temperature : float
65+
Oil supply temperature. Default unit is °C.
4066
lubricant : str or dict
41-
Lubricant specification. Can be:
42-
- String: 'ISOVG32', 'ISOVG46', 'ISOVG68'
43-
- Dictionary: Custom lubricant properties
67+
Lubricant type. Can be:
68+
- 'ISOVG32'
69+
- 'ISOVG46'
70+
- 'ISOVG68'
71+
Or a dictionary with lubricant properties.
4472
n_pad : int
4573
Number of pads in the bearing.
4674
n_theta : int
4775
Number of mesh elements in circumferential direction.
4876
n_radial : int
4977
Number of mesh elements in radial direction.
50-
frequency : array_like or Quantity
78+
frequency : array_like
5179
Rotor rotating frequency(ies). Default unit is rad/s.
5280
equilibrium_position_mode : str
5381
Equilibrium position calculation mode:
@@ -56,61 +84,55 @@ class ThrustPad(BearingElement):
5684
model_type : str, optional
5785
Type of model to be used. Options:
5886
- 'thermo_hydro_dynamic': Thermo-Hydro-Dynamic model
59-
radial_inclination_angle : float or Quantity
87+
radial_inclination_angle : float, optional
6088
Initial radial inclination angle. Default unit is radians.
61-
circumferential_inclination_angle : float or Quantity
89+
circumferential_inclination_angle : float, optional
6290
Initial circumferential inclination angle. Default unit is radians.
63-
initial_film_thickness : float or Quantity
91+
initial_film_thickness : float, optional
6492
Initial film thickness at pivot point. Default unit is meters.
93+
tolerance_force_moment : float, optional
94+
Convergence tolerance for residual forces and moments in N.
95+
The optimization stops when residual_force_moment < tolerance_force_moment.
96+
Default is 0.1.
97+
residual_force_moment : float, optional
98+
Initial value for residual forces and moments in N.
99+
Used as starting point for the iterative equilibrium calculation.
100+
Default is 50.
65101
axial_load : float, optional
66-
Axial load applied to the bearing. Default is None.
67-
**kwargs
68-
Additional keyword arguments passed to BearingElement.
102+
Axial load applied to the bearing. Default unit is Newton.
103+
**kwargs : dict, optional
104+
Additional keyword arguments.
105+
106+
Returns
107+
-------
108+
None
109+
The class instance contains all calculated results as attributes.
110+
111+
References
112+
----------
113+
.. bibliography::
114+
:filter: docname in docnames
69115
70116
Attributes
71117
----------
118+
kzz : ndarray
119+
Axial stiffness coefficient in N/m.
120+
czz : ndarray
121+
Axial damping coefficient in N·s/m.
72122
pressure_field_dimensional : ndarray
73-
Dimensional pressure field [Pa]. Shape: (n_radial+2, n_theta+2)
123+
Dimensional pressure field in Pa. Shape: (n_radial+2, n_theta+2)
74124
temperature_field : ndarray
75-
Temperature field [°C]. Shape: (n_radial+2, n_theta+2)
125+
Temperature field in °C. Shape: (n_radial+2, n_theta+2)
76126
pivot_film_thickness : float
77-
Oil film thickness at the pivot point [m]
127+
Oil film thickness at the pivot point in m.
78128
max_thickness : float
79-
Maximum oil film thickness [m]
129+
Maximum oil film thickness in m.
80130
min_thickness : float
81-
Minimum oil film thickness [m]
82-
kzz : ndarray
83-
Axial stiffness coefficient [N/m]. Shape: (n_frequencies,)
84-
czz : ndarray
85-
Axial damping coefficient [N*s/m]. Shape: (n_frequencies,)
131+
Minimum oil film thickness in m.
86132
viscosity_field : ndarray
87-
Viscosity field [Pa*s]. Shape: (n_radial, n_theta)
133+
Viscosity field in Pa·s. Shape: (n_radial, n_theta)
88134
film_thickness_center_array : ndarray
89-
Film thickness at cell centers. Shape: (n_radial, n_theta)
90-
91-
Notes
92-
-----
93-
The class implements a finite volume method to solve the Reynolds equation
94-
and energy equation simultaneously. The solution includes:
95-
96-
1. Pressure Field: Solved using finite volume discretization of the
97-
Reynolds equation with appropriate boundary conditions.
98-
99-
2. Temperature Field: Solved using the energy equation considering
100-
viscous heating, convection, and conduction effects.
101-
102-
3. Viscosity Variation: Temperature-dependent viscosity using
103-
exponential interpolation: μ = a * exp(b * T)
104-
105-
4. Equilibrium Position: Found by minimizing residual forces and
106-
moments using scipy.optimize.fmin.
107-
108-
5. Dynamic Coefficients: Calculated using perturbation method
109-
for stiffness and damping coefficients.
110-
111-
The mesh discretization uses a structured grid with n_radial by n_theta
112-
control volumes. Boundary conditions include atmospheric pressure at
113-
pad edges and oil supply temperature at boundaries.
135+
Film thickness at cell centers in m. Shape: (n_radial, n_theta)
114136
115137
Examples
116138
--------
@@ -135,13 +157,6 @@ class ThrustPad(BearingElement):
135157
... circumferential_inclination_angle=Q_(-1.70e-05, "rad"),
136158
... initial_film_thickness=Q_(0.2, "mm")
137159
... )
138-
139-
References
140-
----------
141-
.. [1] BARBOSA, J.S. Analise de Modelos Termohidrodinamicos para Mancais de unidades geradoras Francis. 2016. Dissertacao de Mestrado. Universidade Federal de Uberlandia, Uberlandia.
142-
.. [2] HEINRICHSON, N.; SANTOS, I. F.; FUERST, A., The Influence of Injection Pockets on the Performance of Tilting Pad Thrust Bearings Part I Theory. Journal of Tribology, 2007.
143-
.. [3] NICOLETTI, R., Efeitos Termicos em Mancais Segmentados Hibridos Teoria e Experimento. 1999. Dissertacao de Mestrado. Universidade Estadual de Campinas, Campinas.
144-
.. [4] LUND, J. W.; THOMSEN, K. K. A calculation method and data for the dynamic coefficients of oil lubricated journal bearings. Topics in fluid film bearing and rotor bearing system design and optimization, n. 1000118, 1978.
145160
"""
146161

147162
@check_units
@@ -163,6 +178,8 @@ def __init__(
163178
radial_inclination_angle,
164179
circumferential_inclination_angle,
165180
initial_film_thickness,
181+
tolerance_force_moment=0.1,
182+
residual_force_moment=50,
166183
model_type="thermo_hydro_dynamic",
167184
axial_load=None,
168185
**kwargs,
@@ -244,7 +261,11 @@ def __init__(
244261
czz = np.zeros(n_freq)
245262

246263
self._initialize_field_storage(n_freq)
264+
265+
# Optimization data
247266
self.optimization_history = {}
267+
self.tolerance_force_moment = tolerance_force_moment
268+
self.residual_force_moment = residual_force_moment
248269

249270
self.initial_time = time.time()
250271
for i in range(n_freq):
@@ -412,7 +433,7 @@ def _print_single_frequency_results(self, freq_index):
412433
table.add_row(["Equilibrium Mode", self.equilibrium_position_mode, "-"])
413434

414435
table.add_row(
415-
["Maximum Pressure", f"{self.pressure_fields[freq_index].max():.2f}", "Pa"]
436+
["Maximum Pressure", f"{self.pressure_fields[freq_index].max():.4e}", "Pa"]
416437
)
417438
table.add_row(
418439
[
@@ -422,23 +443,23 @@ def _print_single_frequency_results(self, freq_index):
422443
]
423444
)
424445
table.add_row(
425-
["Maximum Film Thickness", f"{self.max_thicknesses[freq_index]:.6f}", "m"]
446+
["Maximum Film Thickness", f"{self.max_thicknesses[freq_index]:.4e}", "m"]
426447
)
427448
table.add_row(
428-
["Minimum Film Thickness", f"{self.min_thicknesses[freq_index]:.6f}", "m"]
449+
["Minimum Film Thickness", f"{self.min_thicknesses[freq_index]:.4e}", "m"]
429450
)
430451
table.add_row(
431452
[
432453
"Pivot Film Thickness",
433-
f"{self.pivot_film_thicknesses[freq_index]:.6f}",
454+
f"{self.pivot_film_thicknesses[freq_index]:.4e}",
434455
"m",
435456
]
436457
)
437458

438459
if self.equilibrium_position_mode == "imposed":
439-
table.add_row(["Axial Load", f"{self.axial_load.sum():.2f}", "N"])
460+
table.add_row(["Axial Load", f"{self.axial_load.sum():.4e}", "N"])
440461
elif self.equilibrium_position_mode == "calculate":
441-
table.add_row(["Axial Load", f"{self.axial_load:.2f}", "N"])
462+
table.add_row(["Axial Load", f"{self.axial_load:.4e}", "N"])
442463

443464
table.add_row(["kzz (Stiffness)", f"{self.kzz[freq_index]:.4e}", "N/m"])
444465
table.add_row(["czz (Damping)", f"{self.czz[freq_index]:.4e}", "N*s/m"])
@@ -526,18 +547,15 @@ def solve_fields(self):
526547
"""
527548

528549
# Initialize with a high value to enter the loop
529-
residual_force_moment = 50
550+
residual_force_moment = self.residual_force_moment
530551
# Set a tolerance to exit the loop
531-
tolerance_force_moment = 30
552+
tolerance_force_moment = self.tolerance_force_moment
532553

533554
# Residual force and moment convergence loop
534555
iteration = 0
535556
while residual_force_moment >= tolerance_force_moment:
536557
iteration += 1
537558

538-
# Store optimization history
539-
self.record_optimization_residual(residual_force_moment, iteration)
540-
541559
if self.equilibrium_position_mode == "imposed":
542560
self.h0i = self.initial_position[2]
543561
x = fmin(
@@ -1250,6 +1268,9 @@ def solve_fields(self):
12501268
self.initial_position = np.array([x[0], x[1], self.pivot_film_thickness])
12511269
self.score = residual_force_moment
12521270

1271+
# Store optimization history
1272+
self.record_optimization_residual(residual_force_moment, iteration)
1273+
12531274
temperature_field_full = np.ones((self.n_radial + 2, self.n_theta + 2))
12541275

12551276
temperature_field_full[1 : self.n_radial + 1, 1 : self.n_theta + 1] = np.flipud(
@@ -1395,8 +1416,8 @@ def show_optimization_convergence(
13951416

13961417
# Display plot if requested
13971418
if show_plots:
1398-
iterations = list(range(len(res_list)))
1399-
residuals = [res if res is not None else 0 for res in res_list]
1419+
iterations = list(range(1, len(res_list) + 1))
1420+
residuals = [res for res in res_list if res is not None]
14001421

14011422
fig = go.Figure()
14021423
fig.add_trace(

0 commit comments

Comments
 (0)