Skip to content

Commit

Permalink
Merge pull request #550 from pbauman/thermochem-parsing-part2-antioch
Browse files Browse the repository at this point in the history
Thermochemsity Parsing Refactoring Part 2: Antioch
  • Loading branch information
pbauman authored Jul 27, 2018
2 parents 55fcd4d + 1ed03ea commit 41f208e
Show file tree
Hide file tree
Showing 51 changed files with 2,264 additions and 567 deletions.
13 changes: 13 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
Version 0.9.0 (in progress)
* C++11 compiler now required
* Minimum libMesh git hash for this release is: 2d9b8bc
* Minimum Antioch git hash is now: e17822d
* Use factory pattern for DiffSolver, now support
specifying DiffSolver type in inputfile,
add support for libMesh::PetscDiffSolver
* Refactor thermochemistry input options parsing.
See master_example_inputfile.in for details. Backward
compatibility with the input file will be maintained
for one release.
* Add Full support for Antioch XML parser for parsing
Antioch thermochemistry and transport data
* Update Cantera transport to respect transport model
specified in the XML file.
* Updated ozone_flame example with run scripts for both
Antioch and Cantera versions. Also updated to illustrate
overriding input options on the command line and AMR
for the final step.

Version 0.8.0
* Minimum libMesh git hash for this release is: 8be0a4e
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ Optional Packages
-----------------

To enable the reacting low Mach Navier-Stokes physics class, GRINS must be compiled with
an external chemistry library. While [Cantera](http://code.google.com/p/cantera/) is
partially supported, [Antioch](https://github.com/libantioch/antioch) is fully
supported.
an external chemistry library. Both [Cantera](http://code.google.com/p/cantera/) and
[Antioch](https://github.com/libantioch/antioch) are fully supported.

The current required minimum hash for using Antioch is libantioch/antioch@ad78595 (libantioch/antioch#240).
The current required minimum hash for using Antioch is libantioch/antioch@e17822d (libantioch/antioch#265).


Building GRINS
Expand Down
67 changes: 48 additions & 19 deletions examples/master_example_inputfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,6 @@
# Notify that we're using Cantera
thermochemistry_library = 'cantera'

# Species in this gas mixture
species = 'N2 N C CN'

[./Cantera]
# Specify the mixture to be used. This is the "mixture" or "phase"
# given in the chemical_data file. The user must set this
Expand All @@ -197,37 +194,63 @@
# Arbitrary material name. Here we describe input parameters related
# to the Antioch thermochemistry library. These are used for reacting
# flow Physics. Note that units here *must* be SI.
# Although we support ASCII input to Antioch, XML format is much preferred.
# The parsing type is determined by the suffix on the chemical data file:
# .dat --> ASCII
# .xml --> XML
# .chemkin --> CHEMKIN (not yet supported)
[./AntiochMaterial]
[./GasMixture]
# Notify that we're using Antioch
thermochemistry_library = 'antioch'

# Species in this gas mixture
species = 'N2 N C CN'

# Path to file containing kinetics data.
kinetics_data = 'datafile.xml'

# Antioch model specification
[./Antioch]

# For XML, we assume you have all kinetics, thermo, and transport data
# (modulo Blotter or Sutherland data, which are specified in separate files).
# For the thermo, we will query the XML file to determine whether it's NASA7
# or NASA9. NASA models are always used for the chemistry and if
# thermo_model (see below) is ideal_gas, then that NASA model will
# also be used there.
chemical_data = 'datafile.xml'

# Specify the mixture to be used. This is the "mixture" or "phase"
# given in the chemical_data file if it's an xml file.
# The user must set this when using an XML file since the data file
# may contain more than one mixture. If using ASCII parsing, this
# variable is not used and not needed.
gas_mixture = 'air4sp'


# The type of transport model. Currently accepted values
# are: constant, mixture_averaged
transport_model = 'constant'

# Model used for computing thermodynamic quantities.
# Currently accepted values are: cea, stat_mech
# Note: CEA data is internally used to the kinetics
# calculation and this option will not effect that.
thermo_model = 'cea'
# Currently accepted values are: ideal_gas, stat_mech
#
# ideal_gas corresponds to assuming electronic states are not populated
# and vibrational are partially populated and computed by taking the NASA
# curve fit value for the total and subtracting the translational and
# vibrational energy. This is a common model in combustion applications.
#
# stat_mech will use statistical mechanics relations to compute translational,
# rotational, vibrational, and electronic energies. Note these strongly depend
# on having the correct modes/degenercies for vibrational and electronic states
# for each species.
thermo_model = 'ideal_gas'

# Model used for computing viscosity.
# Currently accepted values are:
# constant (only valid with transport_model = constant)
# blottner (transport_model = mixture_averaged, requires blottner_data)
# sutherland (transport_model = mixture_averaged, requires sutherland_data),
# kinetics_theory (transport_model = mixture_averaged, requires transport_data, requires
# thermal_conductivity_model and mass_diffusivity_model to be kinetics_theory)
# kinetics_theory (* transport_model = mixture_averaged,
# * requires transport_data if using ASCII parsing or have data in XML file
# if using XML parsing
# * requires thermal_conductivity_model and mass_diffusivity_model
# to be kinetics_theory)
#
# For viscosity_model = 'constant', the viscosity value
# will be parsed from [Materials/material-name/Viscosity/value]
Expand All @@ -238,8 +261,11 @@
# constant (only valid with transport_model = constant)
# constant_prandtl
# eucken (transport_model = mixture_averaged, requires thermo_model = stat_mech)
# kinetics_theory (transport_model = mixture_averaged, requires transport_data, requires
# viscosity_model and mass_diffusivity_model to be kinetics_theory)
# kinetics_theory (* transport_model = mixture_averaged,
# * requires transport_data if using ASCII parsing or have data in XML file
# if using XML parsing
# * requires viscosity_model and mass_diffusivity_model
# to be kinetics_theory)
#
# For thermal_conductivity_model = 'constant', the conductivity value
# will be parsed from [Materials/material-name/ThermalConductivity/value]
Expand All @@ -251,8 +277,11 @@
# Model used for computing mass diffusivity
# Currently accepted values are:
# constant_lewis (transport_model = mixture_averaged, constant)
# kinetics_theory (transport_model = mixture_averaged, requires transport_data, requires
# viscosity_model and thermal_conductivity_model to be kinetics_theory)
# kinetics_theory (* transport_model = mixture_averaged,
# * requires transport_data if using ASCII parsing or have data in XML file
# if using XML parsing
# * requires viscosity_model and thermal_conductivity_model
# to be kinetics_theory)
#
# For mass_diffusivity_model = 'constant_lewis', the lewis number
# will be parsed from [Materials/material-name/LewisNumber/value]
Expand Down
20 changes: 12 additions & 8 deletions src/physics/include/grins/antioch_instantiation_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@
Antioch::EuckenThermalConductivity<Antioch::StatMechThermodynamics<libMesh::Real> >, \
Antioch::ConstantLewisDiffusivity<libMesh::Real> >; \
template class GRINS::class_name<curve_fit, \
Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,curve_fit>, libMesh::Real>, \
Antioch::IdealGasThermo<curve_fit,libMesh::Real>, \
Antioch::SutherlandViscosity<libMesh::Real>, \
Antioch::EuckenThermalConductivity<Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,curve_fit>, libMesh::Real> >, \
Antioch::EuckenThermalConductivity<Antioch::IdealGasThermo<curve_fit,libMesh::Real> >, \
Antioch::ConstantLewisDiffusivity<libMesh::Real> >; \
template class GRINS::class_name<curve_fit, \
Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,curve_fit>, libMesh::Real>, \
Antioch::IdealGasThermo<curve_fit,libMesh::Real>, \
Antioch::BlottnerViscosity<libMesh::Real>, \
Antioch::EuckenThermalConductivity<Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,curve_fit>, libMesh::Real> >, \
Antioch::EuckenThermalConductivity<Antioch::IdealGasThermo<curve_fit,libMesh::Real> >, \
Antioch::ConstantLewisDiffusivity<libMesh::Real> >

#define INSTANTIATE_ANTIOCH_TRANSPORT(class_name) \
INSTANTIATE_ANTIOCH_TRANSPORT_RAW(class_name,Antioch::CEACurveFit<libMesh::Real>)
INSTANTIATE_ANTIOCH_TRANSPORT_RAW(class_name,Antioch::CEACurveFit<libMesh::Real>); \
INSTANTIATE_ANTIOCH_TRANSPORT_RAW(class_name,Antioch::NASA7CurveFit<libMesh::Real>); \
INSTANTIATE_ANTIOCH_TRANSPORT_RAW(class_name,Antioch::NASA9CurveFit<libMesh::Real>)

#ifdef ANTIOCH_HAVE_GSL
#define INSTANTIATE_ANTIOCH_KINETICS_THEORY_TRANSPORT_RAW(class_name,curve_fit) \
Expand All @@ -62,13 +64,15 @@
Antioch::KineticsTheoryThermalConductivity<Antioch::StatMechThermodynamics<libMesh::Real>,libMesh::Real>, \
Antioch::MolecularBinaryDiffusion<libMesh::Real,Antioch::GSLSpliner> >; \
template class GRINS::class_name<curve_fit, \
Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,curve_fit>, libMesh::Real>, \
Antioch::IdealGasThermo<curve_fit,libMesh::Real>, \
Antioch::KineticsTheoryViscosity<libMesh::Real,Antioch::GSLSpliner>, \
Antioch::KineticsTheoryThermalConductivity<Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,curve_fit> >,libMesh::Real>, \
Antioch::KineticsTheoryThermalConductivity<Antioch::IdealGasThermo<curve_fit,libMesh::Real>, libMesh::Real>, \
Antioch::MolecularBinaryDiffusion<libMesh::Real,Antioch::GSLSpliner> >

#define INSTANTIATE_ANTIOCH_KINETICS_THEORY_TRANSPORT(class_name) \
INSTANTIATE_ANTIOCH_KINETICS_THEORY_TRANSPORT_RAW(class_name,Antioch::CEACurveFit<libMesh::Real>)
INSTANTIATE_ANTIOCH_KINETICS_THEORY_TRANSPORT_RAW(class_name,Antioch::CEACurveFit<libMesh::Real>); \
INSTANTIATE_ANTIOCH_KINETICS_THEORY_TRANSPORT_RAW(class_name,Antioch::NASA7CurveFit<libMesh::Real>); \
INSTANTIATE_ANTIOCH_KINETICS_THEORY_TRANSPORT_RAW(class_name,Antioch::NASA9CurveFit<libMesh::Real>)

#endif // ANTIOCH_HAVE_GSL

Expand Down
Loading

0 comments on commit 41f208e

Please sign in to comment.