-
Notifications
You must be signed in to change notification settings - Fork 2
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 #23 from shimwell/adding_a_few_minimal_value_tests
added minimal test for DD, DT neutron energy
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 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 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,36 @@ | ||
import pytest | ||
import NeSST as nst | ||
|
||
|
||
def test_DTprimspecmoments_mean(): | ||
# checks the mean value of the neutron emitted by DT fusion | ||
|
||
DTmean, _ = nst.DTprimspecmoments(Tion=5.0) # units KeV | ||
|
||
assert DTmean == pytest.approx(14.1, abs=0.1) # units MeV | ||
|
||
|
||
def test_DDprimspecmoments_mean(): | ||
# checks the mean value of the neutron emitted by DD fusion | ||
|
||
DDmean, _ = nst.DDprimspecmoments(Tion=5.0) # units KeV | ||
|
||
assert DDmean == pytest.approx(2.5, abs=0.1) # units MeV | ||
|
||
|
||
def test_DDprimspecmoments_mean_with_tion(): | ||
# checks the energy of the neutron increases with ion temperature | ||
|
||
DDmean_cold, _ = nst.DDprimspecmoments(Tion=5.0) # units KeV | ||
DDmean_hot, _ = nst.DDprimspecmoments(Tion=10.0) # units KeV | ||
|
||
assert DDmean_cold < DDmean_hot # units MeV | ||
|
||
|
||
def test_DTprimspecmoments_mean_with_tion(): | ||
# checks the energy of the neutron increases with ion temperature | ||
|
||
DTmean_cold, _ = nst.DTprimspecmoments(Tion=5.0) # units KeV | ||
DTmean_hot, _ = nst.DTprimspecmoments(Tion=10.0) # units KeV | ||
|
||
assert DTmean_cold < DTmean_hot # units MeV |