Skip to content

Commit 795715e

Browse files
authored
Merge pull request #1211 from gsabinoo/fix/cylindrical
Correct formulation when using Lund method
2 parents 0e6a51f + 246bf8b commit 795715e

File tree

6 files changed

+185
-101
lines changed

6 files changed

+185
-101
lines changed

docs/references/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Elements
2323
SealElement
2424
BallBearingElement
2525
RollerBearingElement
26-
THDCylindrical
26+
PlainJournal
2727
BearingFluidFlow
2828
MagneticBearingElement
2929
GearElement

docs/user_guide/tutorial_part_1.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@
12151215
"- 4. `RollerBearingElement`: A bearing element for roller bearings.\n",
12161216
"- 5. `MagneticBearingElement`: A bearing element for magnetic bearings.\n",
12171217
" - 5.1. `param_to_coef`: A bearing element for magnetic bearings from electromagnetic parameters\n",
1218-
"- 6. `THDCylindrical`: A cylindrical bearing element based on the pressure and temperature field in oil film.\n",
1218+
"- 6. `PlainJournal`: A cylindrical bearing element based on the pressure and temperature field in oil film.\n",
12191219
"\n",
12201220
"The classes from item 2 to 6 inherits from `BearingElement` class. It means, you can use the same methods and commands, set up to `BearingElement`, in the other classes."
12211221
]
@@ -1870,7 +1870,7 @@
18701870
"cell_type": "markdown",
18711871
"metadata": {},
18721872
"source": [
1873-
"### 4.6 THDCylindrical Class\n",
1873+
"### 4.6 PlainJournal Class\n",
18741874
"\n",
18751875
"This class computes the pressure and temperature fields within the oil film of a cylindrical bearing while also determining the stiffness and damping coefficients. These calculations are based on a wide range of inputs, including bearing geometry, operating conditions, fluid properties, turbulence modeling, and mesh discretization.\n",
18761876
"\n",
@@ -1913,7 +1913,7 @@
19131913
{
19141914
"data": {
19151915
"text/plain": [
1916-
"THDCylindrical(n=3, n_link=None,\n",
1916+
"PlainJournal(n=3, n_link=None,\n",
19171917
" kxx=[2.49767453e+09], kxy=[-3.14056282e+09],\n",
19181918
" kyx=[1.00992315e+08], kyy=[7.8393767e+08],\n",
19191919
" kzz=[0], cxx=[36950674.61976394],\n",
@@ -1931,7 +1931,7 @@
19311931
}
19321932
],
19331933
"source": [
1934-
"cybearing = rs.THDCylindrical(\n",
1934+
"cybearing = rs.PlainJournal(\n",
19351935
" axial_length=0.263144,\n",
19361936
" journal_radius=0.2,\n",
19371937
" radial_clearance=1.95e-4,\n",

ross/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from .units import Q_
2020
from .utils import get_data_from_figure, visualize_matrix
2121
from ross.bearings.lubricants import lubricants_dict
22-
from ross.bearings.cylindrical import *
22+
from ross.bearings.plain_journal import *
2323
from ross.seals.labyrinth_seal import *
2424
from ross.bearings.thrust_pad import *
2525
from ross.bearings.tilting_pad import *

ross/bearings/cylindrical.py renamed to ross/bearings/plain_journal.py

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
from ross.bearings.lubricants import lubricants_dict
1313

1414

15-
class THDCylindrical(BearingElement):
15+
class PlainJournal(BearingElement):
1616
"""This class calculates the pressure and temperature field in oil film of
17-
a cylindrical bearing. It is also possible to obtain the stiffness and
17+
a plain journal bearing. It is also possible to obtain the stiffness and
1818
damping coefficients.
1919
The basic references for the code is found in :cite:t:`barbosa2018`, :cite:t:`daniel2012` and :cite:t:`nicoletti1999`.
2020
@@ -46,6 +46,9 @@ class THDCylindrical(BearingElement):
4646
Choose the method to calculate the dynamics coefficients. Options are:
4747
- 'lund'
4848
- 'perturbation'
49+
model_type : str, optional
50+
Type of model to be used. Options:
51+
- 'thermo_hydro_dynamic': Thermo-Hydro-Dynamic model
4952
print_progress : bool
5053
Set it True to print the score and forces on each iteration.
5154
False by default.
@@ -111,7 +114,7 @@ class THDCylindrical(BearingElement):
111114
112115
Returns
113116
-------
114-
A THDCylindrical object.
117+
A PlainJournal object.
115118
116119
References
117120
----------
@@ -138,8 +141,8 @@ class THDCylindrical(BearingElement):
138141
139142
Example
140143
--------
141-
>>> from ross.bearings.cylindrical import THDCylindrical
142-
>>> bearing = THDCylindrical(
144+
>>> from ross.bearings.plain_journal import PlainJournal
145+
>>> bearing = PlainJournal(
143146
... n=3,
144147
... axial_length=0.263144,
145148
... journal_radius=0.2,
@@ -193,6 +196,7 @@ def __init__(
193196
sommerfeld_type=2,
194197
initial_guess=[0.1, -0.1],
195198
method="perturbation",
199+
model_type="thermo_hydro_dynamic",
196200
operating_type="flooded",
197201
oil_supply_pressure=None,
198202
oil_flow_v=None,
@@ -220,6 +224,7 @@ def __init__(
220224
self.initial_guess = initial_guess
221225
self.method = method
222226
self.operating_type = operating_type
227+
self.model_type = model_type
223228
self.oil_supply_pressure = oil_supply_pressure
224229
self.oil_flow_v = oil_flow_v
225230
self.show_coeffs = show_coeffs
@@ -234,14 +239,13 @@ def __init__(
234239
self.thetaF = self.betha_s
235240
self.dtheta = (self.thetaF - self.thetaI) / (self.elements_circumferential)
236241

237-
if self.method == "perturbation":
238-
pad_ct = np.arange(0, 360, int(360 / self.n_pad))
239-
self.thetaI = np.radians(pad_ct + 180 / self.n_pad - self.betha_s_dg / 2)
240-
self.thetaF = np.radians(pad_ct + 180 / self.n_pad + self.betha_s_dg / 2)
241-
self.theta_range = [
242-
np.arange(start_rad + (self.dtheta / 2), end_rad, self.dtheta)
243-
for start_rad, end_rad in zip(self.thetaI, self.thetaF)
244-
]
242+
pad_ct = np.arange(0, 360, int(360 / self.n_pad))
243+
self.thetaI = np.radians(pad_ct + 180 / self.n_pad - self.betha_s_dg / 2)
244+
self.thetaF = np.radians(pad_ct + 180 / self.n_pad + self.betha_s_dg / 2)
245+
self.theta_range = [
246+
np.arange(start_rad + (self.dtheta / 2), end_rad, self.dtheta)
247+
for start_rad, end_rad in zip(self.thetaI, self.thetaF)
248+
]
245249

246250
# Dimensionless discretization variables
247251
self.dY = 1 / self.elements_circumferential
@@ -289,7 +293,7 @@ def __init__(
289293
) # Interpolation function
290294
self.reference_viscosity = self.interpolate(self.reference_temperature)
291295

292-
# if self.geometry == "lobe":
296+
# Pivot angle for lobe geometry
293297
self.theta_pivot = np.array([90, 270]) * np.pi / 180
294298

295299
n_freq = np.shape(frequency)[0]
@@ -307,7 +311,8 @@ def __init__(
307311
for i in range(n_freq):
308312
speed = frequency[i]
309313

310-
self.run(speed)
314+
if self.model_type == "thermo_hydro_dynamic":
315+
self.run_thermo_hydro_dynamic(speed)
311316

312317
coeffs = self.coefficients(speed)
313318
kxx[i], kxy[i], kyx[i], kyy[i] = coeffs[0]
@@ -608,12 +613,12 @@ def _forces(self, initial_guess, speed, y0=None, xpt0=None, ypt0=None):
608613
if self.theta_vol_groove[n_p] > 1:
609614
self.theta_vol_groove[n_p] = 1
610615

611-
self.P = Pdim
612-
self.T = Tdim
616+
# self.P must receive the adimensional pressure field
617+
self.P = Pdim * (self.radial_clearance**2) / (self.reference_viscosity * speed * (self.journal_radius**2))
613618
self.Theta_vol = Theta_vol
614619

615-
PPlot = self.P.reshape(self.elements_axial, -1, order="F")
616-
TPlot = self.T.reshape(self.elements_axial, -1, order="F")
620+
# Reshape dimensional pressure field from (axial, circumferential, pads) to (axial, all_other_dims)
621+
PPlot = Pdim.reshape(self.elements_axial, -1, order="F")
617622

618623
Ytheta = np.sort(
619624
np.linspace(
@@ -632,7 +637,7 @@ def _forces(self, initial_guess, speed, y0=None, xpt0=None, ypt0=None):
632637

633638
return Fhx, Fhy
634639

635-
def run(self, speed):
640+
def run_thermo_hydro_dynamic(self, speed):
636641
"""This method runs the optimization to find the equilibrium position of
637642
the rotor's center.
638643
"""
@@ -682,7 +687,7 @@ def _get_interp_coeffs(self, T_muI, T_muF, mu_I, mu_F):
682687
def viscosity(x, a, b):
683688
return a * (x**b)
684689

685-
xdata = [T_muI, T_muF] # changed boundary conditions to avoid division by ]
690+
xdata = [T_muI, T_muF] # changed boundary conditions to avoid division by zero
686691
ydata = [mu_I, mu_F]
687692

688693
popt, pcov = curve_fit(viscosity, xdata, ydata, p0=(6.0, 1.0))
@@ -713,7 +718,7 @@ def coefficients(self, speed):
713718
"""
714719

715720
if self.equilibrium_pos is None:
716-
self.run(speed)
721+
self.run_thermo_hydro_dynamic(speed)
717722
self.coefficients(speed)
718723
else:
719724
if self.method == "lund":
@@ -1961,7 +1966,7 @@ def plot_pressure_distribution(self, axial_element_index=None, fig=None, **kwarg
19611966
)
19621967

19631968
fig.update_layout(
1964-
title="Cylindrical Bearing",
1969+
title="Plain Journal Bearing",
19651970
xaxis=dict(
19661971
showgrid=False,
19671972
zeroline=False,

ross/tests/test_cylindrical.py

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)