RxnHelperUtils
Documentation for RxnHelperUtils.
RxnHelperUtils.average_molwt
RxnHelperUtils.convert2si
RxnHelperUtils.create_header
RxnHelperUtils.density
RxnHelperUtils.get_collection_from_xml
RxnHelperUtils.get_index
RxnHelperUtils.get_molefraction_from_xml
RxnHelperUtils.get_path
RxnHelperUtils.get_text_from_xml
RxnHelperUtils.get_value_from_xml
RxnHelperUtils.massfrac_to_molefrac
RxnHelperUtils.massfrac_to_molefrac!
RxnHelperUtils.molefrac_to_massfrac!
RxnHelperUtils.output_file
RxnHelperUtils.parse_composition
RxnHelperUtils.write_csv
RxnHelperUtils.write_csv
RxnHelperUtils.write_csv
RxnHelperUtils.write_csv
RxnHelperUtils.write_to_file
RxnHelperUtils.average_molwt
— MethodFunction 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
RxnHelperUtils.convert2si
— MethodFunction for converting any unit to SI unit.
Usage:
convert2si(u::String) The function will return the corresponding value in SI units
RxnHelperUtils.create_header
— MethodFunction for creating the headers in the output file
Usage:
createheader(filestream, args...)
- file_stream: output file stram
- args... : variable arguments, which are headers
RxnHelperUtils.density
— MethodFunction for the calculation of density
Usage
density(avg_molwt, T, p)
- avg_molwt : average molecular weight
- T : temperature in K
- p : pressure in Pa
RxnHelperUtils.get_collection_from_xml
— MethodFunction 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.
RxnHelperUtils.get_index
— Methodgetindex(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
RxnHelperUtils.get_molefraction_from_xml
— MethodFunction 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
RxnHelperUtils.get_path
— Methodfunction for constructing relative path to a file #Usage: getpath(path::String, filename::String)
RxnHelperUtils.get_text_from_xml
— MethodFunction 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
RxnHelperUtils.get_value_from_xml
— MethodFunction 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
RxnHelperUtils.massfrac_to_molefrac!
— MethodFunction 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
RxnHelperUtils.massfrac_to_molefrac
— MethodFunction 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
RxnHelperUtils.molefrac_to_massfrac!
— MethodFunction 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
RxnHelperUtils.output_file
— MethodFunction 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
RxnHelperUtils.parse_composition
— MethodFunction 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
RxnHelperUtils.write_csv
— MethodFunction for writing data in the csv file format
Usage:
writecsv(filestream, data)
- file_stream: output file stream
- args... : any mix of arguments
RxnHelperUtils.write_csv
— MethodFunction for writing data in the csv file format
Usage:
writecsv(filestream, data)
- file_stream: output file stream
- data : Vector of Float64
RxnHelperUtils.write_csv
— MethodFunction for writing data in the csv file format
Usage:
writecsv(filestream, data)
- file_stream: output file stream
- data : Vector of strings
RxnHelperUtils.write_csv
— MethodFunction for writing data in the csv file format
Usage:
writecsv(filestream, data)
- file_stream: output file stream
- data : Vector of Float64, String, or Int64
RxnHelperUtils.write_to_file
— MethodFunction 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