"""Width-independent process application from actual rotational speeds.""" from collections.abc import Iterable from math import isfinite def rotational_application_g_m2( rotational_speeds_rpm: Iterable[float], specific_discharge_kg_per_rev_m: float, line_speed_m_min: float, gate_threshold: float, ) -> float | None: speeds = tuple(rotational_speeds_rpm) if not speeds or not all(isfinite(value) for value in speeds): raise ValueError("rotational speeds must be non-empty and finite") if not isfinite(specific_discharge_kg_per_rev_m) or specific_discharge_kg_per_rev_m <= 0: raise ValueError("specific discharge must be finite and positive") if not isfinite(gate_threshold) or gate_threshold <= 0: raise ValueError("speed gate threshold must be finite and positive") if not isfinite(line_speed_m_min): raise ValueError("line speed must be finite") if line_speed_m_min <= gate_threshold: return None value = sum(speeds) * specific_discharge_kg_per_rev_m * 1000 / line_speed_m_min if not isfinite(value): raise ValueError("derived application must be finite") return value