flow.mean_temperature

flow.mean_temperature(temperature, chi)

Solid-fraction-weighted mean temperature: int chi T / int chi.

The smooth counterpart of :func:peak_temperature, and the one to check a gradient against — it has no argmax to jump between cells.

Parameters

Name Type Description Default
temperature jax.Array (NX, NY, NZ) temperature field. required
chi jax.Array Solid fraction, (NX, NY, NZ). required

Returns

Name Type Description
jax.Array Scalar mean temperature over the solid.