diff --git a/examples/porenetwork_upscaling/problem.hh b/examples/porenetwork_upscaling/problem.hh index e06d3bdefd21afd99a6903db500ef10440f7127e..2a4203195b5163c02ada076b33172fdb3f8e273c 100644 --- a/examples/porenetwork_upscaling/problem.hh +++ b/examples/porenetwork_upscaling/problem.hh @@ -71,12 +71,6 @@ public: } // [[/codeblock]] - // #### Temperature - // We need to specify a constant temperature for our isothermal problem. - // Fluid properties that depend on temperature will be calculated with this value. - Scalar temperature() const - { return 283.15; } - // #### Boundary conditions // This function is used to define the __type of boundary conditions__ used depending on the location. // Here, we use Dirichlet boundary conditions (fixed pressures) at the inlet and outlet and Neumann diff --git a/examples/porenetwork_upscaling/spatialparams.hh b/examples/porenetwork_upscaling/spatialparams.hh index 9cfc2c4e81d381d91111210271ea37bd6089fa95..122084b812453f6db678e0b689b5c05c2141ed80 100644 --- a/examples/porenetwork_upscaling/spatialparams.hh +++ b/examples/porenetwork_upscaling/spatialparams.hh @@ -44,7 +44,7 @@ class UpscalingSpatialParams : public PNMSpatialParams<GridGeometry, Scalar, using SubControlVolume = typename GridGeometry::SubControlVolume; using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace; using Element = typename GridView::template Codim<0>::Entity; - + using GlobalPosition = typename Element::Geometry::GlobalCoordinate; public: UpscalingSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry) @@ -68,6 +68,9 @@ public: poreShapeFactor_[i] /= totalAreaSharedWithAdjacentThroats[i]; } + Scalar temperatureAtPos(const GlobalPosition& globalPos) const + { return 283.15; } + template<class ElementSolutionVector> Scalar poreLength(const Element& element, const SubControlVolume& scv,