Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
avalanche
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Community
avalanche
Commits
4601df60
Commit
4601df60
authored
5 years ago
by
matti2
Browse files
Options
Downloads
Patches
Plain Diff
Improved entrainment model Medina in terms of stability
parent
7575e07c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/avalanche/entrainment/Medina/Medina.C
+6
-4
6 additions, 4 deletions
src/avalanche/entrainment/Medina/Medina.C
src/avalanche/entrainment/Medina/Medina.H
+2
-0
2 additions, 0 deletions
src/avalanche/entrainment/Medina/Medina.H
with
8 additions
and
4 deletions
src/avalanche/entrainment/Medina/Medina.C
+
6
−
4
View file @
4601df60
...
@@ -60,6 +60,7 @@ Foam::entrainmentModels::Medina::Medina
...
@@ -60,6 +60,7 @@ Foam::entrainmentModels::Medina::Medina
entrainmentModel
(
type
(),
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
entrainmentModel
(
type
(),
entrainmentProperties
,
Us
,
h
,
hentrain
,
pb
,
tau
),
tauc_
(
"tauc"
,
coeffDict_
),
tauc_
(
"tauc"
,
coeffDict_
),
mu_
(
"mu"
,
coeffDict_
),
mu_
(
"mu"
,
coeffDict_
),
relaxationFactor_
(
coeffDict_
.
lookupOrDefault
<
scalar
>
(
"relax"
,
1
.)),
gs_
(
Us_
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gs_
(
Us_
.
db
().
lookupObject
<
areaVectorField
>
(
"gs"
)),
gn_
(
Us_
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
gn_
(
Us_
.
db
().
lookupObject
<
areaScalarField
>
(
"gn"
))
{
{
...
@@ -73,12 +74,13 @@ Foam::entrainmentModels::Medina::Medina
...
@@ -73,12 +74,13 @@ Foam::entrainmentModels::Medina::Medina
const
Foam
::
areaScalarField
&
const
Foam
::
areaScalarField
&
Foam
::
entrainmentModels
::
Medina
::
Sm
()
const
Foam
::
entrainmentModels
::
Medina
::
Sm
()
const
{
{
areaScalarField
taures
(
tauc_
+
pb_
*
mu_
);
areaScalarField
taures
(
tauc_
+
pb_
.
oldTime
()
*
mu_
);
//no entrainment in "dry" areas:
//no entrainment in "dry" areas:
areaScalarField
eflag
(
pos
(
h_
*
rho_
*
gn_
-
tauc_
/
10
.));
areaScalarField
eflag
(
pos
(
h_
-
dimensionedScalar
(
"small"
,
dimLength
,
1e-2
)));
areaScalarField
hent
(
eflag
*
(
mag
(
tau_
)
-
taures
)
/
(
rho_
*
(
gn_
*
mu_
-
mag
(
gs_
))));
areaScalarField
eflag2
(
pos
(
mag
(
tau_
.
oldTime
())
-
taures
));
areaScalarField
hent
(
eflag
*
eflag2
*
(
mag
(
tau_
.
oldTime
())
-
taures
)
/
(
rho_
*
max
(
gn_
*
mu_
-
mag
(
gs_
),
dimensionedScalar
(
"small"
,
dimAcceleration
,
1e-2
))));
Sm_
=
hent
/
Us_
.
db
().
time
().
deltaT
();
Sm_
=
hent
/
Us_
.
db
().
time
().
deltaT
()
*
relaxationFactor_
;
Sm_
=
max
(
Sm_
,
dimensionedScalar
(
dimVelocity
));
Sm_
=
max
(
Sm_
,
dimensionedScalar
(
dimVelocity
));
Sm_
=
min
(
Sm_
,
hentrain_
/
Us_
.
db
().
time
().
deltaT
());
Sm_
=
min
(
Sm_
,
hentrain_
/
Us_
.
db
().
time
().
deltaT
());
...
...
This diff is collapsed.
Click to expand it.
src/avalanche/entrainment/Medina/Medina.H
+
2
−
0
View file @
4601df60
...
@@ -79,6 +79,8 @@ class Medina
...
@@ -79,6 +79,8 @@ class Medina
//- Friction coefficient tan(phi) of the basal material
//- Friction coefficient tan(phi) of the basal material
dimensionedScalar
mu_
;
dimensionedScalar
mu_
;
scalar
relaxationFactor_
;
//- Reference to the gravitation fields
//- Reference to the gravitation fields
const
areaVectorField
&
gs_
;
const
areaVectorField
&
gs_
;
...
...
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