Exemple #1
0
    def create_complex_bulk_reaction(self, is_kinetic=True, k_fwd_min=1):
        # Reactions
        # 0: NH4+(aq) <=> NH3(aq) + H+(aq)
        # 1: Lys2+(aq) <=> Lys+(aq) + H+(aq)
        # 2: Lys+(aq) <=> Lys(aq) + H+(aq)
        # 3: Lys(aq) <=> Lys-(aq) + H+(aq)
        # 4: Arg2+ <=> Arg+ + H+
        # 5: Arg+ <=> Arg + H+
        # 6: Arg <=> Arg- + H+
        component_system = ComponentSystem()
        component_system.add_component('H+', charges=[1])
        component_system.add_component(
            'Ammonia', species=['NH4+', 'NH3'], charges=[1,0]
        )
        component_system.add_component(
            'Lysine',
            species=['Lys2+', 'Lys+', 'Lys', 'Lys-'],
            charges=[2,1,0,-1]
        )
        component_system.add_component(
            'Arginine',
            species=['Arg2+', 'Arg+', 'Arg', 'Arg-'],
            charges=[2,1,0,-1]
        )
        reaction_model = MassActionLaw(component_system, 'complex')
        reaction_model.add_reaction(
            [1, 2, 0], [-1, 1, 1], 10**(-9.2)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )
        reaction_model.add_reaction(
            [3, 4, 0], [-1, 1, 1], 10**(-2.20)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )
        reaction_model.add_reaction(
            [4, 5, 0], [-1, 1, 1], 10**(-8.90)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )
        reaction_model.add_reaction(
            [5, 6, 0], [-1, 1, 1], 10**(-10.28)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )
        reaction_model.add_reaction(
            [7, 8, 0], [-1, 1, 1], 10**(-2.18)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )
        reaction_model.add_reaction(
            [8, 9, 0], [-1, 1, 1], 10**(-9.09)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )
        reaction_model.add_reaction(
            [9, 10, 0], [-1, 1, 1], 10**(-13.2)*1e3,
            is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
        )

        return reaction_model
Exemple #2
0
    def setUp(self):

        component_system = ComponentSystem()
        component_system.add_component('A')
        component_system.add_component('B')

        binding_model = Langmuir(component_system, name='test')

        binding_model.adsorption_rate = [0.02, 0.03]
        binding_model.desorption_rate = [1, 1]
        binding_model.saturation_capacity = [100, 100]

        self.binding_model = binding_model
Exemple #3
0
 def create_simple_bulk_reaction(self, is_kinetic=True, k_fwd_min=100):
     # 0: NH4+(aq) <=> NH3(aq) + H+(aq)
     component_system = ComponentSystem()
     component_system.add_component('H+', charges=[1])
     component_system.add_component(
         'Ammonia', species=['NH4+', 'NH3'], charges=[1,0]
     )
     reaction_model = MassActionLaw(component_system, 'simple')
     reaction_model.add_reaction(
         [1, 2, 0], [-1, 1, 1], 10**(-9.2)*1e3,
         is_kinetic=is_kinetic, k_fwd_min=k_fwd_min
     )
     return reaction_model
Exemple #4
0
    def setUp(self):
        component_system = ComponentSystem()
        component_system.add_component('A')
        component_system.add_component('B')

        self.single_0 = MassActionLaw(component_system, name='simple')
        self.single_0.add_reaction([0, 1], [-1, 1], 2, k_bwd=2)

        self.single_1 = MassActionLaw(component_system, name='simple')
        self.single_1.add_reaction([0, 1], [-1, 1], 1, k_bwd=1)

        component_system = ComponentSystem()
        component_system.add_component('A')
        component_system.add_component('B')
        component_system.add_component('C')
        self.single_2 = MassActionLaw(n_comp=3, name='simple')
        self.single_2.add_reaction([0, 1], [-1, 1], 1, k_bwd=1)

        self.multi = MassActionLaw(n_comp=3, name='simple')
        self.multi.add_reaction([0, 1], [-1, 1], 1, k_bwd=1)
        self.multi.add_reaction([1, 2], [-1, 1], 1, k_bwd=1)

        self.multi = MassActionLaw(n_comp=3, name='simple')
        self.multi.add_reaction([0, 1], [-1, 1], 1, k_bwd=1)
        self.multi.add_reaction([1, 2], [-1, 1], 1, k_bwd=1)

        self.lysine = MassActionLaw(n_comp=5, name='Lysine')
        self.lysine.add_reaction([0, 1, -1], [-1, 1, 1],
                                 10**(-2.20) * 1e3,
                                 is_kinetic=False)
        self.lysine.add_reaction([1, 2, -1], [-1, 1, 1],
                                 10**(-8.90) * 1e3,
                                 is_kinetic=False)
        self.lysine.add_reaction([2, 3, -1], [-1, 1, 1],
                                 10**(-10.28) * 1e3,
                                 is_kinetic=False)
Exemple #5
0
 def setUp(self):
     self.component_system = ComponentSystem()
     self.component_system.add_component(
         'Ammonia', 
         species=['NH4+', 'NH3'],
         charges=[1,0]
     )
     self.component_system.add_component(
         'Lysine', 
         ['Lys2+', 'Lys+', 'Lys', 'Lys'],
         [2,1,0,-1]
     )
     self.component_system.add_component(
         'H+', 
         charges=[1]
     )
     self.component_system.add_component()
Exemple #6
0
tags:
    steric mass action law
    lwe
    single column
    gradient
    
"""
from CADETProcess.processModel import ComponentSystem
from CADETProcess.processModel import StericMassAction
from CADETProcess.processModel import Source, GeneralRateModel, Sink
from CADETProcess.processModel import FlowSheet
from CADETProcess.processModel import Process

# Component System
component_system = ComponentSystem()
component_system.add_component('A')
component_system.add_component('B')

# Binding Model
binding_model = StericMassAction(component_system, name='SMA')
binding_model.is_kinetic = True
binding_model.adsorption_rate = [0.0, 0.3]
binding_model.desorption_rate = [0.0, 1.5]
binding_model.characteristic_charge = [0.0, 7.0]
binding_model.steric_factor = [0.0, 50.0]
binding_model.capacity = 225.0

# Unit Operations
feed = Source(component_system, name='feed')
feed.c = [180.0, 0.1]
Exemple #7
0
    def create_cross_phase_reaction(self):
        component_system = ComponentSystem()
        component_system.add_component(
            'Ammonia', species=['NH4+', 'NH3'], charges=[1,0]
        )
        component_system.add_component(
            'Lysine',
            species=['Lys2+', 'Lys+', 'Lys', 'Lys-'],
            charges=[2,1,0,-1]
        )
        component_system.add_component('H+', charges=[1])

        reaction_model = MassActionLawParticle(component_system, 'complex')

        # Pore Liquid
        # 0: NH4+(aq) <=> NH3(aq) + H+(aq)
        # 1: Lys2+(aq) <=> Lys+(aq) + H+(aq)
        # 2: Lys+(aq) <=> Lys(aq) + H+(aq)
        # 3: Lys(aq) <=> Lys-(aq) + H+(aq)
        reaction_model.add_liquid_reaction(
            [1, 2, 0], [-1, 1, 1], 10**(-9.2)*1e3, is_kinetic=False
        )
        reaction_model.add_liquid_reaction(
            [3, 4, 0], [-1, 1, 1], 10**(-2.20)*1e3, is_kinetic=False
        )
        reaction_model.add_liquid_reaction(
            [4, 5, 0], [-1, 1, 1], 10**(-8.90)*1e3, is_kinetic=False
        )
        reaction_model.add_liquid_reaction(
            [5, 6, 0], [-1, 1, 1], 10**(-10.28)*1e3, is_kinetic=False
        )

        # Adsorption
        k_fwd_min_ads = 100
        # 0: NH4+(aq) + H+(s) <=> NH4+(s) + H+(aq)
        # 1: NH4+(s) <=> NH3(aq) + H+(s)
        reaction_model.add_cross_phase_reaction(
            [1, 0, 1, 0], [-1, -1, 1, 1], [0, 1, 1, 0], 1/1.5,
            k_fwd_min=k_fwd_min_ads
        )
        reaction_model.add_cross_phase_reaction(
            [1, 2, 0], [-1, 1, 1], [1, 0, 1], 1.5, k_fwd_min=k_fwd_min_ads
        )
        # 2: Lys2+(aq) + 2H+(s) <=> Lys2+(s) + 2H+(aq)
        # 3: Lys2+(s) <=> Lys+(aq) + H+(s)
        reaction_model.add_cross_phase_reaction(
            [3, 0, 3, 0], [-1, -2, 1, 2], [0, 1, 1, 0], 1/5,
            k_fwd_min=k_fwd_min_ads
        )
        reaction_model.add_cross_phase_reaction(
            [3, 2, 0], [-1, 1, 1], [1, 0, 1], 5,
            k_fwd_min=k_fwd_min_ads
        )
        # 4: Lys+(aq) + H+(s) <=> Lys+(s) + H+(aq)
        # 5: Lys+(s) <=> Lys(aq) + H+(s)
        reaction_model.add_cross_phase_reaction(
            [4, 0, 4, 0], [-1, -1, 1, 1], [0, 1, 1, 0], 1/0.75,
            k_fwd_min=k_fwd_min_ads
        )
        reaction_model.add_cross_phase_reaction(
            [4, 5, 0], [-1, 1, 1], [1, 0, 1], 0.75,
            k_fwd_min=k_fwd_min_ads
        )

        return reaction_model
Exemple #8
0
 def setUp(self):
     self.component_system = ComponentSystem()
     self.component_system.add_component('A')
     self.component_system.add_component('B')