Пример #1
0
    def create_ssr_flow_sheet(self):
        flow_sheet = FlowSheet(self.component_system)

        feed = Source(self.component_system, name='feed')
        eluent = Source(self.component_system, name='eluent')
        cstr = Cstr(self.component_system, name='cstr')
        column = LumpedRateModelWithoutPores(self.component_system, name='column')
        outlet = Sink(self.component_system, name='outlet')

        flow_sheet.add_unit(feed)
        flow_sheet.add_unit(eluent)
        flow_sheet.add_unit(cstr)
        flow_sheet.add_unit(column)
        flow_sheet.add_unit(outlet)

        flow_sheet.add_connection(feed, cstr)
        flow_sheet.add_connection(cstr, column)
        flow_sheet.add_connection(eluent, column)
        flow_sheet.add_connection(column, cstr)
        flow_sheet.add_connection(column, outlet)

        flow_sheet.add_eluent_source(eluent)
        flow_sheet.add_feed_source(feed)
        flow_sheet.add_chromatogram_sink(outlet)

        return flow_sheet
Пример #2
0
    def create_clr_flow_sheet(self):
        flow_sheet = FlowSheet(n_comp=2, name='test')

        feed = Source(n_comp=2, name='feed')
        column = LumpedRateModelWithoutPores(n_comp=2, name='column')
        outlet = Sink(n_comp=2, name='outlet')

        flow_sheet.add_unit(feed)
        flow_sheet.add_unit(column)
        flow_sheet.add_unit(outlet)

        flow_sheet.add_connection(feed, column)
        flow_sheet.add_connection(column, outlet)
        flow_sheet.add_connection(column, column)

        return flow_sheet
Пример #3
0
from CADETProcess.processModel import Langmuir
from CADETProcess.processModel import Source, Column, Cstr, Sink
from CADETProcess.processModel import FlowSheet
from CADETProcess.processModel import Process

process_name = flow_sheet_name = 'ssr_binary'
case_dir = 'case_3a'

# Binding Model
binding_model = Langmuir(n_comp=2, name='langmuir')
binding_model.adsorption_rate = [0.02, 0.03]
binding_model.desorption_rate = [1, 1]
binding_model.saturation_capacity = [100, 100]

# Unit Operations
feed = Source(n_comp=2, name='feed')
feed.c = [10, 10]

eluent = Source(n_comp=2, name='eluent')
eluent.c = [0, 0]

tank = Cstr(n_comp=2, name='tank')
tank.V = 0.001
tank.c = [10, 10]

column = Column(n_comp=2, name='column')
column.length = 0.6
column.diameter = 0.024
column.axial_dispersion = 2.4e-6
column.total_porosity = 0.7
        return self._outlet_unit


class SerialZone(ZoneBaseClass):
    pass


class ParallelZone(ZoneBaseClass):
    pass


if __name__ == '__main__':
    from CADETProcess.processModel import LumpedRateModelWithoutPores, Source, Sink
    from CADETProcess.processModel import Linear

    feed = Source(n_comp=2, name='feed')
    feed.c = [0.003, 0.003]
    feed.flow_rate = 0.98e-7

    eluent = Source(n_comp=2, name='eluent')
    eluent.c = [0, 0]
    eluent.flow_rate = 1.96e-7

    raffinate = Sink(n_comp=2, name='raffinate')
    extract = Sink(n_comp=2, name='extract')

    column = LumpedRateModelWithoutPores(n_comp=2, name='column')
    column.length = 0.25
    column.cross_section_area = 3.141592653589793E-4
    column.axial_dispersion = 4.7e-7
    column.total_porosity = 0.83
Пример #5
0
# 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]

eluent = Source(component_system, name='eluent')
eluent.c = [70.0, 0.0]

eluent_salt = Source(component_system, name='eluent_salt')
eluent_salt.c = [500.0, 0.0]

column = GeneralRateModel(component_system, name='column')
column.length = 0.25
column.diameter = 0.0115
column.bed_porosity = 0.37
column.particle_radius = 4.5e-5
column.particle_porosity = 0.33
column.axial_dispersion = 2.0e-7
Пример #6
0
def simulate_solid_equilibria(binding_model,
                              buffer,
                              unit_model='cstr',
                              flush=None):
    process_name = flow_sheet_name = 'initial_conditions'
    component_system = binding_model.component_system

    # Unit Operations
    buffer_source = Source(component_system, name='buffer')
    buffer_source.c = buffer

    if flush is None:
        flush = buffer
    flush_source = Source(component_system, 'flush')
    flush_source.c = flush

    if unit_model == 'cstr':
        unit = Cstr(component_system, 'cstr')
        unit.porosity = 0.5
        unit.V = 1e-6

        Q = 1e-6
        cycle_time = 1000 * unit.volume / Q
        unit.flow_rate = Q
    elif unit_model == 'column':
        unit = LumpedRateModelWithoutPores(component_system, name='column')
        unit.length = 0.1
        unit.diameter = 0.01
        unit.axial_dispersion = 1e-6
        unit.total_porosity = 0.7

        Q = 60 / (60 * 1e6)
        cycle_time = 10 * unit.volume / Q

    try:
        q = binding_model.n_comp * binding_model.n_states * [0]
        q[0] = binding_model.capacity
        unit.q = q
    except AttributeError:
        pass

    unit.binding_model = binding_model

    outlet = Sink(component_system, name='outlet')

    # flow sheet
    fs = FlowSheet(component_system, name=flow_sheet_name)

    fs.add_unit(buffer_source)
    fs.add_unit(flush_source)
    fs.add_unit(unit)
    fs.add_unit(outlet, chromatogram_sink=True)

    fs.add_connection(buffer_source, unit)
    fs.add_connection(flush_source, unit)
    fs.add_connection(unit, outlet)

    # Process
    proc = Process(fs, name=process_name)

    proc.cycle_time = cycle_time

    ## Create Events and Durations
    proc.add_event('buffer_on', 'flow_sheet.buffer.flow_rate', Q)
    proc.add_event('buffer_off', 'flow_sheet.buffer.flow_rate', 0,
                   0.9 * cycle_time)

    proc.add_event('eluent_off', 'flow_sheet.flush.flow_rate', 0.0, 0.0)
    proc.add_event('eluent_on', 'flow_sheet.flush.flow_rate', Q,
                   0.9 * cycle_time)

    # Simulator
    process_simulator = Cadet()
    process_simulator.unit_return_parameters.write_solution_bulk = True
    process_simulator.unit_return_parameters.write_solution_solid = True

    proc_results = process_simulator.simulate(proc)

    if unit_model == 'cstr':
        init_q = proc_results.solution[unit.name].solid.solution[-1, :]
    elif unit_model == 'column':
        init_q = proc_results.solution[unit.name].solid.solution[-1, 0, :]

    return init_q.tolist()
Пример #7
0
from CADETProcess.processModel import Process

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

# Binding Model
binding_model = Langmuir(component_system, name='langmuir')
binding_model.is_kinetic = False
binding_model.adsorption_rate = [0.02, 0.03]
binding_model.desorption_rate = [1, 1]
binding_model.saturation_capacity = [100, 100]

# Unit Operations
feed = Source(component_system, name='feed')
feed.c = [10, 10]

eluent = Source(component_system, name='eluent')
eluent.c = [0, 0]

column = LumpedRateModelWithoutPores(component_system, name='column')
column.length = 0.6
column.diameter = 0.024
column.axial_dispersion = 4.7e-7
column.total_porosity = 0.7
column.binding_model = binding_model

outlet = Sink(component_system, name='outlet')

# flow sheet
Пример #8
0
    def create_source(self):
        source = Source(self.component_system, name='test')

        return source
Пример #9
0
from CADETProcess.processModel import Langmuir
from CADETProcess.processModel import Source, Column, Sink
from CADETProcess.processModel import FlowSheet
from CADETProcess.processModel import Process

process_name = flow_sheet_name = 'serial_ternary'
case_dir = 'case_4'

# Binding Model
binding_model = Langmuir(n_comp=3, name='langmuir')
binding_model.adsorption_rate = [0.01, 0.015, 0.03]
binding_model.desorption_rate = [1, 1, 1]
binding_model.saturation_capacity = [100, 100, 200]

# Unit Operations
feed = Source(n_comp=3, name='feed')
feed.c = [10, 10, 10]

eluent_1 = Source(n_comp=3, name='eluent_1')
eluent_1.c = [0, 0, 0]

eluent_2 = Source(n_comp=3, name='eluent_2')
eluent_2.c = [0, 0, 0]

column_1 = Column(n_comp=3, name='column_1')
column_1.length = 0.286
column_1.diameter = 0.024
column_1.axial_dispersion = 4.7e-7
column_1.total_porosity = 0.7

column_1.binding_model = binding_model