abs_residual_helmholtz Interface

interface
public subroutine abs_residual_helmholtz(self, n, v, t, Ar, ArV, ArT, ArTV, ArV2, ArT2, Arn, ArVn, ArTn, Arn2)

Arguments

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

ArModel

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

Moles vector

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

Volume [L]

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

Temperature [K]

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

Residual Helmoltz energy

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

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

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

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

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

real(kind=pr), intent(out), optional :: Arn(size(n))

real(kind=pr), intent(out), optional :: ArVn(size(n))

real(kind=pr), intent(out), optional :: ArTn(size(n))

real(kind=pr), intent(out), optional :: Arn2(size(n),size(n))

Description

Residual Helmholtz model generic interface.

This interface represents how an Ar model should be implemented. By our standard, a Resiudal Helmholtz model takes as input:

  • The mixture’s number of moles vector.
  • Volume, by default in liters.
  • Temperature, by default in Kelvin.

All the output arguments are optional. While this keeps a long signature for the implementation, this is done this way to take advantage of any inner optimizations to calculate derivatives inside the procedure.

Once the model is implemented, the signature can be short like model%residual_helmholtz(n, v, t, ArT2=dArdT2)