Skip to content

Commit

Permalink
Remove some more unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
wigging committed May 12, 2023
1 parent db56a46 commit 54b7cde
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# "https://github.com/watertap-org/watertap/"
#################################################################################
"""
Thermophysical property package to be used in conjunction with modified ASM2d reactions for compatibility with the modified ADM1 model.
Thermophysical property package to be used in conjunction with modified ASM2d
reactions for compatibility with the modified ADM1 model.
Reference:
[1] Henze, M., Gujer, W., Mino, T., Matsuo, T., Wentzel, M.C., Marais, G.v.R.,
Expand All @@ -22,20 +23,17 @@
# Import IDAES cores
from idaes.core import (
declare_process_block_class,
LiquidPhase,
Component,
Solute,
Solvent,
)
from pyomo.common.config import ConfigValue, In
from pyomo.common.config import ConfigValue
import idaes.logger as idaeslog
from watertap.property_models.activated_sludge.asm2d_properties import (
ASM2dParameterData,
_ASM2dStateBlock,
ASM2dStateBlockData,
)

from idaes.core.util.exceptions import ConfigurationError, InitializationError
from idaes.core.util.exceptions import ConfigurationError

# Some more information about this module
__author__ = "Chenyu Wang"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,9 @@
anaerobic digestion processes", 2016, Water Research, 95, pp.370-382.
"""

# Import Pyomo libraries
import pyomo.environ as pyo

# Import IDAES cores
from idaes.core import (
declare_process_block_class,
MaterialFlowBasis,
ReactionParameterBlock,
ReactionBlockDataBase,
ReactionBlockBase,
)
from idaes.core.util.misc import add_object_reference
from idaes.core.util.exceptions import BurntToast
from idaes.core import declare_process_block_class
import idaes.logger as idaeslog
import idaes.core.util.scaling as iscale
from watertap.property_models.activated_sludge.asm2d_reactions import (
ASM2dReactionParameterData,
_ASM2dReactionBlock,
Expand Down
9 changes: 2 additions & 7 deletions watertap/unit_models/electroNP_ZO.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,15 @@
Param,
Suffix,
NonNegativeReals,
Reference,
units as pyunits,
)
from pyomo.common.config import Bool, ConfigBlock, ConfigValue, In
from pyomo.common.config import ConfigBlock, ConfigValue, In

# Import IDAES cores
from idaes.core import (
declare_process_block_class,
MaterialBalanceType,
EnergyBalanceType,
MomentumBalanceType,
UnitModelBlockData,
useDefault,
MaterialFlowBasis,
)
from idaes.core.solvers import get_solver
from idaes.core.util.tables import create_stream_table_dataframe
Expand All @@ -39,7 +34,7 @@
import idaes.core.util.scaling as iscale
import idaes.logger as idaeslog

from watertap.core import ControlVolume0DBlock, InitializationMixin
from watertap.core import InitializationMixin

__author__ = "Chenyu Wang"

Expand Down
28 changes: 3 additions & 25 deletions watertap/unit_models/tests/test_electroNP_ZO.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,17 @@
ConcreteModel,
assert_optimal_termination,
value,
Var,
log10,
units,
)
from pyomo.network import Port
from idaes.core import (
FlowsheetBlock,
MaterialBalanceType,
EnergyBalanceType,
MomentumBalanceType,
)
from idaes.core import FlowsheetBlock
from watertap.unit_models.electroNP_ZO import ElectroNPZO
from watertap.property_models.activated_sludge.modified_asm2d_properties import (
ModifiedASM2dParameterBlock,
)
from watertap.property_models.activated_sludge.modified_asm2d_reactions import (
ModifiedASM2dReactionParameterBlock,
ModifiedASM2dReactionBlock,
)
from idaes.core.solvers import get_solver
from idaes.core.util.model_statistics import (
degrees_of_freedom,
number_variables,
number_total_constraints,
number_unused_variables,
)
from idaes.core.util.model_statistics import degrees_of_freedom
from idaes.core.util.testing import initialization_tester
from idaes.core.util.scaling import (
calculate_scaling_factors,
unscaled_variables_generator,
unscaled_constraints_generator,
badly_scaled_var_generator,
)
from idaes.core.util.scaling import calculate_scaling_factors
from pyomo.util.check_units import assert_units_consistent
from idaes.core import UnitModelCostingBlock
from watertap.costing import WaterTAPCosting
Expand Down
5 changes: 3 additions & 2 deletions watertap/unit_models/tests/test_thickener_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
FlowsheetBlock,
MaterialBalanceType,
MomentumBalanceType,
PhysicalParameterBlock,
)

from idaes.models.unit_models.separator import SplittingType
Expand Down Expand Up @@ -53,12 +52,14 @@
ASM1ParameterBlock,
)

from pyomo.util.check_units import assert_units_consistent, assert_units_equivalent
from pyomo.util.check_units import assert_units_consistent


# -----------------------------------------------------------------------------
# Get default solver for testing
solver = get_solver()


# -----------------------------------------------------------------------------
@pytest.mark.unit
def test_config():
Expand Down

0 comments on commit 54b7cde

Please sign in to comment.