krakentools.utils.write_water_composition¶
- krakentools.utils.write_water_composition(fresh_water_mass_density, boron_in_ppm_weight, temperature, fout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, fname=None, thermlibs=[], mat_name='', lowest_library_temperature=0, highest_library_temperature=1800)¶
Writes water material card and optionally the therm-card for Serpent into a file for a specific state point (fresh water density + boron ppm)
- Parameters:
-- (temperature {float}) – target mass density of non-borated water (positive number, g/cm3)
-- – boron concentration in ppm weight
-- – water temperature in Kelvin
- Keyword Arguments:
-- (highest_library_temperature {int}) – Handle to a pre-opened file into which the water composition will be written (default: {stdout})
-- – Optional name of file into which the water composition will be written (default: {None})
-- – A list of (thermal scattering library identifier)-(temperature) pairs (default: {None})
-- – Name for the created material (default: {“”}, will be created based on state point)
-- – Lowest cross section library temperature (default: {0 K})
-- – Highest cross section library temperature (default: {1800 K})
- Raises:
RuntimeError – If the target temperature is not bracketed by the thermal scattering libraries.
RuntimeError – If lowest_library_temperature > highest_library_temperature.
RuntimeError – If temperature < lowest_library_temperature.
- Return type:
None