NRTL Derived Type

type, public, extends(GeModelTapenade) :: NRTL

Non-Random-Two-Liquid model

with:


Components

Type Visibility Attributes Name Initial
real(kind=pr), public, allocatable :: a(:,:)

A_{ij} matrix

real(kind=pr), public, allocatable :: b(:,:)

B_{ij} matrix

real(kind=pr), public, allocatable :: c(:,:)

C_{ij} matrix

type(Substances), public :: components

Substances contained in the module


Constructor

public interface NRTL

  • public function init(a, b, c)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=pr), intent(in) :: a(:,:)
    real(kind=pr), intent(in) :: b(:,:)
    real(kind=pr), intent(in) :: c(:,:)

    Return Value type(NRTL)


Type-Bound Procedures

procedure, public :: excess_gibbs

  • private subroutine excess_gibbs(self, n, t, Ge, GeT, GeT2, Gen, GeTn, Gen2)

    Excess Gibbs model generic interface

    Arguments

    Type IntentOptional Attributes Name
    class(GeModelTapenade), intent(in) :: self
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr), intent(in) :: t
    real(kind=pr), intent(out), optional :: Ge
    real(kind=pr), intent(out), optional :: GeT
    real(kind=pr), intent(out), optional :: GeT2
    real(kind=pr), intent(out), optional, dimension(size(n)) :: Gen
    real(kind=pr), intent(out), optional, dimension(size(n)) :: GeTn
    real(kind=pr), intent(out), optional :: Gen2(size(n),size(n))

procedure, public :: ge => EXCESS_GIBBS

  • public subroutine EXCESS_GIBBS(model, n, t, ge)

    Arguments

    Type IntentOptional Attributes Name
    class(NRTL) :: model
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr), intent(in) :: t
    real(kind=pr), intent(out) :: ge

procedure, public :: ge_b => EXCESS_GIBBS_B

  • public subroutine EXCESS_GIBBS_B(model, n, nb, t, tb, ge, geb)

    Arguments

    Type IntentOptional Attributes Name
    class(NRTL) :: model
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr) :: nb(:)
    real(kind=pr), intent(in) :: t
    real(kind=pr) :: tb
    real(kind=pr) :: ge
    real(kind=pr) :: geb

procedure, public :: ge_d => EXCESS_GIBBS_D

  • public subroutine EXCESS_GIBBS_D(model, n, nd, t, td, ge, ged)

    Arguments

    Type IntentOptional Attributes Name
    class(NRTL) :: model
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr), intent(in) :: nd(:)
    real(kind=pr), intent(in) :: t
    real(kind=pr), intent(in) :: td
    real(kind=pr), intent(out) :: ge
    real(kind=pr), intent(out) :: ged

procedure, public :: ge_d_b => EXCESS_GIBBS_D_B

  • public subroutine EXCESS_GIBBS_D_B(model, n, nb, nd, ndb, t, tb, td, tdb, ge, geb, ged, gedb)

    Arguments

    Type IntentOptional Attributes Name
    class(NRTL) :: model
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr) :: nb(:)
    real(kind=pr), intent(in) :: nd(:)
    real(kind=pr) :: ndb(:)
    real(kind=pr), intent(in) :: t
    real(kind=pr) :: tb
    real(kind=pr), intent(in) :: td
    real(kind=pr) :: tdb
    real(kind=pr) :: ge
    real(kind=pr) :: geb
    real(kind=pr) :: ged
    real(kind=pr) :: gedb

procedure, public :: ge_d_d => EXCESS_GIBBS_D_D

  • public subroutine EXCESS_GIBBS_D_D(model, n, nd, t, td0, td, ge, ged0, ged, gedd)

    Arguments

    Type IntentOptional Attributes Name
    class(NRTL) :: model
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr), intent(in) :: nd(:)
    real(kind=pr), intent(in) :: t
    real(kind=pr), intent(in) :: td0
    real(kind=pr), intent(in) :: td
    real(kind=pr), intent(out) :: ge
    real(kind=pr), intent(out) :: ged0
    real(kind=pr), intent(out) :: ged
    real(kind=pr), intent(out) :: gedd

procedure, public :: ln_activity_coefficient

  • public subroutine ln_activity_coefficient(self, n, T, lngamma)

    Arguments

    Type IntentOptional Attributes Name
    class(GeModel), intent(in) :: self
    real(kind=pr), intent(in) :: n(:)
    real(kind=pr), intent(in) :: T
    real(kind=pr), intent(out) :: lngamma(:)