diff --git a/dumux/porenetwork/1pnc/model.hh b/dumux/porenetwork/1pnc/model.hh index 7619f8c2dc1322d65332042a1cbf595d98841659..861ba64725e93ddd44001bf2fce4304b4c04ca19 100644 --- a/dumux/porenetwork/1pnc/model.hh +++ b/dumux/porenetwork/1pnc/model.hh @@ -158,17 +158,19 @@ private: static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state"); using BaseTraits = Dumux::OnePVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT>; + using DTT = GetPropType<TypeTag, Properties::DispersionTensorType>; using DT = GetPropType<TypeTag, Properties::MolecularDiffusionType>; using EDM = GetPropType<TypeTag, Properties::EffectiveDiffusivityModel>; - template<class BaseTraits, class DT, class EDM> + template<class BaseTraits, class DTT, class DT, class EDM> struct NCTraits : public BaseTraits { + using DispersionTensorType = DTT; using DiffusionType = DT; using EffectiveDiffusivityModel = EDM; }; public: - using type = Dumux::PoreNetwork::OnePNCVolumeVariables<NCTraits<BaseTraits, DT, EDM>>; + using type = Dumux::PoreNetwork::OnePNCVolumeVariables<NCTraits<BaseTraits, DTT, DT, EDM>>; }; //!< Set the vtk output fields specific to this model @@ -189,7 +191,10 @@ struct ModelTraits<TypeTag, TTag::PNMOnePNCNI> { private: using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; - using IsothermalTraits = OnePNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>; + using IsothermalTraits = OnePNCModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), + getPropValue<TypeTag, Properties::EnableCompositionalDispersion>(), + getPropValue<TypeTag, Properties::EnableThermalDispersion>(), + getPropValue<TypeTag, Properties::ReplaceCompEqIdx>()>; public: using type = PorousMediumFlowNIModelTraits<IsothermalTraits>; }; @@ -211,19 +216,21 @@ private: static_assert(FST::numPhases == MT::numFluidPhases(), "Number of phases mismatch between model and fluid state"); using BaseTraits = Dumux::OnePVolumeVariablesTraits<PV, FSY, FST, SSY, SST, PT, MT>; + using DTT = GetPropType<TypeTag, Properties::DispersionTensorType>; using DT = GetPropType<TypeTag, Properties::MolecularDiffusionType>; using EDM = GetPropType<TypeTag, Properties::EffectiveDiffusivityModel>; using ETCM = GetPropType< TypeTag, Properties:: ThermalConductivityModel>; - template<class BaseTraits, class DT, class EDM, class ETCM> + template<class BaseTraits, class DTT, class DT, class EDM, class ETCM> struct NCNITraits : public BaseTraits { + using DispersionTensorType = DTT; using DiffusionType = DT; using EffectiveDiffusivityModel = EDM; using EffectiveThermalConductivityModel = ETCM; }; public: - using type = Dumux::PoreNetwork::OnePNCVolumeVariables<NCNITraits<BaseTraits, DT, EDM, ETCM>>; + using type = Dumux::PoreNetwork::OnePNCVolumeVariables<NCNITraits<BaseTraits, DTT, DT, EDM, ETCM>>; }; template<class TypeTag> diff --git a/dumux/porousmediumflow/1p/model.hh b/dumux/porousmediumflow/1p/model.hh index 2dcf1ccba8c42ce0ff55a4b5a9c9d268d05d00ee..f384e5d559a65be2bd5db5ccf19889b6f4e7ad3d 100644 --- a/dumux/porousmediumflow/1p/model.hh +++ b/dumux/porousmediumflow/1p/model.hh @@ -74,6 +74,7 @@ struct OnePModelTraits static constexpr bool enableAdvection() { return true; } static constexpr bool enableMolecularDiffusion() { return false; } static constexpr bool enableEnergyBalance() { return false; } + static constexpr bool enableThermalDispersion() { return false; } }; /*! diff --git a/dumux/porousmediumflow/2pnc/model.hh b/dumux/porousmediumflow/2pnc/model.hh index ea496490a7f175d7689ea4520bab039907db7175..e3a67bef8e91d7de04e3bb162790f87c05b6f6e8 100644 --- a/dumux/porousmediumflow/2pnc/model.hh +++ b/dumux/porousmediumflow/2pnc/model.hh @@ -130,6 +130,8 @@ struct TwoPNCModelTraits static constexpr bool enableEnergyBalance() { return false; } static constexpr bool enableThermalNonEquilibrium() { return false; } static constexpr bool enableChemicalNonEquilibrium() { return false; } + static constexpr bool enableCompositionalDispersion() { return false; } + static constexpr bool enableThermalDispersion() { return false; } static constexpr bool useMoles() { return useMol; } static constexpr bool setMoleFractionsForFirstPhase() { return setMoleFractionForFP; } diff --git a/dumux/porousmediumflow/mpnc/model.hh b/dumux/porousmediumflow/mpnc/model.hh index 32355e62f159224e5762365eb9bec52a647c9103..df29f1498ee0bd9b123d31764792d93ffd58c23c 100644 --- a/dumux/porousmediumflow/mpnc/model.hh +++ b/dumux/porousmediumflow/mpnc/model.hh @@ -145,6 +145,8 @@ struct MPNCModelTraits static constexpr bool enableEnergyBalance() { return false; } static constexpr bool enableThermalNonEquilibrium() { return false; } static constexpr bool enableChemicalNonEquilibrium() { return false; } + static constexpr bool enableCompositionalDispersion() { return false; } + static constexpr bool enableThermalDispersion() { return false; } static constexpr MpNcPressureFormulation pressureFormulation() { return formulation; } diff --git a/dumux/porousmediumflow/richardsnc/model.hh b/dumux/porousmediumflow/richardsnc/model.hh index 6efeba9af99867a982e0017160f21ee82e7d82d8..0d2ad0cf2d964fac5d70c7ec9916b2769245d1a2 100644 --- a/dumux/porousmediumflow/richardsnc/model.hh +++ b/dumux/porousmediumflow/richardsnc/model.hh @@ -110,6 +110,8 @@ struct RichardsNCModelTraits static constexpr bool enableAdvection() { return true; } static constexpr bool enableMolecularDiffusion() { return true; } static constexpr bool enableEnergyBalance() { return false; } + static constexpr bool enableCompositionalDispersion() { return false; } + static constexpr bool enableThermalDispersion() { return false; } static constexpr bool useMoles() { return useMol; } }; diff --git a/test/multidomain/facet/tracer_tracer/properties.hh b/test/multidomain/facet/tracer_tracer/properties.hh index 494ba46ca5d21c02549e7185fbb3bdf22772c576..98d29d818bea93fdd37c8c243eeaf4dd42c9bbc6 100644 --- a/test/multidomain/facet/tracer_tracer/properties.hh +++ b/test/multidomain/facet/tracer_tracer/properties.hh @@ -157,6 +157,10 @@ struct SpatialParams<TypeTag, TTag::TracerTestBulk> template<class TypeTag> struct UseMoles<TypeTag, TTag::TracerTestBulk> { static constexpr bool value = false; }; +// Define whether mole(true) or mass (false) fractions are used +template<class TypeTag> +struct EnableCompositionalDispersion<TypeTag, TTag::TracerTestBulk> { static constexpr bool value = false; }; + //! set the model traits (with disabled diffusion) template<class TypeTag> struct ModelTraits<TypeTag, TTag::TracerTestBulk> @@ -164,7 +168,8 @@ struct ModelTraits<TypeTag, TTag::TracerTestBulk> private: using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; public: - using type = TracerTestModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>()>; + using type = TracerTestModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), + getPropValue<TypeTag, Properties::EnableCompositionalDispersion>()>; }; // use the test-specific fluid system @@ -202,6 +207,10 @@ struct SpatialParams<TypeTag, TTag::TracerTestLowDim> template<class TypeTag> struct UseMoles<TypeTag, TTag::TracerTestLowDim> { static constexpr bool value = false; }; +// Define whether mole(true) or mass (false) fractions are used +template<class TypeTag> +struct EnableCompositionalDispersion<TypeTag, TTag::TracerTestLowDim> { static constexpr bool value = false; }; + //! set the model traits (with disabled diffusion) template<class TypeTag> struct ModelTraits<TypeTag, TTag::TracerTestLowDim> @@ -209,14 +218,14 @@ struct ModelTraits<TypeTag, TTag::TracerTestLowDim> private: using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; public: - using type = TracerTestModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>()>; + using type = TracerTestModelTraits<FluidSystem::numComponents, getPropValue<TypeTag, Properties::UseMoles>(), + getPropValue<TypeTag, Properties::EnableCompositionalDispersion>()>; }; // use the test-specific fluid system template<class TypeTag> struct FluidSystem<TypeTag, TTag::TracerTestLowDim> { using type = TracerFluidSystem<TypeTag>; }; - template< class BulkTypeTag, class LowDimTypeTag > class TestTraits { diff --git a/test/multidomain/facet/tracer_tracer/tracermodeltraits.hh b/test/multidomain/facet/tracer_tracer/tracermodeltraits.hh index a31295c2ec79dd03775b37eec0c63cb8ac48e663..a6f59b10cee10a154c92db4cc6f5ef473c51f092 100644 --- a/test/multidomain/facet/tracer_tracer/tracermodeltraits.hh +++ b/test/multidomain/facet/tracer_tracer/tracermodeltraits.hh @@ -30,10 +30,11 @@ namespace Dumux { //! Custom model traits disabling diffusion -template<int nComp, bool useMol> -struct TracerTestModelTraits : public TracerModelTraits<nComp, useMol> +template<int nComp, bool useMol, bool enableCompDisp> +struct TracerTestModelTraits : public TracerModelTraits<nComp, useMol, enableCompDisp> { static constexpr bool enableMolecularDiffusion() { return false; } + static constexpr bool enableCompositionalDispersion() { return enableCompDisp; } }; } // end namespace Dumux