Skip to content
Snippets Groups Projects
Commit 5474019f authored by podlesny's avatar podlesny
Browse files

add linear dirichlet boundary condition as in Pipping-2013

parent c44c3229
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,39 @@ class VelocityDirichletCondition
const double threshold_;
};
class VelocityDirichletConditionLinearLoading
: public Dune::VirtualFunction<double, double> {
public:
VelocityDirichletConditionLinearLoading(const double finalVelocity = 5e-5, const double threshold = 0.1) :
finalVelocity_(finalVelocity),
threshold_(threshold)
{}
void evaluate(double const &relativeTime, double &y) const {
// Assumed to vanish at time zero
//std::cout << "VelocityDirichletCondition::evaluate()" << std::endl;
/*if (relativeTime <= 0.1)
std::cout << "- loading phase" << std::endl;
else
std::cout << "- final velocity reached" << std::endl;*/
y = (relativeTime <= threshold_)
? finalVelocity_ * relativeTime / threshold_
: finalVelocity_;
//y = relativeTime * finalVelocity;
}
private:
const double finalVelocity_;
const double threshold_;
};
class VelocityStepDirichletCondition
: public Dune::VirtualFunction<double, double> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment