Make extrusion factors work properly.

This commit is contained in:
Atgeirr Flø Rasmussen 2022-07-01 13:37:36 +02:00
parent 73d609f7b5
commit 75c8f34e3e
2 changed files with 14 additions and 1 deletions

View File

@ -132,7 +132,8 @@ public:
void update(const Problem& problem,const PrimaryVariables& primaryVars,unsigned globalSpaceIdx, unsigned timeIdx)
{
//ParentType::update(elemCtx, dofIdx, timeIdx);//only used for extrusion factor
ParentType::update(problem, primaryVars, globalSpaceIdx, timeIdx);
const auto& materialParams = problem.materialLawParams(globalSpaceIdx);
//const auto& materialParams = problem.materialLawParams(0);//NB improve speed
Scalar RvMax;
@ -170,6 +171,7 @@ public:
RvMax
);
rockCompTransMultiplier_ = problem.template rockCompTransMultiplier<Evaluation>(*this, globalSpaceIdx);
porosity_ *= problem.template rockCompPoroMultiplier<Evaluation>(*this, globalSpaceIdx);
}
void update_simple(//const unsigned timeIdx,
const unsigned timeIdx,

View File

@ -46,6 +46,8 @@ class FvBaseIntensiveQuantities
using Implementation = GetPropType<TypeTag, Properties::IntensiveQuantities>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
public:
// default constructor
@ -69,6 +71,15 @@ public:
unsigned timeIdx)
{ extrusionFactor_ = elemCtx.problem().extrusionFactor(elemCtx, dofIdx, timeIdx); }
/*!
* \brief Update all quantities for a given control volume.
*/
void update(const Problem& problem,
const PrimaryVariables& /* primaryVars */,
unsigned /* globalSpaceIdx */,
unsigned /* timeIdx */)
{ extrusionFactor_ = problem.extrusionFactor(); }
/*!
* \brief Return how much a given sub-control volume is extruded.
*