-
Notifications
You must be signed in to change notification settings - Fork 3
Plots
PINSPEC has a wide range of plotting features to allow users to visualize their input and output data. All plotting functions are written in python and included in the python module plotter
. Therefore, all plotting functions must be prefaced with plotter.
. The plotting capabilities include:
- Microscopic Cross Sections
- Macroscopie Cross Sections
- Flux
- Thermal Scattering Kernels
- Fission Emission Spectrum
- Resonance Integrals
- Group Cross Sections
Below is a the code used to plot the flux for the infinite homogeneous case:
py_printf('INFO', 'Plotting flux...')
# Plot the flux
plotter.plotFlux(flux, loglog=True, uselegend=False, filename='flux', \
title='Infinite medium flux')
This function produces the following plot:
INSERT INFINITE MEDIUM FLUX PLOT
As shown above, the plotFlux function takes in five inputs. These inputs help specify characteristics including plot scaling, whether a legend should be included, what the plot file should be called, and the title included on the plot. To make the users job easier, the last four inputs and defaults and thus do not need to be included with every function call.
Below is a the code used to plot flux, cross sections, and thermal scattering kernels for the homogeneous equivalence case:
py_printf('INFO', 'Making plots...')
# Plotting xs, flux, thermal scattering
plotter.plotFlux([total_flux, moderator_flux, fuel_flux], output_dir)
plotter.plotMicroXS(u235, ['capture', 'elastic', 'fission'], output_dir)
plotter.plotMicroXS(u238, ['capture', 'elastic', 'fission'], output_dir)
plotter.plotMicroXS(h1, ['capture', 'elastic', 'absorption'], output_dir)
plotter.plotMicroXS(o16, ['capture', 'elastic', 'absorption'], output_dir)
plotter.plotMacroXS(fuel, ['capture', 'elastic', 'fission', \
'absorption', 'total'], output_dir)
plotter.plotMacroXS(moderator, ['capture', 'elastic', 'fission', \
'absorption', 'total'], output_dir)
plotter.plotThermalScattering(h1, output_dir)
plotter.plotThermalScattering(u238, output_dir)
plotter.plotThermalScattering(u235, output_dir)
plotter.plotThermalScattering(o16, output_dir)
As shown in the two examples, the plotFlux function can take in a single flux tally or a list of flux tallies as its first input.
The macroscopic cross section plots for the fuel (left) and moderator(right) are included below:
INSERT HOMOGENEOUS EQUIVALENCE MACROSCOPIC CROSS SECTION PLOTS