Skip to content
Snippets Groups Projects
Commit 8a7a8f41 authored by Katharina Heck's avatar Katharina Heck Committed by Timo Koch
Browse files

[fix] volumevariabels pn calculation and cmake fix number of vtu files

parent a307c055
No related branches found
No related tags found
Loading
...@@ -198,8 +198,10 @@ public: ...@@ -198,8 +198,10 @@ public:
const auto& priVars = ParentType::extractDofPriVars(elemSol, scv); const auto& priVars = ParentType::extractDofPriVars(elemSol, scv);
// set the wetting pressure // set the wetting pressure
using std::max;
Scalar minPc = MaterialLaw::pc(materialParams, 1.0);
fluidState.setPressure(wPhaseIdx, priVars[pressureIdx]); fluidState.setPressure(wPhaseIdx, priVars[pressureIdx]);
fluidState.setPressure(nPhaseIdx, problem.nonWettingReferencePressure()); fluidState.setPressure(nPhaseIdx, max(problem.nonWettingReferencePressure(), fluidState.pressure(wPhaseIdx) + minPc));
// compute the capillary pressure to compute the saturation // compute the capillary pressure to compute the saturation
// make sure that we the capillary pressure is not smaller than the minimum pc // make sure that we the capillary pressure is not smaller than the minimum pc
......
...@@ -36,7 +36,7 @@ dune_add_test(SOURCES test_ccrichardsanalytical.cc ...@@ -36,7 +36,7 @@ dune_add_test(SOURCES test_ccrichardsanalytical.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/richardsanalyticalcc-reference.vtu --files ${CMAKE_SOURCE_DIR}/test/references/richardsanalyticalcc-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/richardsanalyticalcc-00000.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsanalytical-00002.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsanalytical test_ccrichardsanalytical.input -Problem.Name test_ccrichardsanalytical") --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsanalytical test_ccrichardsanalytical.input -Problem.Name test_ccrichardsanalytical")
# non-isothermal tests # non-isothermal tests
dune_add_test(SOURCES test_richardsniconvection_fv.cc dune_add_test(SOURCES test_richardsniconvection_fv.cc
...@@ -45,9 +45,9 @@ dune_add_test(SOURCES test_richardsniconvection_fv.cc ...@@ -45,9 +45,9 @@ dune_add_test(SOURCES test_richardsniconvection_fv.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/richardsniconvectionbox-reference.vtu --files ${CMAKE_SOURCE_DIR}/test/references/richardsniconvectionbox-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconvection-00010.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconvection-00044.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconvection test_richardsniconvection.input -Problem.Name test_boxrichardsniconvection" --command "${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconvection test_richardsniconvection.input -Problem.Name test_boxrichardsniconvection"
--zeroThreshold {"velocity":1e-16}) )
dune_add_test(SOURCES test_richardsniconvection_fv.cc dune_add_test(SOURCES test_richardsniconvection_fv.cc
NAME test_ccrichardsniconvection NAME test_ccrichardsniconvection
...@@ -55,7 +55,7 @@ dune_add_test(SOURCES test_richardsniconvection_fv.cc ...@@ -55,7 +55,7 @@ dune_add_test(SOURCES test_richardsniconvection_fv.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/richardsniconvectioncc-reference.vtu --files ${CMAKE_SOURCE_DIR}/test/references/richardsniconvectioncc-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconvection-00010.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconvection-00043.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconvection test_richardsniconvection.input -Problem.Name test_ccrichardsniconvection") --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconvection test_richardsniconvection.input -Problem.Name test_ccrichardsniconvection")
dune_add_test(SOURCES test_richardsniconduction_fv.cc dune_add_test(SOURCES test_richardsniconduction_fv.cc
...@@ -64,9 +64,9 @@ dune_add_test(SOURCES test_richardsniconduction_fv.cc ...@@ -64,9 +64,9 @@ dune_add_test(SOURCES test_richardsniconduction_fv.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/richardsniconductionbox-reference.vtu --files ${CMAKE_SOURCE_DIR}/test/references/richardsniconductionbox-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconduction-00006.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconduction-00024.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconduction test_richardsniconduction.input -Problem.Name test_boxrichardsniconduction" --command "${CMAKE_CURRENT_BINARY_DIR}/test_boxrichardsniconduction test_richardsniconduction.input -Problem.Name test_boxrichardsniconduction"
--zeroThreshold {"velocity":1e-8}) )
dune_add_test(SOURCES test_richardsniconduction_fv.cc dune_add_test(SOURCES test_richardsniconduction_fv.cc
NAME test_ccrichardsniconduction NAME test_ccrichardsniconduction
...@@ -74,9 +74,9 @@ dune_add_test(SOURCES test_richardsniconduction_fv.cc ...@@ -74,9 +74,9 @@ dune_add_test(SOURCES test_richardsniconduction_fv.cc
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/richardsniconductioncc-reference.vtu --files ${CMAKE_SOURCE_DIR}/test/references/richardsniconductioncc-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconduction-00006.vtu ${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconduction-00024.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconduction test_richardsniconduction.input -Problem.Name test_ccrichardsniconduction" --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccrichardsniconduction test_richardsniconduction.input -Problem.Name test_ccrichardsniconduction"
--zeroThreshold {"velocity":1e-8}) )
#install sources #install sources
install(FILES install(FILES
......
...@@ -197,6 +197,7 @@ int main(int argc, char** argv) try ...@@ -197,6 +197,7 @@ int main(int argc, char** argv) try
timeLoop->advanceTimeStep(); timeLoop->advanceTimeStep();
// write vtk output // write vtk output
if(timeLoop->willBeFinished())
vtkWriter.write(timeLoop->time()); vtkWriter.write(timeLoop->time());
// report statistics of this time step // report statistics of this time step
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment