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) ...@@ -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 # 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. # but the default 2p2c implementation outputs porosity per vertex.
# Depending on the order of the elements, the porosity would differ in these cases. # Depending on the order of the elements, the porosity would differ in these cases.
dumux_add_test(NAME test_co2_box add_executable(test_co2_box EXCLUDE_FROM_ALL main.cc)
LABELS porousmediumflow co2 target_compile_definitions(test_co2_box PUBLIC TYPETAG=HeterogeneousBox )
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=HeterogeneousBox add_executable(test_co2_tpfa EXCLUDE_FROM_ALL main.cc)
CMAKE_GUARD "( dune-alugrid_FOUND )" target_compile_definitions(test_co2_tpfa PUBLIC TYPETAG=HeterogeneousCCTpfa )
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy # sequential box
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_box-reference.vtu dumux_add_test(NAME test_co2_box_sequential
${CMAKE_CURRENT_BINARY_DIR}/test_co2_box-00019.vtu TARGET test_co2_box
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_box params.input -Problem.Name test_co2_box" LABELS porousmediumflow co2
--zeroThreshold {"porosity":1}) CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
dumux_add_test(NAME test_co2_tpfa CMD_ARGS --script fuzzy
LABELS porousmediumflow co2 --files ${CMAKE_SOURCE_DIR}/test/references/test_co2_box-reference.vtu
SOURCES main.cc ${CMAKE_CURRENT_BINARY_DIR}/test_co2_box-00028.vtu
COMPILE_DEFINITIONS TYPETAG=HeterogeneousCCTpfa --command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_box params.input -Problem.Name test_co2_box"
CMAKE_GUARD "( dune-alugrid_FOUND )" --zeroThreshold {"porosity":1})
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy # sequential tpfa
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2_tpfa-reference.vtu dumux_add_test(NAME test_co2_tpfa_sequential
${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa-00018.vtu LABELS porousmediumflow co2
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2_tpfa params.input -Problem.Name test_co2_tpfa") 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 # build target for the CO2 non-isothermal test problem
dumux_add_test(NAME test_co2ni_box add_executable(test_co2ni_box EXCLUDE_FROM_ALL main.cc)
LABELS porousmediumflow co2 co2ni target_compile_definitions(test_co2ni_box PUBLIC TYPETAG=HeterogeneousNIBox PUBLIC ISOTHERMAL=0 )
SOURCES main.cc
COMPILE_DEFINITIONS TYPETAG=HeterogeneousNIBox add_executable(test_co2ni_tpfa EXCLUDE_FROM_ALL main.cc)
ISOTHERMAL=0 target_compile_definitions(test_co2ni_tpfa PUBLIC TYPETAG=HeterogeneousNICCTpfa PUBLIC ISOTHERMAL=0 )
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py # sequential box
CMD_ARGS --script fuzzy dumux_add_test(NAME test_co2ni_box_sequential
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_box-reference.vtu TARGET test_co2ni_box
${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box-00019.vtu LABELS porousmediumflow co2 co2ni
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box paramsni.input -Problem.Name test_co2ni_box" COMPILE_DEFINITIONS TYPETAG=HeterogeneousNIBox ISOTHERMAL=0
--zeroThreshold {"porosity":1}) CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
dumux_add_test(NAME test_co2ni_tpfa CMD_ARGS --script fuzzy
LABELS porousmediumflow co2 co2ni --files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_box-reference.vtu
SOURCES main.cc ${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box-00028.vtu
COMPILE_DEFINITIONS TYPETAG=HeterogeneousNICCTpfa --command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_box paramsni.input -Problem.Name test_co2ni_box"
ISOTHERMAL=0 --zeroThreshold {"porosity":1})
CMAKE_GUARD "( dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py # sequential tpfa
CMD_ARGS --script fuzzy dumux_add_test(NAME test_co2ni_tpfa_sequential
--files ${CMAKE_SOURCE_DIR}/test/references/test_co2ni_tpfa-reference.vtu TARGET test_co2ni_tpfa
${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa-00018.vtu LABELS porousmediumflow co2 co2ni
--command "${CMAKE_CURRENT_BINARY_DIR}/test_co2ni_tpfa paramsni.input -Problem.Name test_co2ni_tpfa") 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 ...@@ -150,8 +150,8 @@ int main(int argc, char** argv) try
// report statistics of this time step // report statistics of this time step
timeLoop->reportTimeStep(); timeLoop->reportTimeStep();
// set new dt as suggested by the newton solver // double the timestep each time (it is still limited by maximum time step size)
timeLoop->setTimeStepSize(nonLinearSolver.suggestTimeStepSize(timeLoop->timeStepSize())); timeLoop->setTimeStepSize(timeLoop->timeStepSize()*2.0);
// write vtk output // write vtk output
vtkWriter.write(timeLoop->time()); vtkWriter.write(timeLoop->time());
......
[TimeLoop] [TimeLoop]
DtInitial = 250# [s] DtInitial = 5e3 # [s]
TEnd = 1e6# [s] TEnd = 1e6 # [s]
MaxTimeStepSize = 4e4 # [s]
[Grid] [Grid]
File = ./grids/heterogeneousSmall.dgf # relative path to the grid file 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 ...@@ -17,10 +18,7 @@ TemperatureHigh = 331.00 # [Pa] high end for tabularization of fluid properties
Name = co2 # [-] the name of the output files Name = co2 # [-] the name of the output files
EnableGravity = true EnableGravity = true
DepthBOR = 1200# [m] depth below ground surface DepthBOR = 1200# [m] depth below ground surface
InjectionRate = 1e-4 # [kg/sq/s] InjectionRate = 3e-3 # [kg/sq/s]
[Brine] [Brine]
Salinity = 1e-1 Salinity = 1e-1
[LinearSolver]
ResidualReduction = 1e-10
[TimeLoop] [TimeLoop]
DtInitial = 250 # [s] DtInitial = 5e3 # [s]
TEnd = 1e6 # [s] TEnd = 1e6 # [s]
MaxTimeStepSize = 4e4 # [s]
[Grid] [Grid]
File = ./grids/heterogeneousSmall.dgf # relative path to the grid file File = ./grids/heterogeneousSmall.dgf # relative path to the grid file
...@@ -20,13 +21,10 @@ Salinity = 0.1 # [-] salinity of brine ...@@ -20,13 +21,10 @@ Salinity = 0.1 # [-] salinity of brine
Name = co2ni # [-] the name of the output files Name = co2ni # [-] the name of the output files
EnableGravity = true EnableGravity = true
DepthBOR = 1200 # [m] depth below ground surface 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] InjectionPressure = 16e6 #[Pa]
InjectionTemperature = 305 # [K] InjectionTemperature = 305 # [K]
[LinearSolver]
ResidualReduction = 1e-10
[Component] [Component]
SolidDensity = 2700 SolidDensity = 2700
SolidThermalConductivity = 2.8 SolidThermalConductivity = 2.8
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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