watertap.flowsheets.lsrro package
Submodules
watertap.flowsheets.lsrro.lsrro module
- watertap.flowsheets.lsrro.lsrro.feed_concentration_recovery_profile(m, number_of_stages, points_per_sweep=5, quick_start=True)[source]
Generate a cost-optimal feed concentration vs recovery profile for a given number of stages. :param m: Existing Pyomo model. If None, a new model is created. :type m: ConcreteModel, optional :param points_per_sweep: Number of points to sample in the sweep. :type points_per_sweep: int :param number_of_stages: Number of RO stages in the system. :type number_of_stages: int :param quick_start: If True, skip rigorous initialization for faster results. :type quick_start: bool
- Returns:
DataFrame containing the sweep results. output_filename (str): Path to the CSV file where results are saved. fig, ax: Matplotlib figure and axis objects for the contour plot.
- Return type:
results (pd.DataFrame)
- watertap.flowsheets.lsrro.lsrro.optimize_set_up(m, set_default_bounds_on_module_dimensions=True, water_recovery=None, Cbrine=None, A_case=ACase.fixed, B_case=BCase.optimize, AB_tradeoff=ABTradeoff.none, A_value=None, permeate_quality_limit=None, AB_gamma_factor=None, B_max=None, assert_dof=False)[source]
Get the LSRRO flowsheet ready to optimize
- watertap.flowsheets.lsrro.lsrro.B_case
- Type:
‘single_optimum’ or anything else to optimize B value at every LSR stage
- watertap.flowsheets.lsrro.lsrro.A_case
- Type:
‘fixed’ or ‘optimize’ or ‘single_optimum’ A at every LSR stage
- watertap.flowsheets.lsrro.lsrro.AB_tradeoff
‘equality_constraint’ B = function of A ‘none’ no constraint relating B value to A value
- Type:
‘inequality_constraint’ B >= function of A
- watertap.flowsheets.lsrro.lsrro.A_value
- Type:
if A_case=’fixed’, then provide a value to fix A with
- watertap.flowsheets.lsrro.lsrro.assert_dof
- Type:
if True, will raise an error if the degrees of freedom are an unexpected value
- Returns:
model (Pyomo ConcreteModel)
- Return type:
The LSRRO flowsheet.
watertap.flowsheets.lsrro.lsrro_ui module
watertap.flowsheets.lsrro.multi_sweep module
- watertap.flowsheets.lsrro.multi_sweep.run_case(number_of_stages, nx, output_filename=None, quick_start=False)[source]
Run the parameter sweep tool on the LSRRO flowsheet, sweeping over feed concentration from 5 to 250 kg/m^3 and water recovery from 30% to 90%.
- Parameters:
(int) (nx) –
(int) – total number of points swept will be nx^2.
(str (output_filename) – csv file. By default it is ./param_sweep_output/{number_of_stages}_stage/results_LSRRO.csv
optional) (The place to write the parameter sweeep results) – csv file. By default it is ./param_sweep_output/{number_of_stages}_stage/results_LSRRO.csv
- Returns:
global_results (numpy array) (The raw values from the parameter sweep)
sweep_params (dict) (The dictionary of samples)
model (Pyomo ConcreteModel) (The LSRRO flowsheet used for parameter sweeps)