Skip to content
Snippets Groups Projects
Commit 02c12be0 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[freeflow] Add default method for Neumann returning 0

parent 2d41bc4f
No related branches found
No related tags found
3 merge requests!617[WIP] Next,!576Feature/port staggered ff to next next,!571Cleanup/next
......@@ -276,7 +276,7 @@ protected:
if(bcTypes.isNeumann(eqIdx))
{
const auto extrusionFactor = 1.0; //TODO: get correct extrusion factor
boundaryFlux[eqIdx] = problem.neumannAtPos(scvf.center())[cellCenterIdx][eqIdx]
boundaryFlux[eqIdx] = problem.neumann(element, scvf)[cellCenterIdx][eqIdx]
* extrusionFactor * scvf.area();
}
}
......
......@@ -43,21 +43,18 @@ class NavierStokesProblem : public StaggeredFVProblem<TypeTag>
using Implementation = typename GET_PROP_TYPE(TypeTag, Problem);
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager);
using Grid = typename GridView::Grid;
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
using Element = typename GridView::template Codim<0>::Entity;
using Intersection = typename GridView::Intersection;
using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables);
using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
using BoundaryValues = typename GET_PROP_TYPE(TypeTag, BoundaryValues);
enum {
dim = Grid::dimension,
......@@ -69,7 +66,7 @@ class NavierStokesProblem : public StaggeredFVProblem<TypeTag>
velocityYIdx = Indices::velocityYIdx
};
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
using DofTypeIndices = typename GET_PROP(TypeTag, DofTypeIndices);
typename DofTypeIndices::CellCenterIdx cellCenterIdx;
......@@ -95,11 +92,32 @@ public:
*
* \param scvf The sub control volume face
*/
auto dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
BoundaryValues dirichlet(const Element &element, const SubControlVolumeFace &scvf) const
{
return asImp_().dirichletAtPos(scvf.center());
}
/*!
* \brief Returns neumann values at a given scv face.
This method can be overloaded in the actual problem, e.g. for coupling strategies
*
* \param scvf The sub control volume face
*/
BoundaryValues neumann(const Element &element, const SubControlVolumeFace &scvf) const
{
return asImp_().neumannAtPos(scvf.center());
}
/*!
* \brief Returns neumann values at a position.
*
* \param scvf The sub control volume face
*/
BoundaryValues neumannAtPos(const GlobalPosition& globalPos) const
{
return BoundaryValues(0.0);
}
/*!
* \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment