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

Possible intersection skip #2

Closed
jordisanglas opened this issue May 23, 2019 · 7 comments
Closed

Possible intersection skip #2

jordisanglas opened this issue May 23, 2019 · 7 comments

Comments

@jordisanglas
Copy link
Contributor

The general structure of a dfnTrans timestep is (lots of details omitted!):

  1. If the particle is inside a cell in contact with an intersection, CheckDistance() is called. Inside it, the particle's distance to the intersection is computed. If it is close to the intersection, a PredictorStep() is performed and we check if it crossed the intersection. In that case, AcrossIntersection() is called.
  2. Regardless of step 1, another PredictorStep() is always done (sometimes followed by a CorrectorStep()).

If I understand it correctly, the following issue might happen:

  1. A particle is close to an intersection, so a predictor step is performed in step 1. Maybe it does not cross the intersection, it only gets closer to it.
  2. Then, the second PredictorStep() is called and the particle crosses the intersection. However, it is not detected, as the second call to PredictorStep() does not check for intersection crossings.

That means that a particle can cross an intersection without it being detected. If I'm not mistaken, this happens in the truncated_power_law_dist test, for particle np=7 when it is at fracture 3 and crosses fracture 169 without noticing. This can only be seen by debugging the code, and seeing that the particle crosses fracture 169 without calling AcrossIntersection(). However, I do not know if it happens often or it is a rare event.

Am I missing something or is it a small bug?

@dfnWorks
Copy link

Thank you for your comment, I am looking into it now. Is it possible to get the mesh and DFN run you are referring to? could you archive it and send it through transfer.lanl.gov to nataliia at lanl.gov. thanks

@jordisanglas
Copy link
Contributor Author

Hi,

What files would you need in particular? The whole folder is 1.5 GB. Note that the bug can be reproduced in the truncated_power_law_dist test that is already included when installing dfnWorks.

@dfnWorks
Copy link

I am not going to regenerate the fracture network, I am not sure in my computer it will give me exact the same DFN and mesh that you have. It will be great if you can send me exactly the same mesh that you used to get to dfnTrans. If sending files is a problem, then, sure, I can look at the test at dfnWorks package.

@jordisanglas
Copy link
Contributor Author

I have sent the folder (I was not sure which files were needed). dfnTrans has already been run, but you can run it again when debugging.

@dfnWorks
Copy link

Got it, thank you. I will look at the problem and answer your questions soon.

@dfnWorks
Copy link

dfnWorks commented Jun 7, 2019

Thanks again for your comment, it let me look again at another pathological case.
In dfnTrans particles are moving according to predictor-corrector algorithm. Predictor and corrector steps are performed at every time step during particle movement, regardless of the cell location: boundary cell, or regular cell inside a fracture, or an intersection cell (this is Step 2 at your comment).
In step 1, predictor step is used to move particles through the intersection and to make sure that during next predictor-corrector step it will cross an intersection line. Here, no new position no new velocities of the predictor step are used. Once it is detected that particle will cross an intersection, particle is moved back to the point where the particle's trajectory crosses intersection line, then AcrossIntersection is called and the new fracture (or the same fracture) is chosen and new velocities are calculated.
In the case of truncated_power_law_dist test, the intersection line is almost parallel to the flow and the angle between particle's trajectory and intersection line is narrow. Moreover, the particle position before the intersection was detected is very close to the intersection node. When the predictor step was performed, the code didn’t identify the previous and new particle position on different sides of the intersection. This is a rare event. I made a little fix there, it will be available on repo next week.

@jordisanglas
Copy link
Contributor Author

Thank you! If it is a rare event, I guess it does not affect much the results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants