mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge branch 'master' into cmfd
This commit is contained in:
commit
e6bf5ce725
1 changed files with 9 additions and 5 deletions
|
|
@ -8,22 +8,26 @@ import matplotlib.pyplot as pyplot
|
|||
# Get filename and file object
|
||||
filename = sys.argv[1]
|
||||
axial_level = int(sys.argv[2])
|
||||
if len(sys.argv) > 3:
|
||||
stage = int(sys.argv[3])
|
||||
else:
|
||||
stage = 1
|
||||
fh = open(filename,'r')
|
||||
|
||||
# Read size of mesh
|
||||
words = fh.readline().split()
|
||||
nx, ny, nz = [int(item) for item in words]
|
||||
nx, ny, nz, nstage = [int(item) for item in words]
|
||||
|
||||
# Read values
|
||||
value_dict = {}
|
||||
for line in fh:
|
||||
words = line.split()
|
||||
i, j, k = [int(item) for item in words[:3]]
|
||||
value = float(words[3])
|
||||
value_dict[i,j,k] = value
|
||||
i, j, k, m = [int(item) for item in words[:4]]
|
||||
value = float(words[-1])
|
||||
value_dict[i,j,k,m] = value
|
||||
|
||||
# Set up matrix
|
||||
matrix = np.array([[value_dict[i+1,j+1,axial_level] for i in range(nx)]
|
||||
matrix = np.array([[value_dict[i+1,j+1,axial_level,stage] for i in range(nx)]
|
||||
for j in range(ny)])
|
||||
|
||||
# Make figure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue