From 00f6c1369d77aa12c894f3d868176c1e8f90aadc Mon Sep 17 00:00:00 2001 From: Ned Coltman <edward.coltman@iws.uni-stuttgart.de> Date: Thu, 4 Nov 2021 16:20:43 +0100 Subject: [PATCH] [dispersion][model] set enableCompositionalDispersion and enableThermalCompositional to false --- dumux/porenetwork/1pnc/model.hh | 17 ++++++++++++----- dumux/porousmediumflow/1p/model.hh | 1 + dumux/porousmediumflow/2pnc/model.hh | 2 ++ dumux/porousmediumflow/mpnc/model.hh | 2 ++ dumux/porousmediumflow/richardsnc/model.hh | 2 ++ .../facet/tracer_tracer/properties.hh | 15 ++++++++++++--- .../facet/tracer_tracer/tracermodeltraits.hh | 5 +++-- 7 files changed, 34 insertions(+), 10 deletions(-) diff --git a/dumux/porenetwork/1pnc/model.hh b/dumux/porenetwork/1pnc/model.hh index 7619f8c2dc..861ba64725 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 2dcf1ccba8..f384e5d559 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 ea496490a7..e3a67bef8e 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 32355e62f1..df29f1498e 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 6efeba9af9..0d2ad0cf2d 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 494ba46ca5..98d29d818b 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 a31295c2ec..a6f59b10ce 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 -- GitLab