Modelling of two phase flow in packed bed (continued)

427 replies · 36K views · last reply
Chestermiller said:
We are looking at the overall mass balance of CO2 in the column, not the instantaneous amounts entering and leaving.
Yes I was also looking at the overall mass balance. However from the plot earlier (where the total CO2 out was greater than the total CO2 in) it seems that it isn't working. Therefore I moved to the instantaneous balance to search for bugs. There is definitely a bug in the instantaneous mass balance and this may be causing the bug in the overall mass balance

In the post above I was looking for the bug in the ##\dot{m}## equation (i.e. why is the outlet flow greater than the inlet flow) in the hope that fixing this would fix the overall mass balance bug. Is this a reasonable approach?
 
casualguitar said:
Yes I was also looking at the overall mass balance. However from the plot earlier (where the total CO2 out was greater than the total CO2 in) it seems that it isn't working. Therefore I moved to the instantaneous balance to search for bugs. There is definitely a bug in the instantaneous mass balance and this may be causing the bug in the overall mass balance

In the post above I was looking for the bug in the ##\dot{m}## equation (i.e. why is the outlet flow greater than the inlet flow) in the hope that fixing this would fix the overall mass balance bug. Is this a reasonable approach?
Don't forget to take into account the number of moles of N2 that was in the column to begin with.
 
Chestermiller said:
Don't forget to take into account the number of moles of N2 that was in the column to begin with.
Ah so to account for initial N2 I've calculated the molar holdup of gas in the column initially (##m_j##), is there somewhere else I should account for the initial N2?

What I also did this morning for this model was switch to average ##C_p## in the gas phase heat balance rather than just using ##C_{p,N2}##
 
casualguitar said:
Ah so to account for initial N2 I've calculated the molar holdup of gas in the column initially (##m_j##), is there somewhere else I should account for the initial N2?
This only has to be done if you are looking at the cumulative in- and out flows, not the instantaneous values.
casualguitar said:
What I also did this morning for this model was switch to average ##C_p## in the gas phase heat balance rather than just using ##C_{p,N2}##
This should not have a major effect.
 
Chestermiller said:
This only has to be done if you are looking at the cumulative in- and out flows, not the instantaneous values.

This should not have a major effect.
I think I've narrowed it down to an error with the MDR/MLR functions (molar desublimation/liquefaction rates) i.e. this equation: $$M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}$$

Reason being is the follows - when I set the mass transfer rate equal to zero (##k_i## = 0 for CO2 and h2o), everything works:
- the mole balance works (see below moles in > moles out):
Screenshot 2022-08-12 at 11.17.38.png

The CO2 mole fraction equation works (see below it levels out at 0.2, whereas with mass transfer turned on it levels out at 0.35 which is impossible since the inlet mole fraction is 0.2):
Line plot of CO2 gas phase mole fraction against time from 0 to about 8000; the curve jumps from 0 to 0.200 almost immediately and stays flat at 0.200 thereafter.


Lastly the temperature profiles work (see below the temperature levelling out at the inlet gas temperature, rather than some temperature below this):
Line plot of simulation gas temperature against time from 0 to 8000: three curves rise from about 125 to a plateau near 373, the blue curve fastest, then orange, then green.


No other update besides this. I'll investigate the MDR/MLR functions and see what's going on
 
casualguitar said:
No other update besides this. I'll investigate the MDR/MLR functions and see what's going on
In regards to calculating the sublimation pressure - I've got a correlation from Perrys working currently. One question on this - what happens to the sublimation pressure above the triple point? Currently I have something like this:

if temp < triple point temp:
-> use the correlation to calculate sublimation pressure
else:
-> return a very large number for the sublimation pressure

Do we have a sublimation rate associated with temperatures above the triple point temperature or is it 'infinitely fast'?
 
casualguitar said:
I think I've narrowed it down to an error with the MDR/MLR functions (molar desublimation/liquefaction rates) i.e. this equation: $$M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}$$

Reason being is the follows - when I set the mass transfer rate equal to zero (##k_i## = 0 for CO2 and h2o), everything works:
- the mole balance works (see below moles in > moles out):
View attachment 312602
At long times, why doesn't the CO2 gas holdup plus the total CO2 out equal the total CO2 in?
 
casualguitar said:
In regards to calculating the sublimation pressure - I've got a correlation from Perrys working currently. One question on this - what happens to the sublimation pressure above the triple point? Currently I have something like this:

if temp < triple point temp:
-> use the correlation to calculate sublimation pressure
else:
-> return a very large number for the sublimation pressure

Do we have a sublimation rate associated with temperatures above the triple point temperature or is it 'infinitely fast'?
Above the triple point, you use the equilibrium vapor pressure of the liquid. This is very close to the equilibrium vapor pressure for sublimation, so you can use that too. We are not allowing for the CO2 deposited to become liquid.
 
Chestermiller said:
Above the triple point, you use the equilibrium vapor pressure of the liquid. This is very close to the equilibrium vapor pressure for sublimation, so you can use that too. We are not allowing for the CO2 deposited to become liquid.
The vapour pressure curve for CO2 is included now. If the mass transfer is turned way down (k_i = 8x10^-10), then the plots look fine
The temperature levels out at the expected temperature:
Line graph of simulation gas temperature against time for three curves labelled n=0, n=1 and n=2; each rises from about 125 to a plateau near 375 by roughly t=4000, with n=0 rising fastest.

The molar desublimation rate of CO2 looks fine:
Line graph of MDR CO2 against time from 0 to about 2100 for three curves labelled n=0, n=1 and n=2; each curve stays near zero then falls steadily, reaching lower values for n=0 at about -0.0000072 by the end.

The rise and fall of the solid CO2 deposited on the bed looks good (the sublimation is rapid and not like previous plots where the sublimation was much slower than the desublimation):
Line plot of co2 solid phase total molar deposition against time from 0 to 8000, with four coloured curves that rise from zero, peak and then drop back to zero by about time 1100. The peaks are roughly 0.5e-7, 2.5e-7, 5e-7 and 8e-7, with the tallest and latest curve in red.

Lastly, the mole fraction of CO2 levels out at the correct value of 0.2:
Line plot of co2 gas phase mole fraction against time from 0 to 8000: the curve jumps almost vertically from 0.000 to a flat plateau at 0.200 near t=0 and stays there.


However when the mass transfer is turned up (k_i = 8*10^-4) these trends no longer work:
Temperature levels out at a low value:
Line plot of simulation gas temperature against time from 0 to 8000: three curves rise rapidly from about 123 and level off, the top blue curve near 192, the orange near 183 and the green near 182.


The sublimation is much slower than the desublimation:
Line plot of co2 solid phase total molar deposition against time from 0 to 8000, with four curves rising sharply to peaks then falling or levelling off at different rates.

And lastly the CO2 mole fraction levels out at an impossible value:
Line graph of co2 gas phase mole fraction against time from 0 to 8000; three coloured curves rise sharply from near 0.05 to about 0.34 and level off after roughly 500 time units, with one blue curve plateauing slightly lower near 0.335.


It seems odd to me that there is a 'cut off' k_i value where the trends are no longer right, because k_i doesn't change the sign of MDR/MLR (molar desublimation/liquefaction rates), just the magnitude.

There is a fault in my MDR/MLR logic which potentially causes large molar flow rates at the inlet. Close to t=0, the y_CO2 value is so low that the MDR is actually negative. Could I add in some correction to say that if the y_CO2 value is extremely low then assume MDR = 0, or similar?
 
So initially, the MDR value is very slightly below zero (doesn't look like it below but it is if I zoom in). This negative value actually causes ##\dot{m}_j## to be much higher than ##\dot{m}_{j-1}##, and this molar flow then propagates through the bed
Line plot of MDR CO2 against time for n=0, n=1 and n=2. All three curves start near 0.00 to 0.01, the n=0 curve falling steeply to about -0.0235, while n=1 and n=2 peak near 0.012 then settle slightly below and at zero.
 
casualguitar said:
I think I've narrowed it down to an error with the MDR/MLR functions (molar desublimation/liquefaction rates) i.e. this equation: $$M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}$$

Reason being is the follows - when I set the mass transfer rate equal to zero (##k_i## = 0 for CO2 and h2o), everything works:
- the mole balance works (see below moles in > moles out):
View attachment 312602
The CO2 mole fraction equation works (see below it levels out at 0.2, whereas with mass transfer turned on it levels out at 0.35 which is impossible since the inlet mole fraction is 0.2):
I calculate a final total CO2 gas holdup of 0.0006 moles, which is roughly half the value on this graph.
 
Chestermiller said:
I calculate a final total CO2 gas holdup of 0.0006 moles, which is roughly half the value on this graph.
Exactly yes the reason its half the value is because the temperature profile (with mass transfer turned on) is the following (below), where the temperature levels out at a value approximately half of the correct value (shown further below):
Line plot of simulation gas temperature against time from 0 to 8000, with three curves rising from about 123 to a plateau: blue near 192, orange near 183, green near 182.

Line plot of simulation gas temperature against time from 0 to 8000 for three curves that rise from about 125 to a plateau near 375, with the blue curve reaching it fastest and the green slowest.


However to get the correct profile above I have to turn off mass transfer, meaning that the issue is definitely related to the mass transfer.

Looking at the desublimation rate at short time, I see that it is actually negative initially (indicating sublimation). This 1) doesn't seem to make sense as the bed is cold and 2) causes ##\dot{m}_{out}## > ##\dot{m}_{in}## which isn't possible.

So why is there apparently sublimation occurring at short times? Well if (in the equation below) ##Py_i## is less than ##P(T_I)## then this will occur. The issue is that at short times ##y_i## is so small that this equation says there is sublimation happening not desublimation. Is this correct or should I add a further constraint to stop this?

The equation for reference:
$$M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}$$
 
casualguitar said:
Exactly yes the reason its half the value is because the temperature profile (with mass transfer turned on) is the following (below), where the temperature levels out at a value approximately half of the correct value (shown further below):
View attachment 312750
View attachment 312749

However to get the correct profile above I have to turn off mass transfer, meaning that the issue is definitely related to the mass transfer.

Looking at the desublimation rate at short time, I see that it is actually negative initially (indicating sublimation). This 1) doesn't seem to make sense as the bed is cold and 2) causes ##\dot{m}_{out}## > ##\dot{m}_{in}## which isn't possible.

So why is there apparently sublimation occurring at short times? Well if (in the equation below) ##Py_i## is less than ##P(T_I)## then this will occur. The issue is that at short times ##y_i## is so small that this equation says there is sublimation happening not desublimation. Is this correct or should I add a further constraint to stop this?

The equation for reference:
$$M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}$$
Let's. try the trick factor that Tuinier et al use, appropriately corrected for our units: ##\frac{m_i}{m_i+0.1}##
 
Chestermiller said:
Let's. try the trick factor that Tuinier et al use, appropriately corrected for our units: ##\frac{m_i}{m_i+0.1}##
So we let desublimation as it is, and add in this trick factor for sublimation?

To convert their units (kg/m3) to ours (they use mol/m3) I guess we would just need to multiply each ##m_i## term by ##\frac{1000}{mW}##?

That is interesting though. I had thought that desublimation was dependent on temperature and pressure only. I did not realize that a sufficiently low ##y_i## (and therefore a sufficiently low partial pressure) would mean that sublimation actually occurs

Also a note - I'm using units of pascals for the ##M_i''## equation calculation
 
casualguitar said:
So we let desublimation as it is, and add in this trick factor for sublimation?

To convert their units (kg/m3) to ours (they use mol/m3) I guess we would just need to multiply each ##m_i## term by ##\frac{1000}{mW}##?

That is interesting though. I had thought that desublimation was dependent on temperature and pressure only. I did not realize that a sufficiently low ##y_i## (and therefore a sufficiently low partial pressure) would mean that sublimation actually occurs

Also a note - I'm using units of pascals for the ##M_i''## equation calculation
Adding in the fudge factor seems to fix the temperature profile issue, and the other plots look a bit better also. Also the final molar holdup is now 0.006 also:
Line graph of simulation gas temperature against time, with three curves rising from about 125 to a plateau near 375 by time 3000 to 4000; the blue curve rises fastest, orange next, and green slowest with a shoulder near 180 to 190.

Line plot of MDR CO2 against time for n=0, n=1 and n=2: each curve falls from about 0 to a plateau near -7.3, with n=0 dropping first, then n=1, then n=2.
Line plot of co2 solid phase total molar deposition against time from 0 to 8000, with four curves that rise to peaks near 0.10 to 0.16 between times 200 and 500, then fall back to zero by about time 1300.
Line plot of co2 gas phase mole fraction against time for three curves, rising to about 0.25, then settling near 0.20, with sharp vertical spikes near time 620 and 700.


Edit: I'm not sure what the benefit of the fudge factor is though. What is this for? To ensure that sublimation is slightly more inhibited than desublimation?
 
casualguitar said:
So we let desublimation as it is, and add in this trick factor for sublimation?
yes
casualguitar said:
To convert their units (kg/m3) to ours (they use mol/m3) I guess we would just need to multiply each ##m_i## term by ##\frac{1000}{mW}##?
I think our units are moles in each tank. We would multiply both numerator and denominator of their factor (including the 0.1 term) by ##\frac{(1000)A_C\Delta z}{molecular\ weight}## to get ours.
casualguitar said:
That is interesting though. I had thought that desublimation was dependent on temperature and pressure only. I did not realize that a sufficiently low ##y_i## (and therefore a sufficiently low partial pressure) would mean that sublimation actually occurs
It doesn't mean this. All this does is make sure that the mass deposited never gets less than -0.1 kg/m^3 (which is not significant). If the deposited mass tries to go negative, we add mass. Their purpose of this factor was just to provide smoothing of the behavior (not to model actual behavior) so that the deposited mass can't stay negative by more than 0.1.
casualguitar said:
Also a note - I'm using units of pascals for the ##M_i''## equation calculation
The P/RT is supposed to be moles/m^3 of gas.
 
casualguitar said:
Adding in the fudge factor seems to fix the temperature profile issue, and the other plots look a bit better also. Also the final molar holdup is now 0.006 also:
View attachment 312767
View attachment 312768View attachment 312769View attachment 312770

Edit: I'm not sure what the benefit of the fudge factor is though. What is this for? To ensure that sublimation is slightly more inhibited than desublimation?
No. To avoid in a smooth manner the deposition going negative by more the 0.1 kg/m^3 (insignificant amount). it's a numerical trick.
 
Chestermiller said:
I think our units are moles in each tank. We would multiply both numerator and denominator of their factor (including the 0.1 term) by (1000)ACΔzmolecular weight to get ours.
I guess we would just be multiplying the ##m_i## terms by the above factor to convert from kg/m3 to mol/tank, or else the factor would cancel out?
Chestermiller said:
It doesn't mean this.
casualguitar said:
That is interesting though. I had thought that desublimation was dependent on temperature and pressure only. I did not realize that a sufficiently low yi (and therefore a sufficiently low partial pressure) would mean that sublimation actually occurs
When I said this what I meant was that this equation ##M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}## seems to say that sublimation is a function of mole fraction (in addition to P and T), meaning that even with a temperature and pressure below the sublimation temperature, sublimation may still occur if the mole fraction of the species, ##y_i## is sufficiently low. I think anyway.

Chestermiller said:
I think our units are moles in each tank. We would multiply both numerator and denominator of their factor (including the 0.1 term) by (1000)ACΔzmolecular weight to get ours.
Anyway yes in regards to the factor above - we're solving for ##M_{CO2}## (mass of deposited CO2) at each space/time increment so can I simply add this factor to the sublimation equation?: $$trick factor = \frac{M_{CO2}}{M_{CO2} + 0.1}$$

If so, then here's the output with that factor included:

Line plot of MDR CO2 against time for n=0, n=1 and n=2; each curve starts near 0, falls to about -7.3 and levels off, with n=0 falling earliest and n=2 latest.

Line plot of simulation gas temperature against time from 0 to 8000 for three curves that rise from about 125 to a plateau near 375; the blue curve rises fastest, the orange slower, and the green slowest.
Line plot of co2 solid phase total molar deposition against time for four curves; each rises to a peak, then falls back to zero, with peaks near 0.10, 0.146 and 0.16 and later curves peaking at later times.


The molar holdup levels out at a value of 0.006 which is what you previously calculated

And the positional plots have similar peaks to the Tuinier data (the sublimation is still slower than it is in Tuinier et al though):

Line plot titled CO2 Mass vs Position (tank number), with MCO2 on the y-axis (0 to 60) against position 0 to 9. Four curves for t=0s, t=50s, t=100s and t=150s; t=0s stays at zero, while later curves rise to peaks near positions 1 to 3 and then decline.

Line plot of gas temperature Tg (C) against position (tank number) at t=0s, 50s, 100s and 150s; temperature falls with position, and the curves rise over time from a flat -150 C baseline.
 
casualguitar said:
I guess we would just be multiplying the ##m_i## terms by the above factor to convert from kg/m3 to mol/tank, or else the factor would cancel out?When I said this what I meant was that this equation ##M_i'' = \frac{k_i(Py_i - P(T_I))}{RT}## seems to say that sublimation is a function of mole fraction (in addition to P and T), meaning that even with a temperature and pressure below the sublimation temperature, sublimation may still occur if the mole fraction of the species, ##y_i## is sufficiently low. I think anyway.
No. This only happens to a tiny extent when we use the fudge factor. The idea is to not let the deposition amount become significantly less than 0 as a result of slight numerical overshoot.
casualguitar said:
Anyway yes in regards to the factor above - we're solving for ##M_{CO2}## (mass of deposited CO2) at each space/time increment so can I simply add this factor to the sublimation equation?: $$trick factor = \frac{M_{CO2}}{M_{CO2} + 0.1}$$
I think you mean moles of deposited CO2 here. In any event, the fudge factor should, as I indicated earlier, be $$trick factor = \frac{M_{CO2}}{M_{CO2} + 0.1\frac{(1000)A_C\Delta z}{(molecular\ weight \ of \ CO2)}}$$A corresponding equation applies to water.

This is what it would take to make your calculations equivalent to theirs, at least with regard to the fudge factor.

casualguitar said:
If so, then here's the output with that factor included:

View attachment 312826
View attachment 312827View attachment 312828
casualguitar said:
The molar holdup levels out at a value of 0.006 which is what you previously calculated

And the positional plots have similar peaks to the Tuinier data (the sublimation is still slower than it is in Tuinier et al though):

View attachment 312829
View attachment 312830
You need to work toward (1) using the correct equivalent fudge factors, (2) increasing to 30 tanks, and (3) using our mass transfer parameterization.
 
Chestermiller said:
The idea is to not let the deposition amount become significantly less than 0 as a result of slight numerical overshoot.
Got it
Chestermiller said:
I think you mean moles of deposited CO2 here. In any event, the fudge factor should, as I indicated earlier, be trickfactor=MCO2MCO2+0.1(1000)ACΔz(molecular weight of CO2)A corresponding equation applies to water.

This is what it would take to make your calculations equivalent to theirs, at least with regard to the fudge factor.
Ah yes I meant moles, and now I see what you mean. Got it. So you've multiplied all terms by the ##\frac{(1000)A_C\Delta z}{molecular\ weight}## factor. I'll implement this now

So with the correct equivalent fudge factor, and n=30, the output is below
Chestermiller said:
(3) using our mass transfer parameterization.
Are we not already using our mass transfer parameterisation? Or is there something I have left out?

Here is the output:
Line graph titled CO2 Mass vs Position (tank number), plotting MCO2 against position for t=0s, 50s, 100s and 150s; curves rise from zero, peak near positions 6 to 9, then decline.

Line plot titled Gas Temperature vs Position (tank number), with Tg (C) on the vertical axis from -150 to 50 and position from 0 to 30 on the horizontal axis; a flat line at -150 for t=0s and three decaying curves for t=50s, t=100s and t=150s, starting near 30, 55 and 70 at position 0 and falling toward about -140 to -150 by position 30.

The CO2 solid moles buildup looks pretty close to the Tuinier plot. I have one or two ideas as for why the sublimation is slower. I'll look into this.

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}##
 
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.
 
Chestermiller said:
No. The k correlation.
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$$

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''##?

The Schmidt number I calculated seems to be ok also when compared to BSL data. The plot produced for a range of Reynolds numbers looks like this:
Line plot of mass transfer coefficient in mol/m2.s against dimensionless Reynolds number from 0 to 10000. Two curves rise concavely: k_H2O reaches about 40 and k_CO2 about 23 at Re 10000.

For references the current constant ##k_{CO2}## value I'm using is 8*10^-4, so these seem high. Anyway I'll implement the non-constant ##k_j## functionality into the current script and let's see what happens
 
Last edited:
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 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:
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''##?
You need to get the units issue resolved.
 
Last edited:
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.
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:
Line plot titled Gas Temperature vs Position (tank number), with Tg in C on the y-axis from -150 to -80 and position from 0.0 to 4.0; five curves for t=0s, 50s, 100s, 150s and 200s show temperature falling toward -150 C at higher positions as time increases.

Line plot titled CO2 Mass vs Position (tank number), with MCO2 on the vertical axis against position 0 to 4; five curves for t=0s to t=200s rise to peaks near positions 1 to 3 and decline toward zero at position 4.

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
 
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
n = 10 with non-constant ##k_i##:
Line plot of CO2 mass MCO2 against position (tank number) from 0 to 9 at ten times from t=0s to t=350s; curves rise then fall, peaking near 110 around positions 3 to 5 at later times.

Line plot titled Gas Temperature vs Position (tank number), with Tg (C) on the y-axis from about -150 to -40 and position 0 to 9 on the x-axis; curves for t=0s to t=350s show temperature falling from the initial -150 C flat line toward lower values near the far end.

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
 
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
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>
 
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>
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
 
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, 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?

Also I'm not sure if you got the notification of the private message I sent. I attached the report as mentioned, and this also shows the Jacobian and solution array structures

What does it mean to take advantage of the structure of the Jacobian matrix in the matrix inversion chosen option?
 
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>
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:
Line plot titled Gas Temperature vs Position (tank number), with Tg (C) on the y-axis from about -150 to 90 and position from 0 to 30; four curves for t=0s, 50s, 100s and 150s show a temperature front moving from low to high positions, with a plateau near -94 C.


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

Line plot titled CO2 Mass vs Position (tank number), showing MCO2 against position from 0 to 30 at four times (t=0s, 50s, 100s, 150s). Each curve is a rising pulse that peaks near 100 and then falls to zero, moving toward higher positions over time.
 
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
This looks like a major improvement. Is the only difference the equation used to calculate the Re? It doesn't seem possible.