CFD constraints¤
Boundary conditions¤
phydrax.constraints.ContinuousSymmetryVelocityBoundaryConstraint(velocity_var: str, component: DomainComponent, /, *, var: str = 'x', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint
¤
Symmetry (no-penetration) condition on a symmetry plane.
Enforces \(u\cdot n = 0\) on the boundary component.
phydrax.constraints.ContinuousNoPenetrationBoundaryConstraint(velocity_var: str, component: DomainComponent, /, *, wall_normal_velocity: DomainFunction | ArrayLike | None = None, wall_velocity: DomainFunction | ArrayLike | None = None, var: str = 'x', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint
¤
No-penetration (impermeability) wall boundary condition.
Enforces the normal-velocity condition
where u_n can be provided via wall_normal_velocity or derived from a full
wall_velocity by taking its normal component.
phydrax.constraints.ContinuousSlipWallBoundaryConstraint(velocity_var: str, pressure_var: str, component: DomainComponent, /, *, var: str = 'x', viscosity: DomainFunction | ArrayLike, mode: Literal[reverse, forward] = 'reverse', num_points: int | tuple[Any, ...], structure: Any, sampler: str = 'latin_hypercube', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, reduction: Literal[mean, integral] = 'mean') -> FunctionalConstraint
¤
Free-slip wall boundary condition via zero tangential traction.
Forms the (pressure + viscous) traction
and enforces that its tangential component vanishes:
---¤
phydrax.constraints.DiscreteNoPenetrationBoundaryConstraint(velocity_var: str, component: DomainComponent, /, *, points: Mapping[str, ArrayLike] | ArrayLike, wall_normal_velocity: ArrayLike | None = None, var: str = 'x', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, reduction: Literal[mean, sum] = 'mean') -> PointSetConstraint
¤
Discrete no-penetration constraint at explicit boundary anchor points.
Enforces \(u\cdot n = u_n\) (default \(0\)) at the provided points.
phydrax.constraints.DiscreteZeroNormalGradientVelocityBoundaryConstraint(velocity_var: str, component: DomainComponent, /, *, points: Mapping[str, ArrayLike] | ArrayLike, var: str = 'x', mode: Literal[reverse, forward] = 'reverse', weight: DomainFunction | ArrayLike = 1.0, label: str | None = None, reduction: Literal[mean, sum] = 'mean') -> PointSetConstraint
¤
Discrete zero normal-gradient condition for velocity at explicit anchor points.
Enforces \(\partial u/\partial n = 0\) componentwise at the provided points.
Integral / global constraints¤
phydrax.constraints.CFDBoundaryFlowRateConstraint(velocity_var: str, domain, /, *, flow_rate: ArrayLike, var: str = 'x', num_points: NumPoints | tuple[Any, ...], structure: ProductStructure | None = None, sampler: str = 'latin_hypercube', weight: ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, where: Mapping[str, Callable] | None = None, where_all: DomainFunction | None = None) -> IntegralEqualityConstraint
¤
Boundary integral constraint for volumetric flow rate.
Enforces
where \(\dot{V}\) is the prescribed flow rate.
phydrax.constraints.CFDKineticEnergyFluxBoundaryConstraint(velocity_var: str, domain, /, *, target_total_power: ArrayLike, var: str = 'x', num_points: NumPoints | tuple[Any, ...], structure: ProductStructure | None = None, sampler: str = 'latin_hypercube', weight: ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, where: Mapping[str, Callable] | None = None, where_all: DomainFunction | None = None) -> IntegralEqualityConstraint
¤
Boundary integral constraint for kinetic energy flux (power).
Uses the flux density \(\tfrac12\|u\|_2^2(u\cdot n)\) and enforces
phydrax.constraints.AveragePressureBoundaryConstraint(pressure_var: str, domain, /, *, mean_pressure: ArrayLike, num_points: NumPoints | tuple[Any, ...], structure: ProductStructure | None = None, sampler: str = 'latin_hypercube', weight: ArrayLike = 1.0, label: str | None = None, over: str | tuple[str, ...] | None = None, where: Mapping[str, Callable] | None = None, where_all: DomainFunction | None = None) -> IntegralEqualityConstraint
¤
Boundary integral constraint for pressure.
Enforces an integral of the form
If you want to enforce an average pressure \(\bar p\), set mean_pressure to
\(\bar p\,|\partial\Omega|\).