flow.domain.solid_fraction

flow.domain.solid_fraction(distance, epsilon, profile='smootherstep')

Smooth solid indicator from signed distances.

Parameters

Name Type Description Default
distance jax.Array Signed distance, negative inside the solid, any shape. required
epsilon float Interface half-width in the same units as distance. required
profile str "smootherstep" – Perlin’s quintic blend, exactly 1 below -epsilon and exactly 0 above +epsilon, with both first and second derivatives vanishing at the join. "smoothstep" – the cubic Hermite blend, same support but only C1. "sigmoid"sigmoid(-distance/epsilon), which never reaches either end; see this module’s docstring for why that is a poor choice for a penalisation field and a fine one for a volume integral. 'smootherstep'

Returns

Name Type Description
jax.Array Solid fraction in [0, 1], the shape of distance.

Raises

Name Type Description
ValueError On an unknown profile.