Protein at inlet not showing up at outlet

Hi all,

I am having a strange issue where a nonzero inlet profile for several protein components results in an outlet profile with protein concentration of zero. I am using the piecewise cubic polynomial (necessary for this problem) to obtain the inlet profile from a preconditioned input profile, including salt and pH—both of which show up in the result. In the past I have had a number of issues stemming from using the piecewise cubic polynomial, so I figure that it might have something to do with this. I have tried changing the tolerances but this did not help. I thought this might have something to do with the piecewise cubic polynomial assuming continuous section transitions at each time point, so I tried to run the simulation with discontinuous transitions but kept getting convergence errors.

I have attached the h5 file corresponding to this simulation (google drive link). Any help with getting this to work would be very much appreciated—I need to have this working urgently.

Side note: when I change the ionic capacity in similar simulations, it changes whether or not the protein shows up at the outlet. I have no clue why this is the case. This is obviously not a viable solution because I need to use a specific value.

Thanks in advance,

Hi Scott,

I guess you are using MS Windows system? I ran your .h5 file and I think there might be a solution to this problem. Please try this:

  1. open your visual studio (2017 or higher) command prompt
  2. run command editbin.exe /STACK:10000000 location_of_your_cadet_cli.exe

then you can run the simulations now.

If it solves your problem then the problem is the stack overflow. Storing the inlet profiles took too much memory (around 6.9 G) and exceeded the default stack size. This problem only happens to MS Windows but not to other OS. The command simply changes the upper bound of the stack size of the cadet_cli.exe. (Btw, most of the runtime (around 90%) of your simulation is consumed on setting up the inlet profiles.)

Update: this is not the problem that is causing this issue.


1 Like

Yes I am using windows OS. And this is interesting… I have never heard of this before. I opened up visual studio command prompt and ran the command you mentioned. When you mean run the simulation, does it have to be from the h5 file or can I continue to use MATLAB to run it? I did try in MATLAB but I am still having the same issue unfortunately.

Yes, you should be able to call cadet_cli.exe in MATLAB to run the simulations, but since it’s not working it might not be the problem. To further troubleshoot the problem, I’d suggest posting your MATLAB code (Python code is preferred) here or send it to me privately.

Unfortunately it needs to be MATLAB because I run a DAE solver (ode15s) to first get the pH and salt profiles. That could be redone in python but I’m not familiar enough with it yet to do that, but its something I could do down the line.

I have attached the MATLAB code if you still have some time to help.

I really appreciate it!
ScaleUp_LWE_CADET_Forum.m (32.0 KB)

Okay this is somewhat strange. Actually the problem is not the stack overflow, I was able to run the .h5 file using a cadet_cli.exe that has its default stack size. However, I was getting the problem you mentioned:

The following picture is the output of UNIT_000 which has an “inlet” type. It tells me that the several proteins you mentioned did not even enter the inlet. This is probably why it did not show up at the outlet of UNIT_002.

I think there might be something wrong with the input profile. Can you double check if the solution of your ode15s is correct? Or if it is properly inputted into UNIT_000? If nothing goes into UNIT_000 then nothing would come out from UNIT_002 in this case. Another thing that I noticed is:

Can you also explain what are COMP_000 to COMP_006? The second component (COMP_001) has a strangely negative concentration (at the outlet of UNIT_000). Is this really negative or this is some kind of mistake. Usually CADET does not deal with negative concentrations which could be another source of the problem.

1 Like

The input profile is correct. I am fairly confident that it is being correctly inputted into CADET, when I check the terms in mIn you can clearly see that all the components are present. It is odd that the salt and pH components go in but the proteins do not and I do not understand why or how this would even happen.

Basically this script is first simulating the effect of the mixer and tubing on the salt and the five protein components. The salt profile from here is used to simulate the induced pH gradient that occurs due to the salt displacing H+ ions from the weakly charged ligand (see Pabst and Carta 2007 for a description on this phenomena). The result is a salt profile with increased curvature in the uptake due to the titration equilibria as well as the outlet pH profile—with a characteristic crash downwards, followed by a slow increase to its equilibrium value (the actual pH of the elution buffer).

The identity of the components are: NaCl (COMP000), pH (COMP001), protein 1 (COMP002), protein 2 (COMP003), protein 3 (COMP004), protein 4 (COMP005), and protein 5 (COMP006).

The reason why the pH values are negative is because I use a reference pH to scale the isotherm parameters Keq1 and nu1 in the GIEX model, namely pH = pH(actual) - pH(reference), where pH(reference) is 5.5. I have used these negative values in CADET in many of these kinds of simulations without issue, so I can confirm that it does work—at least sometimes.

I am unsure how it can be that the proteins don’t enter the inlet. What could be going on in CADET that would even lead to this happening?

On a very weird note: I ran a similar simulation, same column but different elution conditions, which was working—until I changed the value of ionic capacity by 10%. No idea what to make of that :laughing:

en… strange, conc. of COMP_001 to COMP_006 at the UNIT_000 (inlet) outlet apparently are just some noises:

To further troubleshoot, I’d suggest in your simulations, just drop UNIT_001 and UNIT_002, leaving the inlet UNIT_000 alone, run the simulation and plot the profiles at the outlet of UNIT_000 along with the raw output of the ode15s results. If everything is correct, we should see a perfect overlap between the simulation results of CADET and the ode15s results.

I can try that, but what do you do with the connections matrix when there is only one unit?

Actually you can just plot model.root.output.solution.unit_000.solution_outlet_comp_00X if dropping other units is annoying. Note the change is unit_000 not unit_002.