def model2(self):
     model = ConcreteModel()
     model.prop_param = swco2.SWCO2ParameterBlock()
     model.prop_in = swco2.SWCO2StateBlock(
         default={"parameters": model.prop_param}
     )
     return model
예제 #2
0
 def model_transport(self):
     # This model is used to test transport properties
     model = ConcreteModel()
     model.prop_param = swco2.SWCO2ParameterBlock()
     model.prop_in = swco2.SWCO2StateBlock(
         default={"parameters": model.prop_param})
     return model
예제 #3
0
def build_unit():
    # Create a Concrete Model as the top level object
    m = pyo.ConcreteModel()
    # Add a flowsheet object to the model
    m.fs = FlowsheetBlock(default={"dynamic": False})
    m.fs.properties_co2 = swco2.SWCO2ParameterBlock(
        default={"phase_presentation": swco2.PhaseType.G})
    m.fs.unit = CompressionStage(
        default={
            "property_package": m.fs.properties_co2,
            "impeller_type": ImpellerType.open_impeller,
            "vane_diffuser_type": VaneDiffuserType.vane_diffuser
        })

    # Set the compressor inlet conditions and an initial flow guess
    p = 1.0951 * 1e5  # Pa
    t = 40.0113 + 273.15  # K #
    fin = 1159.44  # mol/s #

    hin_co2 = swco2.htpx(T=t * pyo.units.K, P=p * pyo.units.Pa)

    m.fs.unit.inlet.flow_mol[:].fix(fin)
    m.fs.unit.inlet.enth_mol[:].fix(hin_co2)
    m.fs.unit.inlet.pressure[:].fix(p)

    # inlet specifications
    m.fs.unit.U2.fix(315.3)
    m.fs.unit.outlet.pressure[:].fix(2.53161 * 1e5)

    # fix compressor specification
    m.fs.unit.r2.fix(0.67654)
    m.fs.unit.z_s.fix(0.9952)
    m.fs.unit.z_d1.fix(0.97373)
    m.fs.unit.efficiency_mech.fix(0.97)
    m.fs.unit.eff_drive.fix(1.0)

    return m
예제 #4
0
 def compressor_model(self):
     m = ConcreteModel()
     m.fs = FlowsheetBlock(default={"dynamic": False})
     m.fs.properties = swco2.SWCO2ParameterBlock()
     m.fs.unit = Compressor(default={"property_package": m.fs.properties})
     return m