Commit fc99ebe2 authored by Katharina Heck's avatar Katharina Heck

Merge branch 'feature/fractures-new-test' into 'master'

test for fractures added

See merge request !65
parents 1fce6130 61fdce1a
......@@ -4,8 +4,13 @@ dune_symlink_to_source_files(FILES "grids" "fracture_exercise.input" "plot.p")
dune_add_test(NAME fracture_exercise
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
SOURCES fractures.cc
COMMAND ./fracture_exercise
CMD_ARGS fracture_exercise.input)
COMMAND ${dumux_INCLUDE_DIRS}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/lecture/references/fractures-matrix-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/matrix-00018.vtu
${CMAKE_SOURCE_DIR}/lecture/references/fractures-fractures-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/fractures-00018.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/fracture_exercise -TimeLoop.TEnd 50")
set(CMAKE_BUILD_TYPE Release)
......
......@@ -236,7 +236,10 @@ int main(int argc, char** argv) try
std::cout << "Injected water so far: " << injectedWater << " kg" << std::endl;
std::cout << std::endl;
const auto escapedFromMatrix = matrixProblem->computeGasFluxToOverburden(*matrixGridVariables, x[matrixDomainId])*timeLoop->timeStepSize();
const auto escapedFromMatrix = timeLoop->timeStepSize() *matrixProblem->computeGasFluxToOverburden(*matrixGridVariables,
x[matrixDomainId],
*assembler,
matrixDomainId);
escapedGas += escapedFromMatrix;
std::cout << "Escaped gas in this time step: " << escapedFromMatrix << " kg" << std::endl;
std::cout << "Escaped gas so far: " << escapedGas << " kg" << std::endl << std::endl;
......
......@@ -248,9 +248,11 @@ public:
}
//! computes the gas flux from the reservoir into the overburden
template<class GridVariables, class SolutionVector>
template<class GridVariables, class SolutionVector, class Assembler, std::size_t id>
Scalar computeGasFluxToOverburden(const GridVariables& gridVars,
const SolutionVector& sol) const
const SolutionVector& sol,
const Assembler& assembler,
const Dune::index_constant<id> domainId) const
{
Scalar flux = 0.0;
for (const auto& element : elements(this->fvGridGeometry().gridView()))
......@@ -259,6 +261,8 @@ public:
const auto geometry = element.geometry();
if (geometry.center()[1] < 35.0 && geometry.center()[1] > 15.0)
{
couplingManagerPtr_->bindCouplingContext(domainId, element, assembler);
auto fvGeometry = localView(this->fvGridGeometry());
fvGeometry.bind(element);
......
This diff is collapsed.
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