RxnHelperUtils

Documentation for RxnHelperUtils.

RxnHelperUtils.average_molwtMethod

Function for calculating the average molecular weight

Usage:

average_molwt(molfracs,molwt)

  • molfracs::Array{Float64,1} : vector of mole fraction
  • molwt::Array{Float64,1} : vector of molecular weights
source
RxnHelperUtils.convert2siMethod

Function for converting any unit to SI unit.

Usage:

convert2si(u::String) The function will return the corresponding value in SI units

source
RxnHelperUtils.create_headerMethod

Function for creating the headers in the output file

Usage:

createheader(filestream, args...)

  • file_stream: output file stram
  • args... : variable arguments, which are headers
source
RxnHelperUtils.densityMethod

Function for the calculation of density

Usage

density(avg_molwt, T, p)

  • avg_molwt : average molecular weight
  • T : temperature in K
  • p : pressure in Pa
source
RxnHelperUtils.get_collection_from_xmlMethod

Function to get vector of strings contained in a tag. Ideal for getting the species names

Usage:

getcollectionfrom_xml(xmlroot,tag)

  • xmlroot::XMLElement : The xml root node
  • tag::String : name of the tag

The function returns vector of strings.

source
RxnHelperUtils.get_indexMethod

getindex(sp,ig) Get the index of species in the gasphase limits #Usage getindex(sp,ig)

  • sp::String : species name
  • sp_list::Array{String,1} : Array of species names
source
RxnHelperUtils.get_molefraction_from_xmlMethod

Function to get the mole fractions of species

Usage:

getmolefractionfrom_xml(xmlroot,molwt,gasphase)

  • xmlroot::XMLElement : The xml root node
  • molwt::Array{Float64} : Vector of molecular weights
source
RxnHelperUtils.get_text_from_xmlMethod

Function to get the file path from an xml tag

Usage:

gettextfrom_xml(xmlroot,tag)

  • xmlroot::XMLElement : The xml root node
  • tag::String : name of the tag

The function returns string of file path

source
RxnHelperUtils.get_value_from_xmlMethod

Function to get floating point value from an xml tag

Usage:

getvaluefrom_xml(xmlroot,tag)

  • xmlroot::XMLElement : The xml root node
  • tag::String : name of the tag

The function returns the floating point value contained in the tag

source
RxnHelperUtils.massfrac_to_molefrac!Method

Function to convert massfractions to mole fractions

Usage:

massfrac_to_molefrac!(massfracs,mol_wt,molefracs)
  • massfracs::Array{Float64,1} : Vector of massfractions
  • mol_wt::Array{Float64,1} : Vector of molecular weights
  • molefracs::Array{Float64,1} : Vector of molefractions
source
RxnHelperUtils.massfrac_to_molefracMethod

Function to convert massfractions to mole fractions

Usage:

massfractomolefrac(massfracs,mol_wt,molefracs)

  • massfracs::Array{Float64,1} : Vector of massfractions
  • mol_wt::Array{Float64,1} : Vector of molecular weights
source
RxnHelperUtils.molefrac_to_massfrac!Method

Function to convert molefractions to massfractions

Usage:

molefrac_to_massfrac!(massfracs,molefracs,mol_wt)
  • molefracs::Array{Float64,1} : Vector of molefractions
  • mol_wt::Array{Float64,1} : Vector of molecular weights
source
RxnHelperUtils.output_fileMethod

Function for creating path to the output file

Usage

outputfile(inputfile::String, output_file::String)

  • input_file::String : input file including the path specification
  • output_file::String : output file including path specification

The output file will be placed in the same location as that of the input file. This function finds the location of the input file, constructs the path based on the input file location

source
RxnHelperUtils.parse_compositionMethod

Function to parse the composition string

Usage:

parse_composition(composition_data,sp_list)
  • composition_data::String : composition specification String
  • sp_list:Array{String,1}: Array of species names
source
RxnHelperUtils.write_csvMethod

Function for writing data in the csv file format

Usage:

writecsv(filestream, data)

  • file_stream: output file stream
  • args... : any mix of arguments
source
RxnHelperUtils.write_csvMethod

Function for writing data in the csv file format

Usage:

writecsv(filestream, data)

  • file_stream: output file stream
  • data : Vector of Float64
source
RxnHelperUtils.write_csvMethod

Function for writing data in the csv file format

Usage:

writecsv(filestream, data)

  • file_stream: output file stream
  • data : Vector of strings
source
RxnHelperUtils.write_csvMethod

Function for writing data in the csv file format

Usage:

writecsv(filestream, data)

  • file_stream: output file stream
  • data : Vector of Float64, String, or Int64
source
RxnHelperUtils.write_to_fileMethod

Function for writing data in the output file

Usage:

writetofile(file_stream, args...)

  • file_stream: output file stream
  • args... : variable arguments, which is the floating point data
source