Fortran version
The Fortran API can be included in your code as follow:
!Include library
include "Asali.f90"
!Main
program example
use asali
implicit none
character(len=200), dimension(3) :: names
real, dimension(3) :: x, cp
names(1) = 'H2'
names(2) = 'O2'
names(3) = 'N2'
x(1) = 0.1
x(2) = 0.2
x(3) = 1 - x(1) - x(2)
!Set up composition/pressure and temperature
call set_temperature(393.15)
call set_pressure(4e05)
call set_number_of_species(3)
call set_species_names(names)
call set_mole_fraction(x)
!Properties evaluation
cp = get_species_mass_specific_heat()
Example and database generator can be compiled by typing:
./compile.sh
To convert the Asali database into Fortran code run:
./database-generator
Available thermodynamic and transport properties
ASALI estimates different thermodynamic and transport properties (N
is the number of species):
Function | Estimated property | Return type | Unit dimension |
---|---|---|---|
get_density() | Mixture density | real | kg/m3 |
get_mixture_molecular_weight() | Mixture molecular weight | real | g/mol |
get_mixture_thermal_conductivity() | Mixture thermal conductivity | real | W/m/K |
get_mixture_viscosity() | Mixture viscosity | real | Pa*s |
get_mixture_molar_specific_heat() | Mixture specific heat | real | J/kmol/K |
get_mixture_mass_specific_heat() | Mixture specific heat | real | J/kg/K |
get_mixture_molar_enthalpy() | Mixture enthalpy | real | J/kmol |
get_mixture_mass_enthalpy() | Mixture enthalpy | real | J/kg |
get_mixture_molar_entropy() | Mixture entropy | real | J/kmol/K |
get_mixture_mass_entropy() | Mixture entropy | real | J/kg/K |
get_mixture_diffusion() | Mixture diffusivity | real | m2/s |
get_species_thermal_conductivity() | Single specie thermal conductivity | real, dimension(N) | W/m/K |
get_species_viscosity() | Single specie viscosity | real, dimension(N) | Pa*s |
get_species_molar_specific_heat() | Single specie specific heat | real, dimension(N) | J/kmol/K |
get_species_mass_specific_heat() | Single specie specific heat | real, dimension(N) | J/kg/K |
get_species_molar_enthalpy() | Single specie enthalpy | real, dimension(N) | J/kmol |
get_species_mass_enthalpy() | Single specie enthalpy | real, dimension(N) | J/kg |
get_species_molar_entropy() | Single specie entropy | real, dimension(N) | J/kmol/K |
get_species_mass_entropy() | Single specie entropy | real, dimension(N) | J/kg/K |
get_aritmetic_mean_gas_velocity() | Single gas velocity | real, dimension(N) | m/s |
get_mean_free_path() | Single mean free path | real, dimension(N) | m |
get_binary_diffusion() | Single binary diffusion | real, dimension(N,N) | m2/s |