ipqa-research / yaeos

Thermodynamic Equations of State, Fortran library with both automatic and anallytical derivation capabilities
https://ipqa-research.github.io/yaeos/
Mozilla Public License 2.0
26 stars 4 forks source link

$a_{ij}$ matrix procedure #85

Closed fedebenelli closed 1 month ago

fedebenelli commented 2 months ago

Right now the $a_{ij}$ matrix is a procedure pointer of QMR with the the interface aij(ai, daidt, daidt2, aij, daijdt, daijdt2). This make it limited to $T$ independent combining rule, the interface should be updated or maybe change the logic to use other kind of inheritance.

    type, extends(CubicMixRule) :: QMR
        real(pr), allocatable :: k(:, :) 
            !! Attractive Binary Interatction parameter matrix
        real(pr), allocatable :: l(:, :) 
            !! Repulsive Binary Interatction parameter matrix
        procedure(get_aij), pointer :: aij => null()
            !! Procedure to calculate \(a_{ij}\) matrix. Can be overloaded
            !! by any method that respets the interface [[get_aij(interface)]].
    contains
        procedure :: Dmix !! Attractive parameter mixing rule
        procedure :: Bmix !! Repulsive parameter mixing rule
        procedure :: D1mix => D1mix_constant
    end type QMR
fedebenelli commented 1 month ago

This should be already fixed on the dev branch. We'll see if the issue closes once this reaches main