Skip to content

Feature/user specified solid params in spatial params

Using fancy C++ magic, user-specified solid parameters such as heat capacity, thermal conductivity, and solid density can now also be set in the spatial parameter file as was possible in 2.12, overriding the default solid state function calls. This implements a feature request of Holger, see issue #578 (closed).

An example for the solid heat capacity is implemented in /test/porousmediumflow/3p3c/implicit/columnxylolspatialparams.hh, restoring the release 2.12 version.

    template <class ElementSolution, class SolidState>
    Scalar solidHeatCapacity(const Element& element,
                             const SubControlVolume& scv,
                             const ElementSolution& elemSol,
                             const SolidState& solidState) const
        const auto& globalPos = scv.dofPosition();
        if (isFineMaterial_(globalPos))
            return fineHeatCap_;
            return coarseHeatCap_;

Thus, the test now also only uses an inert solid system and state again as the previous detour of defining two solid components for the sake of having two distinct heat capacities is no longer necessary.

  • Document fancy C++ magic in the ni volume variables

Fixes #578 (closed).

Edited by Timo Koch

Merge request reports