Note
Go to the end to download the full example code.
Rectangular pad with a measured-like surface: crown plus ripple¶
Any function of the film coordinates can be added to the gap. Here a flat pad is compared with one whose face has a 0.5 µm crown and a 0.4 µm ripple of 20 mm wavelength; the film thickness is the smallest gap in both cases.

import matplotlib.pyplot as plt
import numpy as np
from openairbearing import core
from openairbearing.plots import COLOURS
# the series of every plot in blue, red, black and grey, in that order
plt.rcParams["axes.prop_cycle"] = plt.cycler(color=COLOURS)
LX, LY = 40e-3, 80e-3
PS = 0.41e6 + 101325.0
POROUS = core.Porous(kappa=1e-15, hp=4.5e-3)
def _raw(x):
crown = 0.5e-6 * ((x[0] / (0.5 * LX)) ** 2 + (x[1] / (0.5 * LY)) ** 2)
ripple = (
0.4e-6 * np.sin(2 * np.pi * x[0] / 20e-3) * np.cos(2 * np.pi * x[1] / 20e-3)
)
return crown + ripple
_GRID = np.meshgrid(
np.linspace(-LX / 2, LX / 2, 201), np.linspace(-LY / 2, LY / 2, 401)
)
_LOWEST = _raw(np.array(_GRID)).min()
def surface(x):
"""Deviation of the face from flat, shifted so its lowest point is zero."""
return _raw(x) - _LOWEST
def main(n_gaps=20):
gaps = np.linspace(2e-6, 12e-6, n_gaps)
flat = core.rectangular_pad(LX, LY, porous=POROUS, ps=PS)
shaped = core.rectangular_pad(LX, LY, porous=POROUS, ps=PS, shape=surface)
fig, axes = plt.subplots(1, 3, figsize=(14, 4.5))
image = axes[0].pcolormesh(
_GRID[0] * 1e3, _GRID[1] * 1e3, surface(np.array(_GRID)) * 1e6, cmap="jet"
)
fig.colorbar(image, ax=axes[0], label="Surface deviation [µm]")
axes[0].set_aspect("equal")
axes[0].set_xlabel("x [mm]")
axes[0].set_ylabel("y [mm]")
for name, film in (("flat", flat), ("crown and ripple", shaped)):
states = [core.solve_static(film, [h, 0.0, 0.0]) for h in gaps]
axes[1].plot(gaps * 1e6, [s.force("h") for s in states], label=name)
axes[2].plot(gaps * 1e6, [s.flow_normal * 6e4 for s in states], label=name)
axes[1].set_ylabel("Load [N]")
axes[2].set_ylabel("Supply flow [L/min]")
for ax in axes[1:]:
ax.set_xlabel("Smallest film thickness [µm]")
axes[1].legend()
fig.tight_layout()
plt.show()
if __name__ == "__main__":
main()
Total running time of the script: (0 minutes 8.637 seconds)