openairbearing.core.cases¶
Bearing cases: plain, serialisable descriptions of one bearing.
A case is a frozen dataclass of numbers in SI units. It knows how to build its Film and which position it is normally evaluated at, and nothing else, so it can be written to JSON, compared, hashed and edited by path:
case = CircularPad(radius=20e-3)
case = set_path(case, "porous.kappa", 2e-15)
film = case.film()
Every field carries its label, unit and display unit (see params.py), from
which describe builds the field list a form or a table needs.
A field may follow another one while it is not given (the bore pressure of
an annular pad follows the ambient pressure). Its value is then None, in the
case, in the dict of case_to_dict and in JSON (null), and set_path
takes None to make it follow again.
- class AnnularPad(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, gap: float = 5e-06, form_error: float = 0.0, form_error_type: str = 'none', ux: float = 0.0, uy: float = 0.0, r_in: float = 0.01, r_out: float = 0.025, p_inner: float | None = None, n_circ: int = 96, n_radial: int = 16)[source]¶
Bases:
_ThrustFaceAnnular thrust pad (
geometry.annular_pad).The form error runs from the inner edge to the outer one.
- kind: ClassVar[str] = 'annular_pad'¶
- title: ClassVar[str] = 'Annular thrust pad'¶
- help: ClassVar[str] = 'Film thickness is the gap of the flat face without tilt: the same everywhere. Tilt rx and ry turn the runner about the x and y axes through the axis of the annulus, so the gap is film thickness + rx·y - ry·x; the film thickness is then the gap that the plane of the runner has on the axis, where there is no film. A form error adds to that and runs from the inner edge to the outer one: it is zero at the outer edge of a concave face and at the inner edge of a convex one, so without tilt the film thickness is the smallest gap. Forces and moments are those on the runner.'¶
- r_in: float = 0.01¶
- r_out: float = 0.025¶
- p_inner: float | None = None¶
- n_circ: int = 96¶
- n_radial: int = 16¶
- default_position() dict¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- form_error: float = 0.0¶
- form_error_type: str = 'none'¶
- gap: float = 5e-06¶
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- ux: float = 0.0¶
- uy: float = 0.0¶
- class CircularPad(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, gap: float = 5e-06, form_error: float = 0.0, form_error_type: str = 'none', ux: float = 0.0, uy: float = 0.0, radius: float = 0.0185, mesh_refinements: int = 4)[source]¶
Bases:
_ThrustFaceCircular thrust pad (
geometry.circular_pad).- kind: ClassVar[str] = 'circular_pad'¶
- title: ClassVar[str] = 'Circular thrust pad'¶
- radius: float = 0.0185¶
- mesh_refinements: int = 4¶
- default_position() dict¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- form_error: float = 0.0¶
- form_error_type: str = 'none'¶
- gap: float = 5e-06¶
- gas: str = 'air'¶
- help: ClassVar[str] = 'Film thickness is the gap of the flat face without tilt: the same everywhere. Tilt rx and ry turn the runner about the x and y axes through the centre of the face, so the gap is film thickness + rx·y - ry·x, and the film thickness is then the gap at the centre. A form error adds to that and is zero where it leaves the gap smallest (the edge of a concave face, the centre of a convex one), so without tilt the film thickness is the smallest gap. Forces and moments are those on the runner.'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- ux: float = 0.0¶
- uy: float = 0.0¶
- class Journal(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, radius: float = 0.02, length: float = 0.04, clearance: float = 1.2e-05, omega: float = 0.0, wall: str = 'outside', conicity: float = 0.0, roundness: float = 0.0, lobes: int = 2, lobe_angle: float = 0.0, crowning: float = 0.0, n_circ: int = 96, n_axial: int = 16)[source]¶
Bases:
_CaseFull journal bearing (
geometry.journal), with form errors of the bore.- kind: ClassVar[str] = 'journal'¶
- title: ClassVar[str] = 'Journal bearing'¶
- help: ClassVar[str] = 'Displacement x and y move the shaft off the bushing axis; tilt rx and ry turn it about axes through the middle of the bearing. Forces and moments are those of the film on the shaft, so a restoring force is negative. Form errors of the bore add to the gap and leave the clearance as the tightest one: conicity along the axis, out of roundness with two or three lobes around it, and crowning as a parabola along the axis.'¶
- radius: float = 0.02¶
- length: float = 0.04¶
- clearance: float = 1.2e-05¶
- omega: float = 0.0¶
- wall: str = 'outside'¶
- conicity: float = 0.0¶
- roundness: float = 0.0¶
- lobes: int = 2¶
- lobe_angle: float = 0.0¶
- crowning: float = 0.0¶
- n_circ: int = 96¶
- n_axial: int = 16¶
- default_position() dict[source]¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- class JournalPads(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, radius: float = 0.02, length: float = 0.04, clearance: float = 1.2e-05, n_pads: int = 3, pad_angle: float = np.float64(1.7453292519943295), offset: float = 0.0, omega: float = 0.0, taper: float = 0.0, taper_axial: float = 0.0, conicity: float = 0.0, roundness: float = 0.0, lobes: int = 2, lobe_angle: float = 0.0, crowning: float = 0.0, wall: str = 'outside', n_circ: int = 20, n_axial: int = 12)[source]¶
Bases:
_CaseJournal bearing of partial-arc pads (
geometry.journal_pads).- kind: ClassVar[str] = 'journal_pads'¶
- title: ClassVar[str] = 'Journal pads (partial arcs)'¶
- help: ClassVar[str] = 'Equally spaced partial-arc pads around the shaft; the bushing between them is relieved, so every pad edge is at ambient pressure. The first pad is centred at its angle from the x axis. Displacement, tilt and forces are those of the shaft, as for a full journal. Pad taper tilts every pad about its own centre: it is the rise of the gap across the pad, and a positive value closes the gap toward increasing angle (the direction of positive shaft speed) or along +z.'¶
- radius: float = 0.02¶
- length: float = 0.04¶
- clearance: float = 1.2e-05¶
- n_pads: int = 3¶
- pad_angle: float = np.float64(1.7453292519943295)¶
- offset: float = 0.0¶
- omega: float = 0.0¶
- taper: float = 0.0¶
- taper_axial: float = 0.0¶
- conicity: float = 0.0¶
- roundness: float = 0.0¶
- lobes: int = 2¶
- lobe_angle: float = 0.0¶
- crowning: float = 0.0¶
- wall: str = 'outside'¶
- n_circ: int = 20¶
- n_axial: int = 12¶
- default_position() dict[source]¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- class RectangularPad(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, gap: float = 5e-06, form_error: float = 0.0, form_error_type: str = 'none', ux: float = 0.0, uy: float = 0.0, lx: float = 0.04, ly: float = 0.04, infinite: bool = False, nx: int = 32, ny: int = 32)[source]¶
Bases:
_ThrustFaceRectangular thrust pad (
geometry.rectangular_pad).The form error varies along x only, from the centre line x = 0 to the edges at x = -lx/2 and lx/2: a roof or a cylindrical face.
- kind: ClassVar[str] = 'rectangular_pad'¶
- title: ClassVar[str] = 'Rectangular thrust pad'¶
- help: ClassVar[str] = 'Film thickness is the gap of the flat face without tilt: the same everywhere. Tilt rx and ry turn the runner about the x and y axes through the centre of the face, so the gap is film thickness + rx·y - ry·x, and the film thickness is then the gap at the centre. A form error adds to that and varies along x only: it is zero at the two edges across x of a concave face and on the centre line x = 0 of a convex one, so without tilt the film thickness is the smallest gap. Forces and moments are those on the runner.'¶
- form_error: float = 0.0¶
- form_error_type: str = 'none'¶
- lx: float = 0.04¶
- ly: float = 0.04¶
- infinite: bool = False¶
- nx: int = 32¶
- ny: int = 32¶
- default_position() dict¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- gap: float = 5e-06¶
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- ux: float = 0.0¶
- uy: float = 0.0¶
- class SphericalBearing(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, radius: float = 0.025, clearance: float = 1.2e-05, polar_from: float = 0.3, polar_to: float = 1.5707963267948966, omega: float = 0.0, wall: str = 'outside', n_theta: int = 48, n_polar: int = 24)[source]¶
Bases:
_CaseBand of a spherical bearing (
geometry.spherical_bearing).- kind: ClassVar[str] = 'spherical_bearing'¶
- title: ClassVar[str] = 'Spherical bearing'¶
- help: ClassVar[str] = 'The film is a band of a sphere between two angles measured from the pole on the +z axis; 90° is the equator. Displacement x, y, z moves the ball centre in the socket. Forces are those of the film on the ball.'¶
- radius: float = 0.025¶
- clearance: float = 1.2e-05¶
- polar_from: float = 0.3¶
- polar_to: float = 1.5707963267948966¶
- omega: float = 0.0¶
- wall: str = 'outside'¶
- n_theta: int = 48¶
- n_polar: int = 24¶
- default_position() dict[source]¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- class ThrustBushing(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, porous_thrust: Porous = <factory>, bore_diameter: float = 0.03502, shaft_diameter: float = 0.035, length: float = 0.06668, thrust_diameter: float = 0.0762, thrust_gap: float = 3.81e-06, omega: float = 0.0, rotor_round: float = 0.0002, bushing_chamfer: float = 0.0005, vented: bool = False, wall: str = 'outside', construction: str = 'bonded', n_theta: int = 48, n_journal: int = 60, n_thrust: int = 30)[source]¶
Bases:
_CaseJournal and thrust face as one film (
geometry.thrust_bushing).- kind: ClassVar[str] = 'thrust_bushing'¶
- title: ClassVar[str] = 'Thrust bushing (journal with thrust face)'¶
- help: ClassVar[str] = 'The bore and its thrust face are one connected film that meets at the inner corner. The rotor round and bushing chamfer leave a ring-shaped channel there, which lets gas flow around the shaft; set both to zero for a sharp corner. z is the bushing axis and positive z closes the thrust gap; x and y move the shaft sideways; tilts are about the corner end of the axis. Forces and moments are those on the shaft and runner.'¶
- bore_diameter: float = 0.03502¶
- shaft_diameter: float = 0.035¶
- length: float = 0.06668¶
- thrust_diameter: float = 0.0762¶
- thrust_gap: float = 3.81e-06¶
- omega: float = 0.0¶
- rotor_round: float = 0.0002¶
- bushing_chamfer: float = 0.0005¶
- vented: bool = False¶
- wall: str = 'outside'¶
- construction: str = 'bonded'¶
- n_theta: int = 48¶
- n_journal: int = 60¶
- n_thrust: int = 30¶
- size() dict[source]¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- default_position() dict[source]¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- temperature: float = 293.15¶
- class ThrustPads(porous: Porous = <factory>, gas: str = 'air', temperature: float = 293.15, real_gas: bool = False, ps: float = 600000.0, pa: float = 101325.0, gap: float = 5e-06, form_error: float = 0.0, form_error_type: str = 'none', ux: float = 0.0, uy: float = 0.0, r_in: float = 0.01, r_out: float = 0.025, n_pads: int = 3, pad_angle: float = np.float64(1.7453292519943295), offset: float = 0.0, taper: float = 0.0, taper_radial: float = 0.0, n_circ: int = 20, n_radial: int = 12)[source]¶
Bases:
_ThrustFaceThrust face of annular-sector pads (
geometry.thrust_pads).The form error runs from the inner radius to the outer one.
- kind: ClassVar[str] = 'thrust_pads'¶
- title: ClassVar[str] = 'Thrust pads (annular sectors)'¶
- help: ClassVar[str] = 'Equally spaced sector pads of an annulus; the stator between them is relieved, so every pad edge is at ambient pressure. Film thickness is the gap of flat pads without tilt, the same on every pad. Tilt rx and ry turn the runner about the x and y axes through the bearing axis, where there is no film, so the gap is film thickness + rx·y - ry·x. A form error runs from the inner radius to the outer one. The forces are those of all pads together. Pad taper tilts every pad about its own centre: it is the rise of the gap across the pad, and a positive value closes the gap toward increasing angle (or radius). Form error and taper only add to the gap, so without tilt the gap is nowhere below the film thickness.'¶
- r_in: float = 0.01¶
- r_out: float = 0.025¶
- n_pads: int = 3¶
- pad_angle: float = np.float64(1.7453292519943295)¶
- offset: float = 0.0¶
- taper: float = 0.0¶
- taper_radial: float = 0.0¶
- n_circ: int = 20¶
- n_radial: int = 12¶
- default_position() dict¶
Position the case is evaluated at unless a study says otherwise.
A dict from the name of each position coordinate of the film to its value, in m or rad.
- form_error: float = 0.0¶
- form_error_type: str = 'none'¶
- gap: float = 5e-06¶
- gas: str = 'air'¶
- pa: float = 101325.0¶
- ps: float = 600000.0¶
- real_gas: bool = False¶
- size() dict¶
What the case costs to solve, found without solving it.
{“film”: pressure unknowns of the film, “body”: nodes of a porous body under it (0 without one), “model”: “column”, “volume” or “body”}. Builds the film, which takes well under a second for every mesh the forms allow; a case whose film carries a large body says so without building it (
ThrustBushing).
- temperature: float = 293.15¶
- ux: float = 0.0¶
- uy: float = 0.0¶
- case_from_dict(data: dict)[source]¶
Case from a dict with a “kind”, as written by
case_to_dict.Missing fields take the case’s defaults. An unknown kind or field, or a value outside the limits declared on its field, is a ValueError.
- case_to_dict(case) dict[source]¶
JSON-ready dict of a case, with its kind.
A field that follows another one and was not given is None (null in JSON).
- describe(case_or_kind) list[source]¶
Field list of a case or kind: path, label, units, default and limits.
One dict per field, with “path”, “label”, “type”, “default”, “unit”, “display”, “scale” and, where declared, “minimum”, “maximum”, “choices” and “help”. Fields the case or the geometry sets itself are left out. This is what a form or a parameter picker is generated from.
A field that follows another one while it is not given also has “follows”, the path of that field. Its “type” is “float” and its “default” is the value it then takes with the defaults of the kind (that of the field it follows), so that a form can show it as a number; in the case itself the default is None. A form that leaves such a field out of the document it sends gets the following value, whatever the other field is set to.
- set_path(case, path: str, value)[source]¶
Copy of the case with one field changed, by dotted path.
The value is stored as the type of the field and checked against the limits declared on it: outside them, or for an unknown path, it is a ValueError. None is a value only for a field that follows another one (“p_inner” of an annular pad), which then follows it again.