Modelling of two phase flow in packed bed using conservation equations

In summary: Do you have an idea of a starting design for this system, such as overall diameter, packing type, void fraction, length, bed orientation (vertical or horizontal), flow direction, etc?This is a really good question. I think the first step is to come up with a rough design for the system, and then try to use the models we are going to develop to calculate some of the key properties.Let's brainstorm some preliminary models to get us started.1. Two phase flow of vapor and liquid in a bed is going to be pretty complicated, particularly if the pressure is changing and the residence time is large. Let's model what the isothermal behavior of the fluid
  • #316
Chestermiller said:
You know where you have vapor and where you have liquid, and you can get the pressure drop for each of these regions using the Ergun equation. The only big uncertainty is the region where vapor and liquid are both present, but this is only 1 tank (according to what you have said previously). So tentatively neglect it.
I follow, so yes I can get the pressure drop in both regions. Regarding the big uncertainty about where both vapour and liquid are present - will it not be the case though that this region will be present at every position in the bed i.e. moving from inlet to outlet. So, getting the pressure drop for the all vapour case, and the all liquid case should give us the max and min pressure drop that can occur? The pressure would move from the initial pressure drop when the tank is mostly liquid (the lowest pressure drop), up to the max pressure drop when it is all gas. So is it correct to say the saturated region can be ignored, and we can just consider all gas and all liquid?

Also - in the previous Ergun calculation I was able to use the actual length of the bed (about 1.4m). However I am not sure how 'long' each tank is. We know that ##L=n\Delta x##, so knowing the total length, say 1.4m, we could decide a value of delta x and this would give us the value of n. Is it correct to say that the length of a tank 'n' in this model is not constant?
 
Engineering news on Phys.org
  • #317
casualguitar said:
I follow, so yes I can get the pressure drop in both regions. Regarding the big uncertainty about where both vapour and liquid are present - will it not be the case though that this region will be present at every position in the bed i.e. moving from inlet to outlet. So, getting the pressure drop for the all vapour case, and the all liquid case should give us the max and min pressure drop that can occur? The pressure would move from the initial pressure drop when the tank is mostly liquid (the lowest pressure drop), up to the max pressure drop when it is all gas. So is it correct to say the saturated region can be ignored, and we can just consider all gas and all liquid?
I would say that you are correct, and that these would bound the answer.
casualguitar said:
Also - in the previous Ergun calculation I was able to use the actual length of the bed (about 1.4m). However I am not sure how 'long' each tank is. We know that ##L=n\Delta x##, so knowing the total length, say 1.4m, we could decide a value of delta x and this would give us the value of n. Is it correct to say that the length of a tank 'n' in this model is not constant?
The parameter n is the total number of tanks, so the length of each tank is the same: $$\Delta x=\frac{L}{n}$$Once you specify n, the length of each tank is determined.
 
  • #318
Chestermiller said:
I would say that you are correct, and that these would bound the answer.
Great this seems straightforward then. So, checking these two cases:
1) Where liquid flows through the tank at 2kg/s, for the entire length of the tank
2) Where gas flows through the tank at 0.05kg/s, for the entire length of the tank

The max pressure drop occurs in the liquid case, and returns a value of about 4 bar. In the context of a 30 bar operating pressure, this still seems minimal. Also given that this situation doesn't occur in the model, and cannot occur in reality (the model doesn't show the flow increase to 2 kg/s for long, just a quick spike), the real pressure drop is likely still much smaller.

Safe to say pressure drop is negligible for now?

Temperature dependent parameters and the U value are two options for continuation
Also replacing the temperature(H) and mass(H) functions with real EoSs is an option. Open to ideas
 
  • #319
casualguitar said:
Great this seems straightforward then. So, checking these two cases:
1) Where liquid flows through the tank at 2kg/s, for the entire length of the tank
2) Where gas flows through the tank at 0.05kg/s, for the entire length of the tank

The max pressure drop occurs in the liquid case, and returns a value of about 4 bar. In the context of a 30 bar operating pressure, this still seems minimal. Also given that this situation doesn't occur in the model, and cannot occur in reality (the model doesn't show the flow increase to 2 kg/s for long, just a quick spike), the real pressure drop is likely still much smaller.

Safe to say pressure drop is negligible for now?
All the liquid downstream is at 2 kg/sec, not just the spike. And all the vapor upstream is at the higher pressure. How does this effect the VLE? How are the flow and pressure boundary pressures imposed on this bed?
casualguitar said:
Temperature dependent parameters and the U value are two options for continuation
Also replacing the temperature(H) and mass(H) functions with real EoSs is an option. Open to ideas
If I were you, my next focus would be on U. Added accuracy in the property relationships is secondary (if needed at all) in my judgment.
 
  • #320
Chestermiller said:
All the liquid downstream is at 2 kg/sec, not just the spike. And all the vapor upstream is at the higher pressure. How does this effect the VLE? How are the flow and pressure boundary pressures imposed on this bed?
Whoops, yes I read the plot incorrectly. So yes the max pressure drop across the system could be close to 4 bar.

The VLE: How does the higher pressure vapour affect the VLE, or how does the pressure drop (about 4 bar) affect the VLE in the lower pressure regions? When you say how are the flow and pressure boundary pressures imposed on the bed, what do you mean by this?
Chestermiller said:
If I were you, my next focus would be on U. Added accuracy in the property relationships is secondary (if needed at all) in my judgment.
Sounds good. U can be the next point of focus. I'll do some reading today and get a general plan for this
 
  • #321
casualguitar said:
Whoops, yes I read the plot incorrectly. So yes the max pressure drop across the system could be close to 4 bar.

The VLE: How does the higher pressure vapour affect the VLE, or how does the pressure drop (about 4 bar) affect the VLE in the lower pressure regions? When you say how are the flow and pressure boundary pressures imposed on the bed, what do you mean by this?
When the pressure changes in the 2 phase region, this affects the VLE.

I looked over the pressure-enthalpy diagrams of N2 and O2 available online, and can now see what you are driving at with respect to the complexity of the thermodynamic behavior. At a nominal 30 bars, the vapor behavior will definitely be non-ideal. I assume that the data parameterizations you have available apply to the vapor region only? Do you have any information on activity coefficients (or excess free energy) of liquid mixtures of N2 and O2? What is understanding of how close the liquid behavior is to an ideal solution?

With regard to boundary conditions, I assume you are controlling the exit pressure from the bed by some sort of valve arrangement and controlling the vapor flow rate to the bed by continuously adjusting the inlet pressure (since the vapor is compressible).
 
  • #322
Chestermiller said:
I looked over the pressure-enthalpy diagrams of N2 and O2 available online, and can now see what you are driving at with respect to the complexity of the thermodynamic behavior. At a nominal 30 bars, the vapor behavior will definitely be non-ideal.
Yes I was actually just looking at the heat capacity/thermal conductivity graphs of N2/O2 vs temperature and they do vary quite a bit also across our temperature range.
Chestermiller said:
I assume that the data parameterizations you have available apply to the vapor region only?
The data parameterisations apply to both vapour and liquid. There is also flash functionality that can calculate the heat capacity etc in the saturated zone as an average
Chestermiller said:
Do you have any information on activity coefficients (or excess free energy) of liquid mixtures of N2 and O2?
I think so actually. There is functionality in the thermo library to return the liquid activity coefficients:

Screenshot 2022-01-06 at 14.54.34.png

Chestermiller said:
What is understanding of how close the liquid behavior is to an ideal solution?
Effectively none. I'm not sure how to quantify this. What I could do, is take some things like heat capacity etc and plot the percentage variation between the ideal liquid heat capacity and the real liquid heat capacity versus temperature. Something like this?
 
  • #323
casualguitar said:
Yes I was actually just looking at the heat capacity/thermal conductivity graphs of N2/O2 vs temperature and they do vary quite a bit also across our temperature range.
Does this include the effect of pressure on the heat capacity, or is it just the ideal gas heat capacity (which is just the molar average at a given temperature).
casualguitar said:
The data parameterisations apply to both vapour and liquid. There is also flash functionality that can calculate the heat capacity etc in the saturated zone as an average

I think so actually. There is functionality in the thermo library to return the liquid activity coefficients:

View attachment 295181

Effectively none. I'm not sure how to quantify this. What I could do, is take some things like heat capacity etc and plot the percentage variation between the ideal liquid heat capacity and the real liquid heat capacity versus temperature. Something like this?
I was wondering what the effect of composition on the liquid heat capacity was. There is also the question of the VLE deviation from Raoult's Law (as a result of liquid phase non-ideality).

Check out the chapters in Introduction to Chemical Engineering Thermodynamics by Smith and Van Ness (Chapters 10 and beyond).
 
  • #324
Chestermiller said:
I was wondering what the effect of composition on the liquid heat capacity was. There is also the question of the VLE deviation from Raoult's Law (as a result of liquid phase non-ideality).
Yes I actually started Denbigh yesterday and it seems to have similar stuff, so I might continue with this (the effect of composition on liquid heat capacity, deviation from Raoults law). Is this reasonable?

Chestermiller said:
Does this include the effect of pressure on the heat capacity, or is it just the ideal gas heat capacity (which is just the molar average at a given temperature).
The latter, just the ideal gas heat capacity (function of temperature only). I think I can check the variation of liquid heat capacity with temperature for a given pressure, though.

So the plan is loosely to tackle the non ideality of the vapour and liquid phases? And yes I agree that this will require textbook reading on my part, for me to be able to discuss this (two days or so of reading)
 
  • #325
Chestermiller said:
Check out the chapters in Introduction to Chemical Engineering Thermodynamics by Smith and Van Ness (Chapters 10 and beyond).
Two other thoughts for model development:
- Effect of adding radial heat transfer to the system
- Inclusion of a conduction term (seems to be common in packed bed models), rather than having this encompassed in U

But yes for now I'm just reading
 
  • #326
casualguitar said:
Yes I actually started Denbigh yesterday and it seems to have similar stuff, so I might continue with this (the effect of composition on liquid heat capacity, deviation from Raoults law). Is this reasonable?The latter, just the ideal gas heat capacity (function of temperature only). I think I can check the variation of liquid heat capacity with temperature for a given pressure, though.

So the plan is loosely to tackle the non ideality of the vapour and liquid phases? And yes I agree that this will require textbook reading on my part, for me to be able to discuss this (two days or so of reading)
The heat capacity is a function of pressure also (for non-ideal gas behavior). You really need to include the effect of pressure on gas enthalpy.
 
  • #327
Chestermiller said:
The heat capacity is a function of pressure also (for non-ideal gas behavior). You really need to include the effect of pressure on gas enthalpy.
HI Chet, yes there is h(T,P) functionality in the thermo library so I can use that

In regards to the non-ideality of air, yes as you said the vapour is definitely non-ideal, and actually it seems at lower temperatures air is increasingly non-ideal i.e. liquid phase is even more non-ideal. Increasing the pressure results in an increase in non-ideality also. So yes its safe to say vapour and liquid phase air are both non-ideal

The functionality is absolutely there to model this. There is a bit of setup work required in python to get the actual activity coefficients. I'll do that to get an exact idea of how non-ideal air is at various temperatures.

So in terms of implementing non-ideal air, how can we do this in stages? Are these reasonable as a first two?

1) Implement the Ergun equation in the ideal model, to show the pressure decreasing across the system (wont affect any parameter except mass as this is the only place we use P). I have this implemented in a separate script, just need to edit it to find the pressure drop at any point in the system
2) add non ideal correlations for density and heat capacity (as a function of T and P)
 
  • #328
casualguitar said:
HI Chet, yes there is h(T,P) functionality in the thermo library so I can use that

In regards to the non-ideality of air, yes as you said the vapour is definitely non-ideal, and actually it seems at lower temperatures air is increasingly non-ideal i.e. liquid phase is even more non-ideal. Increasing the pressure results in an increase in non-ideality also. So yes its safe to say vapour and liquid phase air are both non-ideal
I'm not so sure it is unreasonable to treat the liquid phase as ideal. This would certainly simplify things greatly. I suggest checking the literature relating to the VLE behavior of O2-N2 liquid mixtures and the activity coefficients for such mixtures.
casualguitar said:
The functionality is absolutely there to model this. There is a bit of setup work required in python to get the actual activity coefficients. I'll do that to get an exact idea of how non-ideal air is at various temperatures.

So in terms of implementing non-ideal air, how can we do this in stages? Are these reasonable as a first two?
There is certainly going to be data on the activity coefficients for O2 and N2 in the vapor phase. Also, maybe the Lewis-Randle rule applies to the vapor. Spend some time digging in the literature.
casualguitar said:
1) Implement the Ergun equation in the ideal model, to show the pressure decreasing across the system (wont affect any parameter except mass as this is the only place we use P). I have this implemented in a separate script, just need to edit it to find the pressure drop at any point in the system
2) add non ideal correlations for density and heat capacity (as a function of T and P
Once you have the non-ideal PVT behavior of the vapor mixtures, you can, knowing the ideal gas heat capacities of N2 and O2 vapor as a function of temperature, get the non-ideal variations in enthalpy with temperature and pressure.
 
  • #329
Chestermiller said:
I'm not so sure it is unreasonable to treat the liquid phase as ideal. This would certainly simplify things greatly. I suggest checking the literature relating to the VLE behavior of O2-N2 liquid mixtures and the activity coefficients for such mixtures.
Checking the literature for the O2-N2 liquid mixture VLE behaviour doesn't seem to return much regarding the activity coefficients.

To possibly simplify further I have one question - why not use an existing EOS model rather than the activity coefficients to model the vapour and liquid phases? If we used an EOS (one already written in code) it seems we could calculate any T or P dependent property easily, and we could assume non-ideality for the liquid phase because the work it would add would not cause a significant increase in modelling difficulty

That said, although I very much prefer the idea of using existing functionality rather than hard coding my own, I don't want to move too fast on that and lose understanding myself

What are your thoughts on using a prewritten EOS instead of an activity coefficient model?

Chestermiller said:
Also, maybe the Lewis-Randle rule applies to the vapor.
I did read about this rule actually in Denbigh. I'll read over this
Chestermiller said:
Once you have the non-ideal PVT behavior of the vapor mixtures, you can, knowing the ideal gas heat capacities of N2 and O2 vapor as a function of temperature, get the non-ideal variations in enthalpy with temperature and pressure.
So yes back the EOS point, the thermo library in Python has existing functionality to calculate both ideal and non-ideal heat capacities of pure O2/N2 and mixtures of these. It can also get the non-ideal enthalpy(T,P)

https://thermo.readthedocs.io/thermo.phases.html?highlight=mixture enthalpy#module-thermo.phases

I think we could save lots of time, and add more complex functionality if we use this. Do you think it is reasonable to use this functionality rather than hard code our own?

EDIT: Also, I'm working on getting the activity coefficients for air plotted as a function of temperature using this thermo library. I will post this plot once its working
 
  • #330
casualguitar said:
Checking the literature for the O2-N2 liquid mixture VLE behaviour doesn't seem to return much regarding the activity coefficients.

To possibly simplify further I have one question - why not use an existing EOS model rather than the activity coefficients to model the vapour and liquid phases? If we used an EOS (one already written in code) it seems we could calculate any T or P dependent property easily, and we could assume non-ideality for the liquid phase because the work it would add would not cause a significant increase in modelling difficulty

That said, although I very much prefer the idea of using existing functionality rather than hard coding my own, I don't want to move too fast on that and lose understanding myself

What are your thoughts on using a prewritten EOS instead of an activity coefficient model?I did read about this rule actually in Denbigh. I'll read over this

So yes back the EOS point, the thermo library in Python has existing functionality to calculate both ideal and non-ideal heat capacities of pure O2/N2 and mixtures of these. It can also get the non-ideal enthalpy(T,P)

https://thermo.readthedocs.io/thermo.phases.html?highlight=mixture enthalpy#module-thermo.phases

I think we could save lots of time, and add more complex functionality if we use this. Do you think it is reasonable to use this functionality rather than hard code our own?

EDIT: Also, I'm working on getting the activity coefficients for air plotted as a function of temperature using this thermo library. I will post this plot once its working
I looked at the reference, but I don't exactly see how they do this. I assume they have an appropriate data base for pure o2 and n2, and somehow mixture parameters. I guess I'll leave it up to you to figure how to work with this software to get the needed thermodynamic functionalities.
 
  • #331
Chestermiller said:
I looked at the reference, but I don't exactly see how they do this. I assume they have an appropriate data base for pure o2 and n2, and somehow mixture parameters. I guess I'll leave it up to you to figure how to work with this software to get the needed thermodynamic functionalities.
Exactly yes there is appropriate data taken from a number of sources (DIPPR, Perrys, etc) to allow for pure and mixture parameter calculations.

I can work with the software absolutely (I have used it for the dew/bubble and Ergun calculations).

I could start with say some plots of air heat capacity and density for our range of temperatures, for a few pressures? To get an idea of how we would expect the model output to change by adding these two in. I'll add them in separately then
 
  • #332
casualguitar said:
Exactly yes there is appropriate data taken from a number of sources (DIPPR, Perrys, etc) to allow for pure and mixture parameter calculations.

I can work with the software absolutely (I have used it for the dew/bubble and Ergun calculations).

I could start with say some plots of air heat capacity and density for our range of temperatures, for a few pressures? To get an idea of how we would expect the model output to change by adding these two in. I'll add them in separately then
What we really need is temperature and density (or specific volume) as functions of enthalpy and pressure for an overall mixture of 79% n2 and 21% o2 (including the two phase region). Starting from enthalpy and density as functions of temperature and pressure for such an overall mixture.
 
  • #333
Chestermiller said:
What we really need is temperature and density (or specific volume) as functions of enthalpy and pressure for an overall mixture of 79% n2 and 21% o2 (including the two phase region). Starting from enthalpy and density as functions of temperature and pressure for such an overall mixture.
To confirm, we are looking to get to this?
$$T(H,P)$$ $$\rho(T,P)$$

And we're assuming we will have this available to start:
$$H(T,P)$$ $$\rho(T,P)$$

So we would need to 'invert' these functions to get to the objective functions?

I can check to see if the goal functions already exist just in case
 
Last edited:
  • Like
Likes Chestermiller
  • #334
Chestermiller said:
What we really need is temperature and density (or specific volume) as functions of enthalpy and pressure for an overall mixture of 79% n2 and 21% o2 (including the two phase region). Starting from enthalpy and density as functions of temperature and pressure for such an overall mixture.
Just as a side note - here are the plots mentioned earlier, 79%/21% air for a pressure of 30 bar:

Density:
Screenshot 2022-01-12 at 22.44.55.png

Heat capacity:
Screenshot 2022-01-12 at 22.45.44.png

Thermal conductivity (included this in case we eventually split U into components):
Screenshot 2022-01-12 at 22.46.55.png
 
Last edited:
  • #335
Chestermiller said:
What we really need is temperature and density (or specific volume) as functions of enthalpy and pressure for an overall mixture of 79% n2 and 21% o2 (including the two phase region). Starting from enthalpy and density as functions of temperature and pressure for such an overall mixture.
Ahh ok it just clicked with me now why we need those specifically. To replace the temperature and mass functions we've got currently implemented. Got it
 
  • Like
Likes Chestermiller
  • #336
casualguitar said:
Ahh ok it just clicked with me now why we need those specifically. To replace the temperature and mass functions we've got currently implemented. Got it
Hi Chet, away for 1 week on annual leave. Will update here once I'm back
 
  • Like
Likes Chestermiller
  • #337
Chestermiller said:
What we really need is temperature and density (or specific volume) as functions of enthalpy and pressure for an overall mixture of 79% n2 and 21% o2 (including the two phase region). Starting from enthalpy and density as functions of temperature and pressure for such an overall mixture.
Hi Chet, returned to work this morning! Looking at the last sentence, you seem to suggest that we can get to H,P formulation from T,P formulation? Is this correct?

I have yet to confirm if H,P formulation is available in the thermo library. Looking into this today
 
  • #338
Chestermiller said:
What we really need is temperature and density (or specific volume) as functions of enthalpy and pressure for an overall mixture of 79% n2 and 21% o2 (including the two phase region). Starting from enthalpy and density as functions of temperature and pressure for such an overall mixture.
Hi Chet, I don't think there are direct PH dependent properties available in thermo

However, if we know the pressure and enthalpy of the system, we could do a PH flash and that will solve the equations to figure out the temperature. We can then query for all the required properties at those specific temperature and pressure values.

PH flash functionality is definitely available in thermo

Is this suitable for us?
 
  • #339
I guess you can do that. Try it can see if it works.
 
  • Like
Likes casualguitar
  • #340
Chestermiller said:
I guess you can do that. Try it can see if it works.
Hi Chet, so the temp(H) and mass(H) functions have now been replaced by a flash function that returns the temperature and density at a given pressure and enthalpy (density is then multiplied by volume to get mass).

One point of confusion I have on this is in relation to the heat of vaporisation. Previously you showed me that we could use different correlations for the temperature/mass based on the enthalpy value i.e. if the enthalpy was lower than the heat of vaporisation then we would use the liquid correlation etc. This naturally allowed us to include the heat of vaporisation for the mixed phase and gas phase.

Now that I'm using a PH flash to calculate the temperature and density, I'm wondering if we have taken the heat of vaporisation into account, and if so, how have we done this?

I guess we have sort of 'rounded' this problem by using the flash calculation however I'm not sure. Does PH flash 'account' for the heat of vaporisation?

Some notes: pressure is assumed constant, liquid and gas heat capacity are assumed constant, U correlation has not been added. These are all minor changes that I will add this evening and tomorrow
 
  • #341
casualguitar said:
Hi Chet, so the temp(H) and mass(H) functions have now been replaced by a flash function that returns the temperature and density at a given pressure and enthalpy (density is then multiplied by volume to get mass).

One point of confusion I have on this is in relation to the heat of vaporisation. Previously you showed me that we could use different correlations for the temperature/mass based on the enthalpy value i.e. if the enthalpy was lower than the heat of vaporisation then we would use the liquid correlation etc. This naturally allowed us to include the heat of vaporisation for the mixed phase and gas phase.

Now that I'm using a PH flash to calculate the temperature and density, I'm wondering if we have taken the heat of vaporisation into account, and if so, how have we done this?

I guess we have sort of 'rounded' this problem by using the flash calculation however I'm not sure. Does PH flash 'account' for the heat of vaporisation?

Some notes: pressure is assumed constant, liquid and gas heat capacity are assumed constant, U correlation has not been added. These are all minor changes that I will add this evening and tomorrow
Pressure is not constant in a flash calculation, right? And, in a flash calculation, heat of vaporization is implicitly included.

Now that you are adopting this approach, you should do the calculations outside the bed model, and parameterize the relationships between temperature and density vs enthalpy and pressure using analytic fits to the results of the flash calculations. That seems like the easiest thing to do. Then you won't have to be doing flash calculations or VLE calculations within your main model.
 
  • #342
Chestermiller said:
Pressure is not constant in a flash calculation, right? And, in a flash calculation, heat of vaporization is implicitly included.
Yes you're right I think my terminology is poor. I assume when you say flash you mean going from P1 to P2 where P1>P2. What I meant was using the known P and H values to calculate T, density, etc. In the thermo library this is called 'flash', however yes I agree its not really 'flashing' in the real sense. Are we on the same page there? And what is the name for the calculation I'm describing, if not flash?

Chestermiller said:
Now that you are adopting this approach, you should do the calculations outside the bed model, and parameterize the relationships between temperature and density vs enthalpy and pressure using analytic fits to the results of the flash calculations. That seems like the easiest thing to do. Then you won't have to be doing flash calculations or VLE calculations within your main model.
Ah I see. For reference, here is the line of code that I use to calculate the temperature and mass holdup of the air mixture given the enthalpy and pressure:
Screenshot 2022-01-27 at 11.40.22.png

Screenshot 2022-01-27 at 11.52.07.png


The setup of the air mixture is a bit more complex. However as you can see its very simple to use the flasher itself to calculate H and P dependent properties. We mentioned earlier getting analytic fits for T(H,P) and density(H,P). Unless I'm misunderstanding, the flash calculation gives us this fit indirectly (and easily) i.e. we in effect have T(H,P) and density(H,P) through the flash calculation. Do you agree with that?

If the above is true, then it seems like its slightly easier to use the above code, rather than extract the analytic relationships T(H,P) and density(H,P)?

I also think it would be useful to post the 'flow' of the code with the added flash calculation now. I'll do this today
 

Attachments

  • Screenshot 2022-01-27 at 11.40.02.png
    Screenshot 2022-01-27 at 11.40.02.png
    2.7 KB · Views: 58
  • #343
If the above is ok, then I could also remove the ##\frac{d\rho}{dH}## function with an analytic alternative?

So the thermo library does provide property derivatives for mixtures. However, it does not provide ##\frac{d\rho}{dH}## or ##\frac{dH}{d\rho}##. One idea I had was to use the chain rule i.e. to multiply two other property derivatives together to get to the one we want, ##\frac{d\rho}{dH}##.

For reference, these are the available density derivatives:

Screenshot 2022-01-27 at 12.36.33.png


And these are the available enthalpy derivatives:
Screenshot 2022-01-27 at 12.37.44.png


So maybe we could choose two that multiply together to give the objective derivative. To use one of these derivatives, we would need to know what is 'constant' while density and enthalpy change. Do we have any constant properties in our system that are mentioned above? Can we assume that pressure is effectively constant, given the change across the system is small?

For later reference, the list of available derivatives is here: https://thermo.readthedocs.io/thermo.stream.html?highlight=stream#thermo.stream.Stream
 
  • #344
casualguitar said:
Yes you're right I think my terminology is poor. I assume when you say flash you mean going from P1 to P2 where P1>P2. What I meant was using the known P and H values to calculate T, density, etc. In the thermo library this is called 'flash', however yes I agree its not really 'flashing' in the real sense. Are we on the same page there? And what is the name for the calculation I'm describing, if not flash?
I think you need to ascertain exactly what this calculation does. Is it a VLE calculation or an actual flash calculation.
casualguitar said:
Ah I see. For reference, here is the line of code that I use to calculate the temperature and mass holdup of the air mixture given the enthalpy and pressure:
View attachment 296088
View attachment 296089

The setup of the air mixture is a bit more complex. However as you can see its very simple to use the flasher itself to calculate H and P dependent properties. We mentioned earlier getting analytic fits for T(H,P) and density(H,P). Unless I'm misunderstanding, the flash calculation gives us this fit indirectly (and easily) i.e. we in effect have T(H,P) and density(H,P) through the flash calculation. Do you agree with that?
OK, provided we are convinced that it is just a VLE calculation, where you specify the T and P and it calculates everything else, including split. Still, there is an iteration that is going to be involved in specifying H and P and extracting T and density. After all, in the model, you dependent variable is H, not T.
 
  • #345
Chestermiller said:
I think you need to ascertain exactly what this calculation does. Is it a VLE calculation or an actual flash calculation.
A VLE calculation, where P and H are known, and are used to find T and density yes
Chestermiller said:
OK, provided we are convinced that it is just a VLE calculation, where you specify the T and P and it calculates everything else, including split. Still, there is an iteration that is going to be involved in specifying H and P and extracting T and density. After all, in the model, you dependent variable is H, not T.
Exactly, H and P are specified, and T and density are extracted (after some iteration etc). However what I'm saying is that the thermo library takes care of this iteration for us. So all we have to do is supply the library with P and H, and it will do the iteration required to solve for T and density. This is useful because it means there are no large blocks of iteration code to be seen in the main script

So what I can do is replace our previous temperature function here:
Screenshot 2022-01-27 at 13.46.22.png


With this new function:
1643291240383.png


The advantage of the second one is that it is analytic, so that single line allows us to take our known H and P values and convert them to T values

The same thing can be done for the mass holdup function, as the VLE calculation done in the thermo library also allows us to get density. I can just multiply by volume to give mass holdup

The final function to be replaced by an analytic one is the ## \frac{d\rho}{dH}## one. As shown in the earlier message above, are there any properties we can assume as constant (while density and enthalpy change)? We can multiply these derivatives together (chain rule) to get to the objective derivative ## \frac{d\rho}{dH}## I think

EDIT: The T(H,P) and density(H,P) functionality is now in place so we have analytic values for T and density at each H and P value. I think replacing the ## \frac{d\rho}{dH}## derivative is a natural next step as it is the only remaining non analytic function
 
Last edited:
  • #346
casualguitar said:
A VLE calculation, where P and H are known, and are used to find T and density yes

Exactly, H and P are specified, and T and density are extracted (after some iteration etc). However what I'm saying is that the thermo library takes care of this iteration for us. So all we have to do is supply the library with P and H, and it will do the iteration required to solve for T and density. This is useful because it means there are no large blocks of iteration code to be seen in the main script

So what I can do is replace our previous temperature function here:
View attachment 296093

With this new function:
View attachment 296094

The advantage of the second one is that it is analytic, so that single line allows us to take our known H and P values and convert them to T values

The same thing can be done for the mass holdup function, as the VLE calculation done in the thermo library also allows us to get density. I can just multiply by volume to give mass holdup

The final function to be replaced by an analytic one is the ## \frac{d\rho}{dH}## one. As shown in the earlier message above, are there any properties we can assume as constant (while density and enthalpy change)? We can multiply these derivatives together (chain rule) to get to the objective derivative ## \frac{d\rho}{dH}## I think

EDIT: The T(H,P) and density(H,P) functionality is now in place so we have analytic values for T and density at each H and P value. I think replacing the ## \frac{d\rho}{dH}## derivative is a natural next step as it is the only remaining non analytic function
Maybe you can supply some graphs of T(H,P) and rho(H,P) to examine?
 
  • #347
Chestermiller said:
Maybe you can supply some graphs of T(H,P) and rho(H,P) to examine?
Yep can do
 
  • #348
Chestermiller said:
Maybe you can supply some graphs of T(H,P) and rho(H,P) to examine?
Hi Chet, T(H,P) and rho(H,P) plots as mentioned (at 30 bar for a range of enthalpies):
rhoH.png

TH.png


We can clearly see the phase change zone in the temperature plot (constant temperature).

These plots were produced assuming constant pressure of 30bar. They were also produced with the d(rho)/dH function you derived. As mentioned, we can replace this derivative with an analytic one, as they are available in the thermo library, however its not clear to me which derivatives to chain rule to get d(rho)/dH

What info were you hoping to examine in these plots?

Thanks
 

Attachments

  • 1643400847530.png
    1643400847530.png
    2.1 KB · Views: 59
  • 1643400873811.png
    1643400873811.png
    2 KB · Views: 64
Last edited:
  • #349
casualguitar said:
Hi Chet, T(H,P) and rho(H,P) plots as mentioned (at 30 bar for a range of enthalpies):
View attachment 296198
View attachment 296199

We can clearly see the phase change zone in the temperature plot (constant temperature).

These plots were produced assuming constant pressure of 30bar. They were also produced with the d(rho)/dH function you derived. As mentioned, we can replace this derivative with an analytic one, as they are available in the thermo library, however its not clear to me which derivatives to chain rule to get d(rho)/dH

What info were you hoping to examine in these plots?

Thanks
The temperature should not be constant in the 2 phase region. It should be varying a little with enthalpy. Just for clarification, you are assuming in these calculations an overall mix of 80 mole % N2 and 20 mole % oxygen, right? Also, is it possible to provide the vapor-liquid split (molar or mass) vs enthalpy? Other pressures? The enthalpies presented in the plots are per mole of mixture or per kg of mixture? The densities are molar densities or mass densities?
 
  • #350
Chestermiller said:
The temperature should not be constant in the 2 phase region. It should be varying a little with enthalpy.
Apologies yes it does vary. Zoomed in plot of enthalpy versus temperature for the two phase region, showing the temperature increase of approx 2-3C :
Screenshot 2022-01-29 at 17.41.07.png

Chestermiller said:
Just for clarification, you are assuming in these calculations an overall mix of 80 mole % N2 and 20 mole % oxygen, right?
Effectively. The exact mole% breakdown is: N2 = 78.08, O2 = 20.95, Ar = 0.97%
The Argon boiling point falls between that of N2 and O2 so our assumption of a single boiling point rather than an envelope is valid still
Chestermiller said:
Also, is it possible to provide the vapor-liquid split (molar or mass) vs enthalpy?
Vapour-liquid split (molar) vs enthalpy (J/mol)
Screenshot 2022-01-29 at 18.15.55.png

Chestermiller said:
The enthalpies presented in the plots are per mole of mixture or per kg of mixture? The densities are molar densities or mass densities?
Enthalpy units: J/mol
Density units: kg/m3

Yes the units are not of the same basis, however I just picked kg/m3 units for the density plot as its easiest to visualise. Are there preferred units? I can provide either easily

Note also these plots are not packed bed related model output plots just plots of various properties of air as a function of enthalpy and pressure

If there is any other enthalpy/pressure dependent info required at this point I can provide it
 
Last edited:

Similar threads

  • Materials and Chemical Engineering
13
Replies
427
Views
15K
Replies
18
Views
1K
Replies
1
Views
746
Replies
2
Views
871
  • Classical Physics
2
Replies
48
Views
2K
Replies
20
Views
2K
  • Classical Physics
2
Replies
35
Views
2K
  • Special and General Relativity
2
Replies
67
Views
4K
  • Materials and Chemical Engineering
Replies
8
Views
8K
Replies
1
Views
1K
Back
Top