diff --git a/dumux/material/components/ammonia.hh b/dumux/material/components/ammonia.hh new file mode 100644 index 0000000000000000000000000000000000000000..22ab1ea141ebd6fe74e4bd10be8ca83071a6a33d --- /dev/null +++ b/dumux/material/components/ammonia.hh @@ -0,0 +1,55 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \ingroup Components + * \brief A class for the Ammonia (NH3) component properties + */ +#ifndef DUMUX_MATERIAL_COMPONENTS_NH3_HH +#define DUMUX_MATERIAL_COMPONENTS_NH3_HH + +#include <dumux/material/components/base.hh> + +namespace Dumux { +namespace Components { + +template <class Scalar> +class Ammonia +: public Components::Base<Scalar, Ammonia<Scalar> > +{ +public: + + /*! + * \brief A human readable name for NH3. + */ + static std::string name() + { return "NH3"; } + + /*! + * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of NH3. + */ + static Scalar molarMass() + { return 0.017031; } // kg/mol + +}; + +} // end namespace Components +} // end namespace Dumux + +#endif diff --git a/dumux/material/components/chlorideion.hh b/dumux/material/components/chlorideion.hh new file mode 100644 index 0000000000000000000000000000000000000000..57ffb73fd71cb3657ecb541b67253b4b4e27bb2b --- /dev/null +++ b/dumux/material/components/chlorideion.hh @@ -0,0 +1,64 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \ingroup Components + * \brief A class for the Cl- (Chloride ion) component properties + */ +#ifndef DUMUX_MATERIAL_COMPONENTS_CL_ION_HH +#define DUMUX_MATERIAL_COMPONENTS_CL_ION_HH + +#include <dumux/material/components/base.hh> +#include <dumux/material/components/ion.hh> + +namespace Dumux { +namespace Components { + +template <class Scalar> +class ChlorideIon +: public Components::Base<Scalar, ChlorideIon<Scalar> > +, public Components::Ion<Scalar, ChlorideIon<Scalar> > +{ +public: + /*! + * \brief A human readable name for the Cl- ion. + */ + static std::string name() + { return "Cl-"; } + + /*! + * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the Cl- ion. + */ + static Scalar molarMass() + { return 35.453e-3; } + + /*! + * \brief The charge of the Cl- ion. + */ + static constexpr int charge() + { + return -1; + } + +}; + +} // end namespace Components +} // end namespace Dumux + +#endif diff --git a/dumux/material/components/glucose.hh b/dumux/material/components/glucose.hh new file mode 100644 index 0000000000000000000000000000000000000000..4db90784ab7add77daa98ff2e1e218e612b997b1 --- /dev/null +++ b/dumux/material/components/glucose.hh @@ -0,0 +1,55 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ + +/*! + * \file + * \ingroup Components + * \brief A class for the Glucose component properties + */ +#ifndef DUMUX_MATERIAL_COMPONENTS_GLUCOSE_HH +#define DUMUX_MATERIAL_COMPONENTS_GLUCOSE_HH + +#include <dumux/material/components/base.hh> + +namespace Dumux { +namespace Components { + +template <class Scalar> +class Glucose +: public Components::Base<Scalar, Glucose<Scalar> > +{ +public: + + /*! + * \brief A human readable name for Glucose. + */ + static std::string name() + { return "Glucose"; } + + /*! + * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of Glucose. + */ + static Scalar molarMass() + { return 0.18016; } // kg/mol +}; + +} // end namespace Components +} // end namespace Dumux + +#endif diff --git a/dumux/material/components/sodiumion.hh b/dumux/material/components/sodiumion.hh new file mode 100644 index 0000000000000000000000000000000000000000..4304df72038c97441cd89e9b8a6671b13beabb42 --- /dev/null +++ b/dumux/material/components/sodiumion.hh @@ -0,0 +1,66 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \ingroup Components + * \brief A class for the Na+ (Sodium ion) component properties + */ +#ifndef DUMUX_MATERIAL_COMPONENTS_NA_ION_HH +#define DUMUX_MATERIAL_COMPONENTS_NA_ION_HH + +#include <dumux/material/components/base.hh> +#include <dumux/material/components/ion.hh> + +namespace Dumux { +namespace Components { + + +template <class Scalar> +class SodiumIon +: public Components::Base<Scalar, SodiumIon<Scalar> > +, public Components::Ion<Scalar, SodiumIon<Scalar> > +{ +public: + /*! + * \brief A human readable name for the Na+ ion. + */ + static std::string name() + { return "Na+"; } + + /*! + * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of the Na+ ion. + */ + static Scalar molarMass() + { return 22.9898e-3; } + + /*! + * \brief The charge of the Na+ ion. + */ + static constexpr int charge() + { + return +1; + } + +}; + +} // end namespace Components +} // end namespace Dumux + + +#endif diff --git a/dumux/material/components/urea.hh b/dumux/material/components/urea.hh new file mode 100644 index 0000000000000000000000000000000000000000..37d0787299fb1c78f2b49825e7cabd0b58f6011e --- /dev/null +++ b/dumux/material/components/urea.hh @@ -0,0 +1,56 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ + +/*! + * \file + * \ingroup Components + * \brief A class for the Urea component properties + */ +#ifndef DUMUX_MATERIAL_COMPONENTS_UREA_HH +#define DUMUX_MATERIAL_COMPONENTS_UREA_HH + +#include <dumux/material/components/base.hh> + +namespace Dumux { +namespace Components { + +template <class Scalar> +class Urea +: public Components::Base<Scalar, Urea<Scalar> > +{ +public: + + /*! + * \brief A human readable name for Urea. + */ + static std::string name() + { return "Urea"; } + + /*! + * \brief The molar mass in \f$\mathrm{[kg/mol]}\f$ of Urea. + */ + static Scalar molarMass() + { return 0.0606; } // kg/mol + +}; + +} // end namespace Components +} // end namespace Dumux + +#endif diff --git a/test/material/components/CMakeLists.txt b/test/material/components/CMakeLists.txt index 045e5f9b94057bc7b518e9f5ad7ff4db761c9e9f..09f2f3b88d5138d88a9d896f65040daadab186b3 100644 --- a/test/material/components/CMakeLists.txt +++ b/test/material/components/CMakeLists.txt @@ -10,6 +10,12 @@ dumux_add_test(NAME plot_air CMD_ARGS "Air" LABELS unit material) +dumux_add_test(NAME plot_ammonia + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "Ammonia" + LABELS unit material) + dumux_add_test(NAME plot_benzene TARGET plot_component COMMAND ./plot_component @@ -23,10 +29,10 @@ dumux_add_test(NAME plot_brine LABELS unit material) dumux_add_test(NAME plot_calcite - TARGET plot_component - COMMAND ./plot_component - CMD_ARGS "Calcite" - LABELS unit material) + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "Calcite" + LABELS unit material) dumux_add_test(NAME plot_calciumion TARGET plot_component @@ -35,22 +41,22 @@ dumux_add_test(NAME plot_calciumion LABELS unit material) dumux_add_test(NAME plot_cao - TARGET plot_component - COMMAND ./plot_component - CMD_ARGS "CaO" - LABELS unit material) + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "CaO" + LABELS unit material) dumux_add_test(NAME plot_cao2h2 - TARGET plot_component - COMMAND ./plot_component - CMD_ARGS "CaO2H2" - LABELS unit material) + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "CaO2H2" + LABELS unit material) dumux_add_test(NAME plot_carbonateion - TARGET plot_component - COMMAND ./plot_component - CMD_ARGS "CarbonateIon" - LABELS unit material) + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "CarbonateIon" + LABELS unit material) dumux_add_test(NAME plot_ch4 TARGET plot_component @@ -58,11 +64,23 @@ dumux_add_test(NAME plot_ch4 CMD_ARGS "CH4" LABELS unit material) +dumux_add_test(NAME plot_chlorideion + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "ChlorideIon" + LABELS unit material) + +dumux_add_test(NAME plot_glucose + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "Glucose" + LABELS unit material) + dumux_add_test(NAME plot_granite - TARGET plot_component - COMMAND ./plot_component - CMD_ARGS "Granite" - LABELS unit material) + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "Granite" + LABELS unit material) dumux_add_test(NAME plot_h2 TARGET plot_component @@ -112,12 +130,24 @@ dumux_add_test(NAME plot_simpleh2o CMD_ARGS "SimpleH2O" LABELS unit material) +dumux_add_test(NAME plot_sodiumion + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "SodiumIon" + LABELS unit material) + dumux_add_test(NAME plot_trichloroethene TARGET plot_component COMMAND ./plot_component CMD_ARGS "Trichloroethene" LABELS unit material) +dumux_add_test(NAME plot_urea + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "Urea" + LABELS unit material) + dumux_add_test(NAME plot_xylene TARGET plot_component COMMAND ./plot_component diff --git a/test/material/components/plotproperties.cc b/test/material/components/plotproperties.cc index 97641376e8d9710f414874778725e53abd3f5a2a..962a67892c34eeae9fbc7839078577e3e581cb8a 100644 --- a/test/material/components/plotproperties.cc +++ b/test/material/components/plotproperties.cc @@ -33,6 +33,7 @@ #include <dumux/common/parameters.hh> #include <dumux/io/gnuplotinterface.hh> #include <dumux/material/components/air.hh> +#include <dumux/material/components/ammonia.hh> #include <dumux/material/components/benzene.hh> #include <dumux/material/components/brine.hh> #include <dumux/material/components/calcite.hh> @@ -41,7 +42,9 @@ #include <dumux/material/components/cao2h2.hh> #include <dumux/material/components/carbonateion.hh> #include <dumux/material/components/ch4.hh> +#include <dumux/material/components/chlorideion.hh> #include <dumux/material/components/co2.hh> +#include <dumux/material/components/glucose.hh> #include <dumux/material/components/granite.hh> #include <dumux/material/components/h2.hh> #include <dumux/material/components/h2o.hh> @@ -51,7 +54,9 @@ #include <dumux/material/components/nacl.hh> #include <dumux/material/components/o2.hh> #include <dumux/material/components/simpleh2o.hh> +#include <dumux/material/components/sodiumion.hh> #include <dumux/material/components/trichloroethene.hh> +#include <dumux/material/components/urea.hh> #include <dumux/material/components/xylene.hh> #include <dumux/material/components/componenttraits.hh> @@ -337,6 +342,8 @@ int main(int argc, char *argv[]) if (compName == "Air") plotStuff< Components::Air<double> >(openPlotWindow); + else if (compName == "Ammonia") + plotStuff< Components::Ammonia<double> >(openPlotWindow); else if (compName == "Benzene") plotStuff< Components::Benzene<double> >(openPlotWindow); else if (compName == "Brine") @@ -356,6 +363,10 @@ int main(int argc, char *argv[]) plotStuff< Components::CarbonateIon<double> >(openPlotWindow); else if (compName == "CH4") plotStuff< Components::CH4<double> >(openPlotWindow); + else if (compName == "ChlorideIon") + plotStuff< Components::ChlorideIon<double> >(openPlotWindow); + else if (compName == "Glucose") + plotStuff< Components::Glucose<double> >(openPlotWindow); else if (compName == "Granite") plotStuff< Components::Granite<double> >(openPlotWindow); else if (compName == "H2") @@ -374,8 +385,12 @@ int main(int argc, char *argv[]) plotStuff< Components::O2<double> >(openPlotWindow); else if (compName == "SimpleH2O") plotStuff< Components::SimpleH2O<double> >(openPlotWindow); + else if (compName == "SodiumIon") + plotStuff< Components::SodiumIon<double> >(openPlotWindow); else if (compName == "Trichloroethene") plotStuff< Components::Trichloroethene<double> >(openPlotWindow); + else if (compName == "Urea") + plotStuff< Components::Urea<double> >(openPlotWindow); else if (compName == "Xylene") plotStuff< Components::Xylene<double> >(openPlotWindow); else