routines Module


Uses

  • module~~routines~~UsesGraph module~routines routines module~constants constants module~routines->module~constants module~data_from_input data_from_input module~routines->module~data_from_input module~dtypes dtypes module~routines->module~dtypes iso_fortran_env iso_fortran_env module~constants->iso_fortran_env module~data_from_input->module~constants module~data_from_input->module~dtypes module~dtypes->module~constants

Functions

public function characterize(file, mw_source, method, fix_C) result(characterization)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: file

file name

character(len=*), intent(in) :: mw_source
character(len=*), intent(in), optional :: method

plus_mw or global_mw

logical, intent(in), optional :: fix_C

Return Value type(FluidDataOut)


Subroutines

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

This subroutine calculates the best regression line for an fluid.

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 fluid

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

set of singles cuts being considered in the fluid

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

set of corresponding mole fractions of scn cuts

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

composition of residual fraction from input file

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) :: n_init

minimum carbon number obtained from the best linear regression

integer, intent(out) :: c_max_blr

output CN at which plus_z is reached, as the summation of single z(i) from the best linear distribution (blr)

public subroutine LimitLine(scn_nc, scn, plus_z, a_blr, b_blr, a_lim, b_lim, c_max_lim, half)

This subroutine obtains the limit line constants for an fluid.

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 fluid.

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

set of singles cuts being considered in the fluid.

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

composition of residual fraction from input file.

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

input constant from the Best linear regression.

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

input constant from the Best linear regression.

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

output real variable. Slope of the limit line.

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

output real variable. Intercept of the limit line.

integer, intent(out) :: c_max_lim

maximum carbon number obtained for limit line. output CN at which plus_z is reached, as the summation of single z(i) from the limit distribution (blr).

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

public subroutine Line_C60_max(scn_nc, scn, plus_z, a_blr, b_blr, half, a_60, b_60, c_max_60)

This subroutine obtains the Cmax60 line constants for an fluid.

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 fluid

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

set of singles cuts being considered in the fluid

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

composition of residual fraction from input file

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

input constant from the Best linear regression

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

input constant from the Best linear regression

real(kind=pr), intent(in) :: half
real(kind=pr), intent(out) :: a_60

output real variable. Slope of the limit line

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

output real variable. Intercept of the C60max line.

integer, intent(out) :: c_max_60

output CN at which Zp is reached, as the summation of single z(i) from the Cmax60 distribution.

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) :: x(:)

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

real(kind=pr), intent(in) :: 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 calculate_volume_6plus(fluid, mw_source, characterization)

this subroutine …

Arguments

Type IntentOptional Attributes Name
type(FluidData), intent(in) :: fluid
character(len=*), intent(in) :: mw_source
type(FluidDataOut), intent(inout) :: characterization

public subroutine density_funtion(fluid, mw_source, characterization)

this subroutine …

Arguments

Type IntentOptional Attributes Name
type(FluidData) :: fluid
character(len=*), intent(in) :: mw_source
type(FluidDataOut) :: characterization

public subroutine difference_mw_plus(fluid, mw_source, method, start, difference, characterization)

this subroutine …

Arguments

Type IntentOptional Attributes Name
type(FluidData), intent(inout) :: fluid
character(len=*), intent(in) :: mw_source
character(len=*), intent(in), optional :: method
logical :: start
real(kind=pr), intent(out) :: difference
type(FluidDataOut), intent(inout) :: characterization

public subroutine get_c_or_m_plus(fluid, mw_source, method, fix_C, characterization)

This subroutine…

Arguments

Type IntentOptional Attributes Name
type(FluidData) :: fluid
character(len=*), intent(in) :: mw_source
character(len=*), intent(in), optional :: method
logical, intent(in) :: fix_C

If C is < 12 or > 14 then fix to the closest value.

type(FluidDataOut) :: characterization

public subroutine get_critical_constants(fluid, characterization)

this subroutine ....

Arguments

Type IntentOptional Attributes Name
type(FluidData), intent(in) :: fluid
type(FluidDataOut), intent(inout) :: characterization

public subroutine lump(fluid, characterization)

This sobroutine … use new variable for plus_w because type fluidata can’t be modified. esto es lo que haria en el write, luego eliminar este comentario.

Arguments

Type IntentOptional Attributes Name
type(FluidData), intent(in) :: fluid
type(FluidDataOut), intent(inout) :: characterization

public subroutine select_method(fluid, mw_source, method, characterization)

This subroutine defines the calculation method to perform the characterization,& based on the available experimental data. If the molecular weight data is experimental, define the mole fractions, molecular weights and densities directly from the input file. On the other hand, if the molecular weights are assumed, they are recalculated according to the methodology described by Martin et al and the molar fractions of the fluid are recalculated.

Arguments

Type IntentOptional Attributes Name
type(FluidData), intent(inout) :: fluid

Derived type to save inlet or experimental information of fluid to be characterized.

character(len=*), intent(in) :: mw_source

This variable indicates the source of the input data, that is, whether they are experimental or not.

character(len=*), intent(in), optional :: method

this option allows choose beetwen obtaining plus_mw or global_mw reported in the experimental information .

type(FluidDataOut), intent(inout) :: characterization

Derive type variable to save results of characterization methodology.