From 7ebb2373c0f2dd56e1f04775d7f450806beaacb9 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Mon, 14 Dec 2020 13:28:45 +0100 Subject: [PATCH] [test][material] Add test for constant component --- test/material/components/CMakeLists.txt | 6 ++++++ test/material/components/plotproperties.cc | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/test/material/components/CMakeLists.txt b/test/material/components/CMakeLists.txt index 09f2f3b88d..a2fa8428da 100644 --- a/test/material/components/CMakeLists.txt +++ b/test/material/components/CMakeLists.txt @@ -64,6 +64,12 @@ dumux_add_test(NAME plot_ch4 CMD_ARGS "CH4" LABELS unit material) +dumux_add_test(NAME plot_constantcomponent + TARGET plot_component + COMMAND ./plot_component + CMD_ARGS "Constant" + LABELS unit material) + dumux_add_test(NAME plot_chlorideion TARGET plot_component COMMAND ./plot_component diff --git a/test/material/components/plotproperties.cc b/test/material/components/plotproperties.cc index 962a67892c..2ad468b5b1 100644 --- a/test/material/components/plotproperties.cc +++ b/test/material/components/plotproperties.cc @@ -43,6 +43,7 @@ #include <dumux/material/components/carbonateion.hh> #include <dumux/material/components/ch4.hh> #include <dumux/material/components/chlorideion.hh> +#include <dumux/material/components/constant.hh> #include <dumux/material/components/co2.hh> #include <dumux/material/components/glucose.hh> #include <dumux/material/components/granite.hh> @@ -365,6 +366,21 @@ int main(int argc, char *argv[]) plotStuff< Components::CH4<double> >(openPlotWindow); else if (compName == "ChlorideIon") plotStuff< Components::ChlorideIon<double> >(openPlotWindow); + else if (compName == "Constant") + { + Parameters::init([](auto& params){ + params["Component.LiquidDensity"] = "1e3"; + params["Component.LiquidKinematicViscosity"] = "1e-3"; + params["Component.LiquidThermalConductivity"] = "0.679"; + params["Component.LiquidHeatCapacity"] = "4.2e3"; + params["Component.GasDensity"] = "1"; + params["Component.GasKinematicViscosity"] = "1"; + params["Component.SolidDensity"] = "1e3"; + params["Component.SolidThermalConductivity"] = "0.679"; + params["Component.SolidHeatCapacity"] = "4.2e3"; + }); + plotStuff< Components::Constant<1, double> >(openPlotWindow); + } else if (compName == "Glucose") plotStuff< Components::Glucose<double> >(openPlotWindow); else if (compName == "Granite") -- GitLab