Comments (16)
Tim Bohm offered some additional diagnostics - curious is the fact that the identical numerical amount of track length seems to repeat with some frequency.
From Tim Bohm:
I built a modified version of dagmcnp with some added print outs in the TrackLengthMeshTally.cpp code. This is to help diagnose the negative track lengths I've been occasionally seeing with the conformal mesh tallies. I pasted some of the output below. It appears that the track length values are not small roundoff type of issues and the same values keep coming up. When I get some more time, I'll try to add some more diagnostics.
Tim
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
Warning-- negative track length. Dubious continuation..
track length= -1.32431
Warning-- negative track length. Dubious continuation..
track length= -0.29982
Warning-- negative track length. Dubious continuation..
track length= -0.280101
next interrupt will kill job.
from dagmc.
Next step: produce this error in a simple geometry in a repeatable way for easy debugging
from dagmc.
@cadangelo May have some simple problems that generate this too.
from dagmc.
I have been able to reproduce this error in two simple test cases that I had set up previously to verify the mesh tally work in DAG-MCNP. The first one is just a rectangular mesh that is conformal to a rectangular prism, and the second is a cylindrical mesh that is conformal to a cylindrical geometrical cell. If I do not include the "conformal" flag when setting up these tallies in the input files, then it produces the negative track length warning. This occurs whether you use DAGMC geometry or native MCNP geometry with the tracklen mesh tallies.
Has this error ever occurred when using the "conformal" flag? This flag removes the error message for both of my simple test cases.
from dagmc.
Can you share/point me to the location of your simple test problems? I'd like to take a look at them.
from dagmc.
These test problems are already in the DAGMC repository at DAG-MCNP/5.1.51/trunk/Testing/Meshtally/cases. Note that these input files have the conformal flag added for the tracklen tallies, so you will only have to remove this flag to see the negative track length error for these problems. The ones that I checked were the gradient_flux and the conformal_cyl1 cases, but it probably occurs for the others as well. As far as I remember from what I discussed with Steve when he wrote this code, the conformal flag is needed for these mesh tallies to use the correct logic for these problems when tracking particles near the overlapped mesh/geometry boundaries. That is why I was curious about whether or not it has ever occurred for problems with the conformal flag added.
from dagmc.
If I recall correctly (about 2-3 years ago when Steve wrote the conformal mesh tally code), he indicated to me that use of the conformal flag was optional and that it would likely result in many warning messages if the mesh generated for the mesh tally did not match the geometry faceting to a high precision.
Regardless, I set the conformal=cell flag in my mesh tally calculation of interest and now get many of the following warnings:
Warning: suspicious epsilon distance in conformal tally: 1.42154e-05
Warning: suspicious epsilon distance in conformal tally: 0.814529
ERROR: No triangle crossings found. Ending a meshtal track early.
Warning: suspicious epsilon distance in conformal tally: 7.04193e-06
Warning: suspicious epsilon distance in conformal tally: 0.76018
Warning: suspicious epsilon distance in conformal tally: 0.251779
ERROR: No triangle crossings found. Ending a meshtal track early.
Warning: suspicious epsilon distance in conformal tally: 3.94904e-06
Warning: suspicious epsilon distance in conformal tally: 1.21389e-05
Warning: suspicious epsilon distance in conformal tally: 0.433859
ERROR: No triangle crossings found. Ending a meshtal track early.
Warning: suspicious epsilon distance in conformal tally: 9.61757e-06
Warning: suspicious epsilon distance in conformal tally: 8.41674e-06
Warning: suspicious epsilon distance in conformal tally: 2.08491e-06
Warning: suspicious epsilon distance in conformal tally: 1.97171e-06
Warning: suspicious epsilon distance in conformal tally: 9.05566e-06
Warning: suspicious epsilon distance in conformal tally: 6.01607e-06
Warning: suspicious epsilon distance in conformal tally: 4.0706e-06
Warning: suspicious epsilon distance in conformal tally: 5.30275e-06
Warning: suspicious epsilon distance in conformal tally: 2.24141e-06
from dagmc.
Yes, that is the same issue I had with the simple cylinder problem as well. I looked back at my emails from Steve when I asked about it and he said that this is because the conformal logic requires an exact match between the geometry and mesh. With curved surfaces this is not always the case, so these epsilon errors pop up. If you refine the mesh, the errors get smaller as the two surfaces get closer to one another. To resolve this for the cylinder testing problem, we had to use the dagmc pre-processing tool to replace the geometric surface with the mesh.
from dagmc.
Found an old bug ticket from Steve in my emails that explains this error a bit more...
"Track length mesh tallies run into numerical issues when the tetrahedral tally mesh has a boundary that exactly coincides with the triangular facets in DagMC. The tally code is not currently aware of surface crossings, but when tally tracks stop and start exactly on tally boundaries (e.g. at surface crossings), the tally tracking code can get confused. It is not very predictable whether a point exactly on a triangle boundary will appear to be inside or outside the associated tetrahedron.
I have committed a test case ("metroid") to the meshtal branch of DAG-MCNP that illustrates this issue, and am working towards a fix."
from dagmc.
A followup to the bug ticket from Steve...
"I know a way for the mesh tally code to monitor MCNP's notion of the current cell (by keeping track of MCNP's =icl= global). If this variable changes between two calls to =dagmc_fmesh_score=, then a surface crossing has occurred.
I propose to add a flag to the track length mesh tally input card, specifying that the tally is fully conformal to DagMC's surface geometry. When this flag is set, the tally code can monitor the =icl= variable to detect surface crossings, and use special logic to avoid numerical problems for track segments that touch the surface boundaries. In effect, ray firing at the tally boundaries can be skipped, because DagMC has already done those calculations. This may lead naturally towards a solution where fully conformal mesh tallies specify the MCNP cell(s) to which they conform."
from dagmc.
Ran another test case using spherical geometry, and this does not have the negative track warnings without the conformal flag (although not surprisingly it does have the epsilon warning with the conformal flag). So it appears as though only meshes with "flat" surfaces such as the rectangular prism and the cylinder cause the problem since they are exactly conformal to the geometry with the precision set by the track length mesh tally. This may help to explain why you see repeated tracks with the same negative values.
from dagmc.
Here are the instructions that Steve gave me for setting up conformal track length tallies that require geometric surfaces being replaced with mesh surfaces in order for the conformal logic to work properly:
-
Create your geometry CAD file, geometry.sat.
-
Load geometry.sat into cubit (be sure attributes are enabled with a command like
set attrib on
before loading). Mesh whatever volume(s) you care about-- for this example we'll use volume 2. Save only the meshed volumes as a .cub file with the following cubit command:export cubit 'mesh.cub' vol 2
. This will give you mesh.cub with surface numbers identical to geometry.sat. -
mbconvert mesh.cub mesh.h5m
-
Run
dagmc_preproc -v --ftol [tolerance] -m mesh.h5m -o output.h5m geometry.sat
. The options are as follows:
- -v -- verbose output, which may be useful to follow the program's progress.
- --ftol [tolerance] -- this is optional, and lets you specify a faceting tolerance like you would on a dag-mcnp5 command line. The tolerance will not apply to the surfaces that are replaced with mesh surfaces.
- -m mesh.h5m -- specifies the alternative mesh file. Surfaces in this file will replace identically-numbered surfaces from geometry.sat
- -o output.h5m -- specify an output file name.
- geometry.sat -- the required input argument.
- Create a dag-mcnp5 problem using output.h5m as the gcad file on the dag-mcnp5 command line. Set up a conformal mesh tally using mesh.h5m as the input mesh, and add conformal=2 to the FC card.
from dagmc.
For some added background information, often in complex geometries such as seen with ITER, one does not want to mesh an entire volume since the mesh element count will get very high. Thus I often only mesh a portion of a geometry volume and so setting conformal=2 does not seem appropriate. Of course I can go back and modify the original geometry and create a volume in the place where I want a mesh tally, but in complex geometries such as seen with ITER, this can be very time consuming and problematic. So the bottom line is, I just want the option where the mesh tally is not necessarily conformal to the geometry to work.
from dagmc.
Based on some speculation with Kerry and Andy, I re-ran my ITER mesh tally calculation using a mesh generated on the same volume as before but scaled by 0.9999 This ran successfully.
from dagmc.
This has been deferred until a refactoring of the TrackLength and other mesh tallies is complete. #96
from dagmc.
Fixed as of commit ed40aec
from dagmc.
Related Issues (20)
- making use of auto-generate release note generate for next release HOT 13
- Improvement on Overlap Check Tool
- Remove need for downstream codes to have Eigen3 installed HOT 1
- False positive for assignment of vacuum HOT 7
- Making use of DAGMC in python package HOT 1
- error building when make DAGMC with MCNP6_BETA2 version HOT 3
- request to moving location of Dockerfile HOT 10
- UWUW Unit Test Failure HOT 3
- Improve documentation on OpenMC material assignment
- Update Pyne submodule
- Allow failures of builds using MOAB `master` and `develop` branches. HOT 1
- Update Pyne submodule
- Miscellaneous typos in documentation
- Control GeomQueryTool screen output HOT 12
- DAGMC not compatible with Geant4 v11.1.1 HOT 2
- DBUILD_MW_REG_TESTS requires h5m models that can't be found as URL missing HOT 9
- Add information on representation of metadata and topological relationships HOT 2
- dagmc tet mesh tallies 5.5x higher when run with MPI version of dag-mcnp6.2 HOT 6
- Remove DagMC class from MOAB namespace HOT 1
- Tests build with installed version of DAGMC if present HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dagmc.