AGA8 WebAssembly  1.0
bindings for AGA8 gas properties calculations
Loading...
Searching...
No Matches
Gross.h
Go to the documentation of this file.
1/*
2This software was developed by employees of the National Institute of Standards and Technology (NIST),
3an agency of the Federal Government and is being made available as a public service. Pursuant to title 17
4United States Code Section 105, works of NIST employees are not subject to copyright protection in the
5United States. This software may be subject to foreign copyright. Permission in the United States and in
6foreign countries, to the extent that NIST may hold copyright, to use, copy, modify, create derivative works,
7and distribute this software and its documentation without fee is hereby granted on a non-exclusive basis,
8provided that this notice and disclaimer of warranty appears in all copies.
9
10THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY,
11INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED
12WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY
13WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE
14ERROR FREE. IN NO EVENT SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT,
15SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE,
16WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY
17PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF,
18OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
19*/
20#ifndef AGA8Gross_H_
21#define AGA8Gross_H_
22
23#include <vector>
24#include <string>
25
26void MolarMassGross(const std::vector<double> &x, double &Mm);
27void PressureGross(const double T, const double D, const std::vector<double> &xGrs, const double HCH, double &P, double &Z, int &ierr, std::string &herr);
28void DensityGross(const double T, const double P, const std::vector<double> &xGrs, const double HCH, double &D, int &ierr, std::string &herr);
29void GrossHv(const std::vector<double> &x, std::vector<double> &xGrs, double &HN, double &HCH);
30void GrossInputs(const double T, const double P, const std::vector<double> &x, std::vector<double> &xGrs, double &Gr, double &HN, double &HCH, int &ierr, std::string &herr);
31void Bmix(const double T, const std::vector<double> &xGrs, const double HCH, double &B, double &C, int &ierr, std::string &herr);
32void GrossMethod1(const double Th, const double Td, const double Pd, std::vector<double> &xGrs, const double Gr, const double Hv, double & Mm, double &HCH, double &HN, int &ierr, std::string &herr);
33void GrossMethod2(const double Th, const double Td, const double Pd, std::vector<double> &xGrs, const double Gr, double &Hv, double &Mm, double &HCH, double &HN, int &ierr, std::string &herr);
34void SetupGross();
35
36#endif
void GrossHv(const std::vector< double > &x, std::vector< double > &xGrs, double &HN, double &HCH)
Calculate ideal heating values based on composition.
Definition Gross.cpp:317
void GrossMethod2(const double Th, const double Td, const double Pd, std::vector< double > &xGrs, const double Gr, double &Hv, double &Mm, double &HCH, double &HN, int &ierr, std::string &herr)
Initialize variables required in the GROSS equation with Method 2 of the AGA 8 Part 1 publication.
Definition Gross.cpp:594
void DensityGross(const double T, const double P, const std::vector< double > &xGrs, const double HCH, double &D, int &ierr, std::string &herr)
Calculate density as a function of temperature and pressure.
Definition Gross.cpp:236
void PressureGross(const double T, const double D, const std::vector< double > &xGrs, const double HCH, double &P, double &Z, int &ierr, std::string &herr)
Calculate pressure as a function of temperature and density.
Definition Gross.cpp:183
void GrossMethod1(const double Th, const double Td, const double Pd, std::vector< double > &xGrs, const double Gr, const double Hv, double &Mm, double &HCH, double &HN, int &ierr, std::string &herr)
Initialize variables required in the GROSS equation with Method 1 of the AGA 8 Part 1 publication.
Definition Gross.cpp:517
void SetupGross()
Initialize all the constants and parameters in the GROSS model.
Definition Gross.cpp:651
void Bmix(const double T, const std::vector< double > &xGrs, const double HCH, double &B, double &C, int &ierr, std::string &herr)
Calculate 2nd and 3rd virial coefficients for the mixture at T.
Definition Gross.cpp:412
void GrossInputs(const double T, const double P, const std::vector< double > &x, std::vector< double > &xGrs, double &Gr, double &HN, double &HCH, int &ierr, std::string &herr)
Calculate relative density and heating values based on composition.
Definition Gross.cpp:364
void MolarMassGross(const std::vector< double > &x, double &Mm)
Calculate molar mass of the mixture with the compositions contained in the x() input array.
Definition Gross.cpp:143