This invention relates to determining thermodynamic parameters of a substance, and more particularly to determining a value of the thermodynamic parameter based on a thermodynamic potential of the substance.
Simulation, optimization, estimation, and control techniques have become increasingly important for maintaining and improving the safety and performance of various industrial systems, such as chemical process systems, refinery systems, power generation systems, refrigeration and air or natural gas liquefaction systems. The simulation, optimization, estimation and control of these systems require thermodynamic parameters substances involved in the thermodynamic processes. Unfortunately, some thermodynamic parameters are difficult or expensive to measure, and some of these thermodynamic parameters cannot be measured at all. Thus, the efficient determination of thermodynamic parameters is critical for simulating, and especially, the real time operation and control of these systems.
The thermodynamic state of a substance, such as fluid, can be uniquely determined by an appropriate set of thermodynamic parameters. After the thermodynamic state of the fluid is determined, other thermodynamic parameters, e.g., density, specific enthalpy, or specific entropy, can be determined theoretically with an appropriate equation of state (EOS). However, the EOS theory does not specify how to perform the determination.
A variety of methods for determining fluid thermodynamic parameters are known. Some methods, such as the Van der Waals equation, represent the parameters of some fluids. However, the parameters are inaccurate. Other, more complex EOS is able to describe the thermodynamic behavior of fluids more accurately.
For example, one conventional method for determining fluid thermodynamic parameters includes EOS representations for a wide variety of fluids. That method can perform a wide range of thermodynamic parameter determinations for both pure fluids and nearly arbitrary mixtures of fluids. However, that method is designed for the exploration and determination of the thermodynamic parameters of fluids, rather than for the integration of working fluid parameter determinations for simulation or control of thermodynamic processes. For example, for a simulation that determines thousands of parameters, the time required of that method limits the overall simulation speed.
Another conventional method uses pre-determined lookup tables. For example, a number of air-conditioner simulations use pre-determined lookup tables, where the desired parameters (e.g., specific enthalpy) are determined offline from a set of measured variables (e.g., temperature and pressure) before the simulation, and then the simulation looks up the corresponding parameter value at runtime. Predetermined lookup tables have the advantage of being very fast, but typically have an accuracy which is strongly dependent upon a sampling density of the parameter.
Accordingly, there is a need for thermodynamic parameter calculation methods, which are both computationally efficient and accurate. Moreover, the consistency of these parameter determinations is also essential. For example, the specific enthalpy ĥ of a fluid can be determined as a function of measurements of temperature T and pressure p, where “̂” denotes that this parameter is determined rather than measured. This new value of ĥ can then be used with the pressure p, to determine the temperature T. For a number of applications, it is essential, that the resulting temperature value determined using ĥ and p is substantially identical to the original measurement T.
Unfortunately, conventional methods produce a nonzero residual between these two values. Because a variety of different measurements are used in these simulations for many different computations, these determinations are not consistent, i.e., these parameter determination methods do not minimize the size of the residual.
For example, several methods, see, e.g., Ding et al (2005, 2009) and Kunic et al (2009), use a set of mappings. Each mapping determines thermodynamic parameters, as determined by construction of the mapping. To compute other thermodynamic parameters, excluded from the mappings, new mappings must be constructed. However, the consistency between these different mappings is not ensured, and the co-existence of multiple representations increases memory size, and computation complexity.
Usually, the conventional methods for determining the thermodynamic parameters fit functional forms to thermodynamic potentials to establish the fundamental EOS. The fundamental EOS enables determining some state functions via differentiation. For example, the substance, such as fluid, can be characterized in terms of the Helmholtz energy A(T, ρ), which is represented by a fundamental EOS. A few thermodynamic parameters that can be calculated from the density ρ and the temperature T using the fundamental EOS for the Helmholtz energy are as follows:
where a denotes the specific Helmholtz energy, p is the pressure, S is the entropy, u is the internal energy, h is the enthalpy, cv is the isovolumetric specific heat, cp is the isobaric specific heat.
Although the above equations can be used to determine thermodynamic parameters using a pair of values of ρ and T, it is difficult to determine a thermodynamic parameter when the pair of values of the thermodynamic parameters are not ρ and T. The general solution to such a problem relies on an iterative process. For example, if the pair of thermodynamic parameters includes ρ and T, and the corresponding value h of the enthalpy is to be determined, then the computation starts with the pair of ρ and T as an initial values, and iteratively updates ρ and T such that the determined values including the pressure {circumflex over (p)} and the enthalpy using the fundamental EOS match the given values p and h. In particular, the residuals p−{circumflex over (p)} and h−ĥ are used to improve the accuracy of the pair ρ and T values iteratively until the magnitude of these residuals are reduced below a predetermined tolerance. If square root finding-procedures are properly implemented and the tolerance is small enough, then by the time that the iteration terminates, {circumflex over (p)} and ĥ values are considered sufficiently close to the true values h and p.
The major drawback of the current fundamental EOS approach for thermodynamic parameter determinations is the complex computation associated with the evaluations of the fundamental EOS, as well as its derivatives, which are further increased by the iteration process.
It is an object of some embodiments of an invention to provide a method for determining a value of a thermodynamic parameter of a substance, such as a single component substance in a liquid or a gas phase. It is a further object of some embodiments to provide a method for mutually consistent determination of multiple thermodynamic parameters.
It is a further object of some embodiments of the invention to provide a method for improving efficiency of thermodynamic parameter determinations for the simulation, optimization, estimation, or control of a desired thermodynamic process.
It is a further object of some embodiments of this invention to provide a method to improve an efficiency of thermodynamic parameter determinations by accomplishing certain procedures offline based on a proper thermodynamic potential to generate and store data for efficient and mutually consistent real time determinations.
It is a further object of some embodiments of the invention to provide a method for determining phase of the substance efficiently using predetermined liquid-vapor phase transition data generated, e.g., offline.
Various embodiments of the invention are based on a general realization that various thermodynamic parameters of a substance can be determined based on one of thermodynamic potentials of the substance, such as the internal energy, enthalpy, Helmholtz energy, or Gibbs free energy. Moreover, some embodiments are based on a specific realization that if the thermodynamic parameters are determined based on the one of thermodynamic potentials, the thermodynamic parameters are mutually consistent.
For example, if the thermodynamic parameters are mutually consistent, values of a thermodynamic parameter determined based on different combinations of mutually consistent thermodynamic parameters using appropriate equation of state (EOS) are substantially identical, which means that the difference between these determined values for the same thermodynamic parameter are caused only by the accuracy of the calculation, which is typically sufficiently small. Hence in general these results can be considered identical for practical applications. Similarly, if the thermodynamic parameters are mutually consistent, a thermodynamic parameter or derivatives of that thermodynamic parameter determined based on the pair of other thermodynamic parameters can then be used to accurately re-compute the pair of thermodynamic parameters.
By properly selecting the thermodynamic potential and establishing the mappings between thermodynamic parameters using the same thermodynamic potential, a number of the iterative determinations required by the fundamental EOS can be reduced. Moreover, the mappings can be predetermined offline, and appropriate mapping can be selected in real time based on, e.g., measurements of particular thermodynamic parameters.
Accordingly, one embodiment discloses a method for determining a value of a thermodynamic parameter of a substance. The method includes acquiring a set of secondary manifolds, wherein each secondary manifold represents a mapping among a combination of thermodynamic parameters of the substance, and wherein the mapping is based on a primary manifold representing a mapping between a pair of thermodynamic parameters and a thermodynamic potential; selecting a particular secondary manifold from the set of secondary manifolds based on particular thermodynamic parameters, wherein the particular secondary manifold is a mapping between the particular thermodynamic parameters and the thermodynamic parameter; and determining the value of the thermodynamic parameter based on the particular secondary manifold and values of the particular thermodynamic parameters. The steps of the method can be performed by a processor.
For example, the substance can be a single phase substance, and the method can include testing a correspondence of the values of the particular thermodynamic parameters to the phase of the substance. In some implementations of the method, the primary manifold can be determined based on a model of the substance; and the secondary manifold can be generated by transforming the primary manifold into coordinate system of the combination of the thermodynamic parameters using, e.g., a theory of thermodynamics. The transforming can be non-iterative, and the thermodynamic potential can be selected from a group consisting of a Helmholtz energy, a Gibbs free energy, an enthalpy, and an internal energy.
Also, the method can include measuring the values of the particular thermodynamic parameters. The values of the set of secondary manifolds can be mutually consistent.
Another embodiment discloses a method for determining a value of thermodynamic parameter of a substance including generating, based on a model of the substance, a primary manifold of a thermodynamic potential of the substance; transforming the primary manifold into a set of secondary manifolds using a theory of thermodynamics, wherein each secondary manifold represents a mapping among a combination of thermodynamic parameters of the substance; and determining the value of the thermodynamic parameter based on measurements of thermodynamic parameters and at least one secondary manifold.
Yet another embodiment discloses a thermodynamic system having a working fluid. The system includes at least one sensor for measuring particular thermodynamic parameters to produce at least one measurement; a memory storing a set of secondary manifolds, wherein each secondary manifold represents a mapping among a combination of thermodynamic parameters of the substance, and is generated based on a primary manifold of a thermodynamic potential of the substance; and a processor for determining a value of a thermodynamic parameter based on the measurement, the primary manifold and at least one secondary manifold.
A fluid is a substance that continually deforms (flows) under an applied shear stress. The phases of the matter in a fluid include liquids, gases, plasma. Within the scope of this invention, a fluid refers only to matters in gas and liquid phases.
Intensive quantities characterizing a substance are those whose values do not depend on the amount of substance in the system
Extensive quantities characterizing a substance are those whose values depend on the amount of substance in the system.
Intensive quantities that determine the state of a thermodynamic system are called thermodynamic parameters of the state of the system. The individual parameters are also known as state variables, thermodynamic parameters, and state parameters.
A thermodynamic state is the macroscopic condition of a thermodynamic system as described uniquely by a set of thermodynamic parameters. The state of any thermodynamic system can be uniquely described by a set of thermodynamic parameters, such as temperature, pressure, density, composition, independently of its surroundings or history.
Thermodynamic potentials are a particular set of state variables which have the dimension of energy. Thermodynamic potentials include internal energy, the enthalpy, the Helmholtz free energy, and the Gibbs free energy.
Each thermodynamic potential is defined as a function of a particular set of thermodynamic parameters, which are known as natural variables for the thermodynamic potential.
Various embodiments of the invention are based on a general realization that various thermodynamic parameters of a substance can be determined based on one of thermodynamic potentials of the substance, such as the internal energy, enthalpy, Helmholtz energy, and Gibbs free energy. Moreover, some embodiments are based on a specific realization that if the thermodynamic parameters are determined based on the thermodynamic potential, than the thermodynamic parameters are mutually consistent.
As referred herein, the mutually consistent values of thermodynamic parameters are such parameters that satisfy equation of state (EOS) and any thermodynamic relations derived from the EOS using theory of thermodynamics.
By selecting the appropriate thermodynamic potential and establishing the mappings between thermodynamic parameters using the same thermodynamic potential, a number of the iterative determinations required by the fundamental EOS can be reduced. Moreover, the mappings can be determined offline, and appropriate mapping can be selected in real time based on, e.g., measurements of particular thermodynamic parameters.
Some embodiments of the invention use a model-based method to establish a first mapping from a set of thermodynamic parameters of a single phase fluid substance to a thermodynamic potential using an appropriate type of manifold, called a primary manifold. The primary manifold is than transformed, e.g., mapped to pairs of various thermodynamic parameters based on the theory of thermodynamics. The mappings between thermodynamic parameters based on the primary manifold are referred herein as secondary manifolds. Due to the particular form of the primary manifold, the secondary manifolds provide mutually consistent, accurate, efficient, and sometimes non-iterative evaluation of the mappings between thermodynamic parameters.
Various embodiments can be implemented in either software or hardware for the efficient and accurate computation of thermodynamic parameters, which are used in the modeling, simulation, control, estimation, and optimization of thermodynamic processes.
After the primary manifold is generated, additional mappings, i.e., the set of secondary manifolds, can be generated based on the primary manifold according to the theory of thermodynamics.
Each thermodynamic potential is defined as a function of a particular set of thermodynamic parameters, which are known as natural variables for the thermodynamic potential. In
Similarly, entropy S 128 and the specific volume v 127 are the natural variables for the internal energy u 123. The entropy S 128 and pressure p 126 are the natural variables for the enthalpy 124h. Temperature T 125 and pressure p 126 are the natural variables for the Gibbs free energy g 122. The conversions between different fundamental states are represented by the arrows and the labels besides the arrows. In particular, g=α+pv, u=α+TS, h=u+pv, and h=g+TS. As an example, suppose the primary manifold is established using the Helmholtz energy α, and the inputs are T and v. Then after determining S and p using the additional manifolds, the enthalpy is given by h=α+pv+TS.
In one embodiment of the invention, the Helmholtz energy is used to generate the primary manifold, and subsequently the secondary manifolds. Other embodiments use the Gibbs free energy, the enthalpy, and the internal energy.
A set of secondary manifolds 145 is acquired 140 and stored, e.g., in a memory 147. The set of secondary manifold can be determined offline, as discussed below. Each secondary manifold represents a mapping among values of a combination of the thermodynamic parameters of the substance, and is generated based on the primary manifold representing a mapping between the pair of thermodynamic parameters and a thermodynamic potential. In addition, the primary manifold can also be acquired.
In some embodiments, each secondary manifold is determined for unique combination of the thermodynamic parameters of the substance, and all combinations are determined from the single primary manifold to ensure mutual consistence of the thermodynamic parameters. Also, in some embodiments, the secondary manifolds are predetermined, and particular secondary manifold 155 is selected 150 based on particular thermodynamic parameters provided to determine the value of the thermodynamic parameter of interest. For example, measurements 175 of the particular thermodynamic parameters can be acquired by one or more sensors 170 during an operation of a thermodynamic system having a substance such as working fluid. Accordingly, in one embodiment, the particular thermodynamic parameters are parameters to be measured during an operation of a thermodynamic system. However, any other method of selection of the particular thermodynamic parameters is possible. The thermodynamic system can include the processor 130 for executing the method 100. Next, the value 180 of the thermodynamic parameter is determined 160 based on the particular secondary manifold 155 and values of the particular thermodynamic parameters 175, as described above.
In one embodiment, bi-cubic functions are used to represent the thermodynamic potential for a particular single substance fluid in vapor or liquid phase. This embodiment is described in more details below for illustration purposes.
In this embodiment, a uniform mesh is generated on a region of interest in the T−v plane, where T is the temperature, and v is the specific volume. On each grid cell (ti,ti+1)×(vj,vj+1) of the mesh, the manifold of the Helmholtz energy α is represented by a bi-cubic function Φi,j as follows:
for (T,v)ε(ti,ti+1)×(vj,vj+1). The 16 unknown coefficients αi,j,kl can be determined from a set of 16 equations, which are listed below
The Helmholtz energy and its derivatives in the right-hand-sides of the above equations are determined using the fundamental EOS. After these quantities are determined, αi,j,kl are solved using algebraic determinations. This
can be accomplished because the above equations contain only 16 unknowns αi,j,kl, k=0,1,2,3 and l=0,1,2,3, and are linear.
Equation (1) can be written in a matrix form as
where τ=T−ti, w=v−vj.
Using the bi-cubic representation of the Helmholtz energy in equation (2), the mappings between different thermodynamic parameters can be constructed. Some of these mappings are described below:
The Mapping (T,v)→p
The relation between the Helmholtz energy α and the pressure is described by the following expression
Therefore, by taking the derivative of equation (2) with respect to the specific volume v, the mapping from (T,v) to the pressure p can be constructed as:
The Mapping (T,v)→S
From the LOS, the specific entropy is
Therefore the mapping from (T,v) to the specific entropys can be constructed as:
The Mapping (p,T)→v
From the mapping (T,v)→p, for any fixed T,p is a quadratic function in v. Therefore, v can be determined by finding the square root of the quadratic function. In particular, let
c
v2(T)=3αi,j,33τ3+3αi,j,23τ2+3αi,j,13τ+3αi,j,03,
c
v1(T)=3αi,j,32τ3+3αi,j,22τ2+3αi,j,12τ+3αi,j,02, and
c
v0(T,p)=3αi,j,31τ3+3αi,j,21τ2+3αi,j,11τ+3αi,j,01+p, then p and v satisfy the following equation
c
v2(T)w2=cv1(T)w+cv0(T,p)=0.
Hence v is given by
The other square root is omitted because it does not have a physical meaning.
The Mapping (S,v)→T
Similar to the construction of the mapping (p,T)→v, the mapping (S,v)→t can be constructed as follows
where cτ2(w)=3αi,j,33τ3+3αi,j,32τ2+3αi,j,31τ+3αi,j,30,
c
τ1(w)=3αi,j,23τ3+3αi,j,22τ2+3αi,j,21τ+3αi,j,20,
c
τ0(S,w)=3αi,j,13τ3+3αi,j,12τ2+3αi,j,11τ+3αi,j,10+S.
The Mappings (S,p)→T and (S,p)→v
Unlike other mappings described above, the mappings (S,p)→T and (S,p)→v cannot be constructed using explicit expressions. In one embodiment, Newton's method is used to establish these mappings. In particular, let f, denote the mapping from (τ,w) to p, and let fs denote the mapping from (τ,w) to s, which can be obtained using the above constructed mappings (T,v)→p and (T,v)→S. Then, the mappings (S,p)→T and (S,p)→v can be established by solving the following equation
Let τk, wk be the estimated square root values of equation (3) in the kth step, then the Newton's method for the (k+1)th step is
From equation (2), the entries of Δf(τk,wk) can be easily determined as follows:
The Newton's method is terminated after the error is smaller than a predetermined tolerance. The temperature and specific volume corresponds to the S and p values are determined using T=t1+τk and v=vj+wk.
The Determination of the Correct Grid Cell
To determine the desired thermodynamic parameters correctly using mappings described above for any pair of thermodynamic parameter inputs, such as (T,v), (S,v), or (S,p), some embodiments determine the mappings using the grid cell that includes the (T,v) data corresponding to the given inputs. Because the grid cell associated with the pair of thermodynamic parameters is not necessarily known, this embodiment determines the correct cell for the pair of thermodynamic parameters. When the mesh is uniform in the T−v domain, some variations of the embodiment determine the correct cell for mappings (T,v)→p and (T,v)→S.
For the mapping (p,T)→v, the index for the correct cell is determined by the following steps:
is the smallest among all possible choices of jc.
Here, Fp denotes the mapping (T,v)→p. The second step above is based on a linear approximation of the function Fp's dependence on the specific volume. jc typically provides a good estimation of the index of the correct grid cell. Because
is strictly negative, the third step above yields the index of the grid with Fp(T,vj)≧p>Fp(T,vj+1). By the continuity of fp, it can be concluded that there exists vε[vj,vj+1), such that fp(T,v)=p, which ensures that {i,j} is the index of the correct grid cell.
In a similar manner, the index {i,j} of the correct grid cell for constructing the mapping (S,v)→p can be determined by following the steps:
is the smallest of all possible choices of ic.
Here Fs denotes the mapping (T,v)→S. Since the mappings (S,p)→T and (S,p)→v are established using the Newton's method, the correct cells can be determined automatically.
Here is an example of a particular application of the proposed method for the determination of enthalpy h of the refrigerant vapor flowing out the compressor in an air conditioning system. Such a task is crucial for evaluating the cooling/heating capacity as well as the energy efficiency of the air conditioning system.
The enthalpy cannot be measured directly and, thus, the enthalpy is calculated using certain measured thermodynamic parameters. In this example, the particular thermodynamic parameters to be measured are the temperature T, and the pressure p. Suppose that the Helmholtz energy has been used to establish the primary manifold using bi-cubic interpolations described previously, then the specific volume v can be readily determined using the mapping (p,T)→v, which has been described previously. Such a calculation is accomplished using one of the secondary manifolds. After the specific volume v has been determined, the value of the Helmholtz energy is determined using the primary manifold given the calculated specific volume v and measured temperature T, and the entropy S is also readily calculated using the mapping (T,v)→S using another secondary manifold. Finally, the enthalpy is determined by the thermodynamic relation h=α+TS+pv.
Offline and Real Time Determinations
In some embodiments of the invention, the determinations of the thermodynamic parameter are partitioned into two parts, e.g., the offline part and the real time part.
The thermodynamic parameter calculation programs are stored in a memory device as described in block 208. In the procedure represented by block 207, a switcher program is generated for linking the correct thermodynamic parameter calculation program to the type of calculation determined by desired inputs and outputs. The switcher program is stored in at least one memory device as described by block 208. In block 203, the phase transition lines in the domain of natural variables (including the line between liquid and mixture of liquid and vapor, the line between vapor and mixture of vapor and liquid, and the line between liquid and supercritical vapor) are determined. These lines are represented using various appropriate methods, such as polynomials or spline functions, and the data for these representations are stored in at least one memory device, as shown in block 205. In the procedure corresponding to block 206, a computer program is generated for testing the phase of the working fluid based on thermodynamic data inputs, and this program is stored in at least one memory device 208.
The above-described embodiments of the present invention can be implemented in any of numerous ways. For example, the embodiments may be implemented using hardware, software or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers. Such processors may be implemented as integrated circuits, with one or more processors in an integrated circuit component. Though, a processor may be implemented using circuitry in any suitable format.
Further, it should be appreciated that a computer may be embodied in any of a number of forms, such as a rack-mounted computer, a desktop computer, a laptop computer, minicomputer, or a tablet computer. Also, a computer may have one or more input and output devices. These devices can be used, among other things, to present a user interface. Examples of output devices that can be used to provide a user interface include printers or display screens for visual presentation of output and speakers or other sound generating devices for audible presentation of output. Examples of input devices that can be used for a user interface include keyboards, and pointing devices, such as mice, touch pads, and digitizing tablets. As another example, a computer may receive input information through speech recognition or in other audible format.
Such computers may be interconnected by one or more networks in any suitable form, including as a local area network or a wide area network, such as an enterprise network or the Internet. Such networks may be based on any suitable technology and may operate according to any suitable protocol and may include wireless networks, wired networks or fiber optic networks.
Also, the various methods or processes outlined herein may be coded as software that is executable on one or more processors that employ any one of a variety of operating systems or platforms. Additionally, such software may be written using any of a number of suitable programming languages and/or programming or scripting tools, and also may be compiled as executable machine language code or intermediate code that is executed on a framework or virtual machine. In this respect, the invention may be embodied as a computer readable storage medium or multiple computer readable media, e.g., a computer memory, compact discs (CD), optical discs, digital video disks (DVD), magnetic tapes, and flash memories. Alternatively or additionally, the invention may be embodied as a computer readable medium other than a computer-readable storage medium, such as a propagating signal.
The terms “program” or “software” are used herein in as generic sense to refer to any type of computer code or set of computer-executable instructions that can be employed to program a computer or other processor to implement various aspects of the present invention as discussed above.
Computer-executable instructions may be in many forms, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures that perform particular tasks or implement particular abstract data types. Typically the functionality of the program modules may be combined or distributed as desired in various embodiments.
Also, the embodiments of the invention may be embodied as a method, of which an example has been provided. The acts performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be constructed in which acts are performed in an order different than illustrated, which may include performing some acts simultaneously, even though shown as sequential acts in illustrative embodiments.
Use of ordinal terms such as “first,” “second,” in the claims to modify a claim element does not by itself connote any priority, precedence, or order of one claim element over another or the temporal order in which acts of a method are performed, but are used merely as labels to distinguish one claim element having a certain name from another element having a same name (but for use of the ordinal term) to distinguish the claim elements.
Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications can be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.