diff --git a/dumux/porousmediumflow/1pncmin/implicit/localresidual.hh b/dumux/porousmediumflow/1pncmin/implicit/localresidual.hh index 0a9cdae818e2ee01b7085a6c70b417439e9a1195..683bbb529b7321d62e25696ae16774957a6fc0cd 100644 --- a/dumux/porousmediumflow/1pncmin/implicit/localresidual.hh +++ b/dumux/porousmediumflow/1pncmin/implicit/localresidual.hh @@ -40,17 +40,17 @@ namespace Dumux * This class is used to fill the gaps in ImplicitLocalResidual for the one-phase n-component flow. */ template<class TypeTag> -class OnePNCMinLocalResidual: public OnePNCLocalResidual<TypeTag> +class OnePNCMinLocalResidual: public CompositionalLocalResidual<TypeTag> { protected: // typedef OnePNCLocalResidual<TypeTag> ParentType; using ParentType = CompositionalLocalResidual<TypeTag>; - using ThisType = TwoPNCMinLocalResidual<TypeTag>; + using ThisType = OnePNCMinLocalResidual<TypeTag>; using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); using Indices = typename GET_PROP_TYPE(TypeTag, Indices); using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); - using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables) + using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); // typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; // typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; // typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; diff --git a/dumux/porousmediumflow/1pncmin/implicit/model.hh b/dumux/porousmediumflow/1pncmin/implicit/model.hh index 419fbec093dc4074a187eb6a36f9cc444a1d8e4d..3e9d5ea1f727d29a9d9c87fe5d4ce73a85058230 100644 --- a/dumux/porousmediumflow/1pncmin/implicit/model.hh +++ b/dumux/porousmediumflow/1pncmin/implicit/model.hh @@ -127,11 +127,6 @@ class OnePNCMinModel: public OnePNCModel<TypeTag> // typedef Dumux::Constants<Scalar> Constant; // typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - using Element = typename GridView::template Codim<0>::Entity; - using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; - using CoordScalar = typename GridView::ctype; - using Tensor = Dune::FieldMatrix<CoordScalar, dimWorld, dimWorld>; - enum { dim = GridView::dimension, dimWorld = GridView::dimensionworld, @@ -148,6 +143,11 @@ class OnePNCMinModel: public OnePNCModel<TypeTag> phaseIdx = Indices::phaseIdx, }; + using Element = typename GridView::template Codim<0>::Entity; + using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; + using CoordScalar = typename GridView::ctype; + using Tensor = Dune::FieldMatrix<CoordScalar, dimWorld, dimWorld>; + //old // typedef typename GridView::template Codim<dim>::Entity Vertex; // typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; @@ -387,34 +387,34 @@ public: * \param curGlobalSol The current global solution * \param oldGlobalSol The previous global solution */ - void updateStaticData(SolutionVector &curGlobalSol, - const SolutionVector &oldGlobalSol) - { - for (unsigned i = 0; i < this->staticDat_.size(); ++i) - this->staticDat_[i].visited = false; - - for (const auto& element : elements(this->gridView_())) - { - FVElementGeometry fvGeometry; - fvGeometry.update(this->gridView_(), element); - for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) - { - auto dofIdxGlobal = this->dofMapper().subIndex(element, scvIdx, dofCodim); - - if (this->staticDat_[dofIdxGlobal].visited) - continue; - - this->staticDat_[dofIdxGlobal].visited = true; - VolumeVariables volVars; - volVars.update(curGlobalSol[dofIdxGlobal], - this->problem_(), - element, - fvGeometry, - scvIdx, - false); - } - } - } +// void updateStaticData(SolutionVector &curGlobalSol, +// const SolutionVector &oldGlobalSol) +// { +// for (unsigned i = 0; i < this->staticDat_.size(); ++i) +// this->staticDat_[i].visited = false; +// +// for (const auto& element : elements(this->gridView_())) +// { +// FVElementGeometry fvGeometry; +// fvGeometry.update(this->gridView_(), element); +// for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx) +// { +// auto dofIdxGlobal = this->dofMapper().subIndex(element, scvIdx, dofCodim); +// +// if (this->staticDat_[dofIdxGlobal].visited) +// continue; +// +// this->staticDat_[dofIdxGlobal].visited = true; +// VolumeVariables volVars; +// volVars.update(curGlobalSol[dofIdxGlobal], +// this->problem_(), +// element, +// fvGeometry, +// scvIdx, +// false); +// } +// } +// } /*! * \brief Write the current solution to a restart file. diff --git a/dumux/porousmediumflow/1pncmin/implicit/propertydefaults.hh b/dumux/porousmediumflow/1pncmin/implicit/propertydefaults.hh index a17763e6f109e65eb026252b4fed195db9518c2b..1b7abe1374f4225cbdd5965669b8b0005e38e99e 100644 --- a/dumux/porousmediumflow/1pncmin/implicit/propertydefaults.hh +++ b/dumux/porousmediumflow/1pncmin/implicit/propertydefaults.hh @@ -33,9 +33,11 @@ #include "volumevariables.hh" #include "properties.hh" +#include <dumux/porousmediumflow/compositional/localresidual.hh> +#include <dumux/porousmediumflow/nonisothermal/implicit/propertydefaults.hh> #include <dumux/porousmediumflow/1pnc/implicit/newtoncontroller.hh> #include <dumux/porousmediumflow/implicit/darcyfluxvariables.hh> -#include <dumux/material/spatialparams/implicit.hh> +#include <dumux/material/spatialparams/implicit1p.hh> #include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> namespace Dumux diff --git a/dumux/porousmediumflow/1pncmin/implicit/volumevariables.hh b/dumux/porousmediumflow/1pncmin/implicit/volumevariables.hh index 70fafae134947665ec67963165dd8d218019ea18..fffe17260032d4d2198b68a69f1956bb7ee736fd 100644 --- a/dumux/porousmediumflow/1pncmin/implicit/volumevariables.hh +++ b/dumux/porousmediumflow/1pncmin/implicit/volumevariables.hh @@ -56,6 +56,7 @@ class OnePNCMinVolumeVariables : public OnePNCVolumeVariables<TypeTag> using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using Problem = typename GET_PROP_TYPE(TypeTag, Problem); using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); + using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); using Indices = typename GET_PROP_TYPE(TypeTag, Indices); @@ -128,39 +129,6 @@ public: } - // TODO/FIXME: The salt crust porosity is not clearly defined. However form literature review it is - // found that the salt crust have porosity of approx. 10 %. Thus we restrict the decrease in porosity - // to this limit. Moreover in the Problem files the precipitation should also be made dependent on local - // porosity value, as the porous media media properties change related to salt precipitation will not be - // accounted otherwise. - - this->porosity_ = 1 - sumPrecipitates_; - - permeabilityFactor_ = std::pow(((1-initialPorosity_)/(1-this->porosity_)), 2) - * std::pow((this->porosity_/initialPorosity_), 3); - - // Verma-Pruess relation - // permeabilityFactor_ = 100 * std::pow(((this->porosity_/initialPorosity_)-0.9),2); - - // Modified Fair-Hatch relation with final porosity set to 0.2 and E1=1 - // permeabilityFactor_ = std::pow((this->porosity_/initialPorosity_),3) - // * std::pow((std::pow((1 - initialPorosity_),2/3))+(std::pow((0.2 - initialPorosity_),2/3)),2) - // / std::pow((std::pow((1 -this->porosity_),2/3))+(std::pow((0.2 -this->porosity_),2/3)),2); - - //Timur relation with residual water saturation set to 0.001 - // permeabilityFactor_ = 0.136 * (std::pow(this->porosity_,4.4)) / (2000 * (std::pow(0.001,2))); - - //Timur relation1 with residual water saturation set to 0.001 - // permeabilityFactor_ = 0.136 * (std::pow(this->porosity_,4.4)) / (200000 * (std::pow(0.001,2))); - - // Bern. relation - // permeabilityFactor_ = std::pow((this->porosity_/initialPorosity_),8); - - //Tixier relation with residual water saturation set to 0.001 - // permeabilityFactor_ = (std::pow((250 * (std::pow(this->porosity_,3)) / 0.001),2)) / initialPermeability_; - - //Coates relation with residual water saturation set to 0.001 - // permeabilityFactor_ = (std::pow((100 * (std::pow(this->porosity_,2)) * (1-0.001) / 0.001,2))) / initialPermeability_ ; // energy related quantities not contained in the fluid state asImp_().updateEnergy_(elemSol, problem, element, scv);