-
Notifications
You must be signed in to change notification settings - Fork 33
Cell-wise densities #153
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
Cell-wise densities #153
Conversation
andrsd
left a comment
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.
👍
ragusa
left a comment
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 have an input file in the test? something like, homogeneous medium, fully reflected, solution saturates to q/sigma_a. next, double the density and the solution should now saturate at half the previous value. simple enough but would test the change in density
modules/linear_boltzmann_solvers/a_lbs_solver/iterative_methods/power_iteration_keigen2.cc
Show resolved
Hide resolved
modules/linear_boltzmann_solvers/a_lbs_solver/source_functions/source_function.cc
Show resolved
Hide resolved
We can but it would require a bit of work since there is currently no way to set cell-wise densities. I was planning on adding a test when I eventually add a way to set the densities. Adding one know would require that to be done now. This is intended to be the infrastructure for using cell-wise densities. I suppose you could view the tests passing as proof that adding unit densities did not change anything. |
|
@zhardy-lanl can you create an issue to add the test I described earlier: homogeneous medium, fully reflected, solution saturates to q/sigma_a. next, double the density and the solution should now saturate at half the previous value. simple enough but would test the change in density. |
|
@zhardy-lanl : can we agree that our units must be:
|
Sure, I can create an issue. I'd like to think a little more carefully about the test. The test you propose would catch whether or not we missed a spot in the code where we should be multiplying by density but are not. I think it would be equally as useful to have a multi-material test where instead of scaling cross sections we set material densities via whatever API I end up implementing for this. See #161 |
On point 1 I agree. My only point of contention would be that there is nothing in the code that I am aware of that is explicitly tied to units (constants, etc.). If there aren't any constants tied to particular units in the code, then the code should be agnostic to units. In other words, the units of the problem are set by the units of the cross section data and densities. Point 2 I feel a little differently. I don't think we need to have strict enforcement of at/(barn-cm) vs. at/cc. The user supplies both the cross sections and the densities, it should be their responsibility to ensure consistency of units in that regard. When we have time-dependent solvers this becomes a bit more important as that time scales can vary dramatically based on the application making the time units of choice far less standard. More generally, there isn't anything (constants) in the code that I know of that is tied to specific units. |
|
except that the mesh and the macroXS need to be compatible. So, yes, the user should put the densities and microXS in whatever they feel like, as long as the resulting macroXS is compatible of the length units used in the mesh. |
7607489 to
bcc7a2f
Compare
Implementation of cell-wise densities into the LBS framework. This change has the effect of the code "assuming" microscopic cross sections instead of macroscopic. This allows for more control over cross sections based on material states and flexibility in how the problem is defined. Of course, using a default density of one in all cells has the same effect as assuming a macroscopic cross sections.
What this PR does
LBSSolverand associated getters.sigma_t.What this PR doesn't do