From 120a857109f8ec940897e3348927c84348094e16 Mon Sep 17 00:00:00 2001 From: Ned Coltman <edward.coltman@iws.uni-stuttgart.de> Date: Fri, 28 Jan 2022 14:17:27 +0100 Subject: [PATCH] [examples][porenetwork] update to the new spatial params --- examples/porenetwork_upscaling/problem.hh | 6 ------ examples/porenetwork_upscaling/spatialparams.hh | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/porenetwork_upscaling/problem.hh b/examples/porenetwork_upscaling/problem.hh index e06d3bdefd..2a4203195b 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 9cfc2c4e81..122084b812 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, -- GitLab