@@ -55,6 +55,7 @@ def __init__( # pylint: disable=too-many-locals
5555 particle_shape_and_density : str = "LiquidSpheres" ,
5656 terminal_velocity : str = "GunnKinzer1949" ,
5757 air_dynamic_viscosity : str = "ZografosEtAl1987" ,
58+ bulk_phase_partitioning : str = "Null" ,
5859 handle_all_breakups : bool = False ,
5960 ):
6061 # initialisation of the fields below is just to silence pylint and to enable code hints
@@ -86,6 +87,7 @@ def __init__( # pylint: disable=too-many-locals
8687 self .particle_shape_and_density = particle_shape_and_density
8788 self .air_dynamic_viscosity = air_dynamic_viscosity
8889 self .terminal_velocity = terminal_velocity
90+ self .bulk_phase_partitioning = bulk_phase_partitioning
8991
9092 self ._components = tuple (
9193 i
@@ -101,8 +103,18 @@ def __init__( # pylint: disable=too-many-locals
101103 getattr (defaults , k ), (numbers .Number , pint .Quantity , pint .Unit )
102104 )
103105 }
106+
107+ physics .constants_defaults .compute_derived_values (constants_defaults )
108+ if constants is not None :
109+ for key in constants :
110+ if key not in constants_defaults :
111+ raise ValueError (
112+ f"constant override provided for unknown key: { key } "
113+ )
114+
104115 constants_defaults = {** constants_defaults , ** (constants or {})}
105116 physics .constants_defaults .compute_derived_values (constants_defaults )
117+
106118 constants = namedtuple ("Constants" , tuple (constants_defaults .keys ()))(
107119 ** constants_defaults
108120 )
0 commit comments