lanl / lanl/dfnWorks

Possible bug at intersections

Open
#7 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
96
Forks
53
Avg merge
2h 58m
Merged PRs (30d)
2

Description

Hi,

There might another issue with the way DFNTrans checks for intersections, which makes particles skip them in some rare cases.

The bug happens when a particle is very close to an intersection, but is in a cell that only has one node in contact with it. The code then defines three variables:

  • int1: Node that belongs to that cell and is in contact with the intersection.
  • int2: Neighbor node of int1 in contact with the intersection.
  • int3: If it exists, second neighbor node in contact with the intersection.

DFNTrans then checks a segment-segment intersection between the particle's trajectory and segment int1<->int2. However, as seen in the figure below, this might not detect the particle crossing the intersection. A possible fix would be to check if int3 exists and, if so, check for an intersection between the particle's trajectory and segment int2<->int3.

Regards,
Jordi

intersection_skip

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the DFNTrans intersection-checking entry point and trace how int1, int2, and optional int3 are selected. Reproduce the near-intersection case shown in the issue and verify that a particle crossing the intersection is detected when the second segment is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.