24#ifndef DUMUX_TEST_SOLIDENERGY_PROBLEM_HH
25#define DUMUX_TEST_SOLIDENERGY_PROBLEM_HH
40template <
class TypeTag>
50 using ElementVolumeVariables =
typename GridVariables::GridVolumeVariables::LocalView;
51 using ElementFluxVariablesCache =
typename GridVariables::GridFluxVariablesCache::LocalView;
53 using Element =
typename GridView::template Codim<0>::Entity;
54 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
56 using FVElementGeometry =
typename GridGeometry::LocalView;
57 using SubControlVolume =
typename GridGeometry::SubControlVolume;
58 using SubControlVolumeFace =
typename GridGeometry::SubControlVolumeFace;
65 name_ = getParam<std::string>(
"Problem.Name");
66 temperatureHigh_ = getParam<Scalar>(
"Problem.TemperatureHigh");
67 temperatureInit_ = getParam<Scalar>(
"Problem.TemperatureInit");
68 lambdaSolid_ = getParam<Scalar>(
"Component.SolidThermalConductivity");
81 const std::string&
name()
const
100 BoundaryTypes bcTypes;
101 bcTypes.setAllNeumann();
122 const FVElementGeometry& fvGeometry,
123 const ElementVolumeVariables& elemVolVars,
124 const ElementFluxVariablesCache& elemFluxVarsCache,
125 const SubControlVolumeFace& scvf)
const
127 const auto& volVars = elemVolVars[scvf.insideScvIdx()];
128 const Scalar value = 0.02*(volVars.temperatureSolid() - temperatureInit_)/0.002;
129 return NeumannValues(value);
151 return PrimaryVariables(temperatureInit_);
171 const auto ampl = (gg.bBoxMax()[1] - gg.bBoxMin()[1])/3.0;
172 const auto len = (gg.bBoxMax()[0] - gg.bBoxMin()[0]);
173 const auto freq = 1.0/len;
175 for (
int i = 0; i < 100; ++i)
177 const auto posx = double(i)/99.0*len;
178 const auto posy = ampl*std::sin(2*M_PI*freq*posx) + ampl*3.0/2.0;
179 pointSources.emplace_back(GlobalPosition({posx, posy}),
typename PointSource::Values({len/100.0}));
203 const Element &element,
204 const FVElementGeometry& fvGeometry,
205 const ElementVolumeVariables& elemVolVars,
206 const SubControlVolume &scv)
const
208 const auto& volVars = elemVolVars[scv];
209 const Scalar charLen = 0.1;
210 static const Scalar nusselt = getParam<Scalar>(
"Problem.NusseltNumber");
211 const Scalar interfacialArea = 2*M_PI*0.001;
212 const Scalar lambdaSolidFluidTransfer = lambdaSolid_;
213 source *= -nusselt*interfacialArea*lambdaSolidFluidTransfer*(volVars.temperatureSolid() - temperatureHigh_)/charLen;
219 Scalar temperatureHigh_, temperatureInit_, lambdaSolid_;
220 static constexpr Scalar eps_ = 1e-6;
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Base class for all finite-volume problems.
Definition: common/fvproblem.hh:50
const std::string & paramGroup() const
The parameter group in which to retrieve runtime parameters.
Definition: common/fvproblem.hh:592
NumEqVector source(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluate the source term for all phases within a given sub-control-volume.
Definition: common/fvproblem.hh:327
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvproblem.hh:588
ValueType Values
Export the value type.
Definition: pointsource.hh:56
Base class for all fully implicit porous media problems.
Definition: dumux/porousmediumflow/problem.hh:39
A piece of stone heated by a network of channels.
Definition: test/porousmediumflow/solidenergy/problem.hh:42
SolidEnergyProblem(std::shared_ptr< const GridGeometry > gridGeometry, const std::string ¶mGroup="")
Definition: test/porousmediumflow/solidenergy/problem.hh:62
const std::string & name() const
The problem name.
Definition: test/porousmediumflow/solidenergy/problem.hh:81
NeumannValues neumann(const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const ElementFluxVariablesCache &elemFluxVarsCache, const SubControlVolumeFace &scvf) const
Evaluate the boundary conditions for a neumann boundary segment.
Definition: test/porousmediumflow/solidenergy/problem.hh:121
PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const
Evaluate the initial value for a control volume.
Definition: test/porousmediumflow/solidenergy/problem.hh:149
void pointSource(PointSource &source, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolume &scv) const
Evaluate the point sources (added by addPointSources) for all phases within a given sub-control-volum...
Definition: test/porousmediumflow/solidenergy/problem.hh:202
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
Specifies which kind of boundary condition should be used for which equation on a given boundary segm...
Definition: test/porousmediumflow/solidenergy/problem.hh:98
void addPointSources(std::vector< PointSource > &pointSources) const
Applies a vector of point sources. The point sources are possibly solution dependent.
Definition: test/porousmediumflow/solidenergy/problem.hh:167
Declares all properties used in Dumux.
Base class for all porous media problems.