diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index e5ae2ae4f1069399d7ee28780af206e2fd74026b..c1cf27ff7135a1693eb79f3c7d7261b0d2d670b2 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -275,7 +275,7 @@ private: static void globalDefaultParameters(Dune::ParameterTree& params) { // parameters in the implicit group - params["Implicit.UpwindWeight"] = "1.0"; + params["Flux.UpwindWeight"] = "1.0"; params["Implicit.EnableJacobianRecycling"] = "false"; // parameters in the assembly group diff --git a/dumux/discretization/cellcentered/tpfa/forchheimerslaw.hh b/dumux/discretization/cellcentered/tpfa/forchheimerslaw.hh index 214dc17aaad3ade064a5ebc8fa594301f1a8ce37..d8445cf06379a8332505c3fa544aae20daab0806 100644 --- a/dumux/discretization/cellcentered/tpfa/forchheimerslaw.hh +++ b/dumux/discretization/cellcentered/tpfa/forchheimerslaw.hh @@ -494,7 +494,7 @@ private: const UpwindTermFunction& upwindTerm, const bool insideIsUpstream) { - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()]; const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()]; diff --git a/dumux/flux/upwindscheme.hh b/dumux/flux/upwindscheme.hh index e4744f02fac91c929da36e626f353aa05570e6e5..4c426c4e41a8ac0a45b9783904db5799b970a276 100644 --- a/dumux/flux/upwindscheme.hh +++ b/dumux/flux/upwindscheme.hh @@ -53,7 +53,7 @@ public: Scalar flux, int phaseIdx) { // TODO: pass this from outside? - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); const auto& elemVolVars = fluxVars.elemVolVars(); const auto& scvf = fluxVars.scvFace(); @@ -87,7 +87,7 @@ public: const UpwindTermFunction& upwindTerm, Scalar flux, int phaseIdx) { - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); // the volume variables of the inside sub-control volume const auto& scvf = fluxVars.scvFace(); @@ -166,7 +166,7 @@ public: const UpwindTermFunction& upwindTerm, Scalar flux, int phaseIdx) { - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); const auto& scvf = fluxVars.scvFace(); const auto& elemVolVars = fluxVars.elemVolVars(); diff --git a/dumux/freeflow/navierstokes/staggered/fluxvariables.hh b/dumux/freeflow/navierstokes/staggered/fluxvariables.hh index f308c4607b6ebc417fe21594d6a2b15ca85fc85d..dff9451495378524cb87420620f7a6e435b32af3 100644 --- a/dumux/freeflow/navierstokes/staggered/fluxvariables.hh +++ b/dumux/freeflow/navierstokes/staggered/fluxvariables.hh @@ -101,7 +101,7 @@ public: { const Scalar velocity = elemFaceVars[scvf].velocitySelf(); const bool insideIsUpstream = scvf.directionSign() == sign(velocity); - static const Scalar upWindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upWindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()]; const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()]; @@ -209,7 +209,7 @@ public: // Lamba function to evaluate the transported momentum, regarding an user-specified upwind weight. auto computeMomentum = [&insideVolVars, &problem](const Scalar upstreamVelocity, const Scalar downstreamVelocity) { - static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); return (upwindWeight * upstreamVelocity + (1.0 - upwindWeight) * downstreamVelocity) * insideVolVars.density(); }; @@ -401,7 +401,7 @@ private: const Scalar upstreamVelocity, const Scalar downstreamVelocity) { - static const Scalar upWindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upWindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); const Scalar density = upWindWeight * upstreamVolVars.density() + (1.0 - upWindWeight) * downstreamVolVars.density(); const Scalar transportedVelocity = upWindWeight * upstreamVelocity + (1.0 - upWindWeight) * downstreamVelocity; return transportedVelocity * density; diff --git a/dumux/multidomain/boundary/darcydarcy/couplingmanager.hh b/dumux/multidomain/boundary/darcydarcy/couplingmanager.hh index 7cc9e57f0112d84e9b96d029b523cc28f4c78edc..d2afc37ea074014e4fe6498d83d65d25b857fad8 100644 --- a/dumux/multidomain/boundary/darcydarcy/couplingmanager.hh +++ b/dumux/multidomain/boundary/darcydarcy/couplingmanager.hh @@ -214,7 +214,7 @@ public: } // upwind scheme - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); auto upwindTerm = [phaseIdx](const auto& volVars){ return volVars.density(phaseIdx)*volVars.mobility(phaseIdx); }; if (std::signbit(flux)) // if sign of flux is negative flux *= (upwindWeight*upwindTerm(outsideVolVars) diff --git a/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh b/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh index 7f1df26991dd9eafd57d89c6bf2558b402d5b61e..e02f16123e15f7244c9e52382a242815e1358fa8 100644 --- a/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh +++ b/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh @@ -343,7 +343,7 @@ public: */ Scalar advectiveFlux(const Scalar insideQuantity, const Scalar outsideQuantity, const Scalar volumeFlow, bool insideIsUpstream) const { - const Scalar upwindWeight = 1.0; //TODO use Implicit.UpwindWeight or something like Coupling.UpwindWeight? + const Scalar upwindWeight = 1.0; //TODO use Flux.UpwindWeight or something like Coupling.UpwindWeight? if(insideIsUpstream) return (upwindWeight * insideQuantity + (1.0 - upwindWeight) * outsideQuantity) * volumeFlow; diff --git a/dumux/multidomain/facet/box/upwindscheme.hh b/dumux/multidomain/facet/box/upwindscheme.hh index a31036bbb1376748a57ca1c36f6a92f9e86bea99..75bc1a0baaa17521255699252870753b1b90b361 100644 --- a/dumux/multidomain/facet/box/upwindscheme.hh +++ b/dumux/multidomain/facet/box/upwindscheme.hh @@ -49,7 +49,7 @@ public: Scalar flux, int phaseIdx) { // TODO: pass this from outside? - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); const auto& elemVolVars = fluxVars.elemVolVars(); const auto& scvf = fluxVars.scvFace(); diff --git a/dumux/multidomain/facet/cellcentered/upwindscheme.hh b/dumux/multidomain/facet/cellcentered/upwindscheme.hh index 99bce0df22446e54d067ce604df2594a973b604b..9b560658e1603bf22a345c74e22f69a1abd4f480 100644 --- a/dumux/multidomain/facet/cellcentered/upwindscheme.hh +++ b/dumux/multidomain/facet/cellcentered/upwindscheme.hh @@ -54,7 +54,7 @@ public: const UpwindTermFunction& upwindTerm, Scalar flux, int phaseIdx) { - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); // the volume variables of the inside sub-control volume const auto& scvf = fluxVars.scvFace(); @@ -147,7 +147,7 @@ public: const UpwindTermFunction& upwindTerm, Scalar flux, int phaseIdx) { - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); const auto& scvf = fluxVars.scvFace(); const auto& elemVolVars = fluxVars.elemVolVars(); diff --git a/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh b/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh index 3383da378a980a79f5bc9dae2a7d92089a8d3a66..0d187dca2cc50d6ba227b2f4aa678ce74f48bc51 100644 --- a/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh +++ b/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh @@ -174,7 +174,7 @@ public: using AdvectionType = GetPropType<TypeTag, Properties::AdvectionType>; // evaluate the current wetting phase Darcy flux and resulting upwind weights - static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); const auto flux_w = AdvectionType::flux(problem, element, fvGeometry, curElemVolVars, scvf, 0, elemFluxVarsCache); const auto flux_n = AdvectionType::flux(problem, element, fvGeometry, curElemVolVars, scvf, 1, elemFluxVarsCache); const auto insideWeight_w = std::signbit(flux_w) ? (1.0 - upwindWeight) : upwindWeight; @@ -292,7 +292,7 @@ public: using AdvectionType = GetPropType<TypeTag, Properties::AdvectionType>; // evaluate the current wetting phase Darcy flux and resulting upwind weights - static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); const auto flux_w = AdvectionType::flux(problem, element, fvGeometry, curElemVolVars, scvf, 0, elemFluxVarsCache); const auto flux_n = AdvectionType::flux(problem, element, fvGeometry, curElemVolVars, scvf, 1, elemFluxVarsCache); const auto insideWeight_w = std::signbit(flux_w) ? (1.0 - upwindWeight) : upwindWeight; @@ -437,7 +437,7 @@ public: using AdvectionType = GetPropType<TypeTag, Properties::AdvectionType>; // evaluate the current wetting phase Darcy flux and resulting upwind weights - static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); const auto flux_w = AdvectionType::flux(problem, element, fvGeometry, curElemVolVars, scvf, 0, elemFluxVarsCache); const auto flux_n = AdvectionType::flux(problem, element, fvGeometry, curElemVolVars, scvf, 1, elemFluxVarsCache); const auto insideWeight_w = std::signbit(flux_w) ? (1.0 - upwindWeight) : upwindWeight; diff --git a/dumux/porousmediumflow/tracer/localresidual.hh b/dumux/porousmediumflow/tracer/localresidual.hh index 0cd193d97483eddc051741a8c58575661761359f..f78b6017facbd6ab0599b211553a56036ccb26e4 100644 --- a/dumux/porousmediumflow/tracer/localresidual.hh +++ b/dumux/porousmediumflow/tracer/localresidual.hh @@ -223,7 +223,7 @@ public: const auto volFlux = problem.spatialParams().volumeFlux(element, fvGeometry, curElemVolVars, scvf); // the upwind weight - static const Scalar upwindWeight = getParam<Scalar>("Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParam<Scalar>("Flux.UpwindWeight"); // get the inside and outside volvars const auto& insideVolVars = curElemVolVars[scvf.insideScvIdx()]; @@ -268,7 +268,7 @@ public: const auto volFlux = problem.spatialParams().volumeFlux(element, fvGeometry, curElemVolVars, scvf); // the upwind weight - static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Implicit.UpwindWeight"); + static const Scalar upwindWeight = getParamFromGroup<Scalar>(problem.paramGroup(), "Flux.UpwindWeight"); // get the inside and outside volvars const auto& insideVolVars = curElemVolVars[scvf.insideScvIdx()]; diff --git a/test/freeflow/navierstokes/closedsystem/params_re1000.input b/test/freeflow/navierstokes/closedsystem/params_re1000.input index cd5be48163103ec699c0a3a6d4c75654687d96a7..e7f2090e6735df3f6c811ad383c8e455e16a13be 100644 --- a/test/freeflow/navierstokes/closedsystem/params_re1000.input +++ b/test/freeflow/navierstokes/closedsystem/params_re1000.input @@ -27,5 +27,5 @@ NumericDifference.BaseEpsilon = 1e-8 [Vtk] WriteFaceData = false -[Implicit] +[Flux] UpwindWeight = 0.5 # set to 0.5 for reproducing Ghia et al. (1982)