Week 3 - Sep 21st

Goal

  • Fix reflection on fences from meeting discussion
  • Type reflection on triangles with Latex
  • R code for reflection in triangle shape, from meeting notes
  • Simulate uniform random incoming distance, uniform [0, pi] Theta in
  • Simulate with natural distribution, u = unif [0,1], arccos(1-2u)
  • The natural distribution is actually, regardless of shooting angle of particle in tubes (with smoothly rough surface, not perfect reflection), it turns out that the for any angle, with many simulations, theta our falls into the distribution of natural one.

R code snippet:

> u<-runif(10000, 0,1)

> hist(acos(1-2*u))

> u<-runif(100000, 0,1)

> hist(acos(1-2*u))

> hist(acos(1-2*u), breaks=50)

> u<-runif(1, 0,1)

> acos(1-2*u)


Progress

  • Working on R code that simulates single triangle microgeometry reflection
  • Vector reflection with normal vectors, boundary are convert to function in order to calculate next collision point
  • Note on debug:

R consider extremely small numbers different than 0.

when return multiple things, like 2 doubles and 1 character, R will cast doubles to Strings


Meeting on Sep.21st

  • Fix R code. Successfully do one simulation with visualization.
  • User can specify the triangle shape by entering vertex coordinates
  • The entering point (in red) is uniform distribution on the horizontal edge. Incoming direction (Theta in) is natural distribution for angles
  • Still need to fix code and handle edge cases, as well as comment and refactor
  • More detail and documentation will be under Latex file "Reflection on boundary with periodic microgeometry", which describes the set up for calculation and simulation. More code detail (input output and function documentation) will be under R-file "reflection on triangle boundary"