Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
MostafaMollaali
dynamic
Commits
0fde67c0
Commit
0fde67c0
authored
8 years ago
by
Christoph Lehmann
Browse files
Options
Downloads
Patches
Plain Diff
[TES] chaged reaction taming strategy
parent
f883fbb9
No related branches found
Tags
tes-works-again
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ProcessLib/TES/TESReactionAdaptor.cpp
+13
-13
13 additions, 13 deletions
ProcessLib/TES/TESReactionAdaptor.cpp
with
13 additions
and
13 deletions
ProcessLib/TES/TESReactionAdaptor.cpp
+
13
−
13
View file @
0fde67c0
...
...
@@ -193,27 +193,22 @@ checkBounds(std::vector<double> const& local_x,
const
double
min_xmV
=
1e-6
;
const
std
::
size_t
nnodes
=
local_x
.
size
()
/
NODAL_DOF
;
const
std
::
size_t
xmV_offset
=
(
NODAL_DOF
-
1
)
*
nnodes
;
const
std
::
size_t
xmV_offset
=
COMPONENT_ID_MASS_FRACTION
*
nnodes
;
for
(
std
::
size_t
i
=
0
;
i
<
nnodes
;
++
i
)
{
auto
const
xnew
=
local_x
[
xmV_offset
+
i
];
if
(
xnew
<
min_xmV
)
{
auto
const
xold
=
local_x_prev_ts
[
i
+
xmV_offset
];
auto
const
xold
=
local_x_prev_ts
[
xmV_offset
+
i
];
if
(
xnew
<
min_xmV
)
{
const
auto
a
=
xold
/
(
xold
-
xnew
);
alpha
=
std
::
min
(
alpha
,
a
);
_bounds_violation
[
i
]
=
true
;
}
else
if
(
xnew
>
1.0
)
{
auto
const
xold
=
local_x_prev_ts
[
i
+
xmV_offset
];
}
else
if
(
xnew
>
1.0
)
{
const
auto
a
=
xold
/
(
xnew
-
xold
);
alpha
=
std
::
min
(
alpha
,
a
);
_bounds_violation
[
i
]
=
true
;
}
else
{
}
else
{
_bounds_violation
[
i
]
=
false
;
}
}
...
...
@@ -222,10 +217,13 @@ checkBounds(std::vector<double> const& local_x,
if
(
alpha
!=
1.0
)
{
if
(
alpha
>
0.5
)
alpha
=
0.5
;
if
(
alpha
<
0.05
)
alpha
=
0.05
;
if
(
_d
.
ap
.
number_of_try_of_iteration
<=
3
)
{
_reaction_damping_factor
*=
sqrt
(
std
::
min
(
alpha
,
0.5
)
);
_reaction_damping_factor
*=
sqrt
(
alpha
);
}
else
{
_reaction_damping_factor
*=
std
::
min
(
alpha
,
0.5
)
;
_reaction_damping_factor
*=
alpha
;
}
}
...
...
@@ -236,6 +234,8 @@ void
TESFEMReactionAdaptorAdsorption
::
preZerothTryAssemble
()
{
if
(
_reaction_damping_factor
<
1e-3
)
_reaction_damping_factor
=
1e-3
;
_reaction_damping_factor
=
std
::
min
(
std
::
sqrt
(
_reaction_damping_factor
),
10.0
*
_reaction_damping_factor
);
...
...
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