Esempio n. 1
0
# Import IDAES cores
import idaes.logger as idaeslog
from idaes.core import (ControlVolume0DBlock,
                        declare_process_block_class,
                        EnergyBalanceType,
                        MomentumBalanceType,
                        MaterialBalanceType,
                        UnitModelBlockData,
                        useDefault)
from idaes.core.util.config import is_physical_parameter_block
from idaes.core.util.misc import add_object_reference
from idaes.core.util.exceptions import PropertyPackageError, \
    PropertyNotSupportedError

_log = idaeslog.getIdaesLogger(__name__)


@declare_process_block_class("Reboiler")
class ReboilerData(UnitModelBlockData):
    """
    Reboiler unit for distillation model.
    Unit model to reboil the liquid from the bottom tray of
    the distillation column.
    """
    CONFIG = UnitModelBlockData.CONFIG()
    CONFIG.declare("has_boilup_ratio", ConfigValue(
        default=False,
        domain=In([True, False]),
        description="Boilup ratio term construction flag",
        doc="""Indicates whether terms for boilup ratio should be
Esempio n. 2
0
# Import IDAES cores
from idaes.core import (declare_process_block_class, PhysicalParameterBlock,
                        Component)
from idaes.core.util.misc import extract_data

from idaes.generic_models.properties.activity_coeff_models.activity_coeff_prop_pack \
    import ActivityCoeffParameterData
from idaes.logger import getIdaesLogger

# Some more inforation about this module
__author__ = "Andrew Lee, Jaffer Ghouse"
__version__ = "0.0.1"

# Set up logger
_log = getIdaesLogger(__name__)


@declare_process_block_class("MethaneParameterBlock")
class MethaneParameterData(ActivityCoeffParameterData):
    # Methane combstion only considers and ideal vapor phase, so need to
    # overload the user-selection of activity coefficient model and valid
    # phases. Do this by creating our own Config block with limited choices.
    CONFIG = PhysicalParameterBlock.CONFIG()

    CONFIG.declare(
        "activity_coeff_model",
        ConfigValue(default="Ideal",
                    domain=In(["Ideal"]),
                    description="Methane combustion supports ideal gas only"))
Esempio n. 3
0
def _init_logging(lvl):
    ui_logger = logger.getIdaesLogger("ui", level=lvl, tag="ui")
    ui_logger.setLevel(lvl)