Celeritas
0.5.0-56+6b053cd
|
Z-aligned circular involute. More...
#include <Involute.hh>
Type aliases | |
using | Intersections = Array< real_type, 3 > |
Safety cannot be trivially calculated. | |
using | StorageSpan = Span< real_type const, 6 > |
Safety cannot be trivially calculated. | |
using | Real2 = Array< real_type, 2 > |
Safety cannot be trivially calculated. | |
static CELER_CONSTEXPR_FUNCTION SurfaceType | surface_type () |
Safety cannot be trivially calculated. | |
static CELER_CONSTEXPR_FUNCTION bool | simple_safety () |
Safety cannot be trivially calculated. | |
Involute (Real2 const &origin, real_type radius, real_type displacement, Chirality sign, real_type tmin, real_type tmax) | |
Construct involute from parameters. More... | |
template<class R > | |
CELER_FUNCTION | Involute (Span< R, StorageSpan::extent >) |
Construct from raw data. | |
CELER_FUNCTION Real2 const & | origin () const |
X-Y center of the circular base of the involute. | |
CELER_FUNCTION real_type | r_b () const |
Involute circle's radius. | |
CELER_FUNCTION real_type | displacement_angle () const |
Displacement angle. | |
CELER_FUNCTION Chirality | sign () const |
Orientation of the involute curve. | |
CELER_FUNCTION real_type | tmin () const |
Get bounds of the involute. | |
CELER_FUNCTION real_type | tmax () const |
Safety cannot be trivially calculated. | |
CELER_FUNCTION StorageSpan | data () const |
Get a view to the data for type-deleted storage. | |
CELER_FUNCTION SignedSense | calc_sense (Real3 const &pos) const |
Determine the sense of the position relative to this surface. More... | |
CELER_FUNCTION Intersections | calc_intersections (Real3 const &pos, Real3 const &dir, SurfaceState on_surface) const |
Calculate all possible straight-line intersections with this surface. | |
CELER_FUNCTION Real3 | calc_normal (Real3 const &pos) const |
Calculate outward normal at a position on the surface. More... | |
Z-aligned circular involute.
An involute is a curve created by unwinding a chord from a shape. The involute implemented here is constructed from a circle and can be made to be clockwise (negative) or anti-clockwise (positive). This involute is the same type of that found in HFIR, and is necessary for building accurate models.
While the parameters define the curve itself have no restriction, except for the radius of involute being positive, the involute needs to be bounded for there to be finite solutions to the roots of the intersection points. Additionally this bound cannot exceed an interval of size of 2 to be able to determine if whether a particle is in, out, or on the involute surface. Lastly the involute geometry is fixed to be z-aligned.
\[ x = r_b (\cos(t+a) + t \sin(t+a)) + x_0 \]
\[ y = r_b (\sin(t+a) - t \cos(t+a)) + y_0 \]
where t is the normal angle of the tangent to the circle of involute with radius r_b from a starting angle of a ( \(r/h\) for a finite cone.
|
explicit |
Construct involute from parameters.
origin | origin of the involute |
radius | radius of the circle of involute |
displacement | displacement angle of the involute |
sign | chirality of involute |
tmin | minimum tangent angle |
tmax | maximum tangent angle |
|
inline |
Calculate outward normal at a position on the surface.
This is done by taking the derivative of the involute equation :
\[ n = {\sin(t+a) - \cos(t+a), 0} \]
|
inline |
Determine the sense of the position relative to this surface.
This is performed by first checking if the particle is outside the bounding circles given by tmin and tmax.
Then position is compared to a point on the involute at the same radius from the origin.
Next the point is determined to be inside if an involute that passes it, has an t that is within the bounds and an a greater than the involute being tested for. To do this, the tangent to the involute must be determined by calculating the intercepts of the circle of involute and circle centered at the midpoint of the origin and the point being tested for that extends to the origin. After which the angle of tangent point can be determined and used to calculate a via:
\[ a = angle - t_point \]
To calculate the intercept of two circles it is assumed that the two circles are x_prime axis. The coordinate along x_prime originating from the center of one of the circles is given by:
\[ x_prime = (d^2 - r^2 + R^2)/(2d) \]
Where d is the distance between the center of the two circles, r is the radius of the displaced circle, and R is the radius of the circle at the orgin. Then the point y_prime can be obatined from:
\[ y_prime = \pm sqrt(R^2 - x_prime^2) \]
Then to convert ( x_prime , y_prime ) to ( x, y ) the following rotation is applied:
\[ x = x_prime*cos(theta) - y_prime*sin(theta) y = y_prime*cos(theta) + x_prime*sin(theta) \]
Where theta is the angle between the x_prime axis and the x axis.