Commit 71393a77 authored by Simon Scholz's avatar Simon Scholz Committed by Timo Koch
Browse files

[co2][test][parallel] Add new meaningful parallel tests

with changes over processor boundaries adapt other tests to match new injection rate, harmonize timesteps with lower DtInitial and MaxTimeStepSize
parent db8142fc
......@@ -5,51 +5,111 @@ dune_symlink_to_source_files(FILES grids)
# Ignore the porosity for all box models since it is defined element-wise in these test
# but the default 2p2c implementation outputs porosity per vertex.
# Depending on the order of the elements, the porosity would differ in these cases.
dumux_add_test(NAME test_co2_box
LABELS porousmediumflow co2
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=HeterogeneousBox
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_box-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2_box-00019.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_box params.input -Problem.Name test_co2_box"
--zeroThreshold {"porosity":1})
dumux_add_test(NAME test_co2_tpfa
LABELS porousmediumflow co2
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=HeterogeneousCCTpfa
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_tpfa-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa-00018.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa params.input -Problem.Name test_co2_tpfa")
add_executable(test_co2_box EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_co2_box PUBLIC TYPETAG=HeterogeneousBox )
add_executable(test_co2_tpfa EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_co2_tpfa PUBLIC TYPETAG=HeterogeneousCCTpfa )
# sequential box
dumux_add_test(NAME test_co2_box_sequential
TARGET test_co2_box
LABELS porousmediumflow co2
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_box-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2_box-00028.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_box params.input -Problem.Name test_co2_box"
--zeroThreshold {"porosity":1})
# sequential tpfa
dumux_add_test(NAME test_co2_tpfa_sequential
LABELS porousmediumflow co2
TARGET test_co2_tpfa
COMPILE_DEFINITIONS TYPETAG=HeterogeneousCCTpfa
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_tpfa-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa-00028.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa params.input -Problem.Name test_co2_tpfa")
# parallel box
dumux_add_test(NAME test_co2_box_parallel
TARGET test_co2_box
LABELS porousmediumflow co2 parallel
CMAKE_GUARD "( dune-alugrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"process rank":100,"porosity":1}
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_box_parallel-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/s0002-p0000-test_co2_box_parallel-00028.vtu
${CMAKE_SOURCE_DIR}/test/references/test_co2_box-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/s0002-test_co2_box_parallel-00028.pvtu
--command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_co2_box params.input -Problem.Name test_co2_box_parallel")
# parallel tpfa
dumux_add_test(NAME test_co2_tpfa_parallel
TARGET test_co2_tpfa
LABELS porousmediumflow co2 parallel
CMAKE_GUARD "( dune-alugrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"process rank":100}
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_tpfa-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/s0002-test_co2_tpfa_parallel-00028.pvtu
--command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa params.input -Problem.Name test_co2_tpfa_parallel")
# build target for the CO2 non-isothermal test problem
dumux_add_test(NAME test_co2ni_box
LABELS porousmediumflow co2 co2ni
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=HeterogeneousNIBox
ISOTHERMAL=0
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_box-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box-00019.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box paramsni.input -Problem.Name test_co2ni_box"
--zeroThreshold {"porosity":1})
dumux_add_test(NAME test_co2ni_tpfa
LABELS porousmediumflow co2 co2ni
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=HeterogeneousNICCTpfa
ISOTHERMAL=0
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_tpfa-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa-00018.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa paramsni.input -Problem.Name test_co2ni_tpfa")
add_executable(test_co2ni_box EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_co2ni_box PUBLIC TYPETAG=HeterogeneousNIBox PUBLIC ISOTHERMAL=0 )
add_executable(test_co2ni_tpfa EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_co2ni_tpfa PUBLIC TYPETAG=HeterogeneousNICCTpfa PUBLIC ISOTHERMAL=0 )
# sequential box
dumux_add_test(NAME test_co2ni_box_sequential
TARGET test_co2ni_box
LABELS porousmediumflow co2 co2ni
COMPILE_DEFINITIONS TYPETAG=HeterogeneousNIBox ISOTHERMAL=0
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_box-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box-00028.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box paramsni.input -Problem.Name test_co2ni_box"
--zeroThreshold {"porosity":1})
# sequential tpfa
dumux_add_test(NAME test_co2ni_tpfa_sequential
TARGET test_co2ni_tpfa
LABELS porousmediumflow co2 co2ni
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_tpfa-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa-00028.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa paramsni.input -Problem.Name test_co2ni_tpfa")
# parallel box
dumux_add_test(NAME test_co2ni_box_parallel
TARGET test_co2ni_box
LABELS porousmediumflow co2 co2ni parallel
CMAKE_GUARD "( dune-alugrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"process rank":100,"porosity":1}
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_box-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/s0002-test_co2ni_box_parallel-00028.pvtu
--command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box paramsni.input -Problem.Name test_co2ni_box_parallel")
# parallel tpfa
dumux_add_test(NAME test_co2ni_tpfa_parallel
TARGET test_co2ni_tpfa
LABELS porousmediumflow co2 co2ni parallel
CMAKE_GUARD "( dune-alugrid_FOUND AND MPI_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy --zeroThreshold {"process rank":100}
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_tpfa_parallel-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/s0002-p0000-test_co2ni_tpfa_parallel-00028.vtu
${CMAKE_SOURCE_DIR}/test/references/test_co2ni_tpfa-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/s0002-test_co2ni_tpfa_parallel-00028.pvtu
--command "${MPIEXEC} -np 2 ${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa paramsni.input -Problem.Name test_co2ni_tpfa_parallel")
......@@ -150,8 +150,8 @@ int main(int argc, char** argv) try
// report statistics of this time step
timeLoop->reportTimeStep();
// set new dt as suggested by the newton solver
timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize()));
// double the timestep each time (it is still limited by maximum time step size)
timeLoop->setTimeStepSize(timeLoop->timeStepSize()*2.0);
// write vtk output
vtkWriter.write(timeLoop->time());
......
[TimeLoop]
DtInitial = 250# [s]
TEnd = 1e6# [s]
DtInitial = 5e3 # [s]
TEnd = 1e6 # [s]
MaxTimeStepSize = 4e4 # [s]
[Grid]
File = ./grids/heterogeneousSmall.dgf # relative path to the grid file
......@@ -17,10 +18,7 @@ TemperatureHigh = 331.00 # [Pa] high end for tabularization of fluid properties
Name = co2 # [-] the name of the output files
EnableGravity = true
DepthBOR = 1200# [m] depth below ground surface
InjectionRate = 1e-4 # [kg/sq/s]
InjectionRate = 3e-3 # [kg/sq/s]
[Brine]
Salinity = 1e-1
[LinearSolver]
ResidualReduction = 1e-10
[TimeLoop]
DtInitial = 250 # [s]
DtInitial = 5e3 # [s]
TEnd = 1e6 # [s]
MaxTimeStepSize = 4e4 # [s]
[Grid]
File = ./grids/heterogeneousSmall.dgf # relative path to the grid file
......@@ -20,13 +21,10 @@ Salinity = 0.1 # [-] salinity of brine
Name = co2ni # [-] the name of the output files
EnableGravity = true
DepthBOR = 1200 # [m] depth below ground surface
InjectionRate = 1e-4 # always given as [kg/(m^2/s)]
InjectionRate = 3e-3 # always given as [kg/(m^2/s)]
InjectionPressure = 16e6 #[Pa]
InjectionTemperature = 305 # [K]
[LinearSolver]
ResidualReduction = 1e-10
[Component]
SolidDensity = 2700
SolidThermalConductivity = 2.8
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
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