Comments (4)
openmc 0.13.0 doesn't write the initial_source.h5 for fixed source simulations despite their being an attribute
Related issue openmc-dev/openmc#1537
The source sampling feature in the next release of openmc (that FLF funded) will help obtain the information required without the need to write a initial_source file
from openmc_source_plotter.
Yep you currently need openmc 0.11for this to work, the readme has an example
from openmc_source_plotter.
Ok, is it because the current version doesn't write "initial_source.h5"? if so, why is the settings.write_initial_source attribute not deprecated?
from openmc_source_plotter.
Ok I see. I shall close this now :-)
For those who are interested, my workaround was:
import matplotlib.pyplot as plt
import numpy as np
E = my_source.energy
n_samples = 20000
std_dev = np.sqrt(4.*E.e0*E.kt/E.m_rat)
energy = np.random.normal(E.e0, std_dev, n_samples)
energy *=
plt.hist(energy, bins="auto", alpha=0.8)
plt.savefig("out.png")
For a source with a Muir energy spectrum
from openmc_source_plotter.
Related Issues (10)
- Add images to the readme HOT 4
- Adding Docker file for CI
- Allow plots with multiple sources
- implement monkey patch to overwrite openmc.Source HOT 1
- matplotlib stem plots for gamma HOT 1
- fix direction plot aspect ratio
- Import error openmc=0.13.3 HOT 2
- source plotter does not support stats.univariate.mixture
- save plots directly with path instead of just displaying HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openmc_source_plotter.