ukaea / neutronics_material_maker

A tool for making parametric material cards for use in neutronics codes. Original developed for the Paramak
19 stars 10 forks source link

added temperature_to_neutronics_code flag #127

Closed shimwell closed 3 years ago

shimwell commented 3 years ago

This PR allows temperature information added to the Material object to be selectively propagated to the openmc_material

This is useful when one needs to use the temperature_in_K or temperature_in_C to control the density but does not want the temperature setting in openmc (due to not having cross section data for temperatures)

example usage

test_mat = nmm.Material(
    "FLiBe",
    temperature_in_K=80,
    pressure_in_Pa=1,
    temperature_to_neutronics_code=False
)

result


print(test_mat.openmc_material.temperature)
>> None
``
codecov[bot] commented 3 years ago

Codecov Report

Merging #127 (8ef9b3d) into develop (55f20e3) will increase coverage by 0.03%. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #127      +/-   ##
===========================================
+ Coverage    95.48%   95.51%   +0.03%     
===========================================
  Files            4        4              
  Lines          709      714       +5     
===========================================
+ Hits           677      682       +5     
  Misses          32       32              
Impacted Files Coverage Δ
neutronics_material_maker/material.py 95.37% <100.00%> (+0.03%) :arrow_up:
neutronics_material_maker/mutlimaterial.py 95.03% <100.00%> (+0.03%) :arrow_up:
neutronics_material_maker/utils.py 96.06% <100.00%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 55f20e3...8ef9b3d. Read the comment docs.