-
Notifications
You must be signed in to change notification settings - Fork 47
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
Adding the KRUSTY tutorial to the Cardinal website #883
base: devel
Are you sure you want to change the base?
Conversation
Thanks, Michael! I will take a closer look over the next few days -- but one initial comment is that the mesh files are too big to version control in Cardinal. They will slow down the git clone operation and, if we end up needing to change the files in the future, the git history doesn't "free" memory from old file versions, so the repo can get bloated. I've moved your files here: https://anl.app.box.com/folder/263952628262 Can you please update the tutorial to instruct the reader that they need to download files from Box? There are other Cardinal tutorials which also follow this pattern. |
You'll also need to link the new markdown file you made from somewhere else inside Cardinal, in order for it to get rendered on the website. For instance, you'll probably want to add that link on the markdown file corresponding to this page: https://cardinal.cels.anl.gov/tutorials/openmc_solid.html |
Thank you! I've updated the tutorial and also linked the new markdown file into openmc_solid.md |
tutorials/krusty/KRUSTY/job_sawtooth
Outdated
@@ -0,0 +1,24 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to version control this file, as we frequently change the Sawtooth instructions when modules change. Let's please delete it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've just deleted it!
Have you tested if the documentation builds locally? You'll want to make sure that the rendered website looks good, format-wise.
This will print out an HTML link which you can paste into a browser to look at a draft of the website. Give it a try, let me know if you run into any issues:
You'll see something like this, copy that |
Thanks, I did not knew about that. I just checked and I have some shortcut link errors and some figures that are too big. I will fix that now! |
I removed the WIP marker so that the test suite will run. |
Job Documentation on 309797a wanted to post the following: View the site here This comment will be updated on new commits. |
8d0dea3
to
b1902ae
Compare
15ee8c9
to
4cfb6f4
Compare
For all images which were not generated by you/Mahmoud, please be sure to include a citation. |
doc/content/tutorials/KRUSTY.md
Outdated
|
||
## Geometry and Computational Models | ||
|
||
This model consists of a multiphysics simulation of the KRUSTY reactor, one of the simplest space power reactor concepts ever proposed. The relevant dimensions are summarized in [table1] and in [krusty_solid_mesh] shows the geometry and gap thicknesses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to add a few sentences which discuss the geometric simplifications you are making (e.g., what is being neglected compared to the real system?). I'd also suggest to add a sentence with something along the lines of "Ongoing work benchmarking Cardinal against KRUSTY will relax these simplifications."
doc/content/tutorials/KRUSTY.md
Outdated
|
||
## Geometry and Computational Models | ||
|
||
This model consists of a multiphysics simulation of the KRUSTY reactor, one of the simplest space power reactor concepts ever proposed. The relevant dimensions are summarized in [table1] and in [krusty_solid_mesh] shows the geometry and gap thicknesses. The basic components are the fuel, heat pipes, control, reflectors and shield. For the sake of simplification, we will only simulate the components within the region spanning from the bottom axial reflector to the top axial reflector along the z-direction, which entails neglecting components outside of this region, the control rod insertion is also being disregarded.The fuel is high enriched uranium U-7.65 Mo with a total length of 25 cm, an outer diameter of 11 cm, and the core contains a 4 cm hole to allow $B_4C$ control insertion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disregarded.The
-> add space before The
doc/content/tutorials/KRUSTY.md
Outdated
|
||
### MOOSE Heat Conduction Model | ||
|
||
The MOOSE heat transfer module is used to solve for steady-state heat conduction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can replace this equation and the variable definitions with
The MOOSE heat transfer module is used to solve for
[energy conservation in the solid](theory/heat_eqn.md).
That will provide a link to the solid equation. We do this just for consistency with the other tutorials.
doc/content/tutorials/KRUSTY.md
Outdated
\end{equation} | ||
where $k_s$ is the solid thermal conductivity, $T_s$ is the solid temperature, and $\dot{q}_s$ is a volumetric heat source in the solid. | ||
|
||
[krusty_mesh] shows the mesh used in this example. The geometry was build using FUSION360, where the CAD file was exported into Cubit, where the mesh was build. Cubit can create meshes with user-defined geometry and customizable boundary layers. The Cubit script used to generate the solid mesh can be found in the directory `cardinal/tutorials/krusty/meshes`, where you will find two files, a `.sat` file that you will import into cubit, which will generate the geometry of KRUSTY, however in order to generete the mesh you will need to run the scripts in the `.txt` file in the cubit terminal, and then you can export the `.e` mesh file, which is the format that MOOSE can read. You can find the `.e` files in this box link: [box](https://anl.app.box.com/s/irryqrx97n5vi4jmct1e3roqgmhzic89/folder/141527707499). Do not forget to place the `e.` mesh files in the same directory as your `.i` files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build -> built
built is the correct past tense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exported -> imported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can refer to the meshes
directory using the relative path, like "in the meshes
directory"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e. -> .e
doc/content/tutorials/KRUSTY.md
Outdated
|
||
### OpenMC Model | ||
|
||
The OpenMC model is built using CSG, which are cells created from regions of space formed by half-space of various common surfaces. First, we define materials for each component of the reactor. Next, we define our geometric parameters, so we can start building our surfaces and manipulate them to create the geometry of each component of the KRUSTY reactor. Then, we need to create cells for each component and fill them with the materials that we previously created, so we can create a universe containg all the cells using `openmc.Universe`. This geometry can be seen in [krusty_solid_mesh]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use acronym for CSG
[!ac](CSG)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The geometry is a CSG-type geometry -- to visualize it, you'd need to do slice plots in OpenMC. Technically, the mesh in [krusty_solid_mesh] is not the geometry OpenMC runs on (this may feel pedantic, but soon OpenMC will actually be able to transport particles through a mesh geometry, so the distinction is important).
doc/content/tutorials/KRUSTY.md
Outdated
|
||
We will use a linear-linear stochastic interpolation between the two cross section data sets nearest to the imposed temperature by setting the `method` parameter on `settings.temperature` to `interpolation`. When OpenMC is initialized, the cross section data is loaded for a temperature range specified by `range` in `settings`. | ||
|
||
!listing /tutorials/krusty/KRUSTY/model03.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor suggestion -- can we rename the file to just model.py
? I know we had several other models internally, but people might be wondering what the 03 means.
| 617, instance 0 (of 1) | 29815 | 0 | 0 | 0 | 6.205e-04 | | | ||
| 618, instance 0 (of 1) | 24836 | 0 | 0 | 0 | 8.822e-04 | | | ||
| 619, instance 0 (of 1) | 21965 | 0 | 0 | 0 | 1.981e-04 | | | ||
| 620, instance 0 (of 1) | 21483 | 0 | 0 | 0 | 2.256e-04 | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many cells! Where do these all come from? I thought this was a CSG model?
doc/content/tutorials/KRUSTY.md
Outdated
|
||
``` | ||
|
||
This shows the OpenMC cells mapped to the MOOSE elements. The above message also shows the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a stochastic volume calculation? The last column in the table looks empty here
doc/content/tutorials/KRUSTY.md
Outdated
problem, each cell only has a single instance. Since we added a stochastic volume | ||
calculation, the last column (`Actual Vol`) is populated with OpenMC's stochastic | ||
estimates for the cell volumes. You can increase the number of samples to drive the error | ||
lower to get more refined estimates of volumes. We cab also see the auxiliary variables and material mapping for OpenMC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cab -> can
tutorials/krusty/KRUSTY/openmc.i
Outdated
type = FileMeshGenerator | ||
file = krusty_scale.e | ||
[] | ||
# [scale] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove anything which is commented out -- for part B, we can just add more input files. People often get confused by commented-out stuff
tutorials/krusty/KRUSTY/openmc.i
Outdated
scaling = 100.0 | ||
output = 'unrelaxed_tally_std_dev' | ||
# temperature_blocks = 'cavity_center clamp core gap_clamp gap_ref gap_sleeve gap_vaccan mli ref_bottom ref_top sleeve vacuum_can' | ||
temperature_blocks = '12 5 14 4 11 9 6 7 13 15 10 8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use subdomain names instead of numbers? I find this is a bit more intuitive
# Radial geometry | ||
# Envelope outer | ||
R_hp_o = 1.27e-2 | ||
D_hp_o = '${fparse 2.0 * R_hp_o}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @MendesMichael pointed out earlier, heat pipe outer diameter should be 1.27e-2 cm
Please review the first version of the KRUSTY tutorial Coupling of OpenMC and MOOSE without Sockeye