Skip to content

Commit c002d2b

Browse files
committed
add comments
1 parent f452760 commit c002d2b

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/picongpu/include/fields/laserProfiles/laserPlaneWave.hpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,24 @@ namespace picongpu
3030
{
3131
/** plane wave (use periodic boundaries!)
3232
*
33-
* no phase shifts, no spacial envelope
33+
* no transversal spacial envelope
34+
* based on the electric potential
35+
* Phi = E_0 * exp(0.5 * (t-t_0)^2 / tau^2) * cos(t - t_0 - phi)
36+
* by applying t = x/c, the spatial derivative can be interchanged by the temporal derivative
37+
* resulting in:
38+
* E = E_0 * exp(...) * [sin(...) + t/tau^2 * cos(...)]
39+
* This ensures int_{-infinty}^{+infinty} E(x) = 0 for any phase.
40+
*
41+
* The plateau length needs to be set to a multiple of the wavelength,
42+
* otherwise the integral will not vanish.
3443
*/
3544
namespace laserPlaneWave
3645
{
37-
38-
/** Compute the
46+
/** calculates longitudinal field distribution
3947
*
48+
* @param currentStep
49+
* @param phase
50+
* @return
4051
*/
4152
HINLINE float3_X laserLongitudinal( uint32_t currentStep, float_X& phase )
4253
{
@@ -46,10 +57,6 @@ namespace picongpu
4657
double envelope = double(AMPLITUDE );
4758
float3_X elong(float3_X::create(0.0));
4859

49-
// a NON-symmetric (starting with phase=0) pulse will be initialized at position z=0 for
50-
// a time of RAMP_INIT * PULSE_LENGTH + LASER_NOFOCUS_CONSTANT = INIT_TIME.
51-
// we shift the complete pulse for the half of this time to start with
52-
// the front of the laser pulse.
5360
const double mue = 0.5 * RAMP_INIT * PULSE_LENGTH;
5461

5562
const double w = 2.0 * PI * f;
@@ -78,6 +85,7 @@ namespace picongpu
7885

7986
const double timeOszi = runTime - endUpramp;
8087
const double t_and_phase = w * timeOszi + LASER_PHASE;
88+
// to understand both components [sin(...) + t/tau^2 * cos(...)] see description above
8189
if( Polarisation == LINEAR_X )
8290
{
8391
elong.x() = float_X( envelope * (math::sin(t_and_phase)
@@ -102,7 +110,7 @@ namespace picongpu
102110
return elong;
103111
}
104112

105-
/**
113+
/** calculates transversal field distribution
106114
*
107115
* @param elong
108116
* @param phase

0 commit comments

Comments
 (0)