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#
What the blueprint’s pressure field is. |
|
|
Functions#
The scaling pipeline on a model’s blueprint rows, in place of the hand rules
( |
API#
- class zoomy_core.model.models.scaling.Pressure#
Bases:
zoomy_core.misc.options.OptionWhat 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.NonDimensionalizeNonDimensionalizewith the thesis choices for a free-surface flow, read off a momentum blueprint (Momentum,MomentumNonHydrostaticor a stand-in withuvel, w, p, tau, rows, vertical).Rows: the horizontal momentum rows divided by
U^2 / L(inertia), the vertical row byU^2 / H(the non-hydrostatic pressure gradient), the mass row byU / L. Default regime:Fr, De = O(1), the inclinee_x = O(eps)(its body force then of the order of the surface gradientg d_x eta).Args
momentum: the blueprint.heights: the height fields (h,b, layer depths), scaled withH.free_surface:sof the hydrostatic part (needed forPressure.total).pressure: thePressurekind ofmomentum.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
InsertClosurereads.
- 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.stressfrom the outcome (Stress.fullwhen a horizontal row keeps the in-plane stress, which the closure step and the in-plane traction read) and returns theClosureRecord.Args
requested: the model’sstresssetting;Stress.fullthere must agree with the outcome.
Raises
ScalingError: the kept bulk shear is neither the vertical shear alone nor the wholetau_dzwith the in-plane stress (noStressoption represents it); a closure contributes nothing at the order (remove it);requesteddisagrees.