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

Implement boundary conditions #10

Closed
ignasiialemany opened this issue Feb 11, 2021 · 2 comments · Fixed by #11
Closed

Implement boundary conditions #10

ignasiialemany opened this issue Feb 11, 2021 · 2 comments · Fixed by #11

Comments

@ignasiialemany
Copy link
Contributor

ignasiialemany commented Feb 11, 2021

Allow the user to choose boundary conditions at the end of [Lx,Ly,Lz]. Currently , the user can choose two types of geometries: full or block. In both cases, the walker uses function one_dt() and checks if the walker is stepping out of the bounding box [Lx,Ly,Lz] . Periodic boundary would mean that the walker is free to step into the following block whereas reflect would not allow walkers crossing from one box to the other.

Implement a config parameter inside substrate.yml in order to be able to switch between these two options. The parameter should be called boundary: reflect or boundary:periodic.

@janniklasrose
Copy link
Owner

I would argue that if you select the block geometry type, you implicitly select periodic boundary conditions for that block. I would therefore say that there is no need to a new config parameter and full should aways reflect when a walker gets to the LxLyLz bounding box.

  • If you want an infinite domain, either specify a practically infinite domain of cells or use a transform if you can't afford to do that.
  • If you want a finite domain, use a full geometry of appropriate LxLyLz.

As a side note, it might be good to verify that the bounding box LxLyLz fully contains the geometry, otherwise we get weird behaviour. Although that could also be left to the user.

@janniklasrose
Copy link
Owner

Uncomment and complement the below code with a suitable if statement based on substrate.boundary:

% ENABLE if the particles cannot leave the bounding box
%dxdydz(:) = Geometry.reflect(dxdydz, intersectInfoBB.vertices);

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

Successfully merging a pull request may close this issue.

2 participants