Skip to content
Browse files

document DCAccelerator.pm and make estimation methods part of the Acc…

…elerator base class.
  • Loading branch information...
1 parent ba9dc2b commit 521a50a645379dfc20e4de31e06569040188db69 @jberger committed Oct 24, 2012
Showing with 51 additions and 8 deletions.
  1. +17 −1 lib/Physics/UEMColumn/Accelerator.pm
  2. +34 −7 lib/Physics/UEMColumn/DCAccelerator.pm
View
18 lib/Physics/UEMColumn/Accelerator.pm
@@ -13,6 +13,14 @@ method field () {
return 0;
}
+method est_exit_vel () {
+ return 0;
+}
+
+method est_exit_time () {
+ return 0;
+}
+
__PACKAGE__->meta->make_immutable;
1;
@@ -37,7 +45,7 @@ L<Physics::UEMColumn::Accelerator> is a base class for acceleration regions in a
=item C<location>
-unlike L<Physics::UEMColumn::Element>, accelerators' location defines the start of the region and defaults to a C<0>.
+Unlike L<Physics::UEMColumn::Element>, accelerators' location defines the start of the region and defaults to a C<0>.
=back
@@ -49,6 +57,14 @@ unlike L<Physics::UEMColumn::Element>, accelerators' location defines the start
Returns a field strength possibly derived from other attributes. In this base class it simply returns zero. This method is intended to be redefined on subclassing.
+=item C<est_exit_vel>
+
+Returns an estimate of the velocity of the pulse on exiting the region. This in not likely to be exact. It is used in estimating the end time of the simulation. The base class' implementation returns zero and is intended to be subclassed.
+
+=item C<est_exit_time>
+
+Returns an estimate of the time that the pulse on exits the region. This in not likely to be exact. It is used in estimating the end time of the simulation. The base class' implementation returns zero and is intended to be subclassed.
+
=back
=head1 SOURCE REPOSITORY
View
41 lib/Physics/UEMColumn/DCAccelerator.pm
@@ -78,26 +78,53 @@ __PACKAGE__->meta->make_immutable;
=head1 NAME
-Physics::UEMColumn::Element - A class representing a DC acceleration region in a UEM system
+Physics::UEMColumn::DCAccelerator - A class representing a DC acceleration region in a UEM system
=head1 SYNOPSIS
- use Physics::UEMColumn alias => ':standard';
- my $acc = DCAccelerator->new(
-
- );
+ use Physics::UEMColumn alias => ':standard';
+ my $acc = DCAccelerator->new(
+ length => '20 mm',
+ voltage => '20 kilovolts',
+ );
=head1 DESCRIPTION
-L<Physics::UEMColumn::Accelerator> is a class representing a DC (static electric field) acceleration region in a UEM system It is itself a subclass of L<Physics::UEMColumn::Element> and inherits its attributes and methods. Additionally it provides:
+L<Physics::UEMColumn::Accelerator> is a class representing a DC (static electric field) acceleration region in a UEM system. It is a subclass of L<Physics::UEMColumn::Accelerator> and inherits its attributes and methods. Additionally it provides:
+
+=head1 ATTRIBUTES
+
+=over
+
+=item C<voltage>
+
+The static electric potential in the accelerator. Unit: V
+
+=item C<sharpness>
+
+The potential is modeled as a C<tanh>, this parameter (defaults to 10) is related to the slope of the tanh near the end of the region. For example a value approaching infinity approximates a step function.
+
+=back
=head1 METHODS
=over
=item C<field>
-Returns a field strength possibly derived from other attributes. In this base class it simply returns zero. This method is intended to be redefined on subclassing.
+Defined as C<voltage> / C<length>
+
+=item C<effect>
+
+Returns an hash reference of effect subroutine references (C<M_t>, C<M_z>, C<acc_z>). See L<Physics::UEMColumn::Element/METHODS> for more.
+
+=item C<est_exit_vel>
+
+Returns an estimate of the velocity of the pulse on exiting the region. This in not likely to be exact. It is used in estimating the end time of the simulation. This overrides the base class and is specific to DC accelerators.
+
+=item C<est_exit_time>
+
+Returns an estimate of the time that the pulse on exits the region. This in not likely to be exact. It is used in estimating the end time of the simulation. This overrides the base class and is specific to DC accelerators.
=back

0 comments on commit 521a50a

Please sign in to comment.
Something went wrong with that request. Please try again.