Tutorial: Electrodialysis with Bipolar membranes (EDBM) unit

EDBM is a membrane-based technology that allows the production of acidic and alkaline solutions by applying an electric potential to the electrodes. In this work, EDBM aims to convert NaCl molecules of a brine solution to NaOH and HCl solutions.

edbm

In desalsim package, the EDBM unit is used to model the operation of a Electrodialysis with Bipolar membranes technology. Upon simulation, it calculates the flow rate of the acid, base, and salt solutions, their ion concentration, and the electricity requirements of the unit. The EDBM function consists of one class: `EDBMCalc`_ that consists of various methods. In this tutorial, we will focus on how to use the class and their methods.

Table 1: Overview of Inputs and Outputs for Electrodialysis with Bipolar Membranes

Process

Input

Output

Feed flow rate [m3/h]

Flow rate of acid [m3/h] and composition [g/L]

Ion concentration [g/L]

Flow rate of base [m3/h] and composition [g/L]

Current Density [A/m2]

Flow rate of salt [m3/h] and composition [g/L]

Number of triplets

Electricity requirements [kWhel]

The mathematical description of Electrodialysis with Bipolar membranes technology is given in Mathematical description, see Section A.6.

1. Getting started

1.1. Import class

import desalsim

Then import the class:

from desalsim.edbm_unit_f import EDBMCalc

Additionally, functions for calculating density (density_calc.py) or constants (comparison.py) where the user can add constant values like MW, prices etc, need to be imported.

from desalsim.density_calc import density_calc
from desalsim import constants
from desalsim import scaleup

1.2. Define feed characteristics

You can initialize the feed solution by setting the flow rate, specifying the focus components and their concentration.

# Input conditions
ph_s = 4.71  # pH salt channel (units: -)
ph_b = 7  # pH base channel (units: -)
ph_a = 7  # pH acid channel (units: -)

# Feed concentration
components = ['Na', 'Cl', 'K', 'Mg', 'Ca', 'SO4', 'HCO3', 'H', 'OH']
Cin_edbm = [13.44, 20.725, 1.146, 0, 0, 0.18, 0, 10**(-ph_s), 3.01551E-11]

# Feed flow rate L/h
Q_in_edbm = 47000
# Water flow rate for acid and base channels
Q_w_in=2*Q_in_edbm

# Feed concentration for base and acid channels
C_b_in = [0, 0, 0, 0, 0, 0, 0, 10**(-ph_b), 10**(-(14-ph_b))]
C_a_in = [0, 0, 0, 0, 0, 0, 0, 10**(-ph_a), 10**(-(14-ph_a))]

# Temperature
T = 20 + 273.15  # K

Note

Note that if you want to add more components, you need to update the components list and include the concentration of the new component in the Cin_edbm.

You can calculate the density of the feed solution and the water quantity in inflow:

d_in = density_calc(25, sum(Cin_edbm)) / 1000
d_s = d_in

# Calculate water quantity in inflow
Mw_in = Q_in_edbm / d_in

1.3. Set operating assumptions

You need to set operating assumptions such as the electrical current density.

# Assumptions:
# The electrical current density
I_d = 400  # Am2
# Set number of triplets
N_trip = 50 * 47  # Number of triplets based on the inlet flow rate
# Set membrane area based on the feed flow rate, m2
A = 0.4  # range: 0.1-1

Finally, you need to set assumptions related to pumping like pressure drop (dp) and pump efficiency (npump).

npump = 0.8  # pump efficiency (units: -)
dp = 1  # pressure drop (units: bar)

1.4. Set Mmebrane characteristics

You need to set Membrane characteristics:

# Membrane characteristics
Cm_bp_H = 0.0000001  # mol/l
Cm_bp_OH = 0.0000001  # mol/l

1.5. Set constants

You need to set constant parameters:

F = 96485.3  # Coulombs/mol
R_const = 8.314462618  # kg⋅m2⋅s−2⋅K−1⋅mol−1
# R_int = 0.28  # ohm cm2
R_int = 45  # ohm cm2
z = 1

After setting all the required inputs, then you can create the functions’ objectives.

2. Use EDBMCalc class

EDBMCalc is a class used to represent mass and energy balance for EDBM Unit. In particular, it calculates the flowrate in each channel, the outlet concentration in each channel, the external Voltage and power needed. EDBMCalc takes as input the feed flow rate (Qin), the membrane area (A), the electrical current density (I_d), the Number of triplets based on the inlet flow rate (N), the initial concentrations of various ions in the salt channel (Ci_s_in), base channel (Ci_b_in), and acid channel (Ci_a_in) and the feed temperature (T).

2.1. Overview

The following attributes are available within the EDBMCalc class:

  • CNa_in, CCl_in, CK_in, CMg_in, CCa_in, CSO4_in: Initial concentrations of various ions (g/l).

  • CNa_out, CCl_out, CK_out, CMg_out, CCa_out, CSO4_out: Outlet concentrations of various ions (g/l).

  • Ci_s_in: Initial concentrations of various ions in the salt channel (mol/l).

  • Ci_a_in: Initial concentrations of various ions in the acid channel (mol/l).

  • Ci_b_in: Initial concentrations of various ions in the base channel (mol/l).

  • EMF: Electromotive force (V).

  • KW_s_in: Inlet ionic water product in the salt channel.

  • KW_a_in: Inlet ionic water product in the acid channel.

  • KW_b_in: Inlet ionic water product in the base channel.

  • M_h2o_a_in: Initial mass flow rate of water in the acid channel (kg/h).

  • M_h2o_b_in: Initial mass flow rate of water in the base channel (kg/h).

  • M_h2o_s_in: Initial mass flow rate of water in the salt channel (kg/h).

  • N_trip: Number of triplets of a channel.

  • P: Gross power needed (W).

  • PM: Molecular weight.

  • Q: Flow rate (l/h).

  • V_ext: Voltage needed (V).

The EDBMCalc class provides the following methods:

# Calculates the flowrate in each channel
flowrate()
# Calculates the inlet mass flow rates of each ion, kg/h
in_mass_flow_rates(ph_s)
# Performs mass balance calculations for Acid channel
acid_channel()
# Performs mass balance calculations for Base channel
base_channel()
# Performs mass balance calculations for Salt channel
salt_channel(Cm_bp_H, Cm_bp_OH)

2.2. Create EDBMCalc objects

EDBMCalc takes as input the feed flow rate (Qin), the membrane area (A), the electrical current density (I_d), the Number of triplets based on the inlet flow rate (N), the initial concentrations of various ions in the salt channel (Ci_s_in), base channel (Ci_b_in), and acid channel (Ci_a_in) and and the feed temperature (T).

Create an instance of the EDBMCalc class with the defined parameters:

# Create an instance of the EDBMCalc class with the defined parameters
edbm_dat = EDBMCalc(Q_in_edbm, A, I_d, N_trip, Cin_edbm, C_b_in, C_a_in, T)

2.3. Use flowrate method

This method calculates the flowrate in each channel (Q1_s_in, Q1_a_in, Q1_b_in).

edbm_dat.flowrate()

It doesn’t take additional inputs.

2.4. Use in_mass_flow_rates method

This method calculates the inlet mass flow rates. In particular, it calculates the inlet mass flow rates of each ion in the three channels (M_s_in, M_a_in, M_b_in), the mass of water in the initial streams in the three channels (M_h2o_s_in, M_h2o_a_in, M_h2o_b_in). Additionally, it calculates the inlet ionic water product in each channel (KW_s_in, KW_a_in, KW_b_in).

edbm_dat.in_mass_flow_rates(ph_s)

It takes the initial pH in the salt channel as input. The results are used in the following calculations.

2.5. Use acid_channel method

It calculates the mass balance calculations for Acid channel. In particular, it calculates the outlet mass flow rate for all ionic species in the channel (M_a_out) and water (M_h2o_a_out), the total outlet mass flow rate (M_a_out_t), volumetric outlet flow rate (Q1_a_out), and the outlet concentration of single ions in the channel (Ci_a_out).

edbm_dat.acid_channel()

It doesn’t take additional inputs.

2.5.1. Assigned the results to output parameters

You can assign the results to output parameters:

Ca_out = edbm_dat.Ci_a_out
Ca_out = edbm_dat.Ci_a_out[0:6]
Ca_out_g = [Ca_out[0] * MW_Na, Ca_out[1] * MW_Cl, Ca_out[2] * MW_K, Ca_out[3] * MW_Mg, Ca_out[4] * MW_Ca, Ca_out[5] * MW_SO4]

# Mass flow rate
M_a_out = edbm_dat.M_a_out_t * N_trip

# Volumetric flow rate
Q_a_out = edbm_dat.Q1_a_out * N_trip

# Conversion to solid
M_HCl_out = Q_a_out * constants.MW_HCl / 1000  # kg/hr

2.6. Use base_channel method

It calculates the mass balance calculations for Base channel. In particular, it calculates the outlet mass flow rate for all ionic species in the channel (M_b_out) and water (M_h2o_b_out), the total outlet mass flow rate (M_b_out_t), volumetric outlet flow rate (Q1_b_out), and the outlet concentration of single ions in the channel (Ci_b_out).

edbm_dat.base_channel()

It doesn’t take additional inputs.

2.6.1. Assigned the results to output parameters

You can assign the results to output parameters:

# Base channel
# Concentration in base channel
Cb_out = edbm_dat.Ci_b_out[0:6]
Cb_out_g = [Cb_out[0] * MW_Na, Cb_out[1] * MW_Cl, Cb_out[2] * MW_K, Cb_out[3] * MW_Mg, Cb_out[4] * MW_Ca, Cb_out[5] * MW_SO4]

# Mass flow rate
M_b_out = edbm_dat.M_b_out_t * N_trip

# Volumetric flow rate
Q_b_out = edbm_dat.Q1_b_out * N_trip

# Conversion to solid
M_NaOH_out = Q_b_out * edbm_dat.Ci_b_out[0] * constants.MW_NaOH / 1000  # kg/hr

2.7. Use salt_channel method

It calculates the mass balance calculations for Salt channel and the Voltage (V_ext) and Power (P) needed. In particular, it calculates the outlet mass flow rate for all ionic species in channel (M_s_out) and water (M_h2o_s_out), the total outlet mass flow rate (M_s_out_t), volumetric outlet flow rate (Q1_s_out) and the outlet concentration of single ions in channel (Ci_s_out).

edbm_dat.salt_channel(Cm_bp_H, Cm_bp_OH)

It takes additional inputs Cm_bp_H, Cm_bp_OH, membrane characteristics.

2.7.1. Assigned the results to output parameters

You can assigned the results to output parameters:

"Salt channel "
    # Concentration in salt channel
    Cbrine_out_t = sum(edbm_dat.Ci_s_out)
    Cbrine_out = edbm_dat.Ci_s_out  # mol/l
    Cbrine_out_g = [
        Cbrine_out[0] * MW_Na, Cbrine_out[1] * MW_Cl, Cbrine_out[2] * MW_K,
        Cbrine_out[3] * MW_Mg, Cbrine_out[4] * MW_Ca, Cbrine_out[5] * MW_SO4
    ]  # g/l

    # Mass flow rate
    M_s_out = edbm_dat.M_s_out_t * N_trip

    # Volumetric flow rate
    Q_s_out = edbm_dat.Q1_s_out * N_trip

2.8. Calculate energy consumption

You can calculate the total energy requirements for the EDBM unit. For this, you can use the voltage needed (V_ext) and the energy for pumping (Ppump).

# Energy consumption
V_ext = edbm_dat.V_ext  # External

# Calculate energy consumption for pumping
Ppump = (edbm_dat.Q1_s_in * N_trip * dp + edbm_dat.Q1_a_in * N_trip * dp + edbm_dat.Q1_b_in * N_trip * dp) / 1000 / 3600 * 1e5 / npump  # units: W -> l to m3 so /1000; bar to J 1e5N/m2*1J/m ; hr to 3660s

# Total energy consumption
E_el_Edbm = V_ext * I_d * A / 1000 + Ppump / 1000

Additionally, the current efficiency (CE) can be calculated. In this work, ideal phenomena are assumed so it is expected to be close to 100%.

# Calculate current efficiency
Cb_in = [0]
CE = (Q_b_out) * (Cb_out[0] - Cb_in[0]) * F / (3600 * N_trip * I_d * A) * 100  # %

Finally, the specific energy consumption (kWh/kg of NaOH) can be calculated:

# Specific energy consumption (kWh/kg of NaOH)
SEC = (V_ext * I_d * A) / (Q_b_out * (edbm_dat.Ci_b_out[0] - edbm_dat.Ci_b_in[0]) * constants.MW_NaOH)