"""Named normalisation schemes: results in the dimensionless form of a paper.
Authors normalise differently: load over (ps − pa)·A, ps·A or pa·A, over
the area of the pad or the projected area of a journal; stiffness times the
clearance or the current gap; flow over one reference flow or another. So
there is no generic "dimensionless load" here. Each scheme is named for
what it divides by, takes every reference quantity explicitly, in SI units,
and returns the normalised values with a label that shows the definition:
from openairbearing import normalise
area = normalise.circular_pad_area(case)
w = normalise.load_over_gauge_supply(load, ps=case.ps, pa=case.pa, area=area)
w.values # load/((ps − pa)·area), an array
w.label # "W/((ps − pa)·A)"
Like the display units of ``openairbearing.display``, a normalisation is a
view at the edge: the solver and the study results stay in SI units, and
``plots.plot_output`` draws an output in a scheme (its ``normalise`` and
``x_normalise`` keywords).
A scheme raises ValueError when a reference quantity it needs is missing,
not finite or not positive, and when ps is not above pa where it divides by
ps − pa. The values normalised (a load, a stiffness, a flow) may be any
numbers, and NaN stays NaN. Where the gap itself is
what is normalised (``feeding_parameter``, ``gap_over_conductance_gap``,
``gap_of_feeding_parameter``) it is a reference quantity of the formula,
and a NaN, zero or negative gap is refused as any other is.
The helpers that take a reference quantity from a case (a ``core.cases``
case or a case document) are named for the choice they make, for example
``circular_pad_area``, and refuse a case for which that choice is not the
obvious one. Pressures come straight from the case (``case.ps``,
``case.pa``, both absolute) and the free flow of a film from
``core.free_flow``, which refuses a film where it is not defined.
"""
from __future__ import annotations
import math
from dataclasses import dataclass
import numpy as np
__all__ = [
"Normalised",
"annular_pad_area",
"circular_pad_area",
"feeding_parameter",
"flow_over_free_flow",
"gap_of_feeding_parameter",
"gap_over_conductance_gap",
"journal_projected_area",
"load_over_ambient",
"load_over_gauge_supply",
"load_over_supply",
"moment_over_gauge_supply",
"pressure_over_gauge_supply",
"stiffness_over_ambient",
"stiffness_over_gauge_supply",
"uniform_restrictor",
]
[docs]
@dataclass(frozen=True)
class Normalised:
"""Normalised values and the label of their definition.
values is an array of the normalised values, label the definition in
the symbols of the scheme, for example "W/((ps − pa)·A)". An axis label
adds the unit, which is none: f"{label} [-]".
"""
values: np.ndarray
label: str
def _values(values) -> np.ndarray:
"""The values to normalise as a float array; None becomes NaN."""
return np.array(values, dtype=float)
def _positive(name: str, value) -> np.ndarray | float:
"""A reference quantity, checked: given, finite and above zero.
A number stays a number (so that the arithmetic of a scheme is that of
plain floats); an array, for example a gap per point, stays an array.
"""
if value is None:
raise ValueError(f"{name} is needed by this scheme and was not given.")
array = np.asarray(value, dtype=float)
if not np.all(np.isfinite(array)) or not np.all(array > 0.0):
raise ValueError(f"{name} must be finite and positive, got {value!r}.")
return float(array) if array.ndim == 0 else array
def _gauge(ps, pa) -> float:
"""ps − pa, Pa, of two absolute pressures; ValueError unless ps > pa."""
ps, pa = _positive("ps", ps), _positive("pa", pa)
if not np.all(np.asarray(ps) > np.asarray(pa)):
raise ValueError(f"ps must be above pa: got ps = {ps!r}, pa = {pa!r}.")
return ps - pa
# ------------------------------------------------------------------ load
[docs]
def load_over_gauge_supply(load, *, ps, pa, area, area_name: str = "A") -> Normalised:
"""Load over the supply pressure above ambient times an area.
W/((ps − pa)·A)
W the load, N; ps and pa the absolute supply and ambient pressures, Pa;
A the area, m²: of the pad (π·R² of a circular pad, the face of the
reference) or the projected area of a journal (L·D). The value is the
mean film pressure above ambient as a fraction of the supply above
ambient over A. area_name is the symbol of the area in the label, "A"
unless given: "π·R²", "L·D" or "2·π·R·L" (the bore) say which one.
Used by Gargiulo and Gilmour, J. Lubr. Technol. 90 (1968) 810-817,
doi:10.1115/1.3601725, Figs. 9 and 12 (A = π·Ro²); Andrisano and
Maggiore, Tribol. Int. 11 (1978) 285-288, doi:10.1016/0301-679X(78)90059-2,
W* (A = π·Rb²); Mori, Yabe and Ono, J. Basic Eng. 87 (1965) 613-620,
doi:10.1115/1.3650618, Fig. 10; Hosokawa et al., J. Tribol. 137 (2015)
021702, doi:10.1115/1.4028999 (psg = ps − pa, A = π·r01²); Yoshimoto,
Tozuka and Dambara, Proc. IMechE J 217 (2003) 125-133,
doi:10.1243/13506500360603552 (A = D·L of the journal).
"""
over = _gauge(ps, pa) * _positive("area", area)
return Normalised(_values(load) / over, f"W/((ps − pa)·{area_name})")
[docs]
def load_over_supply(load, *, ps, area, area_name: str = "A") -> Normalised:
"""Load over the absolute supply pressure times an area.
W/(ps·A)
W the load, N; ps the absolute supply pressure, Pa; A the area, m², the
projected area L·D of a journal in the source; area_name its symbol in
the label.
Used by Sneck and Elwell, The externally pressurized, porous wall,
gas-lubricated journal bearing. II, ASLE Trans. 8 (1965) 339-345,
doi:10.1080/05698196508972105, whose load coefficient is that of their
Part I, p. 289 (W/(ps·L·D), ps absolute).
"""
over = _positive("ps", ps) * _positive("area", area)
return Normalised(_values(load) / over, f"W/(ps·{area_name})")
[docs]
def load_over_ambient(load, *, pa, area, area_name: str = "A") -> Normalised:
"""Load over the ambient pressure times an area.
W/(pa·A)
W the load, N; pa the absolute ambient pressure, Pa; A the area, m²;
area_name its symbol in the label.
Used by Yoshimoto and Kohno, J. Tribol. 123 (2001) 501-508,
doi:10.1115/1.1308027, Fig. 13 (W = w/(pa·π·r0²), nomenclature p. 508).
"""
over = _positive("pa", pa) * _positive("area", area)
return Normalised(_values(load) / over, f"W/(pa·{area_name})")
[docs]
def moment_over_gauge_supply(
moment, *, ps, pa, area, length, area_name: str = "A", length_name: str = "L"
) -> Normalised:
"""Moment over the supply pressure above ambient, an area and a length.
M/((ps − pa)·A·L)
M the moment, N·m; ps and pa the absolute supply and ambient pressures,
Pa; A the area, m²; L the length, m: the projected area D·L of a journal
and its length in the source. area_name and length_name are their
symbols in the label.
Used by Yoshimoto, Tozuka and Dambara, Proc. IMechE J 217 (2003)
125-133, doi:10.1243/13506500360603552, Fig. 12 (m/((ps − pa)·D·L²),
p. 125).
"""
over = _gauge(ps, pa) * _positive("area", area) * _positive("length", length)
return Normalised(
_values(moment) / over, f"M/((ps − pa)·{area_name}·{length_name})"
)
[docs]
def pressure_over_gauge_supply(p, *, ps, pa) -> Normalised:
"""Film pressure above ambient over the supply pressure above ambient.
(p − pa)/(ps − pa)
p the absolute film pressure, ps and pa the absolute supply and ambient
pressures, all Pa.
Used by Mori, Yabe and Ono, J. Basic Eng. 87 (1965) 613-620,
doi:10.1115/1.3650618, Fig. 7.
"""
over = _gauge(ps, pa)
return Normalised((_values(p) - pa) / over, "(p − pa)/(ps − pa)")
# ------------------------------------------------------------- stiffness
[docs]
def stiffness_over_gauge_supply(
stiffness, *, gap, ps, pa, area, gap_name: str = "h", area_name: str = "A"
) -> Normalised:
"""Stiffness times a gap over the supply pressure above ambient and an area.
k·h/((ps − pa)·A)
k the stiffness, N/m; h the gap it is multiplied by,
m: the film thickness at the point (h0 of a pad) or the radial
clearance of a journal, a number or one value per point; ps and pa the
absolute supply and ambient pressures, Pa; A the area, m². gap_name and
area_name are the symbols of the gap and the area in the label ("c" for
a clearance, "π·R²" or "L·D" for the area).
Used by Yoshimoto and Kohno, J. Tribol. 123 (2001) 501-508,
doi:10.1115/1.1308027, Ks and Kd of Figs. 14 and 15 (h = h0,
A = π·r0²); Otsu, Miyatake and Yoshimoto, J. Tribol. 133 (2011) 011701,
doi:10.1115/1.4002730, Kd of Fig. 10 (h = h0, A = L·D, psg = ps − pa);
Lee, master's thesis, Aalto University (2026), Eq. 38 (h = h0,
A = π·R²); Hosokawa et al., J. Tribol. 137 (2015) 021702,
doi:10.1115/1.4028999, Ks = −h·dW/dh of Eq. 22 in this form.
"""
gap = _positive(gap_name, gap)
over = _gauge(ps, pa) * _positive("area", area)
return Normalised(
gap * _values(stiffness) / over, f"k·{gap_name}/((ps − pa)·{area_name})"
)
[docs]
def stiffness_over_ambient(
stiffness, *, gap, pa, area, gap_name: str = "h", area_name: str = "A"
) -> Normalised:
"""Stiffness times a gap over the ambient pressure and an area.
k·h/(pa·A)
The symbols as in ``stiffness_over_gauge_supply``, with pa, Pa, in
place of ps − pa.
Used by Lee, master's thesis, Aalto University (2026), Figs. 17 and 18:
there the stiffness is over pa·π·R², which is what makes those figures
agree with Figs. 13 and 16.
"""
gap = _positive(gap_name, gap)
over = _positive("pa", pa) * _positive("area", area)
return Normalised(gap * _values(stiffness) / over, f"k·{gap_name}/(pa·{area_name})")
# ------------------------------------------------------------------ flow
[docs]
def flow_over_free_flow(flow, *, free_flow) -> Normalised:
"""Flow over the free flow of the bare restrictor.
Q/Q_free
Q the flow and Q_free the flow through the restrictor with nothing in
front of it (the face at ambient pressure, the limit of an infinite
gap), in the same unit: both mass flows, kg/s, or both volume flows of
free gas, m³/s. Which restrictor the free flow is of is the caller's
choice: ``core.free_flow`` gives it for a film whose whole back is fed
and refuses one fed over part of it; Gargiulo and Gilmour normalise by
the free flow of the pad fed over its whole back also where it is fed
over part of it.
Used by Gargiulo and Gilmour, J. Lubr. Technol. 90 (1968) 810-817,
doi:10.1115/1.3601725, Figs. 10 and 13 (normal of the flow, p. 813);
Andrisano and Maggiore, Tribol. Int. 11 (1978) 285-288,
doi:10.1016/0301-679X(78)90059-2, Q* = Q/Q(h → ∞).
"""
return Normalised(_values(flow) / _positive("free_flow", free_flow), "Q/Q_free")
# --------------------------------------------------- numbers of the film
[docs]
def feeding_parameter(gap, *, kappa, hp, radius) -> Normalised:
"""Feeding parameter (porous bearing number) at a gap.
Λ = 12·κ·R²/(hp·h³)
h the gap (film thickness or clearance), m; κ the permeability of the
restrictor through its thickness, m²; hp its thickness, m; R the
radius, m: of the pad (Ro, Rb) or of the journal. Λ compares the
conductance of the restrictor over the face with that of the film to
the rim. The gap is the parameter of the scheme here, not a value to
normalise: like every reference quantity it must be positive, so a
NaN or zero gap is refused.
This is the form of a flat restrictor, or of a journal wall thin
against its radius. A thick journal wall of the same thickness conducts
more, as a curved wall: 12·κ·R/(ln(1 + hp/R)·c³), which is above
12·κ·R²/(hp·c³) by about hp/(2·R) (8 % at hp/R = 1/6). That form is not
this scheme.
Used by Gargiulo and Gilmour, J. Lubr. Technol. 90 (1968) 810-817,
doi:10.1115/1.3601725, p. 810 (12·Ro²·kz/(H·c³)); Andrisano and
Maggiore, Tribol. Int. 11 (1978) 285-288,
doi:10.1016/0301-679X(78)90059-2, p. 287 (12·Rb²·ψ/(t·h³)); Sneck and
Elwell for the thin wall of their Part I (12·κ·R²/(hp·c³), R the
journal radius; the sneck1965_journal case uses the curved form for
the test bushing of Part II, ASLE Trans. 8 (1965) 339-345,
doi:10.1080/05698196508972105, and plots against (l/R)·√Λ).
``gap_of_feeding_parameter`` is the inverse.
"""
gap = _positive("gap", gap)
lam = (
12.0
* _positive("radius", radius) ** 2
* _positive("kappa", kappa)
/ (_positive("hp", hp) * gap**3)
)
return Normalised(np.array(lam, dtype=float), "Λ = 12·κ·R²/(hp·h³)")
[docs]
def gap_of_feeding_parameter(value, *, kappa, hp, radius) -> np.ndarray:
"""The gap, m, at which ``feeding_parameter`` is value (an array).
h = (12·κ·R²/(hp·Λ))^(1/3), the symbols as there: how the sources
place a point given by its feeding parameter at a film thickness.
"""
lam = _positive("feeding parameter", value)
film = (
12.0
* _positive("radius", radius) ** 2
* _positive("kappa", kappa)
/ (_positive("hp", hp) * lam)
) ** (1.0 / 3.0)
return np.array(film, dtype=float)
[docs]
def gap_over_conductance_gap(gap, *, kappa, hp) -> Normalised:
"""Gap over the gap whose film conducts as the restrictor does.
h/h′, h′ = (12·κ·hp)^(1/3)
h the gap, m; κ the permeability of the restrictor, m²; hp its
thickness, m. h′ is the film thickness whose conductance h′³/12 equals
κ·hp. Unlike ``feeding_parameter`` it holds no size of the face.
Used by Mori, Yabe and Ono, J. Basic Eng. 87 (1965) 613-620,
doi:10.1115/1.3650618, as 1/β of Fig. 10.
"""
gap = _positive("gap", gap)
h_prime = (12.0 * _positive("kappa", kappa) * _positive("hp", hp)) ** (1.0 / 3.0)
return Normalised(np.array(gap / h_prime, dtype=float), "h/(12·κ·hp)^(1/3)")
# ------------------------------------------- reference quantities of a case
def _case(case):
"""A ``core.cases`` case from a case or a case document."""
if isinstance(case, dict):
from .core import cases
return cases.case_from_dict(dict(case))
return case
def _refuse(case, scheme: str, kinds: str):
raise ValueError(
f"{scheme} is defined for {kinds}, not for {case.kind!r}: give the "
"area that the source divides by explicitly."
)
[docs]
def circular_pad_area(case) -> float:
"""π·R², m², of a circular pad: the area of its face.
case is a ``core.cases`` case or a case document. Raises ValueError for
any other kind of case.
"""
case = _case(case)
if case.kind != "circular_pad":
_refuse(case, "circular_pad_area", "a circular pad")
return math.pi * case.radius**2
[docs]
def annular_pad_area(case) -> float:
"""π·(ro² − ri²), m², of an annular pad: the area of its face.
Raises ValueError for any other kind of case.
"""
case = _case(case)
if case.kind != "annular_pad":
_refuse(case, "annular_pad_area", "an annular pad")
return math.pi * (case.r_out**2 - case.r_in**2)
[docs]
def journal_projected_area(case) -> float:
"""L·D, m², of a journal: its length times its film diameter.
Raises ValueError for any other kind of case, also for journal pads,
which cover part of the circumference: whether a source means the
projected area of the bore or of the pads is not given by the case.
"""
case = _case(case)
if case.kind != "journal":
_refuse(case, "journal_projected_area", "a journal")
return case.length * 2.0 * case.radius