yaeos__equilibria_stability Module

Phase Stability module

Phase stability related calculations.

Description

Contains the basics rotuines to make phase stability analysis for phase-equilibria detection.

  • tpd(model, z, w, P, T): reduced Tangent-Plane-Distance
  • min_tpd(model, z, P, T, mintpd, w): Find minimal tpd for a multicomponent mixture

Examples

  ! Obtain the minimal tpd for a binary mixture at \(z_1 = 0.13\)
  model = PengRobinson76(tc, pc, ac, kij, lij)

  z = [0.13, 1-0.13]
  w = [0.1, 0.9]

  P = 45.6_pr
  T = 190._pr

  z = z/sum(z)
-----------------------------------------------

References

  1. Thermodynamic Models: Fundamental and Computational Aspects, Michael L. Michelsen, Jørgen M. Mollerup. Tie-Line Publications, Denmark (2004) doi


Functions

public function tm(model, z, w, P, T, d, dtpd)

Michelsen’s modified function, .

Read more…

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model

Thermodynamic model

real(kind=pr), intent(in) :: z(:)

Feed composition

real(kind=pr), intent(in) :: w(:)

Test-phase mole numbers vector

real(kind=pr), intent(in) :: P

Pressure [bar]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(in), optional :: d(:)

vector

real(kind=pr), intent(out), optional :: dtpd(:)

Return Value real(kind=pr)


Subroutines

public subroutine min_tpd(model, z, P, T, mintpd, w, all_minima)

Arguments

Type IntentOptional Attributes Name
class(ArModel), target :: model

Thermodynamic model

real(kind=pr), intent(in) :: z(:)

Feed composition

real(kind=pr), intent(in) :: P

Pressure [bar]

real(kind=pr), intent(in) :: T

Temperature [K]

real(kind=pr), intent(out) :: mintpd

Minimal value of

real(kind=pr), intent(out) :: w(:)

Trial composition

real(kind=pr), intent(out), optional :: all_minima(:,:)

All the found minima