Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
podlesny
dune-tectonic
Commits
3a964fc9
Commit
3a964fc9
authored
4 years ago
by
podlesny
Browse files
Options
Downloads
Patches
Plain Diff
new velocity bc for velocity step test
parent
4d270741
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/tectonic/problem-data/bc.hh
+34
-0
34 additions, 0 deletions
dune/tectonic/problem-data/bc.hh
with
34 additions
and
0 deletions
dune/tectonic/problem-data/bc.hh
+
34
−
0
View file @
3a964fc9
#ifndef SRC_ONE_BODY_PROBLEM_DATA_BC_HH
#define SRC_ONE_BODY_PROBLEM_DATA_BC_HH
#include
<cassert>
#include
<dune/common/function.hh>
class
VelocityDirichletCondition
...
...
@@ -35,6 +37,38 @@ class VelocityDirichletCondition
const
double
threshold_
;
};
class
VelocityStepDirichletCondition
:
public
Dune
::
VirtualFunction
<
double
,
double
>
{
public:
VelocityStepDirichletCondition
(
const
double
initialVelocity
=
5e-5
,
const
double
finalVelocity
=
1e-4
,
const
double
loadingThreshold
=
0.1
,
const
double
stepTime
=
0.5
)
:
initialVelocity_
(
initialVelocity
),
finalVelocity_
(
finalVelocity
),
loadingThreshold_
(
loadingThreshold
),
stepTime_
(
stepTime
)
{
assert
(
loadingThreshold_
<
stepTime_
);
}
void
evaluate
(
double
const
&
relativeTime
,
double
&
y
)
const
{
// Assumed to vanish at time zero
y
=
finalVelocity_
;
if
(
relativeTime
<=
loadingThreshold_
)
{
y
=
initialVelocity_
*
(
1.0
-
std
::
cos
(
relativeTime
*
M_PI
/
loadingThreshold_
))
/
2.0
;
}
else
if
(
relativeTime
<
stepTime_
)
{
y
=
initialVelocity_
;
}
}
private
:
const
double
initialVelocity_
;
const
double
finalVelocity_
;
const
double
loadingThreshold_
;
const
double
stepTime_
;
};
class
NeumannCondition
:
public
Dune
::
VirtualFunction
<
double
,
double
>
{
public:
NeumannCondition
(
double
c
=
0.0
)
:
c_
(
c
)
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment