routines_pre Module


Uses

  • module~~routines_pre~~UsesGraph module~routines_pre routines_pre module~constants constants module~routines_pre->module~constants module~data data module~routines_pre->module~data iso_fortran_env iso_fortran_env module~constants->iso_fortran_env module~data->module~constants

Subroutines

public subroutine Best_Linear_Regression(scn_nc, scn, scn_z, plus_z, a, b, r2, ninit)

This subroutine calculates the best regression line for an oil.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: scn_nc

integer input variable set to the total number of single cuts being considered in the oil

integer, intent(in), allocatable :: scn(:)

set of singles cuts being considered in the oil

real, intent(in), allocatable :: scn_z(:)

set of corresponding mole fractions of scn cuts

real(kind=pr), intent(in) :: plus_z
real(kind=pr), intent(out) :: a

output real variable. Slope of the best regression line.

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

output real variable. Intercept of the best regression line.

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

output real variable. Square correlation coefficient.

integer, intent(out) :: ninit

minimum carbon number obtained from the best linear regression

public subroutine GetNewMpfromC(start, C, Ncut, rCN, zM, zMp, Z6p, a, b, rMp, maxC, z, zpi, zMpi, Ndef, zp, w, rn, rMWplus, zcomp, zdef, rMW, rMdef, Mglobal)

this subroutines for a C value returns the correponding new M20+ value

Arguments

Type IntentOptional Attributes Name
logical :: start
real(kind=pr) :: C
integer :: Ncut
integer, dimension(imax) :: rCN
real(kind=pr), dimension(imax) :: zM
real(kind=pr) :: zMp
real(kind=pr) :: Z6p
real(kind=pr) :: a
real(kind=pr) :: b
real(kind=pr) :: rMp
integer :: maxC
real(kind=pr), dimension(imax) :: z
real(kind=pr), dimension(300) :: zpi
real(kind=pr), dimension(300) :: zMpi
integer :: Ndef
real(kind=pr) :: zp
real(kind=pr), dimension(imax) :: w
real(kind=pr), dimension(imax) :: rn
real(kind=pr) :: rMWplus
real(kind=pr), dimension(imax) :: zcomp
real(kind=pr), dimension(maxD) :: zdef
real(kind=pr), dimension(imax) :: rMW
real(kind=pr), dimension(maxD) :: rMdef
real(kind=pr) :: Mglobal

public subroutine LimitLine(Ncut, rCN, Zp, aBE, bBE, half, alim, blim, Cmax)

Arguments

Type IntentOptional Attributes Name
integer :: Ncut
integer, dimension(imax) :: rCN
real(kind=pr) :: Zp
real(kind=pr) :: aBE
real(kind=pr) :: bBE
real(kind=pr) :: half
real(kind=pr) :: alim
real(kind=pr) :: blim
integer :: Cmax

public subroutine LineC60max(Ncut, Zp, rCN, aBE, bBE, half, a60, b60, C60max)

Arguments

Type IntentOptional Attributes Name
integer :: Ncut
real(kind=pr) :: Zp
integer, dimension(imax) :: rCN
real(kind=pr) :: aBE
real(kind=pr) :: bBE
real(kind=pr) :: half
real(kind=pr) :: a60
real(kind=pr) :: b60
integer :: C60max

public subroutine Linear_Regression(x, y, a, b, r2)

This subroutine computes the regression line for a data set of x, y variables.

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in), allocatable :: x(:)

x: input array of length n which contains the set of independent variable

real(kind=pr), intent(in), allocatable :: y(:)

y: input array of length n which contains the set of dependent variable

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

a: output real variable. Slope of the regression line

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

b: output real variable. Intercept of the regression line

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

public subroutine difMpfromC(start, C, Ncut, rCN, zM, zMp, Z6p, dif, a, b, rMp, maxC, z, zpi, zMpi, zcomp, zdef, zp)

Arguments

Type IntentOptional Attributes Name
logical :: start
real(kind=pr) :: C
integer :: Ncut
integer, dimension(imax) :: rCN
real(kind=pr), dimension(imax) :: zM
real(kind=pr) :: zMp
real(kind=pr) :: Z6p
real(kind=pr) :: dif
real(kind=pr) :: a
real(kind=pr) :: b
real(kind=pr) :: rMp
integer :: maxC
real(kind=pr), dimension(imax) :: z
real(kind=pr), dimension(300) :: zpi
real(kind=pr), dimension(300) :: zMpi
real(kind=pr), dimension(imax) :: zcomp
real(kind=pr), dimension(maxD) :: zdef
real(kind=pr) :: zp

public subroutine difMpfromCfull(start, C, Ndef, Ncut, rCN, dif, a, b, rM, rMp, maxC, z, zp, zpi, zMpi, w, rn, zcomp, zdef)

Arguments

Type IntentOptional Attributes Name
logical :: start
real(kind=pr) :: C
integer :: Ndef
integer :: Ncut
integer, dimension(imax) :: rCN
real(kind=pr) :: dif
real(kind=pr) :: a
real(kind=pr) :: b
real(kind=pr), dimension(imax) :: rM
real(kind=pr) :: rMp
integer :: maxC
real(kind=pr), dimension(imax) :: z
real(kind=pr) :: zp
real(kind=pr), dimension(300) :: zpi
real(kind=pr), dimension(300) :: zMpi
real(kind=pr), dimension(imax) :: w
real(kind=pr), dimension(imax) :: rn
real(kind=pr), dimension(imax) :: zcomp
real(kind=pr), dimension(maxD) :: zdef

public subroutine difnewMp(start, C, Ndef, Ncut, rCN, dif, a, b, rM, rMp, maxC, z, zp, zpi, zMpi, w, rn, zcomp, zdef, rMW, rMdef, Mglobal)

this subroutines for a C value returns the correponding Mp value

Arguments

Type IntentOptional Attributes Name
logical :: start
real(kind=pr) :: C
integer :: Ndef
integer :: Ncut
integer, dimension(imax) :: rCN
real(kind=pr) :: dif
real(kind=pr) :: a
real(kind=pr) :: b
real(kind=pr), dimension(imax) :: rM
real(kind=pr) :: rMp
integer :: maxC
real(kind=pr), dimension(imax) :: z
real(kind=pr) :: zp
real(kind=pr), dimension(300) :: zpi
real(kind=pr), dimension(300) :: zMpi
real(kind=pr), dimension(imax) :: w
real(kind=pr), dimension(imax) :: rn
real(kind=pr), dimension(imax) :: zcomp
real(kind=pr), dimension(maxD) :: zdef
real(kind=pr), dimension(imax) :: rMW
real(kind=pr), dimension(maxD) :: rMdef
real(kind=pr) :: Mglobal

public subroutine get_C(start, C, Ncut, rCN, zM, zMp, Z6p, a, b, rMp, maxC, z, zpi, zMpi, Ndef, zp, w, rn, rMWplus, zcomp, zdef)

Arguments

Type IntentOptional Attributes Name
logical :: start
real(kind=pr) :: C
integer :: Ncut
integer, dimension(imax) :: rCN
real(kind=pr), dimension(imax) :: zM
real(kind=pr) :: zMp
real(kind=pr) :: Z6p
real(kind=pr) :: a
real(kind=pr) :: b
real(kind=pr) :: rMp
integer :: maxC
real(kind=pr), dimension(imax) :: z
real(kind=pr), dimension(300) :: zpi
real(kind=pr), dimension(300) :: zMpi
integer :: Ndef
real(kind=pr) :: zp
real(kind=pr), dimension(imax) :: w
real(kind=pr), dimension(imax) :: rn
real(kind=pr) :: rMWplus
real(kind=pr), dimension(imax) :: zcomp
real(kind=pr), dimension(maxD) :: zdef