diff --git a/dumux/freeflow/stokes/fluxvariables.hh b/dumux/freeflow/stokes/fluxvariables.hh index 6db4c998f300ed680715f303ded14e9be17712a3..98fd0c743fd6fee63541e12a9b0f5c7e60eb66dd 100644 --- a/dumux/freeflow/stokes/fluxvariables.hh +++ b/dumux/freeflow/stokes/fluxvariables.hh @@ -27,7 +27,6 @@ #define DUMUX_STOKES_FLUX_VARIABLES_HH #include -#include #include #include @@ -67,29 +66,6 @@ class StokesFluxVariables typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; public: - //! \brief The old constructor - DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.") - StokesFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int fIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - { - DUNE_THROW(Dune::InvalidStateException, "The FluxVariables now have to be default contructed. " - << "In case you have your own FluxVariables you have to make them default " - << " constructable too. All calls to the old constructor will throw this error. " - << "Everywhere you instantiate FluxVariables do this now by default constructing " - << "a FluxVariables object (FluxVariables fluxVars;) and then updating it where " - << "the update method has the same signature as the old constructor (fluxVars.update(...).)"); - } - - /*! - * \brief Default constructor - * \note This can be removed when the deprecated constructor is removed. - */ - StokesFluxVariables() = default; - /*! * \brief Compute / update the flux variables * diff --git a/dumux/freeflow/stokes/problem.hh b/dumux/freeflow/stokes/problem.hh index 2919be5c11dec0dfcce52393b84218f8699223fb..3206f1942f387afd5fdffbe8c6c3f841214dab3e 100644 --- a/dumux/freeflow/stokes/problem.hh +++ b/dumux/freeflow/stokes/problem.hh @@ -73,7 +73,6 @@ public: */ // \{ - /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. * @@ -102,20 +101,6 @@ public: const GlobalPosition &gravity() const { return gravity_; } - /*! - * \brief Evaluate the intrinsic permeability - * at the corner of a given element - * - * \return (Scalar) permeability - */ - DUNE_DEPRECATED_MSG("permeability() is deprecated.") - Scalar permeability(const Element &element, - const FVElementGeometry &fvGeometry, - const Intersection &intersection, - const int scvIdx, - const int boundaryFaceIdx) const - { DUNE_THROW(Dune::NotImplemented, "permeability()"); } - // \} private: diff --git a/dumux/freeflow/stokesnc/fluxvariables.hh b/dumux/freeflow/stokesnc/fluxvariables.hh index 50c3bf96356f4ef1eb91007b7d86d1ed7c04aec8..429293f5c42fedcf24d41e7d98368170e80fdd25 100644 --- a/dumux/freeflow/stokesnc/fluxvariables.hh +++ b/dumux/freeflow/stokesnc/fluxvariables.hh @@ -72,21 +72,6 @@ class StokesncFluxVariables : public StokesFluxVariables typedef Dune::FieldMatrix DimMatrix; public: - // old constructor - DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.") - StokesncFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int fIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) {} - - /*! - * \brief Default constructor - * \note This can be removed when the deprecated constructor is removed. - */ - StokesncFluxVariables() = default; - /*! * \brief Return the molar density \f$ \mathrm{[mol/m^3]} \f$ at the integration point. */ diff --git a/dumux/freeflow/stokesncni/fluxvariables.hh b/dumux/freeflow/stokesncni/fluxvariables.hh index d5c2d943740647141d7d7820c754736be430032d..754a4017a1d1457a3a38294650ec0158f8fdbdd6 100644 --- a/dumux/freeflow/stokesncni/fluxvariables.hh +++ b/dumux/freeflow/stokesncni/fluxvariables.hh @@ -68,20 +68,6 @@ class StokesncniFluxVariables : public StokesncFluxVariables typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; public: - // old ctor - DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.") - StokesncniFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int fIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) {} - /*! - * \brief Default constructor - * \note This can be removed when the deprecated constructor is removed. - */ - StokesncniFluxVariables() = default; - /*! * \brief Returns the temperature \f$\mathrm{[K]}\f$ at the integration point. */ diff --git a/dumux/freeflow/zeroeq/fluxvariables.hh b/dumux/freeflow/zeroeq/fluxvariables.hh index 2ddc29a426321e484f511b05dee79951760336ac..42dea265b0fd7a001ae9de9f2f5aaceebcaf0647 100644 --- a/dumux/freeflow/zeroeq/fluxvariables.hh +++ b/dumux/freeflow/zeroeq/fluxvariables.hh @@ -63,22 +63,6 @@ class ZeroEqFluxVariables : public GET_PROP_TYPE(TypeTag, BaseStokesFluxVariable typedef Dune::FieldVector DimVector; public: - //! \brief The old constructor - DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.") - ZeroEqFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int fIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - : ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {} - - /*! - * \brief Default constructor - * \note This can be removed when the deprecated constructor is removed. - */ - ZeroEqFluxVariables() = default; - /*! * \brief Compute / update the flux variables * diff --git a/dumux/freeflow/zeroeqnc/fluxvariables.hh b/dumux/freeflow/zeroeqnc/fluxvariables.hh index 1b29da8b1625c2ce49c8b106b37bb49287533f24..098147d6f9aec2f7c3bd3ba91315f9cc3650471d 100644 --- a/dumux/freeflow/zeroeqnc/fluxvariables.hh +++ b/dumux/freeflow/zeroeqnc/fluxvariables.hh @@ -66,22 +66,6 @@ class ZeroEqncFluxVariables : public ZeroEqFluxVariables typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; public: - //! \brief The old constructor - DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.") - ZeroEqncFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int fIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - : ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {} - - /*! - * \brief Default constructor - * \note This can be removed when the deprecated constructor is removed. - */ - ZeroEqncFluxVariables() = default; - /*! * \brief Compute / update the flux variables * diff --git a/dumux/freeflow/zeroeqncni/fluxvariables.hh b/dumux/freeflow/zeroeqncni/fluxvariables.hh index 77974ad2e254f24fd4741b96cd3489319cf465eb..994fc983d316b01c3e61f8bb98f7635fc2eaceb3 100644 --- a/dumux/freeflow/zeroeqncni/fluxvariables.hh +++ b/dumux/freeflow/zeroeqncni/fluxvariables.hh @@ -67,22 +67,6 @@ class ZeroEqncniFluxVariables : public ZeroEqncFluxVariables typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; public: - //! \brief The old constructor - DUNE_DEPRECATED_MSG("FluxVariables now have to be default constructed and updated.") - ZeroEqncniFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int fIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - : ParentType(problem, element, fvGeometry, fIdx, elemVolVars, onBoundary) {} - - /*! - * \brief Default constructor - * \note This can be removed when the deprecated constructor is removed. - */ - ZeroEqncniFluxVariables() = default; - /*! * \brief Compute / update the flux variables * diff --git a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh index 5077e6b0ad4b895ec0311df0ab02f1a6ad77f010..4487c37390814ccd395adf82854cddf77a51a7cc 100644 --- a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh +++ b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh @@ -24,8 +24,6 @@ #ifndef DUMUX_2P2CNI_COUPLING_LOCAL_RESIDUAL_HH #define DUMUX_2P2CNI_COUPLING_LOCAL_RESIDUAL_HH -#include - #include #include #include @@ -169,237 +167,6 @@ public: / this->problem_().timeManager().timeStepSize() * this->curVolVars_(scvIdx).extrusionFactor(); } - - /*! - * \brief Evaluates the time derivative of the phase storage - */ - DUNE_DEPRECATED_MSG("evalPhaseStorageDerivative() is deprecated. Use evalStorageDerivative() instead.") - Scalar evalPhaseStorageDerivative(const int scvIdx) const - { - Scalar result = computePhaseStorage(scvIdx, false); - Scalar oldPhaseStorage = computePhaseStorage(scvIdx, true); - Valgrind::CheckDefined(result); - Valgrind::CheckDefined(oldPhaseStorage); - - result -= oldPhaseStorage; - result *= this->fvGeometry_().subContVol[scvIdx].volume - / this->problem_().timeManager().timeStepSize() - * this->curVolVars_(scvIdx).extrusionFactor(); - Valgrind::CheckDefined(result); - - return result; - } - - /*! - * \brief Compute storage term of all components within all phases - */ - DUNE_DEPRECATED_MSG("computePhaseStorage() is deprecated.") - Scalar computePhaseStorage(const int scvIdx, bool usePrevSol) const - { - const ElementVolumeVariables &elemVolVars = usePrevSol ? this->prevVolVars_() - : this->curVolVars_(); - const VolumeVariables &volVars = elemVolVars[scvIdx]; - - // compute storage term of all components within all phases - Scalar phaseStorage = volVars.density(phaseIdx) - * volVars.saturation(phaseIdx) - * volVars.massFraction(phaseIdx, compIdx); - phaseStorage *= volVars.porosity(); - - return phaseStorage; - } - - /*! - * \brief Compute the fluxes merely for the flux output. - * - * \param scvIdx The sub-control-volume index - */ - DUNE_DEPRECATED_MSG("evalComponentFluxes() has been deprecated.") - PrimaryVariables evalComponentFluxes(const int scvIdx) - { - const unsigned int numScv = this->fvGeometry_().numScv; - PrimaryVariables fluxes[numScv]; - for (int fIdx = 0; fIdx < numScv; fIdx++) - fluxes[fIdx] = 0.0; - - // calculate the mass flux over the faces and subtract - // it from the local rates - for (int fIdx = 0; fIdx < numScv; fIdx++) - { - FluxVariables fluxVars; - fluxVars.update(this->problem_(), - this->element_(), - this->fvGeometry_(), - fIdx, - this->curVolVars_()); - - int i = this->fvGeometry_().subContVolFace[fIdx].i; - int j = this->fvGeometry_().subContVolFace[fIdx].j; - - PrimaryVariables flux(0.); - PrimaryVariables fluxTemp(0.); - this->computeAdvectiveFlux(fluxTemp, fluxVars); - flux += fluxTemp; - this->computeAdvectiveFlux(fluxTemp, fluxVars); - flux += fluxTemp; - - const Scalar extrusionFactor = 0.5 * this->curVolVars_(i).extrusionFactor() - + 0.5 * this->curVolVars_(j).extrusionFactor(); - flux *= extrusionFactor; - - fluxes[i] += flux; - fluxes[j] -= flux; - } - return fluxes[scvIdx]; - } - - /*! - * \brief Compute the fluxes within the different fluid phases. This is - * merely for the computation of flux output. - */ - DUNE_DEPRECATED_MSG("evalPhaseFluxes() has been deprecated.") - void evalPhaseFluxes() - { - elementFluxes_.resize(this->fvGeometry_().numScv); - elementFluxes_ = 0.; - - Scalar flux(0.); - - // calculate the mass flux over the faces and subtract - // it from the local rates - for (int fIdx = 0; fIdx < this->fvGeometry_().numScvf; fIdx++) - { - FluxVariables vars(this->problem_(), - this->element_(), - this->fvGeometry_(), - fIdx, - this->curVolVars_()); - - int i = this->fvGeometry_().subContVolFace[fIdx].i; - int j = this->fvGeometry_().subContVolFace[fIdx].j; - - const Scalar extrusionFactor = - (this->curVolVars_(i).extrusionFactor() - + this->curVolVars_(j).extrusionFactor()) - / 2; - flux = computeAdvectivePhaseFlux(vars) + - computeDiffusivePhaseFlux(vars); - flux *= extrusionFactor; - - elementFluxes_[i] += flux; - elementFluxes_[j] -= flux; - } - } - - /*! - * \brief Returns the advective fluxes within the different phases. - */ - DUNE_DEPRECATED_MSG("computeAdvectivePhaseFlux() is deprecated.") - Scalar computeAdvectivePhaseFlux(const FluxVariables &fluxVars) const - { - Scalar advectivePhaseFlux = 0.; - const Scalar massUpwindWeight = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MassUpwindWeight); - - // data attached to upstream and the downstream vertices - // of the current phase - const VolumeVariables &up = - this->curVolVars_(fluxVars.upstreamIdx(phaseIdx)); - const VolumeVariables &dn = - this->curVolVars_(fluxVars.downstreamIdx(phaseIdx)); - - if (massUpwindWeight > 0.0) - // upstream vertex - advectivePhaseFlux += - fluxVars.volumeFlux(phaseIdx) - * massUpwindWeight - * up.density(phaseIdx) - * up.massFraction(phaseIdx, compIdx); - if (massUpwindWeight < 1.0) - // downstream vertex - advectivePhaseFlux += - fluxVars.volumeFlux(phaseIdx) - * (1 - massUpwindWeight) - * dn.density(phaseIdx) - * dn.massFraction(phaseIdx, compIdx); - - return advectivePhaseFlux; - } - - /*! - * \brief Returns the diffusive fluxes within the different phases. - */ - DUNE_DEPRECATED_MSG("computeAdvectivePhaseFlux() is deprecated.") - Scalar computeDiffusivePhaseFlux(const FluxVariables &fluxVars) const - { - // add diffusive flux of gas component in liquid phase - Scalar diffusivePhaseFlux = fluxVars.moleFractionGrad(phaseIdx)*fluxVars.face().normal; - diffusivePhaseFlux *= -fluxVars.porousDiffCoeff(phaseIdx) * - fluxVars.molarDensity(phaseIdx); - diffusivePhaseFlux *= FluidSystem::molarMass(compIdx); - - return diffusivePhaseFlux; - } - - /*! - * \brief Set the Dirichlet-like conditions for the coupling - * and replace the existing residual - * - * \param scvIdx Sub control vertex index for the coupling condition - */ - DUNE_DEPRECATED_MSG("evalCouplingVertex_ is deprecated. Its functionality is now included in evalBoundary_.") - void evalCouplingVertex_(const int scvIdx) - { - const VolumeVariables &volVars = this->curVolVars_()[scvIdx]; - - // set pressure as part of the momentum coupling - if (this->bcTypes_(scvIdx).isCouplingDirichlet(massBalanceIdx)) - this->residual_[scvIdx][massBalanceIdx] = volVars.pressure(nPhaseIdx); - - // set mass fraction; - if (this->bcTypes_(scvIdx).isCouplingDirichlet(contiWEqIdx)) - this->residual_[scvIdx][contiWEqIdx] = volVars.massFraction(nPhaseIdx, wCompIdx); - - // set temperature as part of the coupling - if (this->bcTypes_(scvIdx).isCouplingDirichlet(energyEqIdx)) - this->residual_[scvIdx][energyEqIdx] = volVars.temperature(); - } - - /*! - * \brief Check if one of the boundary conditions is coupling. - */ - DUNE_DEPRECATED_MSG("boundaryHasCoupling_ is deprecated") - bool boundaryHasCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isCouplingInflow(eqIdx) || bcTypes.isCouplingOutflow(eqIdx)) - return true; - return false; - } - - /*! - * \brief Check if one of the boundary conditions is Neumann. - */ - DUNE_DEPRECATED_MSG("boundaryHasNeumann_ is unused in dumux and therefore deprecated") - bool boundaryHasNeumann_(const BoundaryTypes& bcTypes) const - { - bool hasNeumann = false; - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isNeumann(eqIdx) || bcTypes.isNeumann(eqIdx)) - hasNeumann = true; - return hasNeumann; - } - - /*! - * \brief Returns the fluxes of the specified sub control volume - */ - DUNE_DEPRECATED_MSG("elementFluxes() is deprecated") - Scalar elementFluxes(const int scvIdx) - { - return elementFluxes_[scvIdx]; - } - -private: - ElementFluxVector elementFluxes_; }; } // namespace Dumux diff --git a/dumux/multidomain/2cnistokes2p2cni/localoperator.hh b/dumux/multidomain/2cnistokes2p2cni/localoperator.hh index 5a1a653248d383aba08b40381b991b95ec266941..625f5a9b18f78780308a2352a53e4fc4087ad98e 100644 --- a/dumux/multidomain/2cnistokes2p2cni/localoperator.hh +++ b/dumux/multidomain/2cnistokes2p2cni/localoperator.hh @@ -24,8 +24,6 @@ #ifndef DUMUX_TWOCNISTOKES2P2CNILOCALOPERATOR_HH #define DUMUX_TWOCNISTOKES2P2CNILOCALOPERATOR_HH -#include - #include namespace Dumux { @@ -353,180 +351,6 @@ public: -cParams.elemVolVarsCur1[vertInElem1].temperature()); } } - - //! \copydoc Dumux::TwoCStokesTwoPTwoCLocalOperator::evalCoupling12() - template - DUNE_DEPRECATED_MSG("evalCoupling12() is deprecated. Use evalCoupling() instead.") - void evalCoupling12(const LFSU1& lfsu1, const LFSU2& lfsu2, - const int vertInElem1, const int vertInElem2, - const SDElement1& sdElement1, const SDElement2& sdElement2, - const BoundaryVariables1& boundaryVars1, const BoundaryVariables2& boundaryVars2, - const CParams &cParams, - RES1& couplingRes1, RES2& couplingRes2) const - { - const GlobalPosition& globalPos1 = cParams.fvGeometry1.subContVol[vertInElem1].global; - const GlobalPosition& bfNormal1 = boundaryVars1.face().normal; - const Scalar normalMassFlux1 = boundaryVars1.normalVelocity() * - cParams.elemVolVarsCur1[vertInElem1].density(); - GlobalProblem& globalProblem = this->globalProblem(); - - // evaluate coupling of mass and momentum balances - ParentType::evalCoupling12(lfsu1, lfsu2, - vertInElem1, vertInElem2, - sdElement1, sdElement2, - boundaryVars1, boundaryVars2, - cParams, - couplingRes1, couplingRes2); - - if (cParams.boundaryTypes2.isCouplingNeumann(energyEqIdx2)) - { - // only enter here, if a boundary layer model is used for the computation of the diffusive fluxes - if (ParentType::blModel_) - { - // convective energy flux - const Scalar convectiveFlux = normalMassFlux1 - * cParams.elemVolVarsCur1[vertInElem1].enthalpy(); - - // enthalpy transported by diffusive fluxes - // multiply the diffusive flux with the mass transfer coefficient - static_assert(numComponents1 == 2, - "This coupling condition is only implemented for two components."); - Scalar diffusiveEnergyFlux = 0.0; - Scalar diffusiveFlux = bfNormal1.two_norm() - * ParentType::evalBoundaryLayerConcentrationGradient(cParams, vertInElem1) - * (boundaryVars1.diffusionCoeff(transportCompIdx1) - + boundaryVars1.eddyDiffusivity()) - * boundaryVars1.molarDensity() - * ParentType::evalMassTransferCoefficient(cParams, vertInElem1, vertInElem2); - - diffusiveEnergyFlux += diffusiveFlux * FluidSystem::molarMass(transportCompIdx1) - * boundaryVars1.componentEnthalpy(transportCompIdx1); - diffusiveEnergyFlux -= diffusiveFlux * FluidSystem::molarMass(phaseCompIdx1) - * boundaryVars1.componentEnthalpy(phaseCompIdx1); - - // conductive transported energy - const Scalar conductiveFlux = bfNormal1.two_norm() - * evalBoundaryLayerTemperatureGradient(cParams, vertInElem1) - * (boundaryVars1.thermalConductivity() - + boundaryVars1.thermalEddyConductivity()); - - couplingRes2.accumulate(lfsu2.child(energyEqIdx2), vertInElem2, - -(convectiveFlux - diffusiveEnergyFlux - conductiveFlux)); - } - else if (globalProblem.sdProblem1().isCornerPoint(globalPos1)) - { - const Scalar convectiveFlux = - normalMassFlux1 * - cParams.elemVolVarsCur1[vertInElem1].enthalpy(); - const Scalar conductiveFlux = - bfNormal1 * - boundaryVars1.temperatureGrad() * - (boundaryVars1.thermalConductivity() + boundaryVars1.thermalEddyConductivity()); - Scalar sumDiffusiveFluxes = 0.0; - Scalar sumDiffusiveEnergyFlux = 0.0; - for (int compIdx=0; compIdx < numComponents1; compIdx++) - { - if (compIdx != phaseCompIdx1) - { - Scalar diffusiveFlux = boundaryVars1.moleFractionGrad(compIdx) - * boundaryVars1.face().normal - *(boundaryVars1.diffusionCoeff(compIdx) + boundaryVars1.eddyDiffusivity()) - * boundaryVars1.molarDensity(); - sumDiffusiveFluxes += diffusiveFlux; - sumDiffusiveEnergyFlux += diffusiveFlux - * boundaryVars1.componentEnthalpy(compIdx) - * FluidSystem::molarMass(compIdx); // Multiplied by molarMass [kg/mol] to convert from [mol/m^3 s] to [kg/m^3 s] - } - } - sumDiffusiveEnergyFlux -= sumDiffusiveFluxes * boundaryVars1.componentEnthalpy(phaseCompIdx1) - * FluidSystem::molarMass(phaseCompIdx1); - couplingRes2.accumulate(lfsu2.child(energyEqIdx2), vertInElem2, - -(convectiveFlux - sumDiffusiveEnergyFlux - conductiveFlux)); - } - else - { - // the energy flux from the Stokes domain - couplingRes2.accumulate(lfsu2.child(energyEqIdx2), vertInElem2, - globalProblem.localResidual1().residual(vertInElem1)[energyEqIdx1]); - } - } - if (cParams.boundaryTypes2.isCouplingDirichlet(energyEqIdx2)) - { - // set residualDarcy[energyEqIdx2] = T in 2p2cnilocalresidual.hh - couplingRes2.accumulate(lfsu2.child(energyEqIdx2), vertInElem2, - -cParams.elemVolVarsCur1[vertInElem1].temperature()); - } - } - - //! \copydoc Dumux::TwoCStokesTwoPTwoCLocalOperator::evalCoupling21() - template - DUNE_DEPRECATED_MSG("evalCoupling21() is deprecated. Use evalCoupling() instead.") - void evalCoupling21(const LFSU1& lfsu1, const LFSU2& lfsu2, - const int vertInElem1, const int vertInElem2, - const SDElement1& sdElement1, const SDElement2& sdElement2, - const BoundaryVariables1& boundaryVars1, const BoundaryVariables2& boundaryVars2, - const CParams &cParams, - RES1& couplingRes1, RES2& couplingRes2) const - { - GlobalProblem& globalProblem = this->globalProblem(); - - // evaluate coupling of mass and momentum balances - ParentType::evalCoupling21(lfsu1, lfsu2, - vertInElem1, vertInElem2, - sdElement1, sdElement2, - boundaryVars1, boundaryVars2, - cParams, - couplingRes1, couplingRes2); - - const GlobalPosition& globalPos2 = cParams.fvGeometry2.subContVol[vertInElem2].global; - GlobalPosition normalMassFlux2(0.); - - // velocity*normal*area*rho - // mass flux is needed for both (mass/mole) formulation, as the enthalpy is mass based - for (int phaseIdx=0; phaseIdx - DUNE_DEPRECATED_MSG("evalBoundaryLayerTemperatureGradient() is deprecated.") - Scalar evalBoundaryLayerTemperatureGradient(CParams cParams, const int scvIdx) const - { - this->globalProblem().evalBoundaryLayerTemperatureGradient(cParams, scvIdx); - } }; } // end namespace Dumux diff --git a/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh b/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh index a9a2fa6c6802003af8199bad162f3ad084d9e732..671ae29efa979d4db488e6a41fb3d0d408e135b9 100644 --- a/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh +++ b/dumux/multidomain/2cnistokes2p2cni/stokesncnicouplinglocalresidual.hh @@ -26,8 +26,6 @@ #ifndef DUMUX_STOKESNCNI_COUPLING_LOCAL_RESIDUAL_HH #define DUMUX_STOKESNCNI_COUPLING_LOCAL_RESIDUAL_HH -#include - #include #include @@ -199,150 +197,6 @@ public: this->removeStabilizationAtBoundary_(idx); } } - -protected: - /*! - * \brief Evaluate one part of the Dirichlet-like coupling conditions for a single - * sub-control volume face; rest is done in the local coupling operator - */ - template - DUNE_DEPRECATED_MSG("evalCouplingVertex_ is deprecated. Its functionality is now included in evalBoundary_.") - void evalCouplingVertex_(const IntersectionIterator &isIt, - const int scvIdx, - const int boundaryFaceIdx, - const FluxVariables &boundaryVars) - { - const VolumeVariables &volVars = this->curVolVars_()[scvIdx]; - const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); - - // set velocity normal to the interface - if (bcTypes.isCouplingNeumann(momentumYIdx)) - { - this->residual_[scvIdx][momentumYIdx] = volVars.velocity() - * boundaryVars.face().normal - / boundaryVars.face().normal.two_norm(); - Valgrind::CheckDefined(this->residual_[scvIdx][momentumYIdx]); - } - - // add pressure correction - required for pressure coupling, - // if p.n comes from the pm - if (bcTypes.isCouplingDirichlet(momentumYIdx) || bcTypes.isCouplingMortar(momentumYIdx)) - { - DimVector pressureCorrection(isIt->centerUnitOuterNormal()); - pressureCorrection *= volVars.pressure(); - this->residual_[scvIdx][momentumYIdx] += pressureCorrection[momentumYIdx]* - boundaryVars.face().area; - } - - // set mole fraction for the transported components - for (int compIdx = 0; compIdx < numComponents; compIdx++) - { - int eqIdx = dim + compIdx; - if (eqIdx != massBalanceIdx) { - if (bcTypes.isCouplingDirichlet(eqIdx)) - { - if(useMoles) - this->residual_[scvIdx][eqIdx] = volVars.moleFraction(compIdx); - else - this->residual_[scvIdx][eqIdx] = volVars.massFraction(compIdx); - Valgrind::CheckDefined(this->residual_[scvIdx][eqIdx]); - } - } - } - // set temperature - if (bcTypes.isCouplingDirichlet(energyEqIdx)) - { - this->residual_[scvIdx][energyEqIdx] = volVars.temperature(); - Valgrind::CheckDefined(this->residual_[scvIdx][energyEqIdx]); - } - } - - template - DUNE_DEPRECATED_MSG("evalBeaversJoseph_ is deprecated. Its functionality is now included in the LOP function evalCoupling21().") - void evalBeaversJoseph_(const IntersectionIterator &isIt, - const int scvIdx, - const int boundaryFaceIdx, - const FluxVariables &boundaryVars) - { - const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); - - const GlobalPosition &globalPos = this->fvGeometry_().boundaryFace[boundaryFaceIdx].ipGlobal; - Scalar beaversJosephCoeff = this->problem_().beaversJosephCoeffAtPos(globalPos); - - const Scalar Kxx = this->problem_().permeability(this->element_(), - this->fvGeometry_(), - scvIdx); - beaversJosephCoeff /= sqrt(Kxx); - assert(beaversJosephCoeff > 0.0); - const DimVector& elementUnitNormal = isIt->centerUnitOuterNormal(); - - // implementation as NEUMANN condition ///////////////////////////////////////////// - // (v.n)n - if (bcTypes.isCouplingDirichlet(momentumXIdx)) - { - const Scalar normalComp = boundaryVars.velocity()*elementUnitNormal; - DimVector normalV = elementUnitNormal; - normalV *= normalComp; // v*n*n - - // v_tau = v - (v.n)n - const DimVector tangentialV = boundaryVars.velocity() - normalV; - const Scalar boundaryFaceArea = boundaryVars.face().area; - - for (int dimIdx=0; dimIdx < dim; ++dimIdx) - this->residual_[scvIdx][dimIdx] += beaversJosephCoeff * - boundaryFaceArea * - tangentialV[dimIdx] * - (boundaryVars.dynamicViscosity() + boundaryVars.dynamicEddyViscosity()); - - //////////////////////////////////////////////////////////////////////////////////// - //normal component has only to be set if no coupling conditions are defined - //set NEUMANN flux (set equal to pressure in problem) -// PrimaryVariables priVars(0.0); -// this->problem_().neumann(priVars, this->element_(), this->fvGeometry_(), -// intersection, scvIdx, boundaryFaceIdx); -// for (int dimIdx=0; dimIdx < dim; ++dimIdx) -// this->residual_[scvIdx][dimIdx] += priVars[dimIdx]* -// boundaryFaceArea; - } - if (bcTypes.isCouplingNeumann(momentumXIdx)) - { - assert(beaversJosephCoeff > 0); - /////////////////////////////////////////////////////////////////////////////////////////// - //IMPLEMENTATION AS DIRICHLET CONDITION - //tangential componment: vx = sqrt K /alpha * (grad v n(unity))t - DimVector tangentialVelGrad(0); - boundaryVars.velocityGrad().umv(elementUnitNormal, tangentialVelGrad); - tangentialVelGrad /= -beaversJosephCoeff; // was - before - this->residual_[scvIdx][momentumXIdx] = - tangentialVelGrad[momentumXIdx] - this->curPriVars_(scvIdx)[momentumXIdx]; - - //////////////////////////////////////////////////////////////////////////////////// - //for testing Beavers and Joseph without adjacent porous medium set vy to 0 - // Scalar normalVel(0); - // this->residual_[scvIdx][momentumYIdx] = this->curPrimaryVars_(scvIdx)[momentumYIdx] - normalVel; - //////////////////////////////////////////////////////////////////////////////////// - } - } - - // return true, if at least one equation on the boundary has a coupling condition - DUNE_DEPRECATED_MSG("boundaryHasCoupling_() is deprecated") - bool boundaryHasCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isCouplingInflow(eqIdx) || bcTypes.isCouplingOutflow(eqIdx)) - return true; - return false; - } - - // return true, if at least one equation on the boundary has a mortar coupling condition - DUNE_DEPRECATED_MSG("boundaryHasMortarCoupling_() is deprecated") - bool boundaryHasMortarCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isMortarCoupling(eqIdx)) - return true; - return false; - } }; } // Dumux diff --git a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh index faf98c13deb9a9e2e44c030a71405f4a4c35e6f6..36a614276036466a7385857893732b6d4f921f57 100644 --- a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh +++ b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh @@ -24,8 +24,6 @@ #ifndef DUMUX_2P2C_COUPLING_LOCAL_RESIDUAL_HH #define DUMUX_2P2C_COUPLING_LOCAL_RESIDUAL_HH -#include - #include #include #include @@ -166,240 +164,6 @@ public: * this->curVolVars_(scvIdx).extrusionFactor(); } - /*! - * \brief Evaluates the time derivative of the phase storage - */ - DUNE_DEPRECATED_MSG("evalPhaseStorageDerivative() is deprecated. Use evalStorageDerivative() instead.") - Scalar evalPhaseStorageDerivative(const int scvIdx) const - { - Scalar result = computePhaseStorage(scvIdx, false); - Scalar oldPhaseStorage = computePhaseStorage(scvIdx, true); - Valgrind::CheckDefined(result); - Valgrind::CheckDefined(oldPhaseStorage); - - result -= oldPhaseStorage; - result *= this->fvGeometry_().subContVol[scvIdx].volume - / this->problem_().timeManager().timeStepSize() - * this->curVolVars_(scvIdx).extrusionFactor(); - Valgrind::CheckDefined(result); - - return result; - } - - /*! - * \brief Compute storage term of all components within all phases - */ - DUNE_DEPRECATED_MSG("computePhaseStorage() is deprecated.") - Scalar computePhaseStorage(const int scvIdx, bool usePrevSol) const - { - const ElementVolumeVariables &elemVolVars = - usePrevSol ? this->prevVolVars_() : this->curVolVars_(); - const VolumeVariables &volVars = elemVolVars[scvIdx]; - - return volVars.density(phaseIdx) - * volVars.saturation(phaseIdx) - * volVars.massFraction(phaseIdx, compIdx) - * volVars.porosity(); - } - - /*! - * \brief Compute the fluxes merely for the flux output. - * - * \param scvIdx The sub-control-volume index - */ - DUNE_DEPRECATED_MSG("evalComponentFluxes() has been deprecated.") - PrimaryVariables evalComponentFluxes(const int scvIdx) - { - const unsigned int numScv = this->fvGeometry_().numScv; - PrimaryVariables fluxes[numScv]; - for (int fIdx = 0; fIdx < numScv; fIdx++) - fluxes[fIdx] = 0.0; - - // calculate the mass flux over the faces and subtract - // it from the local rates - for (int fIdx = 0; fIdx < numScv; fIdx++) - { - FluxVariables fluxVars; - fluxVars.update(this->problem_(), - this->element_(), - this->fvGeometry_(), - fIdx, - this->curVolVars_()); - - int i = this->fvGeometry_().subContVolFace[fIdx].i; - int j = this->fvGeometry_().subContVolFace[fIdx].j; - - PrimaryVariables flux(0.); - PrimaryVariables fluxTemp(0.); - this->computeAdvectiveFlux(fluxTemp, fluxVars); - flux += fluxTemp; - this->computeAdvectiveFlux(fluxTemp, fluxVars); - flux += fluxTemp; - - const Scalar extrusionFactor = 0.5 * this->curVolVars_(i).extrusionFactor() - + 0.5 * this->curVolVars_(j).extrusionFactor(); - flux *= extrusionFactor; - - fluxes[i] += flux; - fluxes[j] -= flux; - } - return fluxes[scvIdx]; - } - - /*! - * \brief Compute the fluxes within the different fluid phases. This is - * merely for the computation of flux output. - */ - DUNE_DEPRECATED_MSG("evalPhaseFluxes() has been deprecated.") - void evalPhaseFluxes() - { - elementFluxes_.resize(this->fvGeometry_().numScv); - elementFluxes_ = 0.; - - Scalar flux(0.); - - // calculate the mass flux over the faces and subtract - // it from the local rates - for (int fIdx = 0; fIdx < this->fvGeometry_().numScvf; fIdx++) - { - FluxVariables vars(this->problem_(), - this->element_(), - this->fvGeometry_(), - fIdx, - this->curVolVars_()); - - int i = this->fvGeometry_().subContVolFace[fIdx].i; - int j = this->fvGeometry_().subContVolFace[fIdx].j; - - const Scalar extrusionFactor = - (this->curVolVars_(i).extrusionFactor() - + this->curVolVars_(j).extrusionFactor()) - / 2; - flux = computeAdvectivePhaseFlux(vars) + - computeDiffusivePhaseFlux(vars); - flux *= extrusionFactor; - - elementFluxes_[i] += flux; - elementFluxes_[j] -= flux; - } - } - - /*! - * \brief Returns the advective fluxes within the different phases. - */ - DUNE_DEPRECATED_MSG("computeAdvectivePhaseFlux() is deprecated.") - Scalar computeAdvectivePhaseFlux(const FluxVariables &fluxVars) const - { - Scalar advectivePhaseFlux = 0.; - const Scalar massUpwindWeight = GET_PARAM_FROM_GROUP(TypeTag, Scalar, Implicit, MassUpwindWeight); - - // data attached to upstream and the downstream vertices - // of the current phase - const VolumeVariables &up = - this->curVolVars_(fluxVars.upstreamIdx(phaseIdx)); - const VolumeVariables &dn = - this->curVolVars_(fluxVars.downstreamIdx(phaseIdx)); - if (massUpwindWeight > 0.0) - // upstream vertex - advectivePhaseFlux += - fluxVars.volumeFlux(phaseIdx) - * massUpwindWeight - * up.density(phaseIdx) - * up.massFraction(phaseIdx, compIdx); - if (massUpwindWeight < 1.0) - // downstream vertex - advectivePhaseFlux += - fluxVars.volumeFlux(phaseIdx) - * (1 - massUpwindWeight) - * dn.density(phaseIdx) - * dn.massFraction(phaseIdx, compIdx); - - return advectivePhaseFlux; - } - - /*! - * \brief Returns the diffusive fluxes within the different phases. - */ - DUNE_DEPRECATED_MSG("computeAdvectivePhaseFlux() is deprecated.") - Scalar computeDiffusivePhaseFlux(const FluxVariables &fluxVars) const - { - // add diffusive flux of gas component in liquid phase - Scalar diffusivePhaseFlux = fluxVars.moleFractionGrad(phaseIdx)*fluxVars.face().normal; - - return -1.0 - * fluxVars.porousDiffCoeff(phaseIdx) - * fluxVars.molarDensity(phaseIdx) - * diffusivePhaseFlux - * FluidSystem::molarMass(compIdx); - } - - /*! - * \brief Set the Dirichlet-like conditions for the coupling - * and replace the existing residual - * - * \param scvIdx Sub control vertex index for the coupling condition - */ - DUNE_DEPRECATED_MSG("evalCouplingVertex_ is deprecated. Its functionality is now included in evalBoundary_.") - void evalCouplingVertex_(const int scvIdx) - { - const VolumeVariables &volVars = this->curVolVars_()[scvIdx]; - - // set pressure as part of the momentum coupling - if (this->bcTypes_(scvIdx).isCouplingDirichlet(massBalanceIdx)) - this->residual_[scvIdx][massBalanceIdx] = volVars.pressure(nPhaseIdx); - - // set mass fraction - if (this->bcTypes_(scvIdx).isCouplingDirichlet(contiWEqIdx)) - this->residual_[scvIdx][contiWEqIdx] = volVars.massFraction(nPhaseIdx, wCompIdx); - } - - /*! - * \brief Check if one of the boundary conditions is coupling. - */ - DUNE_DEPRECATED_MSG("boundaryHasCoupling_() is deprecated") - bool boundaryHasCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isCouplingInflow(eqIdx) || bcTypes.isCouplingOutflow(eqIdx)) - return true; - return false; - } - - /*! - * \brief Check if one of the boundary conditions is mortar coupling. - */ - DUNE_DEPRECATED_MSG("boundaryHasMortarCoupling_() is deprecated") - bool boundaryHasMortarCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isMortarCoupling(eqIdx)) - return true; - return false; - } - - /*! - * \brief Check if one of the boundary conditions is Neumann. - */ - DUNE_DEPRECATED_MSG("boundaryHasNeumann_() is unused in dumux and therefore deprecated") - bool boundaryHasNeumann_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - { - if (bcTypes.isNeumann(eqIdx)) - return true; - } - return false; - } - - /*! - * \brief Returns the fluxes of the specified sub control volume - */ - DUNE_DEPRECATED_MSG("elementFluxes() is deprecated") - Scalar elementFluxes(const int scvIdx) - { - return elementFluxes_[scvIdx]; - } - protected: ElementFluxVector elementFluxes_; }; diff --git a/dumux/multidomain/2cstokes2p2c/localoperator.hh b/dumux/multidomain/2cstokes2p2c/localoperator.hh index 40d18057cf6060bb45e0ecf3118ae2ff8cefd6c0..02e7468a14042d76a4529c85a70913074dac15bc 100644 --- a/dumux/multidomain/2cstokes2p2c/localoperator.hh +++ b/dumux/multidomain/2cstokes2p2c/localoperator.hh @@ -26,8 +26,6 @@ #include -#include - #include #include #include @@ -636,296 +634,6 @@ public: } } - /*! - * \brief Evaluation of the coupling from Stokes (1) to Darcy (2). - * - * \param lfsu1 local basis for the trial space of the Stokes domain - * \param lfsu2 local basis for the trial space of the Darcy domain - * \param vertInElem1 local vertex index in element1 - * \param vertInElem2 local vertex index in element2 - * \param sdElement1 the element in the Stokes domain - * \param sdElement2 the element in the Darcy domain - * \param boundaryVars1 the boundary variables at the interface of the Stokes domain - * \param boundaryVars2 the boundary variables at the interface of the Darcy domain - * \param cParams a parameter container - * \param couplingRes1 the coupling residual from the Stokes domain - * \param couplingRes2 the coupling residual from the Darcy domain - */ - template - DUNE_DEPRECATED_MSG("evalCoupling12() is deprecated. Use evalCoupling() instead.") - void evalCoupling12(const LFSU1& lfsu1, const LFSU2& lfsu2, - const int vertInElem1, const int vertInElem2, - const SDElement1& sdElement1, const SDElement2& sdElement2, - const BoundaryVariables1& boundaryVars1, const BoundaryVariables2& boundaryVars2, - const CParams &cParams, - RES1& couplingRes1, RES2& couplingRes2) const - { - const GlobalPosition& globalPos1 = cParams.fvGeometry1.subContVol[vertInElem1].global; - const GlobalPosition& bfNormal1 = boundaryVars1.face().normal; - - const Scalar normalMassFlux = boundaryVars1.normalVelocity() * - cParams.elemVolVarsCur1[vertInElem1].density(); - - //rho*v*n as NEUMANN condition for porous medium (set, if B&J defined as NEUMANN condition) - if (cParams.boundaryTypes2.isCouplingNeumann(massBalanceIdx2)) - { - static_assert(!GET_PROP_VALUE(Stokes2cTypeTag, UseMoles), - "This coupling condition is only implemented for mass fraction formulation."); - - if (globalProblem_.sdProblem1().isCornerPoint(globalPos1)) - { - couplingRes2.accumulate(lfsu2.child(massBalanceIdx2), vertInElem2, - -normalMassFlux); - } - else - { - couplingRes2.accumulate(lfsu2.child(massBalanceIdx2), vertInElem2, - globalProblem_.localResidual1().residual(vertInElem1)[massBalanceIdx1]); - } - } - if (cParams.boundaryTypes2.isCouplingDirichlet(massBalanceIdx2)) - { - couplingRes2.accumulate(lfsu2.child(massBalanceIdx2), vertInElem2, - globalProblem_.localResidual1().residual(vertInElem1)[momentumYIdx1] - -cParams.elemVolVarsCur1[vertInElem1].pressure()); - } - - if (cParams.boundaryTypes2.isCouplingNeumann(contiWEqIdx2)) - { - // only enter here, if a boundary layer model is used for the computation of the diffusive fluxes - if (blModel_) - { - const Scalar diffusiveFlux = - bfNormal1.two_norm() - * globalProblem_.evalBoundaryLayerConcentrationGradient(cParams, vertInElem1) - * (boundaryVars1.diffusionCoeff(transportCompIdx1) - + boundaryVars1.eddyDiffusivity()) - * boundaryVars1.molarDensity() - * FluidSystem::molarMass(transportCompIdx1); - - Scalar advectiveFlux = normalMassFlux * cParams.elemVolVarsCur1[vertInElem1].massFraction(transportCompIdx1); - - const Scalar massTransferCoeff = globalProblem_.evalMassTransferCoefficient(cParams, vertInElem1, vertInElem2); - - if (globalProblem_.sdProblem1().isCornerPoint(globalPos1) && massTransferModel_) - { - const Scalar diffusiveFluxAtCorner = - bfNormal1 * - boundaryVars1.moleFractionGrad(transportCompIdx1) * - (boundaryVars1.diffusionCoeff(transportCompIdx1) + boundaryVars1.eddyDiffusivity()) * - boundaryVars1.molarDensity() * - FluidSystem::molarMass(transportCompIdx1); - - couplingRes2.accumulate(lfsu2.child(contiWEqIdx2), vertInElem2, - -massTransferCoeff*(advectiveFlux - diffusiveFlux) - - (1.-massTransferCoeff)*(advectiveFlux - diffusiveFluxAtCorner)); - } - else - { - couplingRes2.accumulate(lfsu2.child(contiWEqIdx2), vertInElem2, - -massTransferCoeff*(advectiveFlux - diffusiveFlux) + - (1.-massTransferCoeff)*globalProblem_.localResidual1().residual(vertInElem1)[transportEqIdx1]); - } - } - else if (globalProblem_.sdProblem1().isCornerPoint(globalPos1)) - { - static_assert(!GET_PROP_VALUE(TwoPTwoCTypeTag, UseMoles), - "This coupling condition is only implemented for mass fraction formulation."); - - const Scalar advectiveFlux = - normalMassFlux * - cParams.elemVolVarsCur1[vertInElem1].massFraction(transportCompIdx1); - const Scalar diffusiveFlux = - bfNormal1 * - boundaryVars1.moleFractionGrad(transportCompIdx1) * - (boundaryVars1.diffusionCoeff(transportCompIdx1) + boundaryVars1.eddyDiffusivity()) * - boundaryVars1.molarDensity() * - FluidSystem::molarMass(transportCompIdx1); - - couplingRes2.accumulate(lfsu2.child(contiWEqIdx2), vertInElem2, - -(advectiveFlux - diffusiveFlux)); - } - else - { - static_assert(GET_PROP_VALUE(Stokes2cTypeTag, UseMoles) == GET_PROP_VALUE(TwoPTwoCTypeTag, UseMoles), - "This coupling condition is not implemented dor different formulations (mass/mole) in the subdomains."); - - // the component mass flux from the stokes domain - couplingRes2.accumulate(lfsu2.child(contiWEqIdx2), vertInElem2, - globalProblem_.localResidual1().residual(vertInElem1)[transportEqIdx1]); - } - } - if (cParams.boundaryTypes2.isCouplingDirichlet(contiWEqIdx2)) - { - DUNE_THROW(Dune::NotImplemented, "The boundary condition isCouplingDirichlet(contiWEqIdx2) is not implemented for the Darcy side."); - } - } - - /*! - * \brief Evaluation of the coupling from Darcy (2) to Stokes (1). - * - * \param lfsu1 local basis for the trial space of the Stokes domain - * \param lfsu2 local basis for the trial space of the Darcy domain - * \param vertInElem1 local vertex index in element1 - * \param vertInElem2 local vertex index in element2 - * \param sdElement1 the element in the Stokes domain - * \param sdElement2 the element in the Darcy domain - * \param boundaryVars1 the boundary variables at the interface of the Stokes domain - * \param boundaryVars2 the boundary variables at the interface of the Darcy domain - * \param cParams a parameter container - * \param couplingRes1 the coupling residual from the Stokes domain - * \param couplingRes2 the coupling residual from the Darcy domain - */ - template - DUNE_DEPRECATED_MSG("evalCoupling21() is deprecated. Use evalCoupling() instead.") - void evalCoupling21(const LFSU1& lfsu1, const LFSU2& lfsu2, - const int vertInElem1, const int vertInElem2, - const SDElement1& sdElement1, const SDElement2& sdElement2, - const BoundaryVariables1& boundaryVars1, const BoundaryVariables2& boundaryVars2, - const CParams &cParams, - RES1& couplingRes1, RES2& couplingRes2) const - { - const GlobalPosition& globalPos2 = cParams.fvGeometry2.subContVol[vertInElem2].global; - GlobalPosition normalFlux2(0.); - - // velocity*normal*area*rho - for (int phaseIdx=0; phaseIdx 0); - - const Scalar Kxx = spatialParams.intrinsicPermeability(sdElement1, cParams.fvGeometry1, - vertInElem1); - - beaversJosephCoeff /= std::sqrt(Kxx); - const GlobalPosition& elementUnitNormal = boundaryVars1.face().normal; - - // Implementation as Neumann-like condition: (v.n)n - if (cParams.boundaryTypes1.isCouplingDirichlet(momentumXIdx1)) - { - const Scalar normalComp = boundaryVars1.velocity()*elementUnitNormal; - GlobalPosition normalV = elementUnitNormal; - normalV *= normalComp; // v*n*n - - // v_tau = v - (v.n)n - const GlobalPosition tangentialV = boundaryVars1.velocity() - normalV; - const Scalar boundaryFaceArea = boundaryVars1.face().area; - - for (int dimIdx=0; dimIdx < dim; ++dimIdx) - { - couplingRes1.accumulate(lfsu1.child(momentumXIdx1), vertInElem1, - beaversJosephCoeff - * boundaryFaceArea - * tangentialV[dimIdx] - * (boundaryVars1.dynamicViscosity() - + boundaryVars1.dynamicEddyViscosity())); - } - } - // Implementation as Dirichlet-like condition - // tangential component: vx = sqrt K /alpha * (grad v n(unity))t - if (cParams.boundaryTypes1.isCouplingNeumann(momentumXIdx1)) - { - DUNE_THROW(Dune::NotImplemented, "The boundary conditionisCouplingNeumann(momentumXIdx1) on the Stokes side is not implemented anymore."); - // GlobalPosition tangentialVelGrad(0); - // boundaryVars1.velocityGrad().umv(elementUnitNormal, tangentialVelGrad); - // tangentialVelGrad /= -beaversJosephCoeff; // was - before - // couplingRes1.accumulate(lfsu1.child(momentumXIdx1), vertInElem1, - // this->residual_[vertInElem1][momentumXIdx1] = - // tangentialVelGrad[momentumXIdx1] - globalProblem_.localResidual1().curPriVars_(vertInElem1)[momentumXIdx1]); - } - - //coupling residual is added to "real" residual - //here each node is passed twice, hence only half of the dirichlet condition has to be set - if (cParams.boundaryTypes1.isCouplingDirichlet(transportEqIdx1)) - { - // set residualStokes[transportEqIdx1] = x in stokes2clocalresidual.hh - - - static_assert(!GET_PROP_VALUE(Stokes2cTypeTag, UseMoles), - "This coupling condition is only implemented for mass fraction formulation."); - - couplingRes1.accumulate(lfsu1.child(transportEqIdx1), vertInElem1, - -cParams.elemVolVarsCur2[vertInElem2].massFraction(nPhaseIdx2, wCompIdx2)); - } - if (cParams.boundaryTypes1.isCouplingNeumann(transportEqIdx1)) - { - DUNE_THROW(Dune::NotImplemented, "The boundary condition isCouplingNeumann(transportEqIdx1) is not implemented for the Stokes side."); - } - } - - /*! - * \brief Returns a BoundaryLayerModel object - * - * \param cParams a parameter container - * \param scvIdx1 The local index of the sub-control volume of the Stokes domain - */ - template - DUNE_DEPRECATED_MSG("evalBoundaryLayerModel() is deprecated.") - BoundaryLayerModel evalBoundaryLayerModel(CParams cParams, const int scvIdx1) const - { - globalProblem().evalBoundaryLayerModel(cParams, cParams); - } - - /*! - * \brief Returns the concentration gradient through the boundary layer - * - * \param cParams a parameter container - * \param scvIdx1 The local index of the sub-control volume of the Stokes domain - */ - template - DUNE_DEPRECATED_MSG("evalBoundaryLayerConcentrationGradient() is deprecated.") - Scalar evalBoundaryLayerConcentrationGradient(CParams cParams, const int scvIdx1) const - { - globalProblem().evalBoundaryLayerConcentrationGradient(cParams, scvIdx1); - } - - /*! - * \brief Returns the mass transfer coefficient - * - * \param cParams a parameter container - * \param scvIdx1 The local index of the sub-control volume of the Stokes domain - * \param scvIdx2 The local index of the sub-control volume of the Darcy domain - */ - template - DUNE_DEPRECATED_MSG("evalMassTransferCoefficient() is deprecated.") - Scalar evalMassTransferCoefficient(CParams cParams, const int scvIdx1, const int scvIdx2) const - { - globalProblem().evalMassTransferCoefficient(cParams, scvIdx1, scvIdx2); - } - protected: GlobalProblem& globalProblem() const { return globalProblem_; } diff --git a/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh b/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh index 06448f6f05c92c62485a4c8b18f5985869128f89..c32b05c77609991240852e7b351e4f74b63e4a3c 100644 --- a/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh +++ b/dumux/multidomain/2cstokes2p2c/stokesnccouplinglocalresidual.hh @@ -26,8 +26,6 @@ #ifndef DUMUX_STOKESNC_COUPLING_LOCAL_RESIDUAL_HH #define DUMUX_STOKESNC_COUPLING_LOCAL_RESIDUAL_HH -#include - #include #include @@ -201,143 +199,6 @@ public: this->removeStabilizationAtBoundary_(scvIdx); } } - -protected: - /*! - * \brief Evaluate one part of the Dirichlet-like coupling conditions for a single - * sub-control volume face; rest is done in the local coupling operator - */ - template - DUNE_DEPRECATED_MSG("evalCouplingVertex_ is deprecated. Its functionality is now included in evalBoundary_.") - void evalCouplingVertex_(const IntersectionIterator &isIt, - const int scvIdx, - const int boundaryFaceIdx, - const FluxVariables &boundaryVars) - { - const VolumeVariables &volVars = this->curVolVars_()[scvIdx]; - const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); - - // set velocity normal to the interface - if (bcTypes.isCouplingNeumann(momentumYIdx)) - this->residual_[scvIdx][momentumYIdx] = - volVars.velocity() * - boundaryVars.face().normal / - boundaryVars.face().normal.two_norm(); - Valgrind::CheckDefined(this->residual_[scvIdx][momentumYIdx]); - - // add pressure correction - required for pressure coupling, - // if p.n comes from the pm - if (bcTypes.isCouplingDirichlet(momentumYIdx) || bcTypes.isCouplingMortar(momentumYIdx)) - { - DimVector pressureCorrection(isIt->centerUnitOuterNormal()); - pressureCorrection *= volVars.pressure(); - this->residual_[scvIdx][momentumYIdx] += pressureCorrection[momentumYIdx]* - boundaryVars.face().area; - } - - // set mole or mass fraction for the transported components - for (int compIdx = 0; compIdx < numComponents; compIdx++) - { - int eqIdx = dim + compIdx; - if (eqIdx != massBalanceIdx) { - if (bcTypes.isCouplingDirichlet(eqIdx)) - { - if(useMoles) - this->residual_[scvIdx][eqIdx] = volVars.moleFraction(compIdx); - else - this->residual_[scvIdx][eqIdx] = volVars.massFraction(compIdx); - Valgrind::CheckDefined(this->residual_[scvIdx][eqIdx]); - } - } - } - } - - template - DUNE_DEPRECATED_MSG("evalBeaversJoseph_ is deprecated. Its functionality is now included in the LOP function evalCoupling21().") - void evalBeaversJoseph_(const IntersectionIterator &isIt, - const int scvIdx, - const int boundaryFaceIdx, - const FluxVariables &boundaryVars) - { - const BoundaryTypes &bcTypes = this->bcTypes_(scvIdx); - - const GlobalPosition &globalPos = this->fvGeometry_().boundaryFace[boundaryFaceIdx].ipGlobal; - Scalar beaversJosephCoeff = this->problem_().beaversJosephCoeffAtPos(globalPos); - - const Scalar Kxx = this->problem_().permeability(this->element_(), - this->fvGeometry_(), - scvIdx); - beaversJosephCoeff /= std::sqrt(Kxx); - const DimVector& elementUnitNormal = isIt->centerUnitOuterNormal(); - - // implementation as NEUMANN condition ///////////////////////////////////////////// - // (v.n)n - if (bcTypes.isCouplingDirichlet(momentumXIdx)) - { - const Scalar normalComp = boundaryVars.velocity()*elementUnitNormal; - DimVector normalV = elementUnitNormal; - normalV *= normalComp; // v*n*n - - // v_tau = v - (v.n)n - const DimVector tangentialV = boundaryVars.velocity() - normalV; - const Scalar boundaryFaceArea = boundaryVars.face().area; - - for (int dimIdx=0; dimIdx < dim; ++dimIdx) - this->residual_[scvIdx][dimIdx] += beaversJosephCoeff * - boundaryFaceArea * - tangentialV[dimIdx] * - (boundaryVars.dynamicViscosity() - + boundaryVars.dynamicEddyViscosity()); - - //////////////////////////////////////////////////////////////////////////////////// - //normal component has only to be set if no coupling conditions are defined - //set NEUMANN flux (set equal to pressure in problem) -// PrimaryVariables priVars(0.0); -// this->problem_().neumann(priVars, this->element_(), this->fvGeometry_(), -// intersection, scvIdx, boundaryFaceIdx); -// for (int dimIdx=0; dimIdx < dim; ++dimIdx) -// this->residual_[scvIdx][dimIdx] += priVars[dimIdx]* -// boundaryFaceArea; - } - if (bcTypes.isCouplingNeumann(momentumXIdx)) - { - assert(beaversJosephCoeff > 0); - /////////////////////////////////////////////////////////////////////////////////////////// - //IMPLEMENTATION AS DIRICHLET CONDITION - //tangential componment: vx = sqrt K /alpha * (grad v n(unity))t - DimVector tangentialVelGrad(0); - boundaryVars.velocityGrad().umv(elementUnitNormal, tangentialVelGrad); - tangentialVelGrad /= -beaversJosephCoeff; // was - before - this->residual_[scvIdx][momentumXIdx] = - tangentialVelGrad[momentumXIdx] - this->curPriVars_(scvIdx)[momentumXIdx]; - - //////////////////////////////////////////////////////////////////////////////////// - //for testing Beavers and Joseph without adjacent porous medium set vy to 0 -// Scalar normalVel(0); -// this->residual_[scvIdx][momentumYIdx] = this->curPrimaryVars_(scvIdx)[momentumYIdx] - normalVel; - //////////////////////////////////////////////////////////////////////////////////// - } - } - - //! \brief Return true, if at least one equation on the boundary has a coupling condition - DUNE_DEPRECATED_MSG("boundaryHasCoupling_() is deprecated") - bool boundaryHasCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isCouplingInflow(eqIdx) || bcTypes.isCouplingOutflow(eqIdx)) - return true; - return false; - } - - //! \brief Return true, if at least one equation on the boundary has a mortar coupling condition - DUNE_DEPRECATED_MSG("boundaryHasMortarCoupling_() is deprecated") - bool boundaryHasMortarCoupling_(const BoundaryTypes& bcTypes) const - { - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - if (bcTypes.isMortarCoupling(eqIdx)) - return true; - return false; - } }; } // namespace Dumux diff --git a/dumux/multidomain/boxcouplinglocalresidual.hh b/dumux/multidomain/boxcouplinglocalresidual.hh index 651e50a1a67452bff4a67ef40e2aef8e5243dfee..0a8057b1c8efc526ca0fe6784b7074d953017e40 100644 --- a/dumux/multidomain/boxcouplinglocalresidual.hh +++ b/dumux/multidomain/boxcouplinglocalresidual.hh @@ -24,8 +24,6 @@ #ifndef DUMUX_BOX_COUPLING_LOCAL_RESIDUAL_HH #define DUMUX_BOX_COUPLING_LOCAL_RESIDUAL_HH -#include - #include namespace Dumux @@ -68,78 +66,6 @@ public: BoxCouplingLocalResidual() { } - /*! - * \brief Compute the local residual, i.e. the deviation of the - * equations from zero. Gets a solution vector computed by PDELab - * - * \tparam ElemSolVectorType The local solution for the element using PDELab ordering - * - * \param element The DUNE Codim<0> entity for which the residual - * ought to be calculated - * \param fvGeometry The element geometry - * \param elementSolVector The local solution for the element using PDELab ordering - * \param volVarsPrev Volume variables of the previous time step - * \param volVarsCur Volume variables of the current time step - */ - template - DUNE_DEPRECATED_MSG("evalPDELab() is deprecated.") - void evalPDELab(const Element &element, - const FVElementGeometry& fvGeometry, - const ElemSolVectorType& elementSolVector, - ElementVolumeVariables& volVarsPrev, - ElementVolumeVariables& volVarsCur) - { - this->elemPtr_ = &element; - this->fvElemGeomPtr_ = &fvGeometry; - - volVarsPrev.update(this->problem_(), - element, - fvGeometry, - true /* oldSol? */); - volVarsCur.updatePDELab(this->problem_(), - element, - fvGeometry, - elementSolVector); - ElementBoundaryTypes bcTypes; - bcTypes.update(this->problem_(), element, fvGeometry); - - asImp_().evalPDELab(element, fvGeometry, volVarsPrev, volVarsCur, bcTypes); - } - - /*! - * \brief Compute the local residual, i.e. the deviation of the - * equations from zero without taking boundary conditions into account. - * This is required for the flux calculation at the interface - * (called from the coupled problem). Calls evalPDELab with the - * required removal of the stabilization at the boundary (stokes). - * - * \param element The DUNE Codim<0> entity for which the residual - * ought to be calculated - * \param fvGeometry The element geometry - * \param volVarsPrev Volume variables of the previous time step - * \param volVarsCur Volume variables of the current time step - */ - DUNE_DEPRECATED_MSG("evalNoBoundary() is deprecated.") - void evalNoBoundary(const Element &element, - const FVElementGeometry fvGeometry, - ElementVolumeVariables& volVarsPrev, - ElementVolumeVariables& volVarsCur) - { - volVarsPrev.update(this->problem_(), - element, - fvGeometry, - true /* oldSol? */); - volVarsCur.update(this->problem_(), - element, - fvGeometry, - false /* oldSol? */); - - ElementBoundaryTypes bcTypes; - bcTypes.update(this->problem_(), element, fvGeometry); - - asImp_().evalPDELab(element, fvGeometry, volVarsPrev, volVarsCur, bcTypes); - } - /*! * \brief Compute the local residual, i.e. the deviation of the * equations from zero. Calls evalBoundaryPDELab, diff --git a/dumux/multidomain/model.hh b/dumux/multidomain/model.hh index 329d54fddabd0ca8d3deaaad11f5575b8a9f6218..e115df6b2df2be275ae5c97c0423fbe6e43444d6 100644 --- a/dumux/multidomain/model.hh +++ b/dumux/multidomain/model.hh @@ -25,8 +25,6 @@ #ifndef DUMUX_MULTIDOMAIN_MODEL_HH #define DUMUX_MULTIDOMAIN_MODEL_HH -#include - #include "properties.hh" #include "propertydefaults.hh" #include "problem.hh" @@ -293,15 +291,6 @@ public: wasRestarted_ = true; } - /*! - * \brief Returns the number of global degrees of freedoms (DOFs) - */ - DUNE_DEPRECATED_MSG("numDofs() is deprecated.") - size_t numDofs() const - { - return sdModel1().numDofs()*numEq1 + sdModel2().numDofs()*numEq2; - } - //! \copydoc Dumux::ImplicitModel::resetJacobianAssembler() void resetJacobianAssembler() {