data_from_input Module

This module reads the fluid information from the corresponding input file.


Uses

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

Used by

  • module~~data_from_input~~UsedByGraph module~data_from_input data_from_input module~pruebas pruebas module~pruebas->module~data_from_input module~routines routines module~routines->module~data_from_input

Functions

public function data_from_file(file) result(data)

This funtion allows to obtain experimental data from data imput

Arguments

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

file name

Return Value type(FluidData)


Subroutines

public subroutine mass_fractions(file, w, product_z_mw_def_comp, product_z_mw_scn, sum_z_mw_i, product_z_mw_plus, def_comp_w, scn_w, plus_w)

This routine obtains the mass fractions of the fluid’s compounds from the input file, additionally, it calculates the product

Arguments

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

file name

real(kind=pr), intent(out), allocatable :: w(:)

mass fractions of the fluid’s compounds

real(kind=pr), intent(out), allocatable :: product_z_mw_def_comp(:)

product between composition and molecular weight of defind components

real(kind=pr), intent(out), allocatable :: product_z_mw_scn(:)

product between composition and molecular weight of scn fractions

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

sum of the product between composition and molecular weight of the fluid’s compounds

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

product between composition and molecular weight of residual fraction

real(kind=pr), intent(out), allocatable :: def_comp_w(:)
real(kind=pr), intent(out), allocatable :: scn_w(:)
real(kind=pr), intent(out) :: plus_w

public subroutine read_components(file, def_components, scn, scn_plus)

Reads the component names data from input file

Arguments

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

file name

character(len=15), intent(out), allocatable :: def_components(:)

names of defined components

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

names of scn fractions

character(len=15), intent(out) :: scn_plus

name of residual fraction

public subroutine read_composition(file, def_comp_z, scn_z, plus_z)

Reads the molar compositions of each component from input file

Arguments

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

file name

real(kind=pr), intent(out), allocatable :: def_comp_z(:)

set of corresponding mole fractions of defined components

real(kind=pr), intent(out), allocatable :: scn_z(:)

set of corresponding mole fractions of scn cuts

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

composition of residual fraction from input file

public subroutine read_density(file, scn_density, plus_density)

Reads the density of each component from the input file and calculated molar volume since C6 fraction.

Arguments

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

file name

real(kind=pr), intent(out), allocatable :: scn_density(:)

set of corresponding densities of scn cuts

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

density of residual fraction from input file

public subroutine read_molecular_weight(file, def_comp_mw, scn_mw, plus_mw)

Reads the molecular weights of each component from the input file

Arguments

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

file name

real(kind=pr), intent(out), allocatable :: def_comp_mw(:)

set of corresponding molecular weights of defined components

real(kind=pr), intent(out), allocatable :: scn_mw(:)

set of corresponding molecular weights of scn cuts

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

molecular weight of residual fraction

public subroutine read_setup(file, def_comp_nc, scn_nc, scn_nc_ps, numbers_ps)

Reads the setup data from input file

Arguments

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

file name

integer, intent(out) :: def_comp_nc

number of defined components being considered in the oil

integer, intent(out) :: scn_nc

number of single cuts being considered in the oil

integer, intent(out) :: scn_nc_ps

CN from which all SCN fractions will be lumped into the specified number of pseudos

integer, intent(out) :: numbers_ps

number of pseudos in which the scn fractions grouped