From 8967294796414ccf8589e85e522e38e61cbf9e4e Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Tue, 25 Aug 2015 08:22:58 +0000 Subject: [PATCH] [interfacegridcreator] - added functionality and properties to refine grid in all directions - naming (comp -> dimIdx) [multidomain] - adapted to changes in the interfacegridcreator - removed unused properties from input file - in coupled zeroeq problem added output at beginning of simulations [freeflow] - removed one unused property from test_zeroeq2c.input reviewed by timok git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@15341 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/io/interfacegridcreator.hh | 205 +++++++++--------- test/freeflow/zeroeq2c/test_zeroeq2c.input | 1 - .../test_2cnistokes2p2cni.input | 6 +- .../test_2cnistokes2p2cni_boundarylayer.input | 6 +- .../test_2cnistokes2p2cni_reference.input | 6 +- .../2cnizeroeq2p2cniproblem.hh | 7 +- .../2cnizeroeq2p2cni/CMakeLists.txt | 4 +- .../2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.cc | 2 +- .../test_2cnizeroeq2p2cni.input | 7 +- .../test_2cnizeroeq2p2cni_reference.input | 7 +- .../2cstokes2p2c/test_2cstokes2p2c.input | 4 +- .../test_2cstokes2p2c_reference.input | 4 +- .../2czeroeq2p2c/2czeroeq2p2cproblem.hh | 4 +- test/multidomain/2czeroeq2p2c/CMakeLists.txt | 4 +- .../2czeroeq2p2c/test_2czeroeq2p2c.cc | 2 +- .../2czeroeq2p2c/test_2czeroeq2p2c.input | 8 +- .../test_2czeroeq2p2c_reference.input | 7 +- 17 files changed, 125 insertions(+), 159 deletions(-) diff --git a/dumux/io/interfacegridcreator.hh b/dumux/io/interfacegridcreator.hh index 3c1fa7d37a..64b6f41e70 100644 --- a/dumux/io/interfacegridcreator.hh +++ b/dumux/io/interfacegridcreator.hh @@ -71,21 +71,30 @@ public: Dune::array<unsigned int, dim> numCells; Dune::FieldVector<Scalar, dim> lowerLeft; Dune::FieldVector<Scalar, dim> upperRight; - Dune::FieldVector<Scalar, dim> refinePoint(0); - Dune::FieldVector<Scalar, dim> gradingFactor(1); + Dune::FieldVector<Scalar, dim> refinePoint(0.0); + Dune::FieldVector<Scalar, dim> gradingFactor(1.0); + Dune::FieldVector<bool, dim> refineTop(false); // x-direction numCells[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, unsigned int, Grid, NumberOfCellsX); lowerLeft[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftX); upperRight[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightX); + try { refinePoint[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosX); } + catch (Dumux::ParameterException &e) { } + try { gradingFactor[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorX); } + catch (Dumux::ParameterException &e) { } + try { refineTop[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, RefineTopX); } + catch (Dumux::ParameterException &e) { } // y-direction numCells[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, unsigned int, Grid, NumberOfCellsY); lowerLeft[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, LowerLeftY); upperRight[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, UpperRightY); - refinePoint[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY); - gradingFactor[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY); - - bool refineTop = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, RefineTop); + try { refinePoint[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, InterfacePosY); } + catch (Dumux::ParameterException &e) { } + try { gradingFactor[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Grid, GradingFactorY); } + catch (Dumux::ParameterException &e) { } + try { refineTop[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, bool, Grid, RefineTopY); } + catch (Dumux::ParameterException &e) { } typedef Dune::YaspGrid<dim> HelperGrid; std::shared_ptr<HelperGrid> helperGrid = std::shared_ptr<HelperGrid> ( @@ -110,9 +119,9 @@ public: int nY = numCells[1]; std::vector<std::vector<Scalar> > localPositions(dim); - for (int comp = 0; comp < dim; comp++) + for (int dimIdx = 0; dimIdx < dim; dimIdx++) { - Scalar lengthLeft = refinePointLocal[comp]; + Scalar lengthLeft = refinePointLocal[dimIdx]; Scalar lengthRight = 1.0 - lengthLeft; int nLeft, nRight; @@ -120,71 +129,71 @@ public: if (lengthLeft < 1e-10) { nLeft = 0; - nRight = numCells[comp]; + nRight = numCells[dimIdx]; - if (gradingFactor[comp] > 1.0) - hLeft = hRight = (1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + if (gradingFactor[dimIdx] > 1.0) + hLeft = hRight = (1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } else if (lengthLeft > 1.0 - 1e-10) { - nLeft = numCells[comp]; + nLeft = numCells[dimIdx]; nRight = 0; - if (gradingFactor[comp] > 1.0) - hLeft = hRight = (1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); + if (gradingFactor[dimIdx] > 1.0) + hLeft = hRight = (1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } - else if (comp == dim - 1 && refineTop) + else if (refineTop[dimIdx]) { - lengthLeft = refinePointLocal[comp]; - lengthRight = (1 - refinePointLocal[comp])/2; + lengthLeft = refinePointLocal[dimIdx]; + lengthRight = (1 - refinePointLocal[dimIdx])/2; - nLeft = nRight = numCells[comp]/3; + nLeft = nRight = numCells[dimIdx]/3; - if (numCells[comp]%3 == 1) + if (numCells[dimIdx]%3 == 1) nLeft += 1; - else if (numCells[comp]%3 == 2) + else if (numCells[dimIdx]%3 == 2) nRight += 1; - hLeft = lengthLeft*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); + hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); } else if (lengthLeft > 0.5) { - Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[comp], numCells[comp]) + Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[dimIdx], numCells[dimIdx]) * lengthRight/lengthLeft)) - /(2.0*pow(gradingFactor[comp], numCells[comp])))/log(gradingFactor[comp])); - nLeft = std::min((unsigned int)std::ceil(nLeftDouble), numCells[comp]); + /(2.0*pow(gradingFactor[dimIdx], numCells[dimIdx])))/log(gradingFactor[dimIdx])); + nLeft = std::min((unsigned int)std::ceil(nLeftDouble), numCells[dimIdx]); - nRight = numCells[comp] - nLeft; + nRight = numCells[dimIdx] - nLeft; - if (gradingFactor[comp] > 1.0) + if (gradingFactor[dimIdx] > 1.0) { - hLeft = lengthLeft*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); + hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); } else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } else { - Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[comp], numCells[comp]) + Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[dimIdx], numCells[dimIdx]) * lengthLeft/lengthRight)) - /(2.0*pow(gradingFactor[comp], numCells[comp])))/log(gradingFactor[comp]); - nRight = std::min((unsigned int)std::ceil(nRightDouble), numCells[comp]); + /(2.0*pow(gradingFactor[dimIdx], numCells[dimIdx])))/log(gradingFactor[dimIdx]); + nRight = std::min((unsigned int)std::ceil(nRightDouble), numCells[dimIdx]); - nLeft = numCells[comp] - nRight; + nLeft = numCells[dimIdx] - nRight; - if (gradingFactor[comp] > 1.0) + if (gradingFactor[dimIdx] > 1.0) { - hLeft = lengthLeft*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); + hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); } else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight @@ -194,33 +203,33 @@ public: << ", nRight = " << nRight << std::endl; - int numVertices = numCells[comp] + 1; - localPositions[comp].resize(numVertices); + int numVertices = numCells[dimIdx] + 1; + localPositions[dimIdx].resize(numVertices); - localPositions[comp][0] = 0.0; + localPositions[dimIdx][0] = 0.0; for (int i = 0; i < nLeft; i++) { - Scalar hI = hLeft*pow(gradingFactor[comp], nLeft-1-i); - localPositions[comp][i+1] = localPositions[comp][i] + hI; + Scalar hI = hLeft*pow(gradingFactor[dimIdx], nLeft-1-i); + localPositions[dimIdx][i+1] = localPositions[dimIdx][i] + hI; } for (int i = 0; i < nRight; i++) { - Scalar hI = hRight*pow(gradingFactor[comp], i); - localPositions[comp][nLeft+i+1] = localPositions[comp][nLeft+i] + hI; + Scalar hI = hRight*pow(gradingFactor[dimIdx], i); + localPositions[dimIdx][nLeft+i+1] = localPositions[dimIdx][nLeft+i] + hI; } - if (comp == dim - 1 && refineTop) + if (refineTop[dimIdx]) for (int i = 0; i < nRight; i++) { - Scalar hI = hRight*pow(gradingFactor[comp], nRight-1-i); - localPositions[comp][nLeft+nRight+i+1] = localPositions[comp][nLeft+nRight+i] + hI; + Scalar hI = hRight*pow(gradingFactor[dimIdx], nRight-1-i); + localPositions[dimIdx][nLeft+nRight+i+1] = localPositions[dimIdx][nLeft+nRight+i] + hI; } - if (localPositions[comp][numVertices-1] != 1.0) + if (localPositions[dimIdx][numVertices-1] != 1.0) { for (int i = 0; i < numVertices; i++) - localPositions[comp][i] /= localPositions[comp][numVertices-1]; + localPositions[dimIdx][i] /= localPositions[dimIdx][numVertices-1]; } } @@ -285,9 +294,9 @@ public: int nY = numCells[1]; std::vector<std::vector<Scalar> > localPositions(dim); - for (int comp = 0; comp < dim; comp++) + for (int dimIdx = 0; dimIdx < dim; dimIdx++) { - Scalar lengthLeft = refinePointLocal[comp]; + Scalar lengthLeft = refinePointLocal[dimIdx]; Scalar lengthRight = 1.0 - lengthLeft; int nLeft, nRight; @@ -295,71 +304,71 @@ public: if (lengthLeft < 1e-10) { nLeft = 0; - nRight = numCells[comp]; + nRight = numCells[dimIdx]; - if (gradingFactor[comp] > 1.0) - hLeft = hRight = (1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + if (gradingFactor[dimIdx] > 1.0) + hLeft = hRight = (1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } else if (lengthLeft > 1.0 - 1e-10) { - nLeft = numCells[comp]; + nLeft = numCells[dimIdx]; nRight = 0; - if (gradingFactor[comp] > 1.0) - hLeft = hRight = (1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); + if (gradingFactor[dimIdx] > 1.0) + hLeft = hRight = (1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } - else if (comp == dim - 1 && refineTop) + else if (dimIdx == dim - 1 && refineTop) { - lengthLeft = refinePointLocal[comp]; - lengthRight = (1 - refinePointLocal[comp])/2; + lengthLeft = refinePointLocal[dimIdx]; + lengthRight = (1 - refinePointLocal[dimIdx])/2; - nLeft = nRight = numCells[comp]/3; + nLeft = nRight = numCells[dimIdx]/3; - if (numCells[comp]%3 == 1) + if (numCells[dimIdx]%3 == 1) nLeft += 1; - else if (numCells[comp]%3 == 2) + else if (numCells[dimIdx]%3 == 2) nRight += 1; - hLeft = lengthLeft*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); + hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); } else if (lengthLeft > 0.5) { - Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[comp], numCells[comp]) + Scalar nLeftDouble = std::ceil(-log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[dimIdx], numCells[dimIdx]) * lengthRight/lengthLeft)) - /(2.0*pow(gradingFactor[comp], numCells[comp])))/log(gradingFactor[comp])); - nLeft = std::min((int)std::ceil(nLeftDouble), numCells[comp]); + /(2.0*pow(gradingFactor[dimIdx], numCells[dimIdx])))/log(gradingFactor[dimIdx])); + nLeft = std::min((int)std::ceil(nLeftDouble), numCells[dimIdx]); - nRight = numCells[comp] - nLeft; + nRight = numCells[dimIdx] - nLeft; - if (gradingFactor[comp] > 1.0) + if (gradingFactor[dimIdx] > 1.0) { - hLeft = lengthLeft*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); + hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); } else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } else { - Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[comp], numCells[comp]) + Scalar nRightDouble = -log((1.0 + sqrt(1.0 + 4.0 * pow(gradingFactor[dimIdx], numCells[dimIdx]) * lengthLeft/lengthRight)) - /(2.0*pow(gradingFactor[comp], numCells[comp])))/log(gradingFactor[comp]); - nRight = std::min((int)std::ceil(nRightDouble), numCells[comp]); + /(2.0*pow(gradingFactor[dimIdx], numCells[dimIdx])))/log(gradingFactor[dimIdx]); + nRight = std::min((int)std::ceil(nRightDouble), numCells[dimIdx]); - nLeft = numCells[comp] - nRight; + nLeft = numCells[dimIdx] - nRight; - if (gradingFactor[comp] > 1.0) + if (gradingFactor[dimIdx] > 1.0) { - hLeft = lengthLeft*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nLeft)); - hRight = lengthRight*(1.0 - gradingFactor[comp])/(1.0 - pow(gradingFactor[comp], nRight)); + hLeft = lengthLeft*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nLeft)); + hRight = lengthRight*(1.0 - gradingFactor[dimIdx])/(1.0 - pow(gradingFactor[dimIdx], nRight)); } else - hLeft = hRight = 1.0/numCells[comp]; + hLeft = hRight = 1.0/numCells[dimIdx]; } std::cout << "lengthLeft = " << lengthLeft << ", lengthRight = " << lengthRight @@ -369,33 +378,33 @@ public: << ", nRight = " << nRight << std::endl; - int numVertices = numCells[comp] + 1; - localPositions[comp].resize(numVertices); + int numVertices = numCells[dimIdx] + 1; + localPositions[dimIdx].resize(numVertices); - localPositions[comp][0] = 0.0; + localPositions[dimIdx][0] = 0.0; for (int i = 0; i < nLeft; i++) { - Scalar hI = hLeft*pow(gradingFactor[comp], nLeft-1-i); - localPositions[comp][i+1] = localPositions[comp][i] + hI; + Scalar hI = hLeft*pow(gradingFactor[dimIdx], nLeft-1-i); + localPositions[dimIdx][i+1] = localPositions[dimIdx][i] + hI; } for (int i = 0; i < nRight; i++) { - Scalar hI = hRight*pow(gradingFactor[comp], i); - localPositions[comp][nLeft+i+1] = localPositions[comp][nLeft+i] + hI; + Scalar hI = hRight*pow(gradingFactor[dimIdx], i); + localPositions[dimIdx][nLeft+i+1] = localPositions[dimIdx][nLeft+i] + hI; } - if (comp == dim - 1 && refineTop) + if (dimIdx == dim - 1 && refineTop) for (int i = 0; i < nRight; i++) { - Scalar hI = hRight*pow(gradingFactor[comp], nRight-1-i); - localPositions[comp][nLeft+nRight+i+1] = localPositions[comp][nLeft+nRight+i] + hI; + Scalar hI = hRight*pow(gradingFactor[dimIdx], nRight-1-i); + localPositions[dimIdx][nLeft+nRight+i+1] = localPositions[dimIdx][nLeft+nRight+i] + hI; } - if (localPositions[comp][numVertices-1] != 1.0) + if (localPositions[dimIdx][numVertices-1] != 1.0) { for (int i = 0; i < numVertices; i++) - localPositions[comp][i] /= localPositions[comp][numVertices-1]; + localPositions[dimIdx][i] /= localPositions[dimIdx][numVertices-1]; } } diff --git a/test/freeflow/zeroeq2c/test_zeroeq2c.input b/test/freeflow/zeroeq2c/test_zeroeq2c.input index 301952789f..63403fa6c9 100644 --- a/test/freeflow/zeroeq2c/test_zeroeq2c.input +++ b/test/freeflow/zeroeq2c/test_zeroeq2c.input @@ -18,6 +18,5 @@ InjectionConcentration = .2 # [-] # 3 = Deissler # 4 = Meier and Rotta # 5 = Mamayev exponential law -WriteAllSCVData = 0.8984 EddyViscosityModel = 1 EddyDiffusivityModel = 4 diff --git a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input index c53f6c4fb6..1daa03021d 100644 --- a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input +++ b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni.input @@ -19,7 +19,7 @@ NumberOfCellsX = 30 NumberOfCellsY = 62 # Grading and refinement of the mesh in y direction GradingFactorY = 1.13 -RefineTop = false +RefineTopY = false [Output] NameFF = stokes2cni @@ -69,8 +69,6 @@ Swr = 0.005 # [-] Snr = 0.01 # [-] VgAlpha = 6.371e-4 # [1/Pa] VgN = 8.0 # [-] -Pentry = 1357 -BCLambda = 6.960 LambdaSolid = 5.26 # [W/(m*K)] [Newton] @@ -81,6 +79,4 @@ WriteConvergence = false MaxTimeStepDivisions = 20 [LinearSolver] -ResidualReduction = 1e-9 Verbosity = 0 -MaxIterations = 200 \ No newline at end of file diff --git a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_boundarylayer.input b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_boundarylayer.input index 4307ff038a..b881a4069f 100644 --- a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_boundarylayer.input +++ b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_boundarylayer.input @@ -19,7 +19,7 @@ NumberOfCellsX = 15 NumberOfCellsY = 20 # Grading and refinement of the mesh in y direction GradingFactorY = 1.1 -RefineTop = false +RefineTopY = false [Output] NameFF = stokes2cni_boundarylayer @@ -72,8 +72,6 @@ Swr = 0.005 # [-] Snr = 0.01 # [-] VgAlpha = 6.371e-4 # [1/Pa] VgN = 8.0 # [-] -Pentry = 1357 -BCLambda = 6.960 LambdaSolid = 5.26 # [W/(m*K)] [Newton] @@ -84,6 +82,4 @@ WriteConvergence = false MaxTimeStepDivisions = 20 [LinearSolver] -ResidualReduction = 1e-9 Verbosity = 0 -MaxIterations = 200 \ No newline at end of file diff --git a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_reference.input b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_reference.input index 3fd2566514..f7a6a135ba 100644 --- a/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_reference.input +++ b/test/multidomain/2cnistokes2p2cni/test_2cnistokes2p2cni_reference.input @@ -19,7 +19,7 @@ NumberOfCellsX = 15 NumberOfCellsY = 20 # Grading and refinement of the mesh in y direction GradingFactorY = 1.1 -RefineTop = false +RefineTopY = false [Output] NameFF = stokes2cni @@ -69,8 +69,6 @@ Swr = 0.005 # [-] Snr = 0.01 # [-] VgAlpha = 6.371e-4 # [1/Pa] VgN = 8.0 # [-] -Pentry = 1357 -BCLambda = 6.960 LambdaSolid = 5.26 # [W/(m*K)] [Newton] @@ -81,6 +79,4 @@ WriteConvergence = false MaxTimeStepDivisions = 20 [LinearSolver] -ResidualReduction = 1e-9 Verbosity = 0 -MaxIterations = 200 \ No newline at end of file diff --git a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh index c6e9e260b6..593fbd87b2 100644 --- a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh @@ -217,18 +217,15 @@ public: //! \copydoc Dumux::ImplicitProblem::shouldWriteRestartFile() bool shouldWriteRestartFile() const { - return ( ((this->timeManager().timeStepIndex() > 0) + return (((this->timeManager().timeStepIndex() > 0) && (this->timeManager().timeStepIndex() % freqRestart_ == 0)) - // also write a restart file at the end of each episode || this->timeManager().episodeWillBeOver()); } //! \copydoc Dumux::ImplicitProblem::shouldWriteOutput() bool shouldWriteOutput() const { - return ( ((this->timeManager().timeStepIndex() > 0) - && (this->timeManager().timeStepIndex() % freqOutput_ == 0)) - // also write a restart file at the end of each episode + return (this->timeManager().timeStepIndex() % freqOutput_ == 0 || this->timeManager().episodeWillBeOver()); } diff --git a/test/multidomain/2cnizeroeq2p2cni/CMakeLists.txt b/test/multidomain/2cnizeroeq2p2cni/CMakeLists.txt index 9054b99e97..8016a34a3a 100644 --- a/test/multidomain/2cnizeroeq2p2cni/CMakeLists.txt +++ b/test/multidomain/2cnizeroeq2p2cni/CMakeLists.txt @@ -7,6 +7,6 @@ add_dumux_test(test_2cnizeroeq2p2cni test_2cnizeroeq2p2cni test_2cnizeroeq2p2cni --script fuzzy --command "${CMAKE_CURRENT_BINARY_DIR}/test_2cnizeroeq2p2cni -ParameterFile ${CMAKE_CURRENT_SOURCE_DIR}/test_2cnizeroeq2p2cni_reference.input" --files ${CMAKE_SOURCE_DIR}/test/references/2cnizeroeq2p2cni-ff-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/zeroeq2cni-00008.vtu + ${CMAKE_CURRENT_BINARY_DIR}/zeroeq2cni-00010.vtu ${CMAKE_SOURCE_DIR}/test/references/2cnizeroeq2p2cni-pm-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/2p2cni-00008.vtu) + ${CMAKE_CURRENT_BINARY_DIR}/2p2cni-00010.vtu) diff --git a/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.cc b/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.cc index fc01f82502..5d0a81eb04 100644 --- a/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.cc +++ b/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.cc @@ -57,7 +57,7 @@ void printUsage(const char *progName, const std::string &errorMsg) "NumberOfCellsX Number of cells in x-direction\n" "NumberOfCellsY Number of cells in y-direction\n" "GradingFactorY Vertical grading of the cells\n" - "RefineTop Specifies whethter the top of the free flow will be refined\n" + "RefineTopY Specifies whethter the top of the free flow will be refined\n" "InterfacePosY Vertical position of the interface [m]\n" "NoDarcyX1 Horizontal position where the porous medium starts [m]\n" "NoDarcyX2 Horizontal position where the porous medium ends [m]\n" diff --git a/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.input b/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.input index 13b376b128..1bfed64d9e 100644 --- a/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.input +++ b/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni.input @@ -14,7 +14,7 @@ NumberOfCellsX = 15 NumberOfCellsY = 30 # Grading and refinement of the mesh GradingFactorY = 1.16 -RefineTop = true +RefineTopY = true # Position information NoDarcyX1 = 0.25 # [m] # Beginning of PM below NoDarcyX2 = 0.5 # [m] # End of PM below @@ -29,8 +29,6 @@ NamePM = 2p2cni FreqRestart = 5 # how often restart files are written out FreqOutput = 5 # 10 # frequency of VTK output FreqMassOutput = 5 # 20 # frequency of mass and evaporation rate output (Darcy) -FreqFluxOutput = 100 # 100 # frequency of detailed flux output -FreqVaporFluxOutput = 3 # 5 # frequency of summarized flux output [FreeFlow] RefVelocity = 1.0 # [m/s] @@ -66,12 +64,9 @@ MaxSteps = 12 WriteConvergence = false [LinearSolver] -ResidualReduction = 1e-9 Verbosity = 0 -MaxIterations = 100 [ZeroEq] -WriteAllSCVData = -1.0 # Eddy Viscosity Models # 0 = none # 1 = Prandtl diff --git a/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni_reference.input b/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni_reference.input index 9a02e0e8d5..94d27d7ea2 100644 --- a/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni_reference.input +++ b/test/multidomain/2cnizeroeq2p2cni/test_2cnizeroeq2p2cni_reference.input @@ -14,7 +14,7 @@ NumberOfCellsX = 15 NumberOfCellsY = 15 # Grading and refinement of the mesh GradingFactorY = 1.75 -RefineTop = true +RefineTopY = true # Position information NoDarcyX1 = 0.25 # [m] # Beginning of PM below NoDarcyX2 = 0.5 # [m] # End of PM below @@ -29,8 +29,6 @@ NamePM = 2p2cni FreqRestart = 1000 # how often restart files are written out FreqOutput = 5 # 10 # frequency of VTK output FreqMassOutput = 1 # 20 # frequency of mass and evaporation rate output (Darcy) -FreqFluxOutput = 100 # 100 # frequency of detailed flux output -FreqVaporFluxOutput = 2 # 5 # frequency of summarized flux output [FreeFlow] RefVelocity = 3.5 # [m/s] @@ -66,12 +64,9 @@ MaxSteps = 12 WriteConvergence = false [LinearSolver] -ResidualReduction = 1e-9 Verbosity = 0 -MaxIterations = 100 [ZeroEq] -WriteAllSCVData = -1.0 # Eddy Viscosity Models # 0 = none # 1 = Prandtl diff --git a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input index 9bb3d64273..4e74e4af9f 100644 --- a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input +++ b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c.input @@ -19,7 +19,7 @@ NumberOfCellsX = 30 NumberOfCellsY = 62 # Grading and refinement of the mesh in y direction GradingFactorY = 1.13 -RefineTop = false +RefineTopY = false [Output] NameFF = stokes2c @@ -77,6 +77,4 @@ WriteConvergence = false MaxTimeStepDivisions = 20 [LinearSolver] -ResidualReduction = 1e-10 Verbosity = 0 -MaxIterations = 200 \ No newline at end of file diff --git a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c_reference.input b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c_reference.input index f960eba23d..dabadc8a7d 100644 --- a/test/multidomain/2cstokes2p2c/test_2cstokes2p2c_reference.input +++ b/test/multidomain/2cstokes2p2c/test_2cstokes2p2c_reference.input @@ -19,7 +19,7 @@ NumberOfCellsX = 25 NumberOfCellsY = 45 # Grading and refinement of the mesh in y direction GradingFactorY = 1.1 -RefineTop = false +RefineTopY = false [Output] NameFF = stokes2c @@ -77,6 +77,4 @@ WriteConvergence = false MaxTimeStepDivisions = 20 [LinearSolver] -ResidualReduction = 1e-10 Verbosity = 0 -MaxIterations = 200 \ No newline at end of file diff --git a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh index 22f0ab4782..a78182c075 100644 --- a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh +++ b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh @@ -229,9 +229,7 @@ public: //! \copydoc Dumux::ImplicitProblem::shouldWriteOutput() bool shouldWriteOutput() const { - return ( ((this->timeManager().timeStepIndex() > 0) - && (this->timeManager().timeStepIndex() % freqOutput_ == 0)) - // also write a restart file at the end of each episode + return (this->timeManager().timeStepIndex() % freqOutput_ == 0 || this->timeManager().episodeWillBeOver()); } diff --git a/test/multidomain/2czeroeq2p2c/CMakeLists.txt b/test/multidomain/2czeroeq2p2c/CMakeLists.txt index 41ed0b28e3..3f2f80579f 100644 --- a/test/multidomain/2czeroeq2p2c/CMakeLists.txt +++ b/test/multidomain/2czeroeq2p2c/CMakeLists.txt @@ -5,6 +5,6 @@ add_dumux_test(test_2czeroeq2p2c test_2czeroeq2p2c test_2czeroeq2p2c.cc --script fuzzy --command "${CMAKE_CURRENT_BINARY_DIR}/test_2czeroeq2p2c -ParameterFile ${CMAKE_CURRENT_SOURCE_DIR}/test_2czeroeq2p2c_reference.input" --files ${CMAKE_SOURCE_DIR}/test/references/2czeroeq2p2c-ff-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/zeroeq2c-00026.vtu + ${CMAKE_CURRENT_BINARY_DIR}/zeroeq2c-00028.vtu ${CMAKE_SOURCE_DIR}/test/references/2czeroeq2p2c-pm-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/2p2c-00026.vtu) + ${CMAKE_CURRENT_BINARY_DIR}/2p2c-00028.vtu) diff --git a/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.cc b/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.cc index 0284a31492..5ac5259efa 100644 --- a/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.cc +++ b/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.cc @@ -57,7 +57,7 @@ void printUsage(const char *progName, const std::string &errorMsg) "NumberOfCellsX Number of cells in x-direction\n" "NumberOfCellsY Number of cells in y-direction\n" "GradingFactorY Vertical grading of the cells\n" - "RefineTop Specifies whethter the top of the free flow will be refined\n" + "RefineTopY Specifies whethter the top of the free flow will be refined\n" "InterfacePosY Vertical position of the interface [m]\n" "NoDarcyX Horizontal position where the porous medium starts [m]\n" "\n" diff --git a/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.input b/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.input index 03b8864fcd..9581139c77 100644 --- a/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.input +++ b/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c.input @@ -14,7 +14,7 @@ NumberOfCellsX = 20 NumberOfCellsY = 40 # Grading and refinement of the mesh GradingFactorY = 1.16 -RefineTop = false +RefineTopY = false # Position information NoDarcyX = 0.25 # [m] # Horizontal position without PM below RunUpDistanceX = 0.26 # [m] # Horizontal position without Coupling to PM @@ -27,15 +27,12 @@ NamePM = 2p2c FreqRestart = 50 # 500 # how often restart files are written out FreqOutput = 5 # 10 # frequency of VTK output FreqMassOutput = 5 # 20 # frequency of mass and evaporation rate output (Darcy) -FreqFluxOutput = 3 # 100 # frequency of detailed flux output -FreqVaporFluxOutput = 3 # 5 # frequency of summarized flux output [FreeFlow] RefVelocity = 3.5 # [m/s] RefPressure = 1e5 # [Pa] RefMassfrac = 0.008 # [-] RefTemperature = 298.15 # [K] -SlipVelocity = 0.0 # [m/s] [PorousMedium] RefPressurePM = 1e5 # [Pa] @@ -59,12 +56,9 @@ MaxSteps = 15 WriteConvergence = false [LinearSolver] -ResidualReduction = 1e-8 Verbosity = 0 -MaxIterations = 100 [ZeroEq] -WriteAllSCVData = -1.0 # Eddy Viscosity Models # 0 = none # 1 = Prandtl diff --git a/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c_reference.input b/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c_reference.input index ae8b0dee4c..8500a7f857 100644 --- a/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c_reference.input +++ b/test/multidomain/2czeroeq2p2c/test_2czeroeq2p2c_reference.input @@ -14,7 +14,7 @@ NumberOfCellsX = 10 NumberOfCellsY = 25 # Grading and refinement of the mesh GradingFactorY = 1.1 -RefineTop = false +RefineTopY = false # Position information NoDarcyX = 0.25 # [m] # Horizontal position without PM below RunUpDistanceX = 0.26 # [m] # Horizontal position without Coupling to PM @@ -27,8 +27,6 @@ NamePM = 2p2c FreqRestart = 100 # 500 # how often restart files are written out FreqOutput = 5 # 10 # frequency of VTK output FreqMassOutput = 5 # 20 # frequency of mass and evaporation rate output (Darcy) -FreqFluxOutput = 3 # 100 # frequency of detailed flux output -FreqVaporFluxOutput = 3 # 5 # frequency of summarized flux output [FreeFlow] RefVelocity = 3.5 # [m/s] @@ -59,12 +57,9 @@ WriteConvergence = false MaxTimeStepDivisions = 20 [LinearSolver] -ResidualReduction = 1e-8 Verbosity = 0 -MaxIterations = 100 [ZeroEq] -WriteAllSCVData = -1.0 # Eddy Viscosity Models # 0 = none # 1 = Prandtl -- GitLab