Commit eb79a48d authored by Timo Koch's avatar Timo Koch
Browse files

[test][md][boundary] Improve formatting for Darcy-Stokes test

parent 912d07b8
......@@ -61,7 +61,8 @@ public:
std::shared_ptr<CouplingManager> couplingManager)
: ParentType(gridGeometry, "Darcy"), eps_(1e-7), couplingManager_(couplingManager)
{
problemName_ = getParam<std::string>("Vtk.OutputName") + "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
problemName_ = getParam<std::string>("Vtk.OutputName")
+ "_" + getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
// determine whether to simulate a vertical or horizontal flow configuration
verticalFlow_ = problemName_.find("vertical") != std::string::npos;
......@@ -115,13 +116,11 @@ public:
return values;
}
/*!
/*!
* \brief Evaluates the boundary conditions for a Dirichlet control volume.
*
* \param element The element for which the Dirichlet boundary condition is set
* \param scvf The boundary subcontrolvolumeface
*
* For this method, the \a values parameter stores primary variables.
* \param scvf The boundary sub-control-volume-face
*/
PrimaryVariables dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
{ return initial(element); }
......@@ -134,8 +133,6 @@ public:
* \param elemVolVars The element volume variables
* \param elemFluxVarsCache Flux variables caches for all faces in stencil
* \param scvf The boundary sub control volume face
*
* For this method, the \a values variable stores primary variables.
*/
template<class ElementVolumeVariables, class ElementFluxVarsCache>
NumEqVector neumann(const Element& element,
......@@ -147,48 +144,22 @@ public:
NumEqVector values(0.0);
if (couplingManager().isCoupled(CouplingManager::porousMediumIndex, CouplingManager::freeFlowMassIndex, scvf))
values[Indices::conti0EqIdx] = couplingManager().massCouplingCondition(CouplingManager::porousMediumIndex, CouplingManager::freeFlowMassIndex,
fvGeometry, scvf, elemVolVars);
values[Indices::conti0EqIdx] = couplingManager().massCouplingCondition(
CouplingManager::porousMediumIndex, CouplingManager::freeFlowMassIndex,
fvGeometry, scvf, elemVolVars
);
return values;
}
// \}
/*!
* \name Volume terms
*/
// \{
/*!
* \brief Evaluates the source term for all phases within a given
* sub control volume.
*
* \param element The element for which the source term is set
* \param fvGeometry The fvGeometry
* \param elemVolVars The element volume variables
* \param scv The sub control volume
*/
template<class ElementVolumeVariables>
NumEqVector source(const Element &element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolume &scv) const
{ return NumEqVector(0.0); }
// \}
/*!
* \brief Evaluates the initial value for a control volume.
*
* \param element The element
*
* For this method, the \a priVars parameter stores primary
* variables.
*/
PrimaryVariables initial(const Element &element) const
{
return PrimaryVariables(0.0);
}
{ return PrimaryVariables(0.0); }
// \}
......
......@@ -84,15 +84,10 @@ public:
*/
// \{
/*!
* \brief The problem name.
*/
const std::string& name() const
{
return problemName_;
}
{ return problemName_; }
/*!
/*!
* \brief Returns the temperature within the domain in [K].
*
* This problem assumes a temperature of 10 degrees Celsius.
......@@ -101,7 +96,7 @@ public:
{ return 298.0; }
// \}
/*!
/*!
* \name Boundary conditions
*/
// \{
......@@ -165,7 +160,7 @@ public:
return values;
}
/*!
/*!
* \brief Returns Dirichlet boundary values at a given position.
*
* \param globalPos The global position
......@@ -184,7 +179,7 @@ public:
return values;
}
/*!
/*!
* \brief Evaluates the boundary conditions for a Neumann control volume.
*
* \param element The element for which the Neumann boundary condition is set
......@@ -209,29 +204,39 @@ public:
if (couplingManager_->isCoupled(CouplingManager::freeFlowMomentumIndex, CouplingManager::porousMediumIndex, scvf))
{
values += couplingManager_->momentumCouplingCondition(CouplingManager::freeFlowMomentumIndex,
CouplingManager::porousMediumIndex,
fvGeometry, scvf, elemVolVars);
values += FluxHelper::slipVelocityMomentumFlux(*this, fvGeometry, scvf, elemVolVars, elemFluxVarsCache);
values += couplingManager_->momentumCouplingCondition(
CouplingManager::freeFlowMomentumIndex, CouplingManager::porousMediumIndex,
fvGeometry, scvf, elemVolVars
);
values += FluxHelper::slipVelocityMomentumFlux(
*this, fvGeometry, scvf, elemVolVars, elemFluxVarsCache
);
}
else
{
const Scalar pressure = onLeftBoundary_(globalPos) ? deltaP_ : 0.0;
values = FluxHelper::fixedPressureMomentumFlux(*this, fvGeometry, scvf, elemVolVars, elemFluxVarsCache, pressure, true /*zeroNormalVelocityGradient*/);
values = FluxHelper::fixedPressureMomentumFlux(
*this, fvGeometry, scvf, elemVolVars,
elemFluxVarsCache, pressure, true /*zeroNormalVelocityGradient*/
);
}
}
else
{
if (couplingManager_->isCoupled(CouplingManager::freeFlowMassIndex, CouplingManager::porousMediumIndex, scvf))
{
values = couplingManager_->massCouplingCondition(CouplingManager::freeFlowMassIndex, CouplingManager::porousMediumIndex,
fvGeometry, scvf, elemVolVars);
values = couplingManager_->massCouplingCondition(
CouplingManager::freeFlowMassIndex, CouplingManager::porousMediumIndex,
fvGeometry, scvf, elemVolVars
);
}
else
{
using FluxHelper = NavierStokesScalarBoundaryFluxHelper<AdvectiveFlux<ModelTraits>>;
values = FluxHelper::scalarOutflowFlux(*this, element, fvGeometry, scvf, elemVolVars);
values = FluxHelper::scalarOutflowFlux(
*this, element, fvGeometry, scvf, elemVolVars
);
}
}
......
......@@ -89,7 +89,11 @@ struct FluidSystem<TypeTag, TTag::FreeFlowOneP>
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::FreeFlowOneP> { using type = Dune::YaspGrid<2, Dune::EquidistantOffsetCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2> >; };
struct Grid<TypeTag, TTag::FreeFlowOneP>
{
using Coords = Dune::EquidistantOffsetCoordinates<GetPropType<TypeTag, Properties::Scalar>, 2>;
using type = Dune::YaspGrid<2, Coords>;
};
// Set the problem property
template<class TypeTag>
......@@ -116,14 +120,6 @@ struct CouplingManager<TypeTag, TTag::FreeFlowOneP>
using type = Dumux::FreeFlowPorousMediumCouplingManager<Traits>;
};
// template<class TypeTag>
// struct CouplingManager<TypeTag, TTag::StokesOneP>
// {
// using Traits = StaggeredMultiDomainTraits<TypeTag, TypeTag, Properties::TTag::DarcyOneP>;
// using type = Dumux::StokesDarcyCouplingManager<Traits>;
// };
} // end namespace Dumux::Properties
#endif
......@@ -40,8 +40,9 @@ class OnePSpatialParams
OnePSpatialParams<GridGeometry, Scalar>>
{
using GridView = typename GridGeometry::GridView;
using ParentType = FVSpatialParamsOneP<GridGeometry, Scalar,
OnePSpatialParams<GridGeometry, Scalar>>;
using ParentType = FVSpatialParamsOneP<
GridGeometry, Scalar, OnePSpatialParams<GridGeometry, Scalar>
>;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
......@@ -51,7 +52,7 @@ public:
using PermeabilityType = Scalar;
OnePSpatialParams(std::shared_ptr<const GridGeometry> gridGeometry)
: ParentType(gridGeometry)
: ParentType(gridGeometry)
{
permeability_ = getParam<Scalar>("Darcy.SpatialParams.Permeability");
alphaBJ_ = getParam<Scalar>("Darcy.SpatialParams.AlphaBeaversJoseph");
......
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