-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from fusion-energy/allowing_movement_of_initial…
…_source.h5 Allowing movement of initial source.h5
- Loading branch information
Showing
12 changed files
with
390 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import openmc_source_plotter as osp | ||
import openmc | ||
|
||
# initializes a new source object | ||
my_source = openmc.Source() | ||
|
||
# sets the direction to isotropic | ||
my_source.angle = openmc.stats.Isotropic() | ||
|
||
# plots the particle energy distribution | ||
plot = osp.plot_source_direction( | ||
source=my_source, | ||
number_of_particles=100, | ||
openmc_exec="/home/jshim/miniconda3/envs/openmc_0_11_0/bin/openmc", | ||
) | ||
|
||
plot.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import openmc_source_plotter as osp | ||
import openmc | ||
import numpy as np | ||
|
||
# initialises a new source object | ||
my_dt_source = openmc.Source() | ||
|
||
# sets the energy distribution to a Muir distribution DT neutrons | ||
my_dt_source.energy = openmc.stats.Muir(e0=14080000.0, m_rat=5.0, kt=20000.0) | ||
|
||
# initialises a new source object | ||
my_dd_source = openmc.Source() | ||
# sets the energy distribution to a Muir distribution DD neutrons | ||
my_dd_source.energy = openmc.stats.Muir(e0=2080000.0, m_rat=2.0, kt=20000.0) | ||
|
||
# plots the particle energy distribution | ||
plot = osp.plot_source_energy( | ||
source=[my_dt_source, my_dd_source], | ||
number_of_particles=10000, | ||
energy_bins=np.linspace(0, 20e6, 100), | ||
openmc_exec="/home/jshim/miniconda3/envs/openmc_0_11_0/bin/openmc", | ||
) | ||
|
||
plot.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .core import plot_direction_from_initial_source | ||
from .core import plot_position_from_initial_source | ||
from .core import plot_energy_from_initial_source | ||
from .core import get_particle_data | ||
from .core import create_initial_particles | ||
from .utils import get_particle_data | ||
from .utils import create_initial_particles | ||
from .core import plot_source_direction | ||
from .core import plot_source_energy | ||
from .core import plot_source_position |
Oops, something went wrong.