From 3a8ba0e6223f6eb39fe0efc824ac16b93e2a124b Mon Sep 17 00:00:00 2001 From: Markus Wolff <markus.wolff@twt-gmbh.de> Date: Wed, 22 Aug 2012 09:30:23 +0000 Subject: [PATCH] Restored test for generic problem definition (box/decoupled) - test now starts from input file - changed reference after implementation of VtkOutputLevel in decoupled 2p git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8944 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- CMakeLists.txt | 4 +- test/common/generalproblem/CMakeLists.txt | 4 +- test/common/generalproblem/Makefile.am | 4 +- .../generallens_box-reference.vtu | 24 +- .../generallens_decoupled-reference.vtu | 286 +++++++++--------- .../generalproblem/generallensproblem.hh | 40 ++- .../generallensspatialparams.hh | 24 +- .../generalproblem/test_generalproblem2p.cc | 122 ++++++++ .../test_generalproblem2p.input | 38 +++ .../generalproblem/test_generalproblem_2p.cc | 167 ---------- 10 files changed, 366 insertions(+), 347 deletions(-) create mode 100644 test/common/generalproblem/test_generalproblem2p.cc create mode 100644 test/common/generalproblem/test_generalproblem2p.input delete mode 100644 test/common/generalproblem/test_generalproblem_2p.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 75a6f00600..598da38931 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -426,8 +426,8 @@ endif(SUPERLU_FOUND) enable_testing() include(CTest) add_test(test_propertysystem test/common/propertysystem/test_propertysystem) -add_test(test_general_box bin/runTest.sh references/generallens_box-reference.vtu generallens_box-00003.vtu test/common/generalproblem/test_generalproblem_2p --box 1e2 2e1) -add_test(test_general_dec bin/runTest.sh references/generallens_decoupled-reference.vtu generallens_decoupled-00003.vtu test/common/generalproblem/test_generalproblem_2p --decoupled 1e2 2e1) +add_test(test_general_box bin/runTest.sh references/generallens_box-reference.vtu generallens_box-00003.vtu test/common/generalproblem/test_generalproblem2p -ModelType Box -TimeManager.TEnd 1e2 -TimeManager.DtInitial 2e1) +add_test(test_general_dec bin/runTest.sh references/generallens_decoupled-reference.vtu generallens_decoupled-00003.vtu test/common/generalproblem/test_generalproblem2p -ModelType Decoupled -TimeManager.TEnd 1e2 -TimeManager.DtInitial 2e1) add_test(test_spline test/common/spline/test_spline) add_test(test_fluidsystems test/material/fluidsystems/test_fluidsystems) diff --git a/test/common/generalproblem/CMakeLists.txt b/test/common/generalproblem/CMakeLists.txt index 49769d2142..77f9639624 100644 --- a/test/common/generalproblem/CMakeLists.txt +++ b/test/common/generalproblem/CMakeLists.txt @@ -1,6 +1,6 @@ # build target for the simple twophase lens problem in a general definition for both box and decoupled model -add_executable("test_generalproblem_2p" test_generalproblem_2p.cc) -target_link_libraries("test_generalproblem_2p" ${DumuxLinkLibraries}) +add_executable("test_generalproblem2p" test_generalproblem2p.cc) +target_link_libraries("test_generalproblem2p" ${DumuxLinkLibraries}) # add required libraries and includes to the build flags link_directories(${DumuxLinkDirectories}) diff --git a/test/common/generalproblem/Makefile.am b/test/common/generalproblem/Makefile.am index 5472003d08..f5966f3fde 100644 --- a/test/common/generalproblem/Makefile.am +++ b/test/common/generalproblem/Makefile.am @@ -1,8 +1,8 @@ -check_PROGRAMS = test_generalproblem_2p +check_PROGRAMS = test_generalproblem2p noinst_HEADERS = *.hh EXTRA_DIST=*reference.vtu CMakeLists.txt -test_generalproblem_2p_SOURCES = test_generalproblem_2p.cc +test_generalproblem2p_SOURCES = test_generalproblem2p.cc include $(top_srcdir)/am/global-rules diff --git a/test/common/generalproblem/generallens_box-reference.vtu b/test/common/generalproblem/generallens_box-reference.vtu index bb43cdb743..bfa5db43aa 100644 --- a/test/common/generalproblem/generallens_box-reference.vtu +++ b/test/common/generalproblem/generallens_box-reference.vtu @@ -103,28 +103,28 @@ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 -2.01203e-38 -2.88768e-38 -3.00112e-38 -3.04953e-38 -3.07087e-38 -3.05581e-38 -2.54454e-38 + 0 0 0 0 0 -2.01203e-38 -2.88767e-38 -3.00113e-38 -3.04951e-38 -3.07088e-38 -3.0558e-38 -2.54453e-38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 -8.76216e-36 -7.09257e-31 -8.63862e-31 -8.82279e-31 -9.00469e-31 -9.10116e-31 -9.10039e-31 - -7.73491e-31 5.50194e-35 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 -8.76204e-36 -7.09261e-31 -8.63838e-31 -8.82296e-31 -9.00439e-31 -9.10131e-31 -9.10023e-31 + -7.7348e-31 5.50196e-35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 5.05564e-27 8.77861e-22 1.33478e-21 1.39142e-21 1.40889e-21 1.41451e-21 - 1.40306e-21 1.15719e-21 4.17708e-26 1.40649e-35 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 5.05566e-27 8.77861e-22 1.33478e-21 1.39142e-21 1.40889e-21 1.41451e-21 + 1.40306e-21 1.15719e-21 4.17708e-26 1.4065e-35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 -2.37681e-31 4.47757e-18 6.50152e-13 9.63481e-13 1.00025e-12 1.01176e-12 - 1.01525e-12 1.00709e-12 8.34177e-13 2.43023e-17 1.22652e-26 -1.24775e-36 0 0 0 0 0 0 + 0 0 0 0 0 0 -2.37682e-31 4.47757e-18 6.50152e-13 9.63481e-13 1.00025e-12 1.01176e-12 + 1.01525e-12 1.00709e-12 8.34177e-13 2.43023e-17 1.22652e-26 -1.24771e-36 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 2.59083e-23 4.04214e-10 2.04707e-07 2.5122e-07 2.55913e-07 - 2.57264e-07 2.57618e-07 2.56477e-07 2.32317e-07 9.76453e-10 4.77423e-18 9.33604e-28 -7.06724e-37 0 0 0 0 + 0 0 0 0 0 0 0 2.59081e-23 4.04214e-10 2.04707e-07 2.5122e-07 2.55913e-07 + 2.57264e-07 2.57618e-07 2.56477e-07 2.32317e-07 9.76453e-10 4.77423e-18 9.33607e-28 -7.0672e-37 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3.82052e-14 5.862e-06 0.000151849 0.000168741 - 0.000170195 0.000170554 0.000170624 0.000170227 0.000161695 9.26849e-06 2.28524e-10 2.14129e-19 -1.16827e-29 -7.55984e-38 0 0 + 0.000170195 0.000170554 0.000170624 0.000170227 0.000161695 9.26849e-06 2.28524e-10 2.14129e-19 -1.16826e-29 -7.55982e-38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4.59124e-08 0.000835955 0.00438343 @@ -132,12 +132,12 @@ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6.75491e-05 0.00978093 - 0.0232109 0.0239129 0.023956 0.0239605 0.0239606 0.0239517 0.0236247 0.0109741 0.000350005 1.67713e-07 6.17689e-14 1.1319e-24 + 0.0232109 0.0239129 0.023956 0.0239605 0.0239606 0.0239517 0.0236247 0.0109741 0.000350005 1.67713e-07 6.17689e-14 1.13192e-24 -1.13247e-32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00109458 0.0316473 0.0511079 0.051872 0.0519116 0.0519138 0.0519138 0.0519092 0.0516006 0.0330922 0.0030432 1.58901e-05 3.90434e-10 - 5.89373e-19 -5.13426e-30 -9.46271e-38 0 0 0 0 0 0 0 0 0 + 5.89372e-19 -5.13402e-30 -9.4627e-38 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </DataArray> <DataArray type="Float32" Name="Sw" NumberOfComponents="1" format="ascii"> diff --git a/test/common/generalproblem/generallens_decoupled-reference.vtu b/test/common/generalproblem/generallens_decoupled-reference.vtu index 435084acfb..f08dbb194a 100644 --- a/test/common/generalproblem/generallens_decoupled-reference.vtu +++ b/test/common/generalproblem/generallens_decoupled-reference.vtu @@ -251,16 +251,16 @@ 106269 106194 106119 106044 105968 105892 105815 105738 105662 105585 105507 105428 105348 105265 105181 105094 105005 104914 104822 104728 104632 104536 104438 104341 104414 104781 105092 105342 105536 105678 105775 105833 105860 105863 105847 105819 - 105782 105738 105689 105637 105588 105530 105468 105403 105336 105267 105196 105122 + 105782 105738 105689 105637 105585 105526 105465 105400 105333 105264 105193 105119 105041 104967 104892 104816 104740 104664 104588 104511 104433 104356 104277 104198 104117 104034 103949 103862 103774 103683 103591 103498 103403 103307 103211 103114 102810 103288 103668 103962 104186 104350 104465 104540 104580 104595 104590 104570 - 104539 104500 104455 104406 104465 104408 104347 104283 104217 104147 104075 104001 + 104539 104500 104455 104406 104458 104402 104341 104277 104210 104141 104069 103994 103815 103739 103664 103589 103513 103437 103360 103283 103206 103128 103049 102969 102887 102804 102719 102633 102544 102454 102362 102269 102175 102080 101984 101888 101291 101894 102330 102654 102895 103072 103197 103279 103327 103348 103348 103332 - 103304 103267 103225 103186 103278 103222 103161 103097 103031 102961 102889 102813 - 102633 102512 102437 102362 102286 102210 102134 102057 101979 101901 101821 101741 + 103304 103267 103225 103184 103276 103220 103159 103095 103028 102959 102887 102811 + 102623 102512 102437 102362 102286 102210 102134 102057 101979 101901 101821 101741 101659 101576 101491 101405 101316 101226 101135 101042 100948 100853 100757 100661 </DataArray> <DataArray type="Float32" Name="capillary pressure" NumberOfComponents="1" format="ascii"> @@ -373,157 +373,27 @@ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 2.14015e-11 2.6148e-11 2.6148e-11 2.6148e-11 2.6148e-11 2.6148e-11 2.6148e-11 2.14015e-11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0.00139282 0.00147618 0.00148954 0.00149751 0.00150158 0.00150174 0.00149651 0.00142324 - 4.74643e-12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0.000278857 0.000292566 0.000295321 0.000296989 0.000297855 0.000297939 0.000296978 0.000285362 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 3.4199e-06 6.0473 6.26552 6.28633 6.29801 6.3037 6.30288 6.29193 6.09079 - 0.000287957 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 2.38742e-12 -0.0129652 109.884 110.489 110.514 110.524 110.529 110.527 110.51 109.954 - 1.58334 1.30211e-05 0 0 0 0 0 0 0 0 0 0 + 0 0 0 3.85759e-07 3.05783 3.14965 3.16056 3.16693 3.17009 3.16989 3.1647 3.08085 + 5.56883e-05 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 2.7714e-05 7.82048 148.358 149.152 149.175 149.175 149.175 149.175 149.171 148.548 - 47.9062 0.0549039 2.05272e-08 0 0 0 0 0 0 0 0 0 + 0 0 2.38742e-12 -0.0175931 103.161 103.854 103.886 103.902 103.909 103.907 103.886 103.237 + 0.766007 2.38565e-06 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 8.47663e-06 5.7415 146.316 146.971 146.986 146.986 146.986 146.986 146.983 146.443 + 38.326 0.0263255 3.83031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 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 0.999727 0.999717 0.999716 0.999715 0.999715 0.999715 0.999716 0.999725 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 0.989256 0.988979 0.988968 0.988963 0.988961 0.988962 0.988969 0.989224 - 0.999929 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - 1 1 1 0.999645 0.957634 0.956613 0.956583 0.956582 0.956582 0.956582 0.956588 0.957391 - 0.997489 0.999998 1 1 1 1 1 1 1 1 1 1 - 1 1 1 1 1 1 1 1 1 1 1 1 - </DataArray> - <DataArray type="Float32" Name="nonwetting saturation" NumberOfComponents="1" format="ascii"> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -653,6 +523,136 @@ 0.0025108 2.43746e-06 9.11215e-13 6.92259e-26 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </DataArray> + <DataArray type="Float32" Name="nonwetting saturation" NumberOfComponents="1" format="ascii"> + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 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1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 0.999727 0.999717 0.999716 0.999715 0.999715 0.999715 0.999716 0.999725 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 0.989256 0.988979 0.988968 0.988963 0.988961 0.988962 0.988969 0.989224 + 0.999929 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + 1 1 1 0.999645 0.957634 0.956613 0.956583 0.956582 0.956582 0.956582 0.956588 0.957391 + 0.997489 0.999998 1 1 1 1 1 1 1 1 1 1 + 1 1 1 1 1 1 1 1 1 1 1 1 + </DataArray> <DataArray type="Float32" Name="non-wetting-velocity" NumberOfComponents="3" format="ascii"> 0.00397311 0.00053785 0 0.00313021 0.000305055 0 0.00262498 0.000200168 0 0.00228028 0.000144538 0 0.0020249 0.000110841 0 0.00182578 8.82769e-05 0 0.00166548 7.20196e-05 0 0.0015338 5.9669e-05 0 diff --git a/test/common/generalproblem/generallensproblem.hh b/test/common/generalproblem/generallensproblem.hh index 8ac7688dad..45e847c94a 100644 --- a/test/common/generalproblem/generallensproblem.hh +++ b/test/common/generalproblem/generallensproblem.hh @@ -33,13 +33,11 @@ #define DUMUX_GENERALLENSPROBLEM_HH //common includes -#if HAVE_UG -#include <dune/grid/uggrid.hh> -#endif #include <dune/grid/yaspgrid.hh> +#include <dumux/common/cubegridcreator.hh> #include <dumux/material/components/simpleh2o.hh> -#include <dumux/material/components/simplednapl.hh> +#include <dumux/material/components/dnapl.hh> #include <dumux/material/fluidsystems/liquidphase.hh> //box model @@ -75,10 +73,12 @@ NEW_PROP_TAG(ProblemBaseClass); // Set the grid type SET_PROP(GeneralLensProblem, Grid) { -// typedef Dune::UGGrid<2> type; typedef Dune::YaspGrid<2> type; }; +// set the GridCreator property +SET_TYPE_PROP(GeneralLensProblem, GridCreator, CubeGridCreator<TypeTag>); + // Set the problem property SET_PROP(GeneralLensProblem, Problem) { @@ -100,7 +100,7 @@ SET_PROP(GeneralLensProblem, NonwettingPhase) private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; public: - typedef Dumux::LiquidPhase<Scalar, Dumux::SimpleDNAPL<Scalar> > type; + typedef Dumux::LiquidPhase<Scalar, Dumux::DNAPL<Scalar> > type; }; // Enable gravity @@ -148,6 +148,8 @@ SET_PROP(DecoupledGeneralLensProblem, SpatialParamsBaseClass) SET_INT_PROP(DecoupledGeneralLensProblem, Formulation, DecoupledTwoPCommonIndices::pwSn); +SET_INT_PROP(DecoupledGeneralLensProblem, VtkOutputLevel, 1); + SET_TYPE_PROP(DecoupledGeneralLensProblem, EvalCflFluxFunction, Dumux::EvalCflFluxCoats<TypeTag>); SET_SCALAR_PROP(DecoupledGeneralLensProblem, CFLFactor, 1.0); @@ -187,7 +189,7 @@ SET_SCALAR_PROP(DecoupledGeneralLensProblem, CFLFactor, 1.0); * size is \f$t_{\text{inital}} = 250\;s\f$. * * To run the simulation execute the following line in shell: - * <tt>./test_2p 20000 250</tt> + * <tt>./test_generalproblem2p [-ModelType Box/Decoupled]</tt> */ template <class TypeTag > class GeneralLensProblem : public GET_PROP_TYPE(TypeTag, ProblemBaseClass) @@ -229,6 +231,7 @@ class GeneralLensProblem : public GET_PROP_TYPE(TypeTag, ProblemBaseClass) typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + typedef typename GET_PROP(TypeTag, ParameterTree) ParameterTree; typedef typename GridView::template Codim<0>::Entity Element; typedef typename GridView::template Codim<dim>::Entity Vertex; @@ -248,14 +251,11 @@ public: * \param lensUpperRight Global position of the lenses upper right corner */ GeneralLensProblem(TimeManager &timeManager, - const GridView &gridView, - const GlobalPosition &lensLowerLeft, - const GlobalPosition &lensUpperRight) + const GridView &gridView) : ParentType(timeManager, gridView) { eps_ = 3e-6; temperature_ = 273.15 + 20; // -> 20°C - this->spatialParams().setLensCoords(lensLowerLeft, lensUpperRight); this->timeManager().startNextEpisode(500); } @@ -287,6 +287,24 @@ public: this->timeManager().startNextEpisode(500); }; + /*! + * \brief The problem name. + * + * This is used as a prefix for files generated by the simulation. + */ + const char *name() const + { + if (ParameterTree::tree().hasKey("Problem.OutputfileName")) + { + std::string fileName(GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, OutputfileName)); + return fileName.c_str(); + } + else + { + return "test_generalproblem2p"; + } + } + /*! * \brief Returns the temperature within the domain. * diff --git a/test/common/generalproblem/generallensspatialparams.hh b/test/common/generalproblem/generallensspatialparams.hh index 45ff3e139a..ea6493f23c 100644 --- a/test/common/generalproblem/generallensspatialparams.hh +++ b/test/common/generalproblem/generallensspatialparams.hh @@ -105,6 +105,22 @@ public: GeneralLensSpatialParams(const GridView& gridView) : ParentType(gridView) { + try + { + lensLowerLeft_[0] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftX); + lensLowerLeft_[1] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensLowerLeftY); + lensUpperRight_[0] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightX); + lensUpperRight_[1] = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.LensUpperRightY); + } + catch (Dumux::ParameterException &e) { + std::cerr << e << ". Abort!\n"; + exit(1) ; + } + catch (...) { + std::cerr << "Unknown exception thrown!\n"; + exit(1); + } + // residual saturations lensMaterialParams_.setSwr(0.18); lensMaterialParams_.setSnr(0.0); @@ -161,14 +177,6 @@ public: } - //! Set the bounding box of the fine-sand lens - void setLensCoords(const GlobalPosition& lensLowerLeft, - const GlobalPosition& lensUpperRight) - { - lensLowerLeft_ = lensLowerLeft; - lensUpperRight_ = lensUpperRight; - } - private: bool isInLens_(const GlobalPosition &pos) const { diff --git a/test/common/generalproblem/test_generalproblem2p.cc b/test/common/generalproblem/test_generalproblem2p.cc new file mode 100644 index 0000000000..fcb5fd30b1 --- /dev/null +++ b/test/common/generalproblem/test_generalproblem2p.cc @@ -0,0 +1,122 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * Copyright (C) 2007-2008 by Klaus Mosthaf * + * Copyright (C) 2007-2008 by Bernd Flemisch * + * Copyright (C) 2008-2009 by Andreas Lauser * + * Institute for Modelling Hydraulic and Environmental Systems * + * University of Stuttgart, Germany * + * email: <givenname>.<name>@iws.uni-stuttgart.de * + * * + * 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 + * + * \brief test for the two-phase box model + */ +#include "config.h" + +#include "generallensproblem.hh" +#include <dumux/common/start.hh> + +//////////////////////// +// the main function +//////////////////////// +void usage(const char *progName, const std::string &errorMsg) +{ + if (errorMsg.size() > 0) + { + std::string errorMessageOut = "\nUsage: "; + errorMessageOut += progName; + errorMessageOut += " [options]\n"; + errorMessageOut += errorMsg; + errorMessageOut += "\n\nThe List of Mandatory arguments for this program is:\n" + "\t-TEnd The end of the simulation. [s] \n" + "\t-DtInitial The initial timestep size. [s] \n" + "\t-Grid.NumberOfCellsX Resolution in x-direction [-]\n" + "\t-Grid.NumberOfCellsY Resolution in y-direction [-]\n" + "\t-Grid.UpperRightX Dimension of the grid [m]\n" + "\t-Grid.UpperRightY Dimension of the grid [m]\n"; + errorMessageOut += "\n\nThe Optional command line argument:\n" + "\t-ModelType Can be: Box (2p box model), Decoupled (2p impes model),\n"; + std::cout << errorMessageOut << "\n"; + } +} + +int main(int argc, char** argv) +{ + Dune::ParameterTree paramTree; + std::string s(Dumux::readOptions_(argc, argv, paramTree)); + if (s.empty()) + { + if (paramTree.hasKey("ModelType")) + { + std::string modelType(paramTree.get<std::string>("ModelType")); + + if (modelType == "Box") + { + typedef TTAG(BoxGeneralLensProblem) ProblemTypeTag; + typedef GET_PROP(ProblemTypeTag, ParameterTree) ParamTree; + Dune::ParameterTree &rt = ParamTree::runTimeParams(); + rt["ModelType"]=modelType; + ParamTree::tree()["Problem.OutputfileName"] = "generallens_box"; + int startReturn = Dumux::start<ProblemTypeTag>(argc, argv, usage); + std::cout<<"######################################################\n"; + std::cout<<"Used box 2p model\n"; + return startReturn; + } + else if (modelType == "Decoupled") + { + typedef TTAG(DecoupledGeneralLensProblem) ProblemTypeTag; + typedef GET_PROP(ProblemTypeTag, ParameterTree) ParamTree; + Dune::ParameterTree &rt = ParamTree::runTimeParams(); + rt["ModelType"]=modelType; + ParamTree::tree()["Problem.OutputfileName"] = "generallens_decoupled"; + int startReturn = Dumux::start<ProblemTypeTag>(argc, argv, usage); + std::cout<<"######################################################\n"; + std::cout<<"Used decoupled 2p model\n"; + return startReturn; + } + else + { + typedef TTAG(BoxGeneralLensProblem) ProblemTypeTag; + int startReturn = Dumux::start<ProblemTypeTag>(argc, argv, usage); + std::cout<<"######################################################\n"; + std::cout<<"Unknwon model type "<<modelType<<" specified\n"; + std::cout<<"Default to box model\n"; + return startReturn; + } + } + else + { + typedef TTAG(BoxGeneralLensProblem) ProblemTypeTag; + int startReturn = Dumux::start<ProblemTypeTag>(argc, argv, usage); + std::cout<<"######################################################\n"; + std::cout<<"No model type specified\n"; + std::cout<<"Default to box model\n"; + return startReturn; + } + } + else + { + typedef TTAG(BoxGeneralLensProblem) ProblemTypeTag; + int startReturn = Dumux::start<ProblemTypeTag>(argc, argv, usage); + std::cout<<"######################################################\n"; + std::cout<<s<<" is not a valid model type specification!\n"; + std::cout<<"Default to box model\n"; + return startReturn; + } +} + diff --git a/test/common/generalproblem/test_generalproblem2p.input b/test/common/generalproblem/test_generalproblem2p.input new file mode 100644 index 0000000000..44ca748ae2 --- /dev/null +++ b/test/common/generalproblem/test_generalproblem2p.input @@ -0,0 +1,38 @@ +############################################################### +# Parameter file for test_2p. +# Everything behind a '#' is a comment. +# Type "./test_2p --help" for more information. +############################################################### + +############################################################### +# Mandatory arguments +############################################################### + +[TimeManager] +DtInitial = 250 # [s] +TEnd = 3000 # [s] + +[Grid] +NumberOfCellsX = 48# [-] level 0 resolution in x-direction +NumberOfCellsY = 32# [-] level 0 resolution in y-direction + +UpperRightX = 6# [m] dimension of the grid +UpperRightY = 4# [m] dimension of the grid + +[SpatialParams] +LensLowerLeftX = 1.0 # [m] x-coordinate of the lower left lens corner +LensLowerLeftY = 2.0 # [m] y-coordinate of the lower left lens corner +LensUpperRightX = 4.0 # [m] x-coordinate of the upper right lens corner +LensUpperRightY = 3.0 # [m] y-coordinate of the upper right lens corner + +############################################################### +# Simulation restart +# +# DuMux simulations can be restarted from *.drs files +# Set Restart to the value of a specific file, +# e.g.: 'Restart = 27184.1' for the restart file +# name_time=27184.1_rank=0.drs +# Please comment in the two lines below, if restart is desired. +############################################################### +# [TimeManager] +# Restart = ... diff --git a/test/common/generalproblem/test_generalproblem_2p.cc b/test/common/generalproblem/test_generalproblem_2p.cc deleted file mode 100644 index cb72172ed8..0000000000 --- a/test/common/generalproblem/test_generalproblem_2p.cc +++ /dev/null @@ -1,167 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * Copyright (C) 2007-2008 by Klaus Mosthaf * - * Copyright (C) 2007-2008 by Bernd Flemisch * - * Copyright (C) 2008-2009 by Andreas Lauser * - * Institute for Modelling Hydraulic and Environmental Systems * - * University of Stuttgart, Germany * - * email: <givenname>.<name>@iws.uni-stuttgart.de * - * * - * 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 - * - * \brief test for the two-phase box model - */ -#include "config.h" -#include "generallensproblem.hh" - -#include <dune/grid/common/gridinfo.hh> -#include <dune/grid/utility/structuredgridfactory.hh> - -#include <dune/common/exceptions.hh> -#include <dune/common/mpihelper.hh> - -#include <iostream> - - -//////////////////////// -// the main function -//////////////////////// -void usage(const char *progname) -{ - std::cout << "usage: " << progname << " --box/--decoupled tEnd dt [refineLevel]\n"; - exit(1); -} - -int main(int argc, char** argv) -{ -#ifdef NDEBUG - try { -#endif - //TypeTag which chooses the box model - typedef TTAG(BoxGeneralLensProblem) BoxTypeTag; - //TypeTag which chooses the decoupled model - typedef TTAG(DecoupledGeneralLensProblem) DecoupledTypeTag; - typedef GET_PROP_TYPE(BoxTypeTag, Scalar) Scalar; - typedef GET_PROP_TYPE(BoxTypeTag, Grid) Grid; -// typedef GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef GET_PROP_TYPE(BoxTypeTag, TimeManager) BoxTimeManager; - typedef GET_PROP_TYPE(DecoupledTypeTag, TimeManager) DecoupledTimeManager; - typedef Dune::FieldVector<Scalar, Grid::dimensionworld> GlobalPosition; - - static const int dim = Grid::dimension; - - // initialize MPI, finalize is done automatically on exit - Dune::MPIHelper::instance(argc, argv); - - //////////////////////////////////////////////////////////// - // parse the command line arguments - //////////////////////////////////////////////////////////// - if (argc < 4) - usage(argv[0]); - - int argPos = 1; - bool useBoxModel = false; - bool useDecoupledModel = false; - if (std::string(argv[argPos]) == "--box") - { - useBoxModel = true; - } - else if (std::string(argv[argPos]) == "--decoupled") - { - useDecoupledModel = true; - } - ++argPos; - - // read the initial time step and the end time - double tEnd, dt; - std::istringstream(argv[argPos++]) >> tEnd; - std::istringstream(argv[argPos++]) >> dt; - - if (argc - argPos > 1) { - usage(argv[0]); - } - - double refineLevel = 0; - if (argc - argPos == 1) - std::istringstream(argv[argPos]) >> refineLevel; - - //////////////////////////////////////////////////////////// - // create the grid - //////////////////////////////////////////////////////////// - GlobalPosition lowerLeftCorner(0.0); - GlobalPosition domainSize; - Dune::array< unsigned int, dim > numberOfCells; // cell resolution - domainSize[0] = 6.0; - domainSize[1] = 4.0; - - numberOfCells[0] = 48; - numberOfCells[1] = 32; - - Dune::shared_ptr<Grid> grid(Dune::StructuredGridFactory<Grid>::createCubeGrid(lowerLeftCorner, domainSize, numberOfCells)); - grid->globalRefine(refineLevel); - - //////////////////////////////////////////////////////////// - // instantiate and run the concrete problem - //////////////////////////////////////////////////////////// - - // specify dimensions of the low-permeable lens - GlobalPosition lowerLeftLens, upperRightLens; - lowerLeftLens[0] = 1.0; - lowerLeftLens[1] = 2.0; - upperRightLens[0] = 4.0; - upperRightLens[1] = 3.0; - - // instantiate and run the concrete problem - if (useBoxModel) - { - BoxTimeManager timeManager; - Dumux::GeneralLensProblem<BoxTypeTag> problem(timeManager, grid->leafView(), lowerLeftLens, upperRightLens); - problem.setName("generallens_box"); - timeManager.init(problem, 0, dt, tEnd, false); - Dumux::Properties::print<BoxTypeTag>(); - timeManager.run(); - return 0; - } - else if (useDecoupledModel) - { - DecoupledTimeManager timeManager; - Dumux::GeneralLensProblem<DecoupledTypeTag> problem(timeManager, grid->leafView(), lowerLeftLens, upperRightLens); - problem.setName("generallens_decoupled"); - timeManager.init(problem, 0, dt, tEnd, false); - Dumux::Properties::print<DecoupledTypeTag>(); - timeManager.run(); - return 0; - } - else - { - std::cout<<"No valid model chosen!\n"; - usage(argv[0]); - } -#ifdef NDEBUG - } - catch (Dune::Exception &e) { - std::cerr << "Dune reported error: " << e << std::endl; - } - catch (...) { - std::cerr << "Unknown exception thrown!\n"; - throw; - } -#endif // NDEBUG - - return 3; -} -- GitLab