Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
262e4cfe
Commit
262e4cfe
authored
Feb 21, 2017
by
Matthieu Schaller
Browse files
More symmetric ICs for the 1D Noh case
parent
82aa7d08
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/Noh_1D/makeIC.py
View file @
262e4cfe
...
...
@@ -23,7 +23,7 @@ from numpy import *
# Generates a swift IC file for the Noh problem test in a periodic cubic box
# Parameters
numPart
=
100
0
numPart
=
100
1
gamma
=
5.
/
3.
# Gas adiabatic index
rho0
=
1.
# Background density
P0
=
1.e-6
# Background pressure
...
...
examples/Noh_1D/plotSolution.py
View file @
262e4cfe
...
...
@@ -74,7 +74,7 @@ S = sim["/PartType0/Entropy"][:]
P
=
sim
[
"/PartType0/Pressure"
][:]
rho
=
sim
[
"/PartType0/Density"
][:]
N
=
100
0
# Number of points
N
=
100
1
# Number of points
x_min
=
-
1
x_max
=
1
...
...
@@ -86,7 +86,7 @@ x += x_min
x_s
=
np
.
arange
(
0
,
2.
,
2.
/
N
)
-
1.
rho_s
=
np
.
ones
(
N
)
*
rho0
P_s
=
np
.
ones
(
N
)
*
rho0
v_s
=
np
.
ones
(
N
)
*
v
v_s
=
np
.
ones
(
N
)
*
v
0
# Shock position
u0
=
rho0
*
P0
*
(
gas_gamma
-
1
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment