Skip to content
Snippets Groups Projects
Commit 3528fde7 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/add-new-components_new' into 'master'

[test][material][components] added new components needed for the biomin example

See merge request !1855
parents 95f17866 750f1524
No related branches found
No related tags found
1 merge request!1855[test][material][components] added new components needed for the biomin example
// -*- 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
// -*- 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
// -*- 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
// -*- 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
// -*- 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
...@@ -10,6 +10,12 @@ dumux_add_test(NAME plot_air ...@@ -10,6 +10,12 @@ dumux_add_test(NAME plot_air
CMD_ARGS "Air" CMD_ARGS "Air"
LABELS unit material) 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 dumux_add_test(NAME plot_benzene
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
...@@ -23,10 +29,10 @@ dumux_add_test(NAME plot_brine ...@@ -23,10 +29,10 @@ dumux_add_test(NAME plot_brine
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_calcite dumux_add_test(NAME plot_calcite
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
CMD_ARGS "Calcite" CMD_ARGS "Calcite"
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_calciumion dumux_add_test(NAME plot_calciumion
TARGET plot_component TARGET plot_component
...@@ -35,22 +41,22 @@ dumux_add_test(NAME plot_calciumion ...@@ -35,22 +41,22 @@ dumux_add_test(NAME plot_calciumion
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_cao dumux_add_test(NAME plot_cao
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
CMD_ARGS "CaO" CMD_ARGS "CaO"
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_cao2h2 dumux_add_test(NAME plot_cao2h2
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
CMD_ARGS "CaO2H2" CMD_ARGS "CaO2H2"
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_carbonateion dumux_add_test(NAME plot_carbonateion
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
CMD_ARGS "CarbonateIon" CMD_ARGS "CarbonateIon"
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_ch4 dumux_add_test(NAME plot_ch4
TARGET plot_component TARGET plot_component
...@@ -58,11 +64,23 @@ dumux_add_test(NAME plot_ch4 ...@@ -58,11 +64,23 @@ dumux_add_test(NAME plot_ch4
CMD_ARGS "CH4" CMD_ARGS "CH4"
LABELS unit material) 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 dumux_add_test(NAME plot_granite
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
CMD_ARGS "Granite" CMD_ARGS "Granite"
LABELS unit material) LABELS unit material)
dumux_add_test(NAME plot_h2 dumux_add_test(NAME plot_h2
TARGET plot_component TARGET plot_component
...@@ -112,12 +130,24 @@ dumux_add_test(NAME plot_simpleh2o ...@@ -112,12 +130,24 @@ dumux_add_test(NAME plot_simpleh2o
CMD_ARGS "SimpleH2O" CMD_ARGS "SimpleH2O"
LABELS unit material) 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 dumux_add_test(NAME plot_trichloroethene
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
CMD_ARGS "Trichloroethene" CMD_ARGS "Trichloroethene"
LABELS unit material) 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 dumux_add_test(NAME plot_xylene
TARGET plot_component TARGET plot_component
COMMAND ./plot_component COMMAND ./plot_component
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/io/gnuplotinterface.hh> #include <dumux/io/gnuplotinterface.hh>
#include <dumux/material/components/air.hh> #include <dumux/material/components/air.hh>
#include <dumux/material/components/ammonia.hh>
#include <dumux/material/components/benzene.hh> #include <dumux/material/components/benzene.hh>
#include <dumux/material/components/brine.hh> #include <dumux/material/components/brine.hh>
#include <dumux/material/components/calcite.hh> #include <dumux/material/components/calcite.hh>
...@@ -41,7 +42,9 @@ ...@@ -41,7 +42,9 @@
#include <dumux/material/components/cao2h2.hh> #include <dumux/material/components/cao2h2.hh>
#include <dumux/material/components/carbonateion.hh> #include <dumux/material/components/carbonateion.hh>
#include <dumux/material/components/ch4.hh> #include <dumux/material/components/ch4.hh>
#include <dumux/material/components/chlorideion.hh>
#include <dumux/material/components/co2.hh> #include <dumux/material/components/co2.hh>
#include <dumux/material/components/glucose.hh>
#include <dumux/material/components/granite.hh> #include <dumux/material/components/granite.hh>
#include <dumux/material/components/h2.hh> #include <dumux/material/components/h2.hh>
#include <dumux/material/components/h2o.hh> #include <dumux/material/components/h2o.hh>
...@@ -51,7 +54,9 @@ ...@@ -51,7 +54,9 @@
#include <dumux/material/components/nacl.hh> #include <dumux/material/components/nacl.hh>
#include <dumux/material/components/o2.hh> #include <dumux/material/components/o2.hh>
#include <dumux/material/components/simpleh2o.hh> #include <dumux/material/components/simpleh2o.hh>
#include <dumux/material/components/sodiumion.hh>
#include <dumux/material/components/trichloroethene.hh> #include <dumux/material/components/trichloroethene.hh>
#include <dumux/material/components/urea.hh>
#include <dumux/material/components/xylene.hh> #include <dumux/material/components/xylene.hh>
#include <dumux/material/components/componenttraits.hh> #include <dumux/material/components/componenttraits.hh>
...@@ -337,6 +342,8 @@ int main(int argc, char *argv[]) ...@@ -337,6 +342,8 @@ int main(int argc, char *argv[])
if (compName == "Air") if (compName == "Air")
plotStuff< Components::Air<double> >(openPlotWindow); plotStuff< Components::Air<double> >(openPlotWindow);
else if (compName == "Ammonia")
plotStuff< Components::Ammonia<double> >(openPlotWindow);
else if (compName == "Benzene") else if (compName == "Benzene")
plotStuff< Components::Benzene<double> >(openPlotWindow); plotStuff< Components::Benzene<double> >(openPlotWindow);
else if (compName == "Brine") else if (compName == "Brine")
...@@ -356,6 +363,10 @@ int main(int argc, char *argv[]) ...@@ -356,6 +363,10 @@ int main(int argc, char *argv[])
plotStuff< Components::CarbonateIon<double> >(openPlotWindow); plotStuff< Components::CarbonateIon<double> >(openPlotWindow);
else if (compName == "CH4") else if (compName == "CH4")
plotStuff< Components::CH4<double> >(openPlotWindow); 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") else if (compName == "Granite")
plotStuff< Components::Granite<double> >(openPlotWindow); plotStuff< Components::Granite<double> >(openPlotWindow);
else if (compName == "H2") else if (compName == "H2")
...@@ -374,8 +385,12 @@ int main(int argc, char *argv[]) ...@@ -374,8 +385,12 @@ int main(int argc, char *argv[])
plotStuff< Components::O2<double> >(openPlotWindow); plotStuff< Components::O2<double> >(openPlotWindow);
else if (compName == "SimpleH2O") else if (compName == "SimpleH2O")
plotStuff< Components::SimpleH2O<double> >(openPlotWindow); plotStuff< Components::SimpleH2O<double> >(openPlotWindow);
else if (compName == "SodiumIon")
plotStuff< Components::SodiumIon<double> >(openPlotWindow);
else if (compName == "Trichloroethene") else if (compName == "Trichloroethene")
plotStuff< Components::Trichloroethene<double> >(openPlotWindow); plotStuff< Components::Trichloroethene<double> >(openPlotWindow);
else if (compName == "Urea")
plotStuff< Components::Urea<double> >(openPlotWindow);
else if (compName == "Xylene") else if (compName == "Xylene")
plotStuff< Components::Xylene<double> >(openPlotWindow); plotStuff< Components::Xylene<double> >(openPlotWindow);
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment