• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

librerie di calcolo

  • Thread starter Thread starter zeigs
  • Start date Start date

zeigs

Guest
Good morning to all
I would need libraries to calculate thermodynamic parameters of gas mixtures to use them in some sizing software we are writing.
Do you have any interesting names? Of course, the optimum would be free libraries, but as far as I have searched for now I have found nothing to do with our case (e.g. they only treat perfect and non-real gases)
 
cation

quest
http://www.prode.com/en/ppp.htmIt interacts with excel and seems suitable for what you are looking for. This is what
http://gpengineeringsoft.com/pages/pdtmixprops.htmlis stand alone and rather simple but I noticed some problems in the calculation of "flash" condensations.

otherwise on another level you place aspen hysys, process simulator oriented to oil & gas.

work on many types of gas? Do you have to do only p-v-t calculations or even flash?

if you work mainly on hydrocarbons, I recommend to model them with one of the many "analytical" state equations developed for these gases. They also exist for other types of gas and precision is good, especially if you are not too close to the critical point.

If you give us some more information we can address you better: I personally work on real gas, hydrocarbon species.
 
Also flash. Yes, mostly we work on hydrocarbons, but the intention is to be able to work on gas in a generic way. the important thing is to be able to calculate the conditions of real gases, mixtures and condensations.
we care that they are libraries because we have to integrate them into some computing software, and it is not just process.

As for analytical equations, the thing is interesting (even for a matter of royalties), although I fear that it is not enough to calculate condensates, where could I find them? at present I found only those dedicated to pure methane.

anyway thanks for the indications.
 
Also flash. Yes, mostly we work on hydrocarbons, but the intention is to be able to work on gas in a generic way. the important thing is to be able to calculate the conditions of real gases, mixtures and condensations.
we care that they are libraries because we have to integrate them into some computing software, and it is not just process.

As for analytical equations, the thing is interesting (even for a matter of royalties), although I fear that it is not enough to calculate condensates, where could I find them? at present I found only those dedicated to pure methane.

anyway thanks for the indications.
with state equations you can calculate everything, so also the behavior of the different stages!

the premise is that there are "mixing rules" to find the parameters that enter the equations according to the composition of your mixture, thus allowing you to apply the status equations both to pure components and to mixtures, inserting the constants obtained with appropriate mixing rules.
in general every state equation has its own, and for hydrocarbons I can suggest one of the following roads:

1. analytical equations of "cubic" type, therefore solved as third-degree equations: the "historical" used for natural gas (so good behavior for c1 to c5) hydrocarbons are those of peng-robinson and soave-redlich-kwong that are widespread. They are not good for polar molecules such as co2 and h20 (I usually care, so much the quantities present in a natural gas are minimal).

2. law of the corresponding states, corrections like lee-kesler which, according to two or three adimensional parameters, make you through tables all the information you need for both pvt and flash calculations. These are less accurate than analytical equations, they have the same limits for polar substances, but they are easy to use and I use them. I count to give you some other info with links and other between today and tomorrow!

Hi.
 
As for analytical equations, the thing is interesting (even for a matter of royalties), although I fear that it is not enough to calculate condensates, where could I find them? at present I found only those dedicated to pure methane.
In the meantime, you will be able to reach this link:
https://www.e-education.psu.edu/png520/It is a complete "line course" to learn how to "manage" natural gas as a real fluid, then calculate volume temperature pressure, calculate its calorimetric properties and also balances between phases, including flashes, using the most important state equations for real gas.
to the left you have all the chapters.
a warning: pvt calculations with state equations are all simple, it is about solving third degree equations and you have the direct analytical formula, with excel there are no problems.
the balances between the phases are rather iterative and require numerical methods such as that of the " successive approximations". expect to waste a lot of time on the latter, which are still well explained in the above llink!

because of my work, I improvised several years ago self-taught of these parts of physical chemistry and chemical engineering, extremely difficult and delicate topics...that in the course of mechanical machines have just touched: "You consider yourself a perfect gas..." it felt bad that in certain situations you can make huge mistakes considering it perfect! As for example, the power absorbed by an incorrect evaluation compressor of the cp/cv, with engines already delivered and already mounted on the skid! :smile:
 
Thank you very much, especially for the last link. Sorry if I answered you only now but we had some soil instability issues in recent days
 
As for other info, I can also address you to the work of lee and kesler, which is suitable for interpolation on pc (as opposed to state equations):

"a generalized thermodynamic correlateon based on three-parameter corresponding states"
b.i. lee and m.g. kesler
aiche journal, vol.21 no.3 (may 1975)

There are also other similar ones, but this is the capostipite.
based on reduced pressure (p/pcritical), reduced temperature (t/tcritical) and acentric factor, this report allows you to calculate numerous thermodynamic properties:

- coefficient of compressibility z=pv/mrt for pvt calculations;
- enthalpy and entropy, cp
- Escapement for balances between phases

any property p is expressed with a relationship of type

p = p0 + wp1 where p0 and p1 are the tabulated dimensional properties in function of reduced temperature and pressure and w is the acentric factor.
if you have a mixture, you can use the following "mixing rules" based on medium weights, being weights the molar fractions of the constituent songs:

pc = x1*pc1+x2*pc2+...+xn*pcn
tc = x1*tc1++xn*tcn
w = x1*w1++xn*wn

It's a very simple but quite reliable way if you don't need extreme precision: I think we're under 5% but maybe close to the critical point. as I told you it lends itself well for non-polar and non-associative fluids, like natural gas!
As soon as I can get you an example on a mixture!
Hi.
 
Sorry I'm late!
as promised I begin to allegarten some examples for the calculation of real gases.
For now I limit myself to pvt calculations, i.e. those in which two of the three variables of state pressure, temperature, volume (or density) must be obtained the third.

the first I attach you is based on a law of states corresponding to only two parameters (the simplest), which is quite well respected in the case of hydrocarbons and non-polar molecules in general: It is not too good, for example, for co2, but not even for non-polar fluids close to the critical point.
I have to deal mainly with hydrocarbons, since I work in the oil & gas field, and I can assure you that 90% of the time this semplicing method is quite accurate for practical problems pvt precisely. The only chart you need to search on the net is the standing-katz diagram that I partially attach to you.

Sorry about the quality of the pictures, hoping you didn't make mistakes in calculation! :biggrin:
 

Attachments

  • 1.webp
    1.webp
    551.9 KB · Views: 20
  • 2.webp
    2.webp
    467.9 KB · Views: 13
  • 3.webp
    3.webp
    544 KB · Views: 9
  • 4.webp
    4.webp
    552.5 KB · Views: 10
  • 5.webp
    5.webp
    865 KB · Views: 13

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top