def build(self): super().build() self._tech_type = "dmbr" build_sido_reactive(self) constant_intensity(self)
def build(self): super().build() self._tech_type = "mabr" build_sido_reactive(self) constant_intensity(self) self.blower_size = Var( units=pyunits.m**2, bounds=(0, None), doc="Sizing variable for blower size", ) self._fixed_perf_vars.append(self.blower_size) self._perf_var_dict["Blower Size (m^2)"] = self.blower_size
def build(self): super().build() self._tech_type = "mabr" build_sido_reactive(self) self.nitrogen_removal_rate = Var( units=pyunits.g / pyunits.m**2 / pyunits.day, bounds=(0, None), doc="Nitrogen removal rate per day", ) self._fixed_perf_vars.append(self.nitrogen_removal_rate) self.reactor_area = Var( units=pyunits.m**2, bounds=(0, None), doc="Sizing variable for effective reactor area", ) @self.Constraint( self.flowsheet().time, doc="Constraint for effective reactor area", ) def reactor_area_constraint(b, t): return b.reactor_area == pyunits.convert( b.properties_treated[t].flow_mass_comp["ammonium_as_nitrogen"] / b.nitrogen_removal_rate, to_units=pyunits.m**2, ) self._perf_var_dict["Reactor Area"] = self.reactor_area self.air_flow_rate = Var( self.flowsheet().config.time, units=pyunits.m**3 / pyunits.hour / pyunits.m**2, bounds=(0, None), doc="Air flow rate per area", ) self._fixed_perf_vars.append(self.air_flow_rate) self.air_flow_vol = Var( self.flowsheet().config.time, units=pyunits.m**3 / pyunits.hour, bounds=(0, None), doc="Volumetric air flow rate", ) @self.Constraint( self.flowsheet().time, doc="Constraint for air flow", ) def air_flow_constraint(b, t): return b.air_flow_vol[t] == pyunits.convert( b.air_flow_rate[t] * b.reactor_area, to_units=pyunits.m**3 / pyunits.hour, ) self._perf_var_dict["Volumetric Air Flow Rate"] = self.air_flow_vol self.electricity = Var( self.flowsheet().time, units=pyunits.kW, bounds=(0, None), doc="Electricity consumption of unit", ) self._perf_var_dict["Electricity Demand"] = self.electricity self.energy_electric_flow_vol_inlet = Var( units=pyunits.kWh / pyunits.m**3, doc="Electricity intensity with respect to inlet flowrate of unit", ) @self.Constraint( self.flowsheet().time, doc="Constraint for electricity consumption based on air flowrate.", ) def electricity_consumption(b, t): return b.electricity[t] == ( b.energy_electric_flow_vol_inlet * pyunits.convert( b.air_flow_vol[t], to_units=pyunits.m**3 / pyunits.hour)) self._fixed_perf_vars.append(self.energy_electric_flow_vol_inlet) self._perf_var_dict[ "Electricity Intensity"] = self.energy_electric_flow_vol_inlet
def build(self): super().build() self._tech_type = "electrochemical_nutrient_removal" build_sido_reactive(self) self.electricity = Var( self.flowsheet().time, units=pyunits.kW, bounds=(0, None), doc="Electricity consumption of unit", ) self._perf_var_dict["Electricity Demand"] = self.electricity self.energy_electric_flow_mass = Var( units=pyunits.kWh / pyunits.kg, doc="Electricity intensity with respect to struvite byproduct flowrate of unit", ) @self.Constraint( self.flowsheet().time, doc="Constraint for electricity consumption based on struvite flowrate.", ) def electricity_consumption(b, t): return b.electricity[t] == ( b.energy_electric_flow_mass * pyunits.convert( b.properties_byproduct[t].flow_mass_comp["struvite"], to_units=pyunits.kg / pyunits.hour, ) ) self._fixed_perf_vars.append(self.energy_electric_flow_mass) self._perf_var_dict["Electricity Intensity"] = self.energy_electric_flow_mass self.magnesium_chloride_dosage = Var( units=pyunits.dimensionless, bounds=(0, None), doc="Dosage of magnesium chloride per struvite", ) self._fixed_perf_vars.append(self.magnesium_chloride_dosage) self._perf_var_dict[ "Dosage of magnesium chloride per struvite" ] = self.magnesium_chloride_dosage self.MgCl2_flowrate = Var( self.flowsheet().time, units=pyunits.kg / pyunits.hr, bounds=(0, None), doc="Magnesium chloride flowrate", ) self._perf_var_dict["Magnesium Chloride Demand"] = self.MgCl2_flowrate @self.Constraint( self.flowsheet().time, doc="Constraint for magnesium chloride demand based on struvite flowrate.", ) def MgCl2_demand(b, t): return b.MgCl2_flowrate[t] == ( b.magnesium_chloride_dosage * pyunits.convert( b.properties_byproduct[t].flow_mass_comp["struvite"], to_units=pyunits.kg / pyunits.hour, ) )