Component
Design abilities for AguaClara drinking water treatment plant components
This module allows plant component classes to
specify expert inputs and their defaults automatically
propogate plant-wide design inputs throughout all of its subcomponents
reconfigure Onshape Part Studios and Assemblies that represent plant components.
If a Component
is instantiated with custom subcomponents, and the
subcomponents have their own q
and/or temp
specified:
plant = Plant(
q = 40 * u.L / u.s,
filter = Filter(q = 20 * u.L / u.s)
)
then the subcomponets will preserve their q
and temp
:
>>> plant.q
40 liter / second
>>> plant.filter.q
20 liter / second
Otherwise, subcomponents will inherit the main component’s q
and temp
:
>>> plant = Plant(q = 40 * u.L / u.s)
>>> plant.q
40 liter / second
>>> plant.filter.q
40 liter / second
- class aguaclara.design.component.Component(**kwargs)[source]
An abstract class representing AguaClara plant components.
This class provides subclasses with the ability to record and propogate a configuration of plant design variables (
q
andtemp
) for a component and all of its subcomponents.- set_subcomponents()[source]
Set the plant-wide inputs of all subcomponents.
Call this function at the end of a subclass’s
__init__()
setq
andtemp
for subcomponents, except when a subcomponent specifies its own customq
andtemp
.