Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
TurTLE
TurTLE
Commits
e1a91df0
Commit
e1a91df0
authored
9 months ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
tweaks CFL computation
parent
efd77f3a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!122
fix CFL estimate for box length other than 2pi
Pipeline
#221460
passed
9 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TurTLE/DNS_statistics.py
+7
-1
7 additions, 1 deletion
TurTLE/DNS_statistics.py
with
7 additions
and
1 deletion
TurTLE/DNS_statistics.py
+
7
−
1
View file @
e1a91df0
...
@@ -460,8 +460,14 @@ def plot_basic_stats(
...
@@ -460,8 +460,14 @@ def plot_basic_stats(
with
self
.
get_data_file
()
as
data_file
:
with
self
.
get_data_file
()
as
data_file
:
if
'
CFL_velocity
'
in
data_file
[
'
statistics
'
].
keys
():
if
'
CFL_velocity
'
in
data_file
[
'
statistics
'
].
keys
():
self
.
statistics
[
'
CFL_velocity(t)
'
]
=
data_file
[
'
statistics/CFL_velocity
'
][
ii0
:
ii1
+
1
]
self
.
statistics
[
'
CFL_velocity(t)
'
]
=
data_file
[
'
statistics/CFL_velocity
'
][
ii0
:
ii1
+
1
]
dx
=
((
2
*
np
.
pi
/
self
.
parameters
[
'
dkx
'
])
/
self
.
parameters
[
'
nx
'
])
# Lx / nx
dy
=
((
2
*
np
.
pi
/
self
.
parameters
[
'
dky
'
])
/
self
.
parameters
[
'
ny
'
])
dz
=
((
2
*
np
.
pi
/
self
.
parameters
[
'
dkz
'
])
/
self
.
parameters
[
'
nz
'
])
if
((
np
.
round
(
dx
,
5
)
!=
np
.
round
(
dy
,
5
))
or
(
np
.
round
(
dx
,
5
)
!=
np
.
round
(
dz
,
5
))):
print
(
'
WARNING: CFL computation does not make sense for non-isotropic grids
'
)
tresolution2
=
(
self
.
parameters
[
'
dt
'
]
*
self
.
statistics
[
'
CFL_velocity(t)
'
]
tresolution2
=
(
self
.
parameters
[
'
dt
'
]
*
self
.
statistics
[
'
CFL_velocity(t)
'
]
/
(
2
*
np
.
pi
/
self
.
parameters
[
'
dkx
'
]
/
self
.
parameters
[
'
nx
'
])
)
/
dx
)
a
.
plot
(
self
.
statistics
[
'
t
'
]
/
self
.
statistics
[
'
Tint
'
],
a
.
plot
(
self
.
statistics
[
'
t
'
]
/
self
.
statistics
[
'
Tint
'
],
tresolution2
,
tresolution2
,
label
=
'
$
\\
frac{
\\
Delta t}{
\\
Delta x}
\\
| u
\\
|_{CFL}$
'
)
label
=
'
$
\\
frac{
\\
Delta t}{
\\
Delta x}
\\
| u
\\
|_{CFL}$
'
)
...
...
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