Commit 4cbb547b authored by Timo Koch's avatar Timo Koch Committed by Timo Koch
Browse files

[test][1pnc] Improve Maxwell-Stefan test

Make test more robust by

* fixing output interval so always the same number of outputs are written
* use fixed time step size

Decrease runtime by only using 1 cell in y-direction.
We test in 2D to test the model in 2D but the specific setup is
one-dimensional so the added cells can be spared.

The new reference solution was created with a timestep
of 5s. The test uses a timestep of 25s which still
reproduces and accurate enough solution so the
comparison passes.
parent a0f0e297
Pipeline #17646 passed with stages
......@@ -8,7 +8,7 @@ dumux_add_test(NAME test_1pnc_maxwellstefan_tpfa
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_1pnc_maxwellstefan_tpfa-reference.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnc_maxwellstefan_tpfa params.input -Problem.Name test_1pnc_maxwellstefan_tpfa")
dumux_add_test(NAME test_1pnc_maxwellstefan_box
......@@ -18,6 +18,6 @@ dumux_add_test(NAME test_1pnc_maxwellstefan_box
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_1pnc_maxwellstefan_box-reference.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_1pnc_maxwellstefan_box params.input -Problem.Name test_1pnc_maxwellstefan_box"
--zeroThreshold {"velocity_Gas \(m/s\)":1e-13})
......@@ -100,12 +100,6 @@ int main(int argc, char** argv)
auto gridVariables = std::make_shared<GridVariables>(problem, gridGeometry);
// get some time loop parameters
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
auto tEnd = getParam<Scalar>("TimeLoop.TEnd");
auto dt = getParam<Scalar>("TimeLoop.DtInitial");
auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize");
// intialize the vtk output module
VtkOutputModule<GridVariables, SolutionVector> vtkWriter(*gridVariables, x, problem->name());
using VelocityOutput = GetPropType<TypeTag, Properties::VelocityOutput>;
......@@ -115,8 +109,13 @@ int main(int argc, char** argv)
// instantiate time loop
auto timeLoop = std::make_shared<TimeLoop<Scalar>>(0.0, dt, tEnd);
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
const auto tEnd = getParam<Scalar>("TimeLoop.TEnd");
const auto dt = getParam<Scalar>("TimeLoop.DtInitial");
const auto maxDt = getParam<Scalar>("TimeLoop.MaxTimeStepSize");
auto timeLoop = std::make_shared<CheckPointTimeLoop<Scalar>>(0.0, dt, tEnd);
// the assembler with time loop for instationary problem
using Assembler = FVAssembler<TypeTag, DiffMethod::numeric>;
......@@ -144,7 +143,8 @@ int main(int argc, char** argv)
// write vtk output
if (timeLoop->isCheckPoint())
// report statistics of this time step
DtInitial = 1 # [s]
DtInitial = 15 # [s]
TEnd = 3600 # [s]
MaxTimeStepSize = 25 # [s]
UpperRight = 1 1
Cells = 30 30
UpperRight = 1 0.03
Cells = 30 1
Name = maxwellstefan_1pnc # name passed to the output routines
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment