mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Add temperatures to statepoints, Material.from_hdf5
Also include material attributes to summary format documentation
This commit is contained in:
parent
05ce0e9f51
commit
60d92f89d2
3 changed files with 12 additions and 0 deletions
|
|
@ -116,6 +116,13 @@ The current version of the summary file format is 6.0.
|
|||
- **sab_names** (*char[][]*) -- Names of
|
||||
S(:math:`\alpha,\beta`) tables assigned to the material.
|
||||
|
||||
:Attributes: - **volume** (*double[]*) -- Volume of this material [cm^3]. Only
|
||||
present if ``volume`` supplied
|
||||
- **temperature** (*double[]*) -- Temperature of this material [K].
|
||||
Only present in ``temperature`` supplied
|
||||
- **depletable** (*int[]*) -- ``1`` if the material can be depleted,
|
||||
``0`` otherwise. Always present
|
||||
|
||||
**/nuclides/**
|
||||
|
||||
:Attributes: - **n_nuclides** (*int*) -- Number of nuclides in the problem.
|
||||
|
|
|
|||
|
|
@ -287,6 +287,8 @@ class Material(IDManagerMixin):
|
|||
material.depletable = bool(group.attrs['depletable'])
|
||||
if 'volume' in group.attrs:
|
||||
material.volume = group.attrs['volume']
|
||||
if "temperature" in group.attrs:
|
||||
material.temperature = group.attrs["temperature"]
|
||||
|
||||
# Read the names of the S(a,b) tables for this Material and add them
|
||||
if 'sab_names' in group:
|
||||
|
|
|
|||
|
|
@ -898,6 +898,9 @@ void Material::to_hdf5(hid_t group) const
|
|||
if (volume_ > 0.0) {
|
||||
write_attribute(material_group, "volume", volume_);
|
||||
}
|
||||
if (temperature_ > 0.0) {
|
||||
write_attribute(material_group, "temperature", temperature_);
|
||||
}
|
||||
write_dataset(material_group, "name", name_);
|
||||
write_dataset(material_group, "atom_density", density_);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue