Skip to content

Commit

Permalink
Fix chromatography system settings
Browse files Browse the repository at this point in the history
This commit fixes some model settings as well as the refinement unit ID
for the cyclic setting
  • Loading branch information
jbreue16 committed Jan 15, 2025
1 parent e4bc42b commit 5bf74e2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions src/test_cadet_core/2025_frandsen_et_al_continuousChrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def json_to_csv(json_file, csv_file, subgroup_path, ignore_data):
# ignore_data not required since desired columns can be picked in latex
ignore_data = []#['$N_d$', 'Min. value', 'DoF', 'Bulk DoF']

json_file = str(output_path) + r"/convergence_acyclicSystem1_LRM_linBnd_1comp.json" # Input JSON file
csv_file = str(output_path) + r"/convergence_acyclicSystem1_LRM_linBnd_1comp.csv" # Output CSV file
json_file = str(output_path) + r"/convergence_acyclicSystem1_LRMP_linBnd_1comp.json" # Input JSON file
csv_file = str(output_path) + r"/convergence_acyclicSystem1_LRMP_linBnd_1comp.csv" # Output CSV file
json_to_csv(json_file, csv_file, subgroup_path, ignore_data)

subgroup_path = ['convergence', 'DG_P2', 'outlet'] # Path to the subgroup in the JSON file
json_file = str(output_path) + r"/convergence_cyclicSystem1_LRM_linBnd_1comp.json" # Input JSON file
csv_file = str(output_path) + r"/convergence_cyclicSystem1_LRM_linBnd_1comp.csv" # Output CSV file
json_file = str(output_path) + r"/convergence_cyclicSystem1_LRMP_linBnd_1comp.json" # Input JSON file
csv_file = str(output_path) + r"/convergence_cyclicSystem1_LRMP_linBnd_1comp.csv" # Output CSV file
json_to_csv(json_file, csv_file, subgroup_path, ignore_data)


Expand Down
12 changes: 6 additions & 6 deletions src/test_cadet_core/chrom_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def chromatography_systems_tests(n_jobs, database_path, small_test,

if analytical_reference:
ref = convergence.get_solution(
reference_data_path+'/ref_cyclicSystem1_LRM_linBnd_1comp.h5', unit='unit_'+unit_IDs[0])
reference_data_path+'/ref_cyclicSystem1_LRMP_linBnd_1comp.h5', unit='unit_'+unit_IDs[0])
ref_files = [[ref]]

config_names = ['cyclicSystem1_LRM_linBnd_1comp']
config_names = ['cyclicSystem1_LRMP_linBnd_1comp']

# %% run convergence analysis

Expand All @@ -81,7 +81,7 @@ def chromatography_systems_tests(n_jobs, database_path, small_test,
idas_abstol=idas_abstol,
n_jobs=n_jobs,
rerun_sims=True,
system_refinement_IDs=['002', '003'],
system_refinement_IDs=['001', '002'],
analytical_reference=analytical_reference
)

Expand Down Expand Up @@ -114,13 +114,13 @@ def chromatography_systems_tests(n_jobs, database_path, small_test,
# we compare the simulated outlet of unit 006 with the analytical
# solution of the combined outlets of unit 004 and 005
ref = convergence.get_solution(
reference_data_path+'/ref_acyclicSystem1_LRM_linBnd_1comp.h5', unit='unit_004')
reference_data_path+'/ref_acyclicSystem1_LRMP_linBnd_1comp.h5', unit='unit_004')
ref = 0.5 * ref + 0.5 * convergence.get_solution(
reference_data_path+'/ref_acyclicSystem1_LRM_linBnd_1comp.h5', unit='unit_005')
reference_data_path+'/ref_acyclicSystem1_LRMP_linBnd_1comp.h5', unit='unit_005')

ref_files = [[ref]]

config_names = ['acyclicSystem1_LRM_linBnd_1comp']
config_names = ['acyclicSystem1_LRMP_linBnd_1comp']

# %% run convergence analysis

Expand Down
14 changes: 6 additions & 8 deletions src/test_cadet_core/settings_columnSystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def Cyclic_model1(nelem, polydeg, exactInt, analytical_reference=False):
Cyclic_model.root.input.model.unit_001.par_porosity = 0.75
Cyclic_model.root.input.model.unit_001.col_dispersion = 2e-7
Cyclic_model.root.input.model.unit_001.col_length = 1.4e-2
# From Lubke2007, is not important
Cyclic_model.root.input.model.unit_001.cross_section_area = 1
Cyclic_model.root.input.model.unit_001.film_diffusion = 6.9e-6
Cyclic_model.root.input.model.unit_001.par_radius = 45e-6
Expand Down Expand Up @@ -97,10 +96,10 @@ def Cyclic_model1(nelem, polydeg, exactInt, analytical_reference=False):
Cyclic_model.root.input.model.unit_001)

# Unit LRMP2
Cyclic_model.root.input.model.unit_003.adsorption.is_kinetic = False # Kinetic binding
Cyclic_model.root.input.model.unit_003.adsorption.LIN_KA = [
Cyclic_model.root.input.model.unit_002.adsorption.is_kinetic = False # Kinetic binding
Cyclic_model.root.input.model.unit_002.adsorption.LIN_KA = [
35.5] # m^3 / (mol * s) (mobile phase)
Cyclic_model.root.input.model.unit_003.adsorption.LIN_KD = [
Cyclic_model.root.input.model.unit_002.adsorption.LIN_KD = [
1] # 1 / s (desorption)

# To write out last output to check for steady state
Expand Down Expand Up @@ -206,7 +205,6 @@ def Acyclic_model1(nelem, polydeg, exactInt, analytical_reference=False):
Acyclic_model.root.input.model.unit_002.par_porosity = 0.75
Acyclic_model.root.input.model.unit_002.col_dispersion = 2e-7
Acyclic_model.root.input.model.unit_002.col_length = 1.4e-2
# From Lubke2007, is not important
Acyclic_model.root.input.model.unit_002.cross_section_area = 1
Acyclic_model.root.input.model.unit_002.film_diffusion = 6.9e-6
Acyclic_model.root.input.model.unit_002.par_radius = 45e-6
Expand Down Expand Up @@ -272,9 +270,9 @@ def Acyclic_model1(nelem, polydeg, exactInt, analytical_reference=False):
1] # 1 / s (desorption)

# Unit LRMP6
Acyclic_model.root.input.model.unit_004.adsorption.LIN_KA = [
Acyclic_model.root.input.model.unit_005.adsorption.LIN_KA = [
4.55] # m^3 / (mol * s) (mobile phase)
Acyclic_model.root.input.model.unit_004.adsorption.LIN_KD = [
Acyclic_model.root.input.model.unit_005.adsorption.LIN_KD = [
0.12] # 1 / s (desorption)

# To write out last output to check for steady state
Expand All @@ -290,7 +288,7 @@ def Acyclic_model1(nelem, polydeg, exactInt, analytical_reference=False):
Acyclic_model.root.input.model.unit_000.sec_000.const_coeff = [
1] # Inlet flowrate concentration
Acyclic_model.root.input.model.unit_001.sec_000.const_coeff = [
0] # Desorbent stream
1] # Desorbent stream

Acyclic_model.root.input.model.unit_000.sec_001.const_coeff = [
0] # Inlet flowrate concentration
Expand Down

0 comments on commit 5bf74e2

Please sign in to comment.