Docs › Physics API reference › onesim.physics.hydrodynamics
A.9 onesim.physics.hydrodynamics
CahnHilliard class
CahnHilliard(*, domain: object, model_id: str = <factory>, free_energy: object, mobility: object, velocity: object | None = None, source: object | None = None) -> None
Evolve composition and chemical potential with a specified free energy and mobility.
Declared fields. composition (1, differential), chemical_potential (Pa, algebraic), capillary_force (N/m^3, derived, x/y/z), phase_flux (m/s, derived, x/y/z), free_energy_density (J/m^3, derived), advecting_velocity (m/s, input, x/y/z), composition_source (1/s, input).
CompositionGradient class
CompositionGradient(*, boundary: object, physics: object, value: object = 0.0) -> None
Outward composition derivative grad(c).n, in 1/m.
Selected methods.
composition_gradient(*, points, time)
CompressibleEuler class
CompressibleEuler(*, domain: object, model_id: str = <factory>, equation_of_state: object, mass_source: object = 0.0, momentum_source: object = 0.0, energy_source: object = 0.0) -> None
Advance conservative mass, momentum and total energy with an equation of state and optional sources.
Declared fields. density (kg/m^3, differential), momentum (kg/m^2/s, differential), total_energy (J/m^3, differential), velocity (m/s, derived), pressure (Pa, derived), internal_energy (J/kg, derived), mass_supply (kg/m^3/s, input), momentum_supply (N/m^3, input), energy_supply (W/m^3, input). Selected methods.
reflect_boundary_state(interior, *, normal)
reflect_boundary_state_jacobian(interior, *, normal)
DarcyFluxBoundary class
DarcyFluxBoundary(*, boundary: object, physics: object, flux: object = 0.0, factory: object | None = None) -> None
Externally prescribed outward Darcy velocity in m/s.
Selected methods.
semantic_conditions(condition_id)
bind_scalar_balance(*, model, mesh)
bind_finite_volume(*, model, mesh)
DarcyPressureBoundary class
DarcyPressureBoundary(*, boundary: object, physics: object, value: object, factory: object | None = None) -> None
Physical pressure in Pa, constant or callback(time, coordinate).
Selected methods.
semantic_conditions(condition_id)
bind_scalar_balance(*, model, mesh)
bind_finite_volume(*, model, mesh)
DarcyPressureFlow class
DarcyPressureFlow(*, domain: object, model_id: str = <factory>, permeability: float, viscosity: float, pressure_storage: float) -> None
Advance or solve porous pressure with Darcy velocity derived from permeability and viscosity.
Declared fields. pressure (Pa, differential), darcy_velocity (m/s, derived). Selected methods.
scalar_balance()
DoubleWellFreeEnergy class
DoubleWellFreeEnergy(*, surface_tension: object, interface_width: object) -> None
psi(c)=beta*(c^2-1)^2/4 and gradient energy kappa*|grad(c)|^2/2.
Selected methods.
density(composition)
derivative(composition)
second_derivative(composition)
EulerInvariantDomain class
EulerInvariantDomain(density_floor: float = 1e-12, pressure_floor: float = 1e-12) -> None
Provide density and pressure floors for a compatible conservative invariant-domain limiter.
Selected methods.
bind(*, model, law)
FixedVelocity class
FixedVelocity(*, boundary: object, physics: object, value: object) -> None
Physical Cartesian velocity trace, including time-dependent motion.
FlowTraction class
FlowTraction(*, boundary: object, physics: object, value: object) -> None
Prescribed outward Cauchy traction sigma.n, including viscous stress.
Selected methods.
traction(*, points, normal, time)
IdealGasEquationOfState class
IdealGasEquationOfState(gamma: float = 1.4) -> None
Close the Euler pressure and wave-speed relations for an ideal gas.
Selected methods.
to_conserved(primitive: Euler1DPrimitiveState) -> Euler1DConservedState
to_primitive(state: Euler1DConservedState) -> Euler1DPrimitiveState
flux(state: Euler1DConservedState) -> Euler1DConservedState
flux_jacobian(state: Euler1DConservedState)
Complete conservative-coordinate derivative of the physical flux.
maximum_wave_speed(state: Euler1DConservedState) -> float
maximum_wave_speed_gradient(state: Euler1DConservedState)
Conservative-coordinate gradient, selecting zero for abs(u) at rest.
IncompressibleNavierStokes class
IncompressibleNavierStokes(*, domain: object, model_id: str = <factory>, material: object, body_force: object | None = None) -> None
Solve velocity and pressure from momentum and incompressibility with a fluid material and body force.
Declared fields. velocity (m/s, differential, x/y/z), pressure (Pa, algebraic), body_force (N/m^3, input, x/y/z).
NoSlipWall class
NoSlipWall(*, boundary: object, physics: object) -> None
Set stationary zero wall velocity for the owned flow model.
OldroydBShear class
OldroydBShear(*, domain: object, model_id: str = <factory>, shear_rate: float | None, stress_law: object) -> None
Advance homogeneous polymer stress in a prescribed shear using the selected stress law.
Declared fields. stress_xx (Pa, differential), stress_xy (Pa, differential), stress_yy (Pa, differential), imposed_rate (1/s, input).
PhaseAdvection class
PhaseAdvection(*, domain: object, model_id: str = <factory>, velocity: float, first_density: float, second_density: float, phase_source: object = 0.0) -> None
Advance a phase fraction under prescribed transport and derive mixture density.
Declared fields. volume_fraction (1, differential), mixture_density (kg/m^3, derived), volume_supply (1/s, input).
PhaseFlux class
PhaseFlux(*, boundary: object, physics: object, value: object = 0.0) -> None
Outward total phase flux (c*u-M*grad(mu)).n, in m/s.
Selected methods.
phase_flux(*, points, time)
PhaseFractionInvariantDomain class
PhaseFractionInvariantDomain() -> None
One convex scaling preserves the cell average and enforces both bounds.
Selected methods.
coordinate_bounds(*, point_count)
bind(*, model, law)
admissible(values)
source_step(values, source)
maximum_scaling(mean, samples)
PressureTraction class
PressureTraction(*, boundary: object, physics: object, value: object) -> None
Outward traction -p_ext*n, with zero imposed tangential traction.
Selected methods.
traction(*, points, normal, time)
ReactiveMixtureTransport class
ReactiveMixtureTransport(*, domain: object, model_id: str = <factory>, network: ReactionNetworkIR, volumetric_heat_capacity: float, kinetics: object = None, thermal_source: object = 0.0, species_sources: Mapping = <factory>, velocity: float) -> None
Couple species kinetics with thermal and advective transport using an explicit reaction network.
RotatingWall class
RotatingWall(*, boundary: object, physics: object, angular_velocity: tuple, rotation_origin: tuple = (0.0, 0.0, 0.0)) -> None
Prescribe rigid-wall rotation around an origin through the angular-velocity vector.
Selected methods.
velocity_at(points)
ShallowWater class
ShallowWater(*, domain: object, model_id: str = <factory>, gravity: float = 9.81, water_source: object = 0.0, discharge_source: object = 0.0) -> None
Advance water depth and discharge with gravity and optional sources.
Declared fields. depth (m, differential), discharge (m^2/s, differential), velocity (m/s, derived), water_supply (m/s, input), momentum_supply (m^2/s^2, input). Selected methods.
reflect_boundary_state(interior, *, normal)
reflect_boundary_state_jacobian(interior, *, normal)
ShallowWaterInvariantDomain class
ShallowWaterInvariantDomain(depth_floor: float = 1e-12) -> None
Supply the positive-depth floor for compatible shallow-water limiting.
Selected methods.
bind(*, model, law)
admissible(values)
maximum_scaling(mean, samples)
source_step(values, source)
Exact forward-update limit for the positive-depth half-space.
TopographicShallowWater class
TopographicShallowWater(*, domain: object, model_id: str = <factory>, gravity: float = 9.81, water_source: object = 0.0, discharge_source: object = 0.0, bed_elevation: object = 0.0) -> None
Stationary bed elevation in metres; depth may vanish with zero discharge.
Declared fields. depth (m, differential), discharge (m^2/s, differential), velocity (m/s, derived), water_supply (m/s, input), momentum_supply (m^2/s^2, input), bed (m, derived), free_surface (m, derived). Selected methods.
bed_values(coordinates)
hydrostatic_balance()
TransmissiveBoundary class
TransmissiveBoundary(*, boundary: object, physics: object) -> None
Zero-gradient exterior states for the model's differential fields.
Selected methods.
bind_finite_volume(*, model, mesh)
semantic_conditions(condition_id)
ViscoelasticStressLaw class
ViscoelasticStressLaw(relaxation_time: float, polymer_viscosity: float) -> None
Evaluate Oldroyd-B upper-convected stress rate and relaxation.
Selected methods.
evaluate(stress: tuple[tuple[float, ...], ...], velocity_gradient: tuple[tuple[float, ...], ...]) -> tuple[tuple[float, ...], ...]
jacobian_action(stress, velocity_gradient, *, stress_direction, gradient_direction)
Exact joint derivative of relaxation, source and convected deformation.
WetDryShallowWaterDomain class
WetDryShallowWaterDomain() -> None
Provide the shallow-water invariant-domain policy that permits a dry state.
Selected methods.
bind(*, model, law)
admissible(values)
source_step(values, source)