Commit ce8bdf48 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

[test][co2] use new spatial params

parent e0a1b470
Pipeline #11307 waiting for manual action with stages
......@@ -222,7 +222,7 @@ public:
const auto dofIdxGlobal = scv.dofIndex();
vtkBoxVolume_[dofIdxGlobal] += scv.volume();
#if ISOTHERMAL
vtkTemperature_[dofIdxGlobal] = initialTemperatureField_(scv.dofPosition());
vtkTemperature_[dofIdxGlobal] = this->spatialParams().temperatureAtPos(scv.dofPosition());
#endif
}
......@@ -260,17 +260,6 @@ public:
const std::string& name() const
{ return name_; }
/*!
* \brief Returns the temperature within the domain.
*
* \param globalPos The global position
*
* This problem assumes a geothermal gradient with
* a surface temperature of 10 degrees Celsius.
*/
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
{ return initialTemperatureField_(globalPos); }
// \}
/*!
......@@ -397,7 +386,7 @@ private:
PrimaryVariables values(0.0);
values.setState(firstPhaseOnly);
const Scalar temp = initialTemperatureField_(globalPos);
const Scalar temp = this->spatialParams().temperatureAtPos(globalPos);
const Scalar densityW = FluidSystem::Brine::liquidDensity(temp, 1e7);
const Scalar moleFracLiquidCO2 = 0.00;
......@@ -419,11 +408,6 @@ private:
return values;
}
Scalar initialTemperatureField_(const GlobalPosition globalPos) const
{
return 283.0 + (depthBOR_ - globalPos[dimWorld-1])*0.03;
}
Scalar depthBOR_;
Scalar injectionRate_;
......
......@@ -28,7 +28,7 @@
#define DUMUX_HETEROGENEOUS_SPATIAL_PARAMS_HH
#include <dumux/io/grid/griddata.hh>
#include <dumux/material/spatialparams/fv.hh>
#include <dumux/porousmediumflow/fvspatialparamsmp.hh>
#include <dumux/material/fluidmatrixinteractions/2p/brookscorey.hh>
#include <dumux/porousmediumflow/co2/model.hh>
......@@ -43,21 +43,23 @@ namespace Dumux {
*/
template<class GridGeometry, class Scalar>
class HeterogeneousSpatialParams
: public FVSpatialParams<GridGeometry,
Scalar,
HeterogeneousSpatialParams<GridGeometry, Scalar>>
: public FVPorousMediumSpatialParamsMP<GridGeometry,
Scalar,
HeterogeneousSpatialParams<GridGeometry, Scalar>>
{
using Grid = typename GridGeometry::Grid;
using GridView = typename GridGeometry::GridView;
using FVElementGeometry = typename GridGeometry::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
using Element = typename GridView::template Codim<0>::Entity;
using ParentType = FVSpatialParams<GridGeometry, Scalar, HeterogeneousSpatialParams<GridGeometry, Scalar>>;
using ParentType = FVPorousMediumSpatialParamsMP<GridGeometry, Scalar, HeterogeneousSpatialParams<GridGeometry, Scalar>>;
using GlobalPosition = typename SubControlVolume::GlobalPosition;
using PcKrSwCurve = FluidMatrix::BrooksCoreyDefault<Scalar>;
static constexpr int dimWorld = GridView::dimensionworld;
public:
using PermeabilityType = Scalar;
......@@ -76,6 +78,8 @@ public:
barrierTopPorosity_ = 0.001;
barrierMiddlePorosity_ = 0.05;
reservoirPorosity_ = 0.2;
depthBOR_ = getParam<Scalar>("Problem.DepthBOR");
}
/*!
......@@ -184,6 +188,17 @@ public:
int wettingPhaseAtPos(const GlobalPosition& globalPos) const
{ return FluidSystem::BrineIdx; }
/*!
* \brief Returns the temperature within the domain.
*
* \param globalPos The global position
*
* This problem assumes a geothermal gradient with
* a surface temperature of 10 degrees Celsius.
*/
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
{ return 283.0 + (depthBOR_ - globalPos[dimWorld-1])*0.03; }
private:
std::shared_ptr<const GridData<Grid>> gridData_;
......@@ -200,6 +215,8 @@ private:
Scalar barrierMiddleK_;
Scalar reservoirK_;
Scalar depthBOR_;
std::vector<int> paramIdx_;
const PcKrSwCurve pcKrSwCurve_;
};
......
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