29
29
30
30
namespace picongpu
31
31
{
32
- /* * Load pre-defined background field */
32
+ /* Load pre-defined background field */
33
33
namespace templates
34
34
{
35
- /* * Traveling-wave Thomson scattering laser pulse */
35
+ /* Traveling-wave Thomson scattering laser pulse */
36
36
namespace twts
37
37
{
38
38
39
39
class BField
40
40
{
41
41
public:
42
42
typedef float_X float_T;
43
-
43
+
44
+ enum PolarizationType
45
+ {
46
+ /* The linear polarization of the TWTS laser is defined
47
+ * relative to the plane of the pulse front tilt (reference plane).
48
+ *
49
+ * Polarisation is normal to the reference plane.
50
+ * Use Ex-fields (and corresponding B-fields) in TWTS laser internal coordinate system.
51
+ */
52
+ LINEAR_X = 1u ,
53
+ /* Polarization lies within the reference plane.
54
+ * Use Ey-fields (and corresponding B-fields) in TWTS laser internal coordinate system.
55
+ */
56
+ LINEAR_YZ = 2u ,
57
+ };
58
+
44
59
/* Center of simulation volume in number of cells */
45
60
PMACC_ALIGN (halfSimSize,DataSpace<simDim>);
46
61
/* y-position of TWTS coordinate origin inside the simulation coordinates [meter]
47
- The other origin coordinates (x and z) default to globally centered values
48
- with respect to the simulation volume. */
62
+ * The other origin coordinates (x and z) default to globally centered values
63
+ * with respect to the simulation volume.
64
+ */
49
65
const PMACC_ALIGN (focus_y_SI,float_64);
50
66
/* Laser wavelength [meter] */
51
67
const PMACC_ALIGN (wavelength_SI,float_64);
@@ -69,14 +85,17 @@ class BField
69
85
/* TWTS laser time delay */
70
86
PMACC_ALIGN (tdelay,float_64);
71
87
/* Should the TWTS laser time delay be chosen automatically, such that
72
- the laser gradually enters the simulation volume? [Default: TRUE] */
88
+ * the laser gradually enters the simulation volume? [Default: TRUE]
89
+ */
73
90
const PMACC_ALIGN (auto_tdelay,bool );
74
-
91
+ /* Polarization of TWTS laser */
92
+ const PMACC_ALIGN (pol,PolarizationType);
93
+
75
94
/* * Magnetic field of the TWTS laser
76
95
*
77
96
* \param focus_y_SI the distance to the laser focus in y-direction [m]
78
97
* \param wavelength_SI central wavelength [m]
79
- * \param pulselength_SI sigma of std. gauss for intensity (E^2),
98
+ * \param pulselength_SI sigma of std. gauss for intensity (E^2),
80
99
* pulselength_SI = FWHM_of_Intensity / 2.35482 [seconds (sigma)]
81
100
* \param w_x beam waist: distance from the axis where the pulse electric field
82
101
* decreases to its 1/e^2-th part at the focus position of the laser [m]
@@ -88,6 +107,8 @@ class BField
88
107
* \param tdelay_user manual time delay if auto_tdelay is false
89
108
* \param auto_tdelay calculate the time delay such that the TWTS pulse is not
90
109
* inside the simulation volume at simulation start timestep = 0 [default = true]
110
+ * \param pol determines the TWTS laser polarization, which is either normal or parallel
111
+ * to the laser pulse front tilt plane [ default= LINEAR_X , LINEAR_YZ ]
91
112
*/
92
113
HINLINE
93
114
BField ( const float_64 focus_y_SI,
@@ -98,9 +119,10 @@ class BField
98
119
const float_X phi = 90 .*(PI / 180 .),
99
120
const float_X beta_0 = 1.0 ,
100
121
const float_64 tdelay_user_SI = 0.0 ,
101
- const bool auto_tdelay = true );
102
-
103
-
122
+ const bool auto_tdelay = true ,
123
+ const PolarizationType pol = LINEAR_X );
124
+
125
+
104
126
/* * Specify your background field B(r,t) here
105
127
*
106
128
* \param cellIdx The total cell id counted from the start at t=0
@@ -109,21 +131,41 @@ class BField
109
131
operator ()( const DataSpace<simDim>& cellIdx,
110
132
const uint32_t currentStep ) const ;
111
133
112
- /* * Calculate the By(r,t) field here
134
+ /* * Calculate the By(r,t) field, when electric field vector (Ex,0,0)
135
+ * is normal to the pulse-front-tilt plane (y,z)
113
136
*
114
137
* \param pos Spatial position of the target field.
115
138
* \param time Absolute time (SI, including all offsets and transformations)
116
139
* for calculating the field */
117
140
HDINLINE float_T
118
141
calcTWTSBy ( const float3_64& pos, const float_64 time ) const ;
119
142
120
- /* * Calculate the Bz(r,t) field here
143
+ /* * Calculate the Bz(r,t) field, when electric field vector (Ex,0,0)
144
+ * is normal to the pulse-front-tilt plane (y,z)
145
+ *
146
+ * \param pos Spatial position of the target field.
147
+ * \param time Absolute time (SI, including all offsets and transformations)
148
+ * for calculating the field */
149
+ HDINLINE float_T
150
+ calcTWTSBz_Ex ( const float3_64& pos, const float_64 time ) const ;
151
+
152
+ /* * Calculate the By(r,t) field, when electric field vector (0,Ey,0)
153
+ * lies within the pulse-front-tilt plane (y,z)
154
+ *
155
+ * \param pos Spatial position of the target field.
156
+ * \param time Absolute time (SI, including all offsets and transformations)
157
+ * for calculating the field */
158
+ HDINLINE float_T
159
+ calcTWTSBx ( const float3_64& pos, const float_64 time ) const ;
160
+
161
+ /* * Calculate the Bz(r,t) field here (electric field vector (0,Ey,0)
162
+ * lies within the pulse-front-tilt plane (y,z)
121
163
*
122
164
* \param pos Spatial position of the target field.
123
165
* \param time Absolute time (SI, including all offsets and transformations)
124
166
* for calculating the field */
125
167
HDINLINE float_T
126
- calcTWTSBz ( const float3_64& pos, const float_64 time ) const ;
168
+ calcTWTSBz_Ey ( const float3_64& pos, const float_64 time ) const ;
127
169
128
170
/* * Calculate the B-field vector of the TWTS laser in SI units.
129
171
* \tparam T_dim Specializes for the simulation dimension
@@ -134,7 +176,17 @@ class BField
134
176
getTWTSBfield_Normalized (
135
177
const PMacc::math::Vector<floatD_64,detail::numComponents>& eFieldPositions_SI,
136
178
const float_64 time) const ;
137
-
179
+
180
+ /* * Calculate the B-field vector of the "in-plane" polarized TWTS laser in SI units.
181
+ * \tparam T_dim Specializes for the simulation dimension
182
+ * \param cellIdx The total cell id counted from the start at timestep 0
183
+ * \return B-field vector of the rotated TWTS field in SI units */
184
+ template <unsigned T_dim>
185
+ HDINLINE float3_X
186
+ getTWTSBfield_Normalized_Ey (
187
+ const PMacc::math::Vector<floatD_64,detail::numComponents>& eFieldPositions_SI,
188
+ const float_64 time) const ;
189
+
138
190
};
139
191
140
192
} /* namespace twts */
0 commit comments