A monte carlo pin cell spectral code for nuclear engineering applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
YPlane Class Reference

The YPlane is a a plane perpendicular to the y-axis. More...

#include "pinspec/src/Surface.h"

Inheritance diagram for YPlane:
Surface

Public Member Functions

 YPlane (const char *surface_name=(char *)"")
 The YPlane constructor. More...
 
virtual ~YPlane ()
 YPlane destructor.
 
float getY ()
 Returns the y-coordinate of the plane's intersection point with the y-axis. More...
 
void setY (float y)
 Sets the x-coordinate of the plane's intersection point with the y-axis. More...
 
float evaluate (neutron *neutron)
 Returns the evaluation of a neutron's coordinates $ (x,y) $ with respect to the quadratic surface representing this y-plane: $ f(x,y) = qy + d = y - y_0 $. More...
 
float evaluate (float x, float y, float z)
 Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to the quadratic surface representing this y-plane: $ f(x,y,z) = qy + d = y - y_0 $. More...
 
float computeParametrizedDistance (neutron *neutron)
 Computes the parametrized distance to the YPlane along a neutron's trajectory. More...
 
bool onSurface (neutron *neutron)
 Checks whether a neutron is on the YPlane. More...
 
void reflectNeutron (neutron *neutron)
 Perfectly reflects a neutron at a yplane. More...
 
- Public Member Functions inherited from Surface
 Surface (const char *surface_name=(char *)"")
 Surface class constructor. More...
 
virtual ~Surface ()
 Surface destructor.
 
char * getSurfaceName ()
 Return the name of the surface. More...
 
int getUid () const
 Returns the unique ID auto-generated for the surface. More...
 
boundaryType getBoundaryType () const
 Returns this surface's boundary type. More...
 
surfaceType getSurfaceType () const
 Returns this surface's type (XPLANE, YPLANE, CIRCLE, etc.) More...
 
void setBoundaryType (boundaryType type)
 Sets the boundary type for this Surface. More...
 

Private Attributes

float _y
 

Additional Inherited Members

- Protected Attributes inherited from Surface
char * _surface_name
 
int _uid
 
surfaceType _surface_type
 
boundaryType _boundary_type
 
- Static Protected Attributes inherited from Surface
static int _n = 1
 

Detailed Description

The YPlane is a a plane perpendicular to the y-axis.

The YPlane represents planes perpendicular to the y-axis using the quadratic surface formulation. The YPlane is a Surface subclass.

Constructor & Destructor Documentation

YPlane::YPlane ( const char *  surface_name = (char*)"")

The YPlane constructor.

Parameters
surface_namethe (optional) name of the surface

Assigns a default value of y=0 for the y-axis intersection point.

Member Function Documentation

float YPlane::computeParametrizedDistance ( neutron neutron)
virtual

Computes the parametrized distance to the YPlane along a neutron's trajectory.

The distance returned is a parametrized distance along the unit vectory defining the neutron's trajectory, not a Cartesian distance. If the neutron is traveling away from the surface then the distance returned will be infinity. The equation used to compute the parametrized distance $ d $ from a neutron at $ y $ traveling with component an y-component of its unit trajectory vector $ u $ to this xplane at $ y_0 $ is: $ d = \frac{y_0 - y}{u} $

Parameters
neutrona pointer to a neutron struct
Returns
the parametrized distance to the surface along the neutron's trajectory

Implements Surface.

float YPlane::evaluate ( neutron neutron)
virtual

Returns the evaluation of a neutron's coordinates $ (x,y) $ with respect to the quadratic surface representing this y-plane: $ f(x,y) = qy + d = y - y_0 $.

Parameters
neutronthe neutron of interest

Implements Surface.

float YPlane::evaluate ( float  x,
float  y,
float  z 
)
virtual

Returns the evaluation of a neutron's coordinates $ (x,y,z) $ with respect to the quadratic surface representing this y-plane: $ f(x,y,z) = qy + d = y - y_0 $.

Parameters
xthe x-coordinate of interest
ythe y-coordinate of interest
zthe z-coordinate of interest

Implements Surface.

float YPlane::getY ( )

Returns the y-coordinate of the plane's intersection point with the y-axis.

Returns
the y-coordinate of the intersection point
bool YPlane::onSurface ( neutron neutron)
virtual

Checks whether a neutron is on the YPlane.

The threshold used to compute whether or not a neutron is on the on the YPlane is 1E-6 for the difference between the y-coordinate of the neutron's position and the location of the YPlane

Parameters
neutronthe neutron of interest to check
Returns
true if on the YPlane, otherwise false

Implements Surface.

void YPlane::reflectNeutron ( neutron neutron)
virtual

Perfectly reflects a neutron at a yplane.

Parameters
neutronthe neutron of interest

Implements Surface.

void YPlane::setY ( float  y)

Sets the x-coordinate of the plane's intersection point with the y-axis.

Parameters
ythe y-coordinate of the intersectiont point

Member Data Documentation

float YPlane::_y
private

The location of the plane's intersection with the y-axis


The documentation for this class was generated from the following files: