Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 1ka verification case #178

Closed
wants to merge 1,262 commits into from
Closed

Add 1ka verification case #178

wants to merge 1,262 commits into from

Conversation

lkadz
Copy link
Collaborator

@lkadz lkadz commented Sep 24, 2024

(Ref. #12)

EDIT: @Lee01Atom, you had the issue number in the comments, so it did not show. I just fixed it.

moosetest added 30 commits December 14, 2023 15:57
@lkadz lkadz changed the title Add 1ka verification case Add 1ka verification case #12 Sep 24, 2024
@lkadz lkadz changed the title Add 1ka verification case #12 Add 1ka verification case Sep 24, 2024
@simopier
Copy link
Collaborator

Thank you for your contribution, @Lee01Atom!

The tests currently fail because your commit messages do not reference an existing issue:

##########################################################################
ERROR: Your patch does not contain a valid ticket reference! (i.e. #1234)
Merge branch 'devel' of https://github.com/Lee01Atom/TMAP8 into test
add  ver-1ka

ERROR: The following files do not contain a newline character before EOF:
	test/tests/ver-1ka/ver-1ka.i

Run the "delete_trailing_whitespace.sh" script in your $MOOSE_DIR/scripts directory.
##########################################################################

to solve it, follow the instructions from the "contributing to TMAP8" page :

Now enter a short description of the commit [...] At the bottom, you should add (Ref. #<ISSUE_NUMBER>)

Right now, you should be able to run: git commit --amend and update the commit message to add the issue number. In that case:

(Ref. #12)

@simopier simopier self-assigned this Sep 24, 2024
@simopier simopier added the V&V Relevant to V&V label Sep 24, 2024
Copy link
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lee01Atom, this is very quick first take looking at the main missing pieces, not a thorough review yet:

  • you should also add a documentation page (.md) that describes the case. you can find examples in projects/TMAP8/doc/content/verification_and_validation/
  • You should also add a test file that will run the test. You can find examples in the other V&V cases.
  • as explained above, you need your commit message to list the issue number.

These requirements are (in part) what ensure that TMAP8 remains Nuclear Quality Assurance, level 1 compliant. It takes a bit of time to get used to this way of doing code development, but thorough documentation and rigorous testing are key to high software quality assurance. It helps build trust in TMAP8.

Please let me know if you have any questions.

@moosebuild
Copy link

moosebuild commented Sep 29, 2024

Job Documentation, step Sync to remote on f3dc432 wanted to post the following:

View the site here

This comment will be updated on new commits.

Copy link
Collaborator

@simopier simopier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preliminary review with some comments and suggestions.

@@ -0,0 +1,27 @@
import numpy as np
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add in-code comments

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at other .py files for up to date practices:

  • Automatic figure generation
  • calculate RSMPE

test/tests/ver-1ka/tests Show resolved Hide resolved
input = val-1ka.i
csvdiff = val-1ka_out.csv
requirement = 'The system shall be able to model the tritium volumetric source in one enclosure'
[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test case to run the python script.
Example:

[ver-1a_comparison]
    type = RunCommand
    command = 'python3 comparison_ver-1a.py'
    requirement = 'The system shall be able to generate comparison plots between the analytical solution and simulated solution of verification case 1a, modeling species diffusion through a structure, originating from a depleting source enclosure.'
    required_python_packages = 'matplotlib numpy pandas os'
  []

test/tests/ver-1ka/ver-1ka.i Outdated Show resolved Hide resolved
test/tests/ver-1ka/ver-1ka.md Outdated Show resolved Hide resolved
test/tests/ver-1ka/ver-1ka.md Outdated Show resolved Hide resolved
test/tests/ver-1ka/ver-1ka.md Outdated Show resolved Hide resolved
test/tests/ver-1ka/ver-1ka.md Outdated Show resolved Hide resolved
Comment on lines 23 to 26
!media figures/ver-1ka_comparison_time.png
style=width:50%;margin-bottom:2%
id=ver-1ka_comparison_time
caption=Comparison of $T_2$ partial pressure in an enclosure with no loss pathways as function of time calculated through TMAP8 and analytically
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now use a different approach to ensure the figures are automatically generated by the documentation. Here is an example:

!media comparison_ver-1g.py
       image_name=ver-1g_comparison_equal_conc.png
       style=width:50%;margin-bottom:2%;margin-left:auto;margin-right:auto
       id=ver-1g_comparison_equal_conc
       caption=Comparison of concentration of AB as a function of time calculated through TMAP8 and analytically for the case when A and B have equal concentrations.

test/tests/ver-1ka/tests Outdated Show resolved Hide resolved
Apply preliminary suggestions

Co-authored-by: Pierre-Clement Simon <[email protected]>
@simopier
Copy link
Collaborator

simopier commented Oct 4, 2024

Cleaning this up was a challenge, so another PR was opened to replace this one. See #183.

@simopier simopier closed this Oct 4, 2024
@simopier simopier mentioned this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V&V Relevant to V&V
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants