From 3bb3a5f50aa5127c0d07f56da7e709db3472506d Mon Sep 17 00:00:00 2001 From: BBArrosDias <44622222+BBArrosDias@users.noreply.github.com> Date: Sun, 23 Jun 2024 16:46:10 -0700 Subject: [PATCH] Revert "Closes #258. Remove `use_transport` flag" --- docs/contributors.md | 1 - docs/input-files.md | 1 + src/general/MixtureOptions.h | 93 +++++++++++++++++++----------------- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/docs/contributors.md b/docs/contributors.md index 9eab9148..29de591b 100644 --- a/docs/contributors.md +++ b/docs/contributors.md @@ -15,7 +15,6 @@ Pierre Schrooyen
Laurent Soucasse
Alessandro Turchi
[Ruben Di Battista](https://rdb.is)
-Matthew Goodson - [Corvid Technologies](https://www.corvidtec.com) Have you contributed but don't see your name? Open a PR on Github and add yourself in this file, we will be happy to add you. diff --git a/docs/input-files.md b/docs/input-files.md index 0bba4a53..1e85a20b 100644 --- a/docs/input-files.md +++ b/docs/input-files.md @@ -119,6 +119,7 @@ Attribute | Possible Values | D `thermal_conductivity` | `CG`, __LDLT__, `Wilke` | choice of heavy particle translational thermal conductivity algorithm `thermo_db` | __RRHO__, `NASA-7`, `NASA-9` | choice of [thermodynamic database](#thermodynamic_databases) `state_model` | __ChemNonEq1T__, `ChemNonEqTTv`, `Equil`, `EquilTP` | choice of [state model](#statemodels) +`use_transport` | `no`, __yes__ | whether or not to load transport data `viscosity` | `CG`, `Gupta-Yos`, __LDLT__, `Wilke` | choice of viscosity algorithm ### Species List Descriptor diff --git a/src/general/MixtureOptions.h b/src/general/MixtureOptions.h index 8ecbf42b..b25141b3 100644 --- a/src/general/MixtureOptions.h +++ b/src/general/MixtureOptions.h @@ -51,7 +51,7 @@ class MixtureOptions * species list. */ MixtureOptions(); - + /** * Copy constructor. */ @@ -59,6 +59,7 @@ class MixtureOptions : m_species_descriptor(options.m_species_descriptor), m_compositions(options.m_compositions), m_default_composition(options.m_default_composition), + m_load_transport(options.m_load_transport), m_source(options.m_source), m_state_model(options.m_state_model), m_thermo_db(options.m_thermo_db), @@ -67,32 +68,32 @@ class MixtureOptions m_thermal_conductivity(options.m_thermal_conductivity), m_gsi_mechanism(options.m_gsi_mechanism) { } - - /** - * Constructs a new MixtureOptions object from a mixture file (without the - * .xml extension). The file is first assumed to reside in the relative - * path from the local directory. If it does not exist there, then - * MPP_DATA_DIRECTORY/mixtures is checked. - */ - MixtureOptions(const std::string& mixture); - + /** - * Constructs a new MixtureOptions object from a mixture file (without the - * .xml extension). The file is first assumed to reside in the relative - * path from the local directory. If it does not exist there, then - * MPP_DATA_DIRECTORY/mixtures is checked. - */ - MixtureOptions(const char* mixture); - - /** - * Constructs a new MixtureOptions from an XmlElement. - */ - MixtureOptions(Utilities::IO::XmlElement& element); - - /** - * Destructor. - */ - ~MixtureOptions() {} + * Constructs a new MixtureOptions object from a mixture file (without the + * .xml extension). The file is first assumed to reside in the relative + * path from the local directory. If it does not exist there, then + * MPP_DATA_DIRECTORY/mixtures is checked. + */ + MixtureOptions(const std::string& mixture); + + /** + * Constructs a new MixtureOptions object from a mixture file (without the + * .xml extension). The file is first assumed to reside in the relative + * path from the local directory. If it does not exist there, then + * MPP_DATA_DIRECTORY/mixtures is checked. + */ + MixtureOptions(const char* mixture); + + /** + * Constructs a new MixtureOptions from an XmlElement. + */ + MixtureOptions(Utilities::IO::XmlElement& element); + + /** + * Destructor. + */ + ~MixtureOptions() {} /** * Assignment operator. @@ -102,7 +103,7 @@ class MixtureOptions swap(*this, options); return *this; } - + /** * Loads the mixture options from a mixture input file. */ @@ -117,63 +118,63 @@ class MixtureOptions * Gets the source of this mixture options (mixture file name). */ const std::string& getSource() const { - return m_source; + return m_source; } /** * Sets the options back to a default state. */ void setDefaultOptions(); - + /** * Gets the list of species names. */ const std::string& getSpeciesDescriptor() const { return m_species_descriptor; } - + /** * Sets the list of species names. */ void setSpeciesDescriptor(const std::string& descriptor) { m_species_descriptor = descriptor; } - + /** * Gets the mixture state model to be used. */ const std::string& getStateModel() const { return m_state_model; } - + /** * Sets the mixture state model to be used. */ void setStateModel(const std::string& state_model) { m_state_model.assign(state_model); } - + /** * Gets the thermodynamic database type to use. */ const std::string& getThermodynamicDatabase() const { return m_thermo_db; } - + /** * Sets which thermodynamic database is to be used. */ void setThermodynamicDatabase(const std::string& thermo_db) { m_thermo_db = thermo_db; } - + /** * Gets the name of the reaction mechanism to use. */ const std::string& getMechanism() const { return m_mechanism; } - + /** * Sets the name of the reaction mechanism. */ @@ -187,37 +188,37 @@ class MixtureOptions const std::string& getViscosityAlgorithm() const { return m_viscosity; } - + /** * Sets which viscosity algorithm to use. */ void setViscosityAlgorithm(const std::string& viscosity) { m_viscosity = viscosity; } - + /** * Gets the thermal conductivity algorithm to use. */ const std::string& getThermalConductivityAlgorithm() const { return m_thermal_conductivity; } - + /** * Sets the thermal conductivity algorithm to use. */ void setThermalConductivityAlgorithm( - const std::string& thermal_conductivity) + const std::string& thermal_conductivity) { m_thermal_conductivity = thermal_conductivity; } - + /** * Gets the Gas-Surface Interaction mechanism to use. */ const std::string& getGSIMechanism() const { return m_gsi_mechanism; } - + /** * Sets the Gas-Surface Interaction mechanism to use. */ @@ -326,7 +327,7 @@ class MixtureOptions bool addComposition( const Thermodynamics::Composition& c, bool make_default = false); - + const std::vector& compositions() const { return m_compositions; } @@ -340,13 +341,15 @@ class MixtureOptions private: std::string m_species_descriptor; - + std::vector m_compositions; int m_default_composition; //std::vector > m_default_composition; //bool m_has_default_composition; - std::string m_source; + bool m_load_transport; + + std::string m_source; std::string m_state_model; std::string m_thermo_db; std::string m_mechanism;