openairbearing.core.film¶
Steady gas film with porous feeding: one solver for every bearing geometry.
Mass balance per unit film area, for a film of thickness h between a porous stator and a moving surface:
div( -(1+Psi) h³/12 grad(phi) + rho h U/2 ) = kappa/hp (phi_s - phi)
phi(p) is the gas flow potential (gas.py), Psi the slip factor of the porous face and U the sum of the two surface velocities. The right-hand side is the feed of the column restrictor model: one-dimensional Darcy flow through the restrictor thickness hp from the supply pressure, or that in series with a Knudsen skin at the face (restrictor.py), whose flow follows the pressure difference across it rather than phi. The volume model (restrictor.py, porous_body.py) replaces it by the flow in the whole restrictor body, solved together with the film; a Knudsen skin is then a conductance between the face of the body and the film. Pressures are prescribed on the named boundaries (ambient, a chamber, a vent); any other edge is a symmetry line with no flow across it.
The unknown is P = p/pa and the gap is scaled by h_ref. The weak residual is
R(v) = ∫ C3 a(P) grad P·grad v - a_c r(P) H U·grad v
- a_s (Theta_s - Theta(P)) v dA,
with C3 = (1+Psi) H³, a = phi’/phi’_a, r = rho/rho_a, Theta = phi/(phi’_a pa), a_c = 6 rho_a/(h_ref² phi’_a pa) and a_s = 12 kappa/(hp h_ref³). Without sliding and with Darcy feed the problem is linear in Theta; that solution is the Newton start. One unit of the residual is a mass flow of h_ref³ phi’_a pa/12, so the flows are sums of nodal residuals.
Generalised forces follow from virtual work, F_i = ∫ (p - pa) dh/dq_i dA, so a geometry only has to define its gap h(x, q). F_i is the force on the body whose motion q describes, in the direction of q_i.
- exception ContactError[source]¶
Bases:
FilmSolveErrorThe gap closes somewhere in the film.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class Film(basis: object, boundaries: dict, gap: Callable, dof_names: tuple, porous: Porous, ps: float, pa: float = 101325.0, gas: Gas = IdealGas(name='air', mu0=1.81e-05, R=287.05, T=293.15), velocity: Callable | None = None, metric: Callable | None = None, h_ref: float = 1e-05, h_floor: float = 0.0, regions: dict | None = None, body: object = None, coords: tuple = (('x', 'm'), ('y', 'm')), name: str = 'film')[source]¶
Bases:
objectOne connected film domain, ready to solve at any position q.
basis: scikit-fem basis on the film surface (unrolled for a cylinder).
boundaries: name -> (dof indices, absolute pressure in Pa).
gap: h(x, q) in m; x has shape (2, …), q the position of the moving body.
dof_names: one name per entry of q.
porous: the restrictor (restrictor.py); its
modelpicks the column or the volume model.velocity: U(x) -> (Ux, Uy), sum of the surface velocities in m/s, or None.
metric: g(x) -> (g1, g2), the lengths per unit of each film coordinate, for a surface described in orthogonal curvilinear coordinates (for example (s, theta) on an annulus with g = (1, r)). None for plain lengths. Velocities and gradients are physical; the area element is g1·g2.
- basis: object¶
- boundaries: dict¶
- gap: Callable¶
- dof_names: tuple¶
- ps: float¶
- pa: float = 101325.0¶
- velocity: Callable | None = None¶
- metric: Callable | None = None¶
- h_ref: float = 1e-05¶
- h_floor: float = 0.0¶
- regions: dict | None = None¶
- body: object = None¶
- coords: tuple = (('x', 'm'), ('y', 'm'))¶
- name: str = 'film'¶
- property n_q: int¶
Number of position coordinates.
- property dirichlet: ndarray¶
Indices of the nodes on the pressure boundaries.
- thinnest(q) float[source]¶
Smallest gap at position q, m: over the nodes and the quadrature points.
The solver takes the gap at the quadrature points, so those decide whether it can solve; the nodes add the edges of the film, where a tilted face is thinnest and no quadrature point lies. Between the nodes the gap of an eccentric bore is below its nodal values, by up to e·(1 - cos(half the node spacing)) for an eccentricity e, and a shape with a feature narrower than an element by as much as the feature is deep. It is still a sample: a feature that falls between all of these points is not seen, here or by the solver.
- exception FilmSolveError[source]¶
Bases:
RuntimeErrorThe film solve did not converge.
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- class StaticState(film: Film, q: ndarray, p: ndarray, wrench: ndarray, flow_supply: float, flow_out: dict, shear: ndarray, h_min: float, iterations: int, residual: ndarray = None, flow_regions: dict = <factory>, restrictor: object = None)[source]¶
Bases:
objectSolution of one film at one position.
- q: ndarray¶
- p: ndarray¶
- wrench: ndarray¶
- flow_supply: float¶
- flow_out: dict¶
- shear: ndarray¶
- h_min: float¶
- iterations: int¶
- residual: ndarray = None¶
- flow_regions: dict¶
- restrictor: object = None¶
- property flow_normal: float¶
Supply flow as free gas at pa and the gas temperature, m³/s.
- property mass_imbalance: float¶
(supply - total outflow) / supply. Measures solver convergence only.
- free_flow(film: Film) float[source]¶
Free-gas flow through the bare restrictor of a film, m³/s at pa.
The restrictor vents from the supply pressure straight to ambient over the whole film face, with nothing in front of it: the usual way permeability is measured. It is the feed of the column model (
Porous.mass_flux) with ambient pressure everywhere on the face, integrated over the film surface, so permeability and thickness may vary over the face and a curved wall counts. For a uniform restrictor of known area it equalsPorous.free_flow.Gas moves through the thickness only. That is exact when the whole back is fed and the sides are sealed, whichever restrictor model the film uses. A partial feed (
Porous.feed_area), or an open rim in the volume model, is not covered and raises ValueError.A film on a porous body (
film.body, porous_body.py) has the free flow of that body, with the flow in it in all directions: its supply faces at supply pressure, its film face at ambient pressure and its open faces at theirs, the flow being what enters through the supply faces.film.porousplays no part in it, so changingfilm.porousof such a film does not change its free flow: the permeability is that of the body.
- solve_static(film: Film, q, *, tol: float = 1e-10, max_iter: int = 40) StaticState[source]¶
Solve the film at position q.
q: one value per entry of
film.dof_names, m or rad.tol: Newton stops when its step is below tol times the solution.
max_iter: largest number of Newton iterations (three times as many for a porous body with a flow law of its own that is not linear).
The restrictor model is
film.porous.model, “column” or “volume”, or the porous body if the film lies on one (film.body). Raises ContactError if the smallest gap (Film.thinnest) is at or belowfilm.h_floor, FilmSolveError if Newton does not converge, and ValueError for a position of the wrong length or a partial feed with the column model.
- stiffness(film: Film, q, *, rel_step: float = 1e-3) ndarray[source]¶
Static stiffness K_ij = -dF_i/dq_j at position q by central differences.
Shape (n_q, n_q), in N/m, N/rad, N·m/m or N·m/rad, with the restrictor model of
film.porous.model: two static solves per coordinate. Each position coordinate is stepped so that the gap changes by at most rel_step times the minimum film thickness. A coordinate that does not change the gap gives a zero column, and a coupling term below 1e-9 of the scale of its two diagonal terms is returned as exactly zero.