zoomy_core.model.models.scaling

zoomy_core.model.models.scaling#

The free-surface scaling of the thesis (20_methodology.md, section Dimensional analysis) on the balance-law blueprints, and the ordered truncation the moment models run instead of their hand rules when they are given a ShallowScaling (scaling= setting).

eq. (scaling-variables)   x, y ~ L;  z, b, h ~ H;  t ~ L / U;  u, v ~ U;  w ~ eps U
eq. (pressure-scaling)    p = rho g (s - z) + q,  q ~ rho U^2
eq. (sme-stress-scaling)  tau_xz, tau_yz ~ S;  tau_xx, tau_xy, tau_yy, tau_zz ~ eps S
eq. (fr-de)               eps = H / L,  Fr = U / sqrt(g H),  De = eps rho U^2 / S

De is written through the stress scale S (1/De = S / (eps rho U^2), the coefficient of d_z tau_hz in the horizontal row divided by rho U^2 / L); the closure fixes S (Newtonian S = rho nu U / H gives De = eps U H / nu, eq. (fr-de)).

Module Contents#

Classes#

Pressure

What the blueprint’s pressure field is.

FreeSurfaceNonDim

NonDimensionalize with the thesis choices for a free-surface flow, read off a momentum blueprint (Momentum, MomentumNonHydrostatic or a stand-in with uvel, w, p, tau, rows, vertical).

Functions#

ordered_truncation

The scaling pipeline on a model’s blueprint rows, in place of the hand rules (moment_scaling, the hydrostatic inertia drop, apply_full_tensor):

API#

class zoomy_core.model.models.scaling.Pressure#

Bases: zoomy_core.misc.options.Option

What the blueprint’s pressure field is.

Initialization

Initialize self. See help(type(self)) for accurate signature.

total#

‘total’

nonhydrostatic#

‘nonhydrostatic’

class zoomy_core.model.models.scaling.FreeSurfaceNonDim(momentum, *, heights, free_surface=None, pressure=Pressure.total, mass=None)#

Bases: zoomy_core.model.derivation.nondim.NonDimensionalize

NonDimensionalize with the thesis choices for a free-surface flow, read off a momentum blueprint (Momentum, MomentumNonHydrostatic or a stand-in with uvel, w, p, tau, rows, vertical).

Rows: the horizontal momentum rows divided by U^2 / L (inertia), the vertical row by U^2 / H (the non-hydrostatic pressure gradient), the mass row by U / L. Default regime: Fr, De = O(1), the incline e_x = O(eps) (its body force then of the order of the surface gradient g d_x eta).

Args

  • momentum: the blueprint.

  • heights: the height fields (h, b, layer depths), scaled with H.

  • free_surface: s of the hydrostatic part (needed for Pressure.total).

  • pressure: the Pressure kind of momentum.p.

  • mass: name of the mass row to scale with it (optional).

Initialization

Store the blueprint; the scales are built against the model (apply_to_model).

apply_to_model(m)#

Scale the rows and record the blueprint fields InsertClosure reads.

zoomy_core.model.models.scaling.ordered_truncation(m, momentum, closures, scaling, *, heights, free_surface=None, pressure=Pressure.total, mass=None, requested=None)#

The scaling pipeline on a model’s blueprint rows, in place of the hand rules (moment_scaling, the hydrostatic inertia drop, apply_full_tensor):

FreeSurfaceNonDim -> ShallowScaling -> InsertClosure -> ShallowScaling -> Dimensionalize

Sets m.stress from the outcome (Stress.full when a horizontal row keeps the in-plane stress, which the closure step and the in-plane traction read) and returns the ClosureRecord.

Args

  • requested: the model’s stress setting; Stress.full there must agree with the outcome.

Raises

  • ScalingError: the kept bulk shear is neither the vertical shear alone nor the whole tau_dz with the in-plane stress (no Stress option represents it); a closure contributes nothing at the order (remove it); requested disagrees.