From e3c523aa5a508444a89a2903f15602d63cf9aca9 Mon Sep 17 00:00:00 2001 From: Sina Ackermann <sina.ackermann@iws.uni-stuttgart.de> Date: Thu, 30 Mar 2017 15:45:40 +0200 Subject: [PATCH] [staggeredGrid][nonisothermal] Add property EnableEnergyBalanceStokes * previously, only EnableEnergyBalance was available which needs properties of the solid phase (in a porous medium) --- dumux/freeflow/staggered/fluxvariables.hh | 4 +- dumux/freeflow/staggered/localresidual.hh | 80 +------------------- dumux/freeflow/staggered/propertydefaults.hh | 2 +- dumux/implicit/properties.hh | 1 + 4 files changed, 8 insertions(+), 79 deletions(-) diff --git a/dumux/freeflow/staggered/fluxvariables.hh b/dumux/freeflow/staggered/fluxvariables.hh index 060682cfbf..9fe38a55ad 100644 --- a/dumux/freeflow/staggered/fluxvariables.hh +++ b/dumux/freeflow/staggered/fluxvariables.hh @@ -33,7 +33,7 @@ namespace Properties { // forward declaration NEW_PROP_TAG(EnableComponentTransport); -NEW_PROP_TAG(EnableEnergyBalance); +NEW_PROP_TAG(EnableEnergyBalanceStokes); NEW_PROP_TAG(EnableInertiaTerms); } @@ -49,7 +49,7 @@ class FreeFlowFluxVariablesImpl; */ template<class TypeTag> using FreeFlowFluxVariables = FreeFlowFluxVariablesImpl<TypeTag, GET_PROP_VALUE(TypeTag, EnableComponentTransport), - GET_PROP_VALUE(TypeTag, EnableEnergyBalance)>; + GET_PROP_VALUE(TypeTag, EnableEnergyBalanceStokes)>; /*! * \ingroup Discretization diff --git a/dumux/freeflow/staggered/localresidual.hh b/dumux/freeflow/staggered/localresidual.hh index e93c3134d3..cc1d59c58d 100644 --- a/dumux/freeflow/staggered/localresidual.hh +++ b/dumux/freeflow/staggered/localresidual.hh @@ -37,7 +37,7 @@ namespace Properties { // forward declaration NEW_PROP_TAG(EnableComponentTransport); -NEW_PROP_TAG(EnableEnergyBalance); +NEW_PROP_TAG(EnableEnergyBalanceStokes); NEW_PROP_TAG(EnableInertiaTerms); NEW_PROP_TAG(ReplaceCompEqIdx); } @@ -59,7 +59,7 @@ class StaggeredNavierStokesResidualImpl; template<class TypeTag> using StaggeredNavierStokesResidual = StaggeredNavierStokesResidualImpl<TypeTag, GET_PROP_VALUE(TypeTag, EnableComponentTransport), - GET_PROP_VALUE(TypeTag, EnableEnergyBalance)>; + GET_PROP_VALUE(TypeTag, EnableEnergyBalanceStokes)>; // template<class TypeTag> @@ -316,6 +316,8 @@ protected: DUNE_THROW(Dune::InvalidStateException, "Face at " << scvf.center() << " has an outflow BC for the momentum balance but no Dirichlet BC for the pressure!"); } } +// std::cout << "** staggered/localresidual: massBalanceIdx = " << massBalanceIdx +// << ", momBalanceIdx = " << momentumBalanceIdx << std::endl; } @@ -350,80 +352,6 @@ private: return result; } }; - - -// specialization for immiscible, non-isothermal flow -//template<class TypeTag> -//class StaggeredNavierStokesResidualImpl<TypeTag, false, true> : public StaggeredNavierStokesResidualImpl<TypeTag, false, false>; -//{ -// using ParentType = StaggeredNavierStokesResidualImpl<TypeTag, false, false>; -// friend class StaggeredLocalResidual<TypeTag>; -// using GridView = typename GET_PROP_TYPE(TypeTag, GridView); -// -// enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; -// -// using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -// using Implementation = typename GET_PROP_TYPE(TypeTag, LocalResidual); -// using Problem = typename GET_PROP_TYPE(TypeTag, Problem); -// using Element = typename GridView::template Codim<0>::Entity; -// using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); -// using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); -// using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes); -// using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); -// using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache); -// using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache); -// using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); -// using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); -// using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace); -// using CellCenterSolutionVector = typename GET_PROP_TYPE(TypeTag, CellCenterSolutionVector); -// using FaceSolutionVector = typename GET_PROP_TYPE(TypeTag, FaceSolutionVector); -// using CellCenterPrimaryVariables = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables); -// using Indices = typename GET_PROP_TYPE(TypeTag, Indices); -// -// -// enum { -// // grid and world dimension -// dim = GridView::dimension, -// dimWorld = GridView::dimensionworld, -// -// pressureIdx = Indices::pressureIdx, -// velocityIdx = Indices::velocityIdx, -// -// massBalanceIdx = Indices::massBalanceIdx, -// momentumBalanceIdx = Indices::momentumBalanceIdx, -// energyBalanceIdx = Indices::energyBalanceIdx -// }; -// -// using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); -// -// static constexpr bool navierStokes = GET_PROP_VALUE(TypeTag, EnableInertiaTerms); -// /*! -// * \brief Evaluate the rate of change of all conservation -// * quantites (e.g. phase mass) within a sub-control -// * volume of a finite volume element for the immiscible models. -// * \param scv The sub control volume -// * \param volVars The current or previous volVars -// * \note This function should not include the source and sink terms. -// * \note The volVars can be different to allow computing -// * the implicit euler time derivative here -// */ -// CellCenterPrimaryVariables computeStorageForCellCenter(const SubControlVolume& scv, -// const VolumeVariables& volVars) -// { -// CellCenterPrimaryVariables storage; -// storage[massBalanceIdx] = volVars.density(); -// storage[energyBalanceIdx] = volVars.density() * volVars.internalEnergy(); -// return storage; -// } -//}; - -// specialization for miscible, non-isothermal flow -template<class TypeTag> -class StaggeredNavierStokesResidualImpl<TypeTag, true, true> : public StaggeredNavierStokesResidualImpl<TypeTag, false, true>, - public StaggeredNavierStokesResidualImpl<TypeTag, true, false> -{ -}; - } #endif // DUMUX_CC_LOCAL_RESIDUAL_HH diff --git a/dumux/freeflow/staggered/propertydefaults.hh b/dumux/freeflow/staggered/propertydefaults.hh index 9852a5e6b2..da89fa3377 100644 --- a/dumux/freeflow/staggered/propertydefaults.hh +++ b/dumux/freeflow/staggered/propertydefaults.hh @@ -117,7 +117,7 @@ SET_BOOL_PROP(NavierStokes, EnableAdvection, true); SET_BOOL_PROP(NavierStokes, EnableMolecularDiffusion, false); //! Isothermal model by default -SET_BOOL_PROP(NavierStokes, EnableEnergyBalance, false); +SET_BOOL_PROP(NavierStokes, EnableEnergyBalanceStokes, false); //! The indices required by the isothermal single-phase model SET_TYPE_PROP(NavierStokes, Indices, NavierStokesCommonIndices<TypeTag>); diff --git a/dumux/implicit/properties.hh b/dumux/implicit/properties.hh index af294c6031..ea9682eb0b 100644 --- a/dumux/implicit/properties.hh +++ b/dumux/implicit/properties.hh @@ -97,6 +97,7 @@ NEW_PROP_TAG(MolecularDiffusionType); //! The type for the calculation of the mo NEW_PROP_TAG(SolutionDependentMolecularDiffusion); //!< specifies if the parameters for the diffusive fluxes depend on the solution NEW_PROP_TAG(EnableEnergyBalance); //! Specifies if the model solves an energy equation NEW_PROP_TAG(HeatConductionType); //! The type for the calculation of the heat conduction fluxes +NEW_PROP_TAG(EnableEnergyBalanceStokes); //! Specifies if the model solves an energy equation NEW_PROP_TAG(SolutionDependentHeatConduction); //!< specifies if the parameters for the heat conduction fluxes depend on the solution // specify if we evaluate the permeability in the volume (for discontinuous fields) -- GitLab