Commit 9dc20c0f authored by Klaus Mosthaf's avatar Klaus Mosthaf
Browse files

The effective diffusivity of the 1p2c model is now treated in the same way as...

The effective diffusivity of the 1p2c model is now treated in the same way as in the 2p2c model and can be selected as exchangeable property (according to FS#181). ATTENTION: The tortuosity method in the specific spatial parameters is not used anymore and has to be removed.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11321 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent bf1fe98b
......@@ -53,6 +53,7 @@ class OnePTwoCFluxVariables
typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams;
typedef typename GET_PROP_TYPE(TypeTag, EffectiveDiffusivityModel) EffectiveDiffusivityModel;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
enum {
......@@ -435,12 +436,16 @@ protected:
const VolumeVariables &volVarsI = elemVolVars[face().i];
const VolumeVariables &volVarsJ = elemVolVars[face().j];
// Diffusion coefficient in the porous medium
porousDiffCoeff_
= harmonicMean(volVarsI.porosity() * volVarsI.tortuosity() * volVarsI.diffCoeff(),
volVarsJ.porosity() * volVarsJ.tortuosity() * volVarsJ.diffCoeff());
// = 1./2*(volVarsI.porosity() * volVarsI.tortuosity() * volVarsI.diffCoeff() +
// volVarsJ.porosity() * volVarsJ.tortuosity() * volVarsJ.diffCoeff());
const Scalar diffCoeffI = EffectiveDiffusivityModel::effectiveDiffusivity(volVarsI.porosity(),
/*sat=*/1.0,
volVarsI.diffCoeff());
const Scalar diffCoeffJ = EffectiveDiffusivityModel::effectiveDiffusivity(volVarsJ.porosity(),
/*sat=*/1.0,
volVarsJ.diffCoeff());
// -> harmonic mean
porousDiffCoeff_ = harmonicMean(diffCoeffI, diffCoeffJ);
}
/*!
......
......@@ -57,6 +57,7 @@ NEW_PROP_TAG(PhaseIdx); //!< A phase index in to allow that a two-phase fluidsys
NEW_PROP_TAG(NumComponents); //!< Number of fluid components in the system
NEW_PROP_TAG(Indices); //!< Enumerations for the model
NEW_PROP_TAG(SpatialParams); //!< The type of the spatial parameters
NEW_PROP_TAG(EffectiveDiffusivityModel); //!< The employed model for the computation of the effective diffusivity
NEW_PROP_TAG(FluidSystem); //!< Type of the multi-component relations
NEW_PROP_TAG(ImplicitMassUpwindWeight); //!< The default value of the upwind weight
NEW_PROP_TAG(ImplicitMobilityUpwindWeight); //!< Weight for the upwind mobility in the velocity calculation
......
......@@ -38,6 +38,7 @@
#include "1p2cindices.hh"
#include <dumux/material/spatialparams/implicitspatialparams1p.hh>
#include <dumux/material/fluidmatrixinteractions/2p/diffusivitymillingtonquirk.hh>
namespace Dumux
{
......@@ -79,6 +80,14 @@ SET_TYPE_PROP(OnePTwoC, Indices, Dumux::OnePTwoCIndices<TypeTag, 0>);
//! Use ImplicitSpatialParamsOneP by default.
SET_TYPE_PROP(OnePTwoC, SpatialParams, ImplicitSpatialParamsOneP<TypeTag>);
//! The model after Millington (1961) is used for the effective diffusivity
SET_PROP(OnePTwoC, EffectiveDiffusivityModel)
{ private :
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
public:
typedef DiffusivityMillingtonQuirk<Scalar> type;
};
//! Set the phaseIndex per default to zero (important for two-phase fluidsystems).
SET_INT_PROP(OnePTwoC, PhaseIdx, 0);
......
......@@ -90,6 +90,13 @@ public:
porosity_ = problem.spatialParams().porosity(element, fvGeometry, scvIdx);
tortuosity_ = problem.spatialParams().tortuosity(element, fvGeometry, scvIdx);
if (tortuosity_ > 0)
{
std::cerr << "ERROR: You are still using the tortuosity method in your spatialParams, which is not used anymore.\n"
<< "Please remove it, the calculation is done within the effective diffusivity model.\n";
exit(1);
}
dispersivity_ = problem.spatialParams().dispersivity(element, fvGeometry, scvIdx);
// Second instance of a parameter cache.
......@@ -105,7 +112,6 @@ public:
transportCompIdx);
Valgrind::CheckDefined(porosity_);
Valgrind::CheckDefined(tortuosity_);
Valgrind::CheckDefined(dispersivity_);
Valgrind::CheckDefined(diffCoeff_);
......@@ -210,8 +216,9 @@ public:
{ return diffCoeff_; }
/*!
* \brief Return the tortuosity \f$\mathrm{[-]}\f$ of the streamlines of the fluid.
* \brief DEPRECATED: Not used anymore!
*/
DUNE_DEPRECATED_MSG("tortuosity is now calculated with the effective diffusivity model")
Scalar tortuosity() const
{ return tortuosity_; }
......@@ -279,6 +286,6 @@ private:
{ return *static_cast<const Implementation*>(this); }
};
}// end namepace
}// end namespace
#endif
......@@ -61,7 +61,6 @@ public:
{
permeability_ = 1e-10;
porosity_ = 0.4;
tortuosity_ = 0.28;
}
~OnePTwoCOutflowSpatialParams()
......@@ -106,20 +105,6 @@ public:
return porosity_;
}
/*!
* \brief Define the tortuosity \f$\mathrm{[-]}\f$.
*
* \param element The finite element
* \param fvGeometry The finite volume geometry
* \param scvIdx The local index of the sub-control volume where
*/
double tortuosity(const Element &element,
const FVElementGeometry &fvGeometry,
const int scvIdx) const
{
return tortuosity_;
}
/*!
* \brief Define the dispersivity.
*
......@@ -144,7 +129,6 @@ public:
private:
Scalar permeability_;
Scalar porosity_;
Scalar tortuosity_;
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment