Skip to content
Snippets Groups Projects
Commit 88a1d7f3 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Corrected the IC scripts. The initial smoothing lengths were set-up for the...

Corrected the IC scripts. The initial smoothing lengths were set-up for the GADGET convention not SWIFT.
parent aa3ac3d4
No related branches found
No related tags found
1 merge request!59Corrected the IC scripts.
...@@ -63,7 +63,7 @@ for i in range(L): ...@@ -63,7 +63,7 @@ for i in range(L):
v[index,1] = 0. v[index,1] = 0.
v[index,2] = 0. v[index,2] = 0.
m[index] = mass m[index] = mass
h[index] = 2.251 * boxSize / L h[index] = 1.1255 * boxSize / L
u[index] = internalEnergy u[index] = internalEnergy
ids[index] = index ids[index] = index
......
...@@ -67,7 +67,7 @@ for i in range(L): ...@@ -67,7 +67,7 @@ for i in range(L):
v[index,1] = 0. v[index,1] = 0.
v[index,2] = 0. v[index,2] = 0.
m[index] = mass m[index] = mass
h[index] = 2.251 / 2 * boxSize / L h[index] = 1.1255 * boxSize / L
u[index] = internalEnergy u[index] = internalEnergy
ids[index] = index ids[index] = index
if sqrt((x - boxSize/2.)**2 + (y - boxSize/2.)**2 + (z - boxSize/2.)**2) < 2.01 * boxSize/L: if sqrt((x - boxSize/2.)**2 + (y - boxSize/2.)**2 + (z - boxSize/2.)**2) < 2.01 * boxSize/L:
......
...@@ -70,7 +70,7 @@ for i in range(L): ...@@ -70,7 +70,7 @@ for i in range(L):
v[index,1] = 0. v[index,1] = 0.
v[index,2] = 0. v[index,2] = 0.
m[index] = mass m[index] = mass
h[index] = 2.251 / 2 * hbox h[index] = 1.1255 * hbox
u[index] = internalEnergy u[index] = internalEnergy
ids[index] = index ids[index] = index
if sqrt((x - boxSize/2.)**2 + (y - boxSize/2.)**2 + (z - boxSize/2.)**2) < 1.2 * hbox: if sqrt((x - boxSize/2.)**2 + (y - boxSize/2.)**2 + (z - boxSize/2.)**2) < 1.2 * hbox:
......
...@@ -74,7 +74,7 @@ ds = grp.create_dataset('Masses', (numPart,1), 'f') ...@@ -74,7 +74,7 @@ ds = grp.create_dataset('Masses', (numPart,1), 'f')
ds[()] = m ds[()] = m
m = zeros(1) m = zeros(1)
h = full((numPart, 1), 2.251 * boxSize / L) h = full((numPart, 1), 1.1255 * boxSize / L)
ds = grp.create_dataset('SmoothingLength', (numPart,1), 'f') ds = grp.create_dataset('SmoothingLength', (numPart,1), 'f')
ds[()] = h ds[()] = h
h = zeros(1) h = zeros(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment