- #351
- 23,019
- 5,552
No. The k correlation.casualguitar said:But yes, what did you mean by 'our mass transfer parameterization' if not this equation: ##M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}##
No. The k correlation.casualguitar said:But yes, what did you mean by 'our mass transfer parameterization' if not this equation: ##M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}##
Uncertain about the units for ##k_i## and ##D_{ab}## (mass diffusion coefficient) -Chestermiller said:No. The k correlation.
You keep flip-flopping between k having units of m/s and having units of moles/m^2.sec. If you are using m/s, leave out the ##\rho_m\ (=\frac{P}{RT_I})## in the above equation. Otherwise, keep it. I also think there should be a factor of ##(1-\epsilon)## in the above equation. Your equation for molar flux seems to use k is in m/s. Is that your understanding?casualguitar said:Uncertain about the units for ##k_i## and ##D_{ab}## (mass diffusion coefficient) -
So the correlation I've currently got for ##k_i## is:
$$k_i = (2.19Re^{1/3} + 0.78Re^{0.619})Sc^{1/3}D_{ab}\rho_m/d_p$$
You need to get the units issue resolved.casualguitar said:The the units of ##D_{ab}## are ##m^2/s## from the correlation above. BSL provides these ##D_{ab}## values in ##m^2/s## also. The units of ##k_i## are therefore ##mol/m^2.s## then. There is probably some unit issue here somewhere because the molar deposition rate is also mol/m2.s. Can the units of ##k_i## be the same as the units of ##M_i''##?
That is my understanding yes. I had some issues getting the non constant ##k_i## model to converge however it does converge now. The output below is for n=5. Adding in non constant ##k_i## seems to increase the runtime of the model by quite a bit for some reason. So I'll run n=30 in a bit (currently on the way home) and see how long it takes. Anyway here's the n=5 output:Chestermiller said:You keep flip-flopping between k having units of m/s and having units of moles/m^2.sec. If you are using m/s, leave out the ##\rho_m\ (=\frac{P}{RT_I})## in the above equation. Otherwise, keep it. I also think there should be a factor of ##(1-\epsilon)## in the above equation. Your equation for molar flux seems to use k is in m/s. Is that your understanding?
You need to get the units issue resolved.
n = 10 with non-constant ##k_i##:casualguitar said:That is my understanding yes. I had some issues getting the non constant ##k_i## model to converge however it does converge now. The output below is for n=5. Adding in non constant ##k_i## seems to increase the runtime of the model by quite a bit for some reason. So I'll run n=30 in a bit (currently on the way home) and see how long it takes. Anyway here's the n=5 output:
View attachment 312935
View attachment 312936
I don't like how the MCO2 plot looks (the peaks should increase in size over time), so I'll look into that. But yes first I'll run n=30
What implicit integrator are you using? What is the structure of the Jacobian matrix, and do you take advantage of this in the matrix inversion chosen option>casualguitar said:n = 10 with non-constant ##k_i##:View attachment 312987
View attachment 312988
No such luck getting n=30 to converge. It seems to get stuck around 180K. I'm not sure what extra difficulty would be caused be n=30 that is not present in n=10 besides maybe some convergence issues. Looking into it. I'm leaving the simulation running just on the off chance it does actually converge after long times
The LSODA integrator (from the solve_ivp package). I have seen mentions of the Jacobian matrix in the documentation so I'll take a look at thisChestermiller said:What implicit integrator are you using? What is the structure of the Jacobian matrix, and do you take advantage of this in the matrix inversion chosen option>
Hi Chet, I looked into the Jacobian matrix question and if I understand the question the structure of the Jacobian matrix is just a rectangle of shape [n,6], where n is the number of spatial positions and 6 is the number of ODEs we have. Does this answer the question?casualguitar said:The LSODA integrator (from the solve_ivp package). I have seen mentions of the Jacobian matrix in the documentation so I'll take a look at this
Hi Chet,Chestermiller said:What implicit integrator are you using? What is the structure of the Jacobian matrix, and do you take advantage of this in the matrix inversion chosen option>
This looks like a major improvement. Is the only difference the equation used to calculate the Re? It doesn't seem possible.casualguitar said:Hi Chet,
As mentioned, here is the model output for the new Reynolds Number formulation:
We're now getting a clear constant temperature zone around the sublimation point of CO2, similar to the Tuinier model:
View attachment 313411
The mass buildup looks odd here in that the maximum buildup amount at a position seems to be constant, and also the value (approx 100) is about double the Tuinier value. Looking into this
View attachment 313412
Yep you're right its not possible. I was mistakenly using the inlet molar flow to calculate the non-boundary position Reynolds Numbers. In switching to your new Re formulation I noticed that mistakeChestermiller said:This looks like a major improvement. Is the only difference the equation used to calculate the Re? It doesn't seem possible.
No. See their Fig. 3.casualguitar said:Yep you're right its not possible. I was mistakenly using the inlet molar flow to calculate the non-boundary position Reynolds Numbers. In switching to your new Re formulation I noticed that mistake
The CO2 mass buildup trend is correct in that the plug of CO2 increases in 'width' over time. Is that actually an issue that it seems to stay at a constant 100kg/m3?
That is the equation for ##a_s##, the particle surface per unit volume of column. ##A_s## is the particle surface per tank. $$A_s=A_c\Delta z a_s=\frac{6}{d_p}(1-\epsilon)A_c\Delta z$$casualguitar said:In checking the area values I've got one point of confusion. What is the difference between ##A_s## and ##a_s##? ##A_s## seems to be the particle surface area per unit volume: $$A_s = \frac{6}{d_p}(1-\epsilon)$$
Correct.casualguitar said:In regards to where each are used, it seems that ##A_s## will be used everywhere here, so we don't seem to have a need for ##a_s##?
Ah whoops yes I agree with the above, and I am using the correct ##A_s## value. Typo by me. Ok then its possibly time to add in the last few small bits (non constant heat capacity, non constant viscosity, etc)? I have the functions written for all of those. I don't think it will change the output much though. A reasonable next (final?) step?Chestermiller said:No. See their Fig. 3.
That is the equation for ##a_s##, the particle surface per unit volume of column. ##A_s## is the particle surface per tank. $$A_s=A_c\Delta z a_s=\frac{6}{d_p}(1-\epsilon)A_c\Delta z$$
GreatChestermiller said:Correct.
You need to again confirm that the overall CO2 mass balance is satisfied. I'm also wondering why we get a peak of 100, and they get a peak of 60. Try 15 tanks to see whether the added axial dispersion spreads the deposited CO2 out over a broader region.casualguitar said:Ah whoops yes I agree with the above, and I am using the correct ##A_s## value. Typo by me. Ok then its possibly time to add in the last few small bits (non constant heat capacity, non constant viscosity, etc)? I have the functions written for all of those. I don't think it will change the output much though. A reasonable next (final?) step?
Great
EDIT: Oh and I'll make that change you mentioned about including the mass flow rate derivative as an integrated variable
So now that the model is effectively ready to be used (you might disagree with that), I think it would be useful to run a number of simulations to show how some performance parameters vary with initial and boundary conditions (ICs/BCs), such as separation efficiency or CO2 captured per unit of refrigeration. Do you think it is worthwhile to do this kind of 'factorial analysis'?
Seems to fail at around 330K. There isn't any phase change happening around there so I'm not sure why that happens. Looking into itChestermiller said:Try 15 tanks to see whether the added axial dispersion spreads the deposited CO2 out over a broader region.
Hi Chet! I've returned to the CO2 model and was hoping to discuss it with someone. You're the person that I've had the most discussion with on this so I was hoping I could continue this for a short while if thats ok with you! The simulation has progressed since our last discussion but there are some parts that I am unsure about. I just have some questions I'd like to discuss with someone. If this is ok with you, I can bring you up to speed on thisChestermiller said:15 tanks should run more easily than 30 tanks. Sounds like a variable dimensioning/storage issue.
I'll do my best to answer your questions, but my memory of this work is fading.casualguitar said:Hi Chet! I've returned to the CO2 model and was hoping to discuss it with someone. You're the person that I've had the most discussion with on this so I was hoping I could continue this for a short while if thats ok with you! The simulation has progressed since our last discussion but there are some parts that I am unsure about. I just have some questions I'd like to discuss with someone. If this is ok with you, I can bring you up to speed on this
What do the results look like if you run the model with the mass transfer coefficient set to zero?casualguitar said:The output looks like this -
The output looks like this, for n = 200:
View attachment 326119
View attachment 326120
View attachment 326121
I wanted to incude this last plot showing every position (all 200) and how they behave over time. Clearly the CO2 mole fraction output isnt right. The other plots dont actually look too bad though.
View attachment 326116
In regards to the position vs temperature plots higher up, there doesnt seem to be any constant temperature zone which is present in Tuinier et al.
I apologise for the information dump but yes I would just like to open up dialogue here again as I found it hugely beneficial last time to have someone to have a back and forth with.
Is the above information sufficient or should I provide further info on this?
EDIT: One point I forgot to mention - in the gas/bed temperature vs position plots, I have printed time values. You can see that the temperature profile acually stops changing after a while and this is before the entirety of the bed has reached the inlet gas temperature
Hi Chet, setting ki_CO2 = 0 and letting n=200 results in these plots:Chestermiller said:What do the results look like if you run the model with the mass transfer coefficient set to zero?
Why does the CO2 mole fraction rise so rapidly? What is the gas residence time in the bed?casualguitar said:Hi Chet, setting ki_CO2 = 0 and letting n=200 results in these plots:
View attachment 326147
View attachment 326148
View attachment 326149
View attachment 326150
The co2 mole fraction rises to 0.2 which is the inlet mole fraction, so this looks ok. There is no CO2 buildup on the bed as expected. The temperature profiles also generally look ok although there is no constant temeprature zone.
For reference, the h_desublimation_CO2 is set to 26,000 J/mol currently. Just now I tried setting it to 0 and 200,000, neither of which changed the temperature profiles appreciably
I think due to the high flow. The inlet total molar flow for that plot was 0.002mol/s.Chestermiller said:Why does the CO2 mole fraction rise so rapidly? What is the gas residence time in the bed?
No it doesn't allow for it. Right now the value can go below zero and does. Originally I had a conditional statement in the integrator that said "if the amount of CO2 in the bed goes below zero, set it to zero". Then I moved this statement to post-processing, so now I'm just plotting the CO2 deposition values that are above zero, but the solution from the integrator does contain negative values. Are either of these approaches ok, or should we somehow allow for it directly in the mass balance equation?Chestermiller said:There's something wrong with how the release of the CO2 from the bed is handled. If there is a driving force for removal but there is no CO2 left on the bed, the flow of CO2 from the bed to the gas has to be zero. That means that the mass balance equation for the CO2 in the gas has to allow for this. Is it?
Yes. Here is the output when this is imposed:Chestermiller said:Is ##A_s## the bed surface area (m^2) per tank and ##M_I## the moles of CO2 deposited per tank? If so, pleases try to impose the following: If ##M_i<0.1 A_s## and ##M_{i}^"\leq 0##, reset ##M_i^"## to zero. This applies to the realistic flow rates.
Where ##A_s =A_c\Delta z a_s=\frac{6}{d_p}(1-\epsilon)A_c\Delta z = 0.0032m^2##, the molar flow is 0.002mol/s and k_i = 5 * 10 ** -4 mol/m2.s:##M_i<0.1 A_s## and ##M_{i}^"\leq 0##, reset ##M_i^"## to zero
Yes. Do you think 0.1 is too large. Why didn't you run the calculation for a realistic molar flow rate?casualguitar said:Yes. Here is the output when this is imposed:
Where ##A_s =A_c\Delta z a_s=\frac{6}{d_p}(1-\epsilon)A_c\Delta z = 0.0032m^2##, the molar flow is 0.002mol/s and k_i = 5 * 10 ** -4 mol/m2.s:
View attachment 326285
View attachment 326286
View attachment 326287
View attachment 326289
View attachment 326290
Is the reason for the ##0.1A_s## constraint so that we dont run into any case where ##M_i## <0? In a case where ##M_i''## is large this may occur
No I think 0.1 is ok. Ah I was using a molar flow rate that fit the mass transfer coefficient. These two values affect the output quite a lot so if I change the molar flow I also need to adjust the mass transfer coefficient to get reasonable looking output.Chestermiller said:Yes. Do you think 0.1 is too large. Why didn't you run the calculation for a realistic molar flow rate?
What are your thoughts on whether the new plots were closer to your expectations?