Field types

Basic field types

ElectricFields.LinearFieldType
LinearField

Linearly polarized field, i.e. the field amplitude is scalar. Consisting of a peak vector potential, a vector envelope, and a carrier, which has to be a LinearCarrier.

Examples

julia> @field(A) do
       I₀ = 1e14u"W/cm^2"
       λ = 800.0u"nm"
       τ = 6.2u"fs"
       tmax = 20.0u"fs"
       end
Linearly polarized field with
  - I₀ = 2.8495e-03 au = 1.0e14 W cm^-2 =>
    - E₀ = 5.3380e-02 au = 27.4492 GV m^-1
    - A₀ = 0.9372 au
  – a Fixed carrier @ λ = 800.0000 nm (T = 2.6685 fs, ω = 0.0570 Ha = 1.5498 eV, f = 374.7406 THz)
  – and a Gaussian envelope of duration 6.2000 fs (intensity FWHM; ±8.11σ)
  – and a bandwidth of 0.0108 Ha = 294.3469 meV ⟺ 71.1728 THz ⟺ 2871.2568 Bohr = 151.9404 nm
  – Uₚ = 0.2196 Ha = 5.9759 eV => α = 16.4562 Bohr = 870.8242 pm

julia> @field(B) do
       I₀ = 0.05
       ω = 1.0
       ramp = 1.0
       flat = 3.0
       env = :trapezoidal
       end
Linearly polarized field with
  - I₀ = 5.0000e-02 au = 1.7547226e15 W cm^-2 =>
    - E₀ = 2.2361e-01 au = 114.9832 GV m^-1
    - A₀ = 0.2236 au
  – a Fixed carrier @ λ = 45.5634 nm (T = 151.9830 as, ω = 1.0000 Ha = 27.2114 eV, f = 6.5797 PHz)
  – and a /1‾3‾1\ cycles trapezoidal envelope
  – and a bandwidth of Inf Ha = Inf eV ⟺ Inf Hz ⟺ Inf Bohr = Inf m
  – Uₚ = 0.0125 Ha = 340.1423 meV => α = 0.2236 Bohr = 11.8328 pm
source
ElectricFields.TransverseFieldType
TransverseField

Transversely polarized field, i.e the polarization vector is confined to the plane that is perpendicular to the direction of propagation. If the propagation vector is not rotated, this plane is the $z-x$, with $z$ by convention being the principal polarization axis, and $y$ is the direction of propagation.

The formal definition is

\[\vec{A}(t)\defd A_0 f(t) \Im\{\vec{J}\exp[\im(\omega t + \phi)]\},\]

using the complex-valued Jones vector $\vec{J}$, but in practice, we use a rotation matrix $\mat{R}$ and the Carriers give the amplitudes in the canonical, unrotated coordinate sytem:

\[\vec{A}(t) = A_0 f(t) \mat{R}\vec{C}(t).\]

Examples

julia> # Circularly polarized field

julia> @field(A) do
       I₀ = 1e14u"W/cm^2"
       λ = 800.0u"nm"
       τ = 6.2u"fs"
       tmax = 20.0u"fs"
       ξ = 1.0
       end
Transversely polarized field with
  - I₀ = 2.8495e-03 au = 1.0e14 W cm^-2 =>
    - E₀ = 5.3380e-02 au = 27.4492 GV m^-1
    - A₀ = 0.9372 au
  – a Elliptical carrier with ξ = 1.00 (RCP) @ λ = 800.0000 nm (T = 2.6685 fs, ω = 0.0570 Ha = 1.5498 eV, f = 374.7406 THz)
  – and a Gaussian envelope of duration 6.2000 fs (intensity FWHM; ±8.11σ)
  – and a bandwidth of 0.0108 Ha = 294.3469 meV ⟺ 71.1728 THz ⟺ 2871.2568 Bohr = 151.9404 nm
  – Uₚ = 0.2196 Ha = 5.9759 eV => α = 16.4562 Bohr = 870.8242 pm

julia> # Linearly polarized field, but explicitly in 3D

julia> @field(B) do
       I₀ = 1e14u"W/cm^2"
       λ = 800.0u"nm"
       τ = 6.2u"fs"
       tmax = 20.0u"fs"
       kind = :transverse
       end
Transversely polarized field with
  - I₀ = 2.8495e-03 au = 1.0e14 W cm^-2 =>
    - E₀ = 5.3380e-02 au = 27.4492 GV m^-1
    - A₀ = 0.9372 au
  – a LinearTransverseCarrier: Fixed carrier @ λ = 800.0000 nm (T = 2.6685 fs, ω = 0.0570 Ha = 1.5498 eV, f = 374.7406 THz)
  – and a Gaussian envelope of duration 6.2000 fs (intensity FWHM; ±8.11σ)
  – and a bandwidth of 0.0108 Ha = 294.3469 meV ⟺ 71.1728 THz ⟺ 2871.2568 Bohr = 151.9404 nm
  – Uₚ = 0.2196 Ha = 5.9759 eV => α = 16.4562 Bohr = 870.8242 pm

julia> # Linearly polarized field, rotated

julia> @field(C) do
       I₀ = 1e14u"W/cm^2"
       λ = 800.0u"nm"
       τ = 6.2u"fs"
       tmax = 20.0u"fs"
       rotation = π/3, [0,0,1]
       end
Transversely polarized field with
  - I₀ = 2.8495e-03 au = 1.0e14 W cm^-2 =>
    - E₀ = 5.3380e-02 au = 27.4492 GV m^-1
    - A₀ = 0.9372 au
  – a LinearTransverseCarrier: Fixed carrier @ λ = 800.0000 nm (T = 2.6685 fs, ω = 0.0570 Ha = 1.5498 eV, f = 374.7406 THz)
  – a Gaussian envelope of duration 6.2000 fs (intensity FWHM; ±8.11σ)
  – and a rotation of 0.33π about [0.000, 0.000, 1.000]
  – and a bandwidth of 0.0108 Ha = 294.3469 meV ⟺ 71.1728 THz ⟺ 2871.2568 Bohr = 151.9404 nm
  – Uₚ = 0.2196 Ha = 5.9759 eV => α = 16.4562 Bohr = 870.8242 pm
source
ElectricFields.ConstantFieldType
ConstantField(tmax, E₀)

The field amplitude of a constant field is defined as

\[F(t) = \begin{cases} E_0, & 0 \leq t \leq t_{\textrm{max}}, \\ 0, & \textrm{else}, \end{cases} \implies A(t) = \begin{cases} -E_0t, & 0 \leq t \leq t_{\textrm{max}}, \\ A(t_{\textrm{max}}), & t_{\textrm{max}} < t, \\ 0, & \textrm{else}. \end{cases}\]

Since the vector potential is non-zero at the end of the pulse, this is a non-propagating field, i.e. it does not correspond to a freely propagating pulse. It however corresponds to the field in an idealized capacitor, i.e. two plates of opposite charge.

Example

julia> @field(F) do
       I₀ = 1e13u"W/cm^2"
       tmax = 3.0u"fs"
       kind = :constant
       end
Constant field of
  - 124.0241 jiffies = 3.0000 fs duration, and
  - E₀ = 1.6880e-02 au = 8.6802 GV m^-1
source
ElectricFields.RampType
Ramp(tmax, E₀, f, name)

The field amplitude of a ramp is defined as

\[F(t) = \begin{cases} E_0f'(\tau), & 0 \leq t_{\textrm{max}}, \\ 0, \textrm{else}, \end{cases} \implies A(t) = \begin{cases} -E_0t_{\textrm{max}}f(\tau), & 0 \leq t \leq t_{\textrm{max}},\\ A(t_{\textrm{max}}), & t_{\textrm{max}} < t,\\ 0, & \textrm{else}, \end{cases} \quad \tau = \frac{t}{t_{\textrm{max}}}.\]

To define a new ramp, one thus only needs to define one function on the unit interval, $f(\tau)$ whose derivative $f'(\tau)$ rises from $0$ to $1$. Similar to ConstantField, Ramp is a non-propagating field, but is realizable in e.g. a capacitor.

Three kinds of ramps are predefined, :linear_ramp, :parabolic_ramp, :sin²_ramp (with the alias :sin2_ramp).

Examples

julia> @field(F) do
           E₀ = 1.0
           tmax = 4.0u"fs"
           kind = :sin²_ramp
       end
sin² up-ramp of
  - 165.3655 jiffies = 4.0000 fs duration, and
  - E₀ = 1.0000e+00 au = 514.2207 GV m^-1

julia> @field(F) do
           E₀ = 1.0
           tmax = 4.0u"fs"
           kind = :linear_ramp
           ramp = :down
       end
Linear down-ramp of
  - 165.3655 jiffies = 4.0000 fs duration, and
  - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
source

Arithmetic

ElectricFields.SumFieldType
SumField(a, b)

The linear combination of two fields a and b.

Example

julia> @field(A) do
           I₀ = 1.0
           T = 2.0
           σ = 3.0
           Tmax = 3.0
       end
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> @field(B) do
           I₀ = 0.5
           T = 1.0
           σ = 3.0
           Tmax = 3.0
       end
Linearly polarized field with
  - I₀ = 5.0000e-01 au = 1.7547226e16 W cm^-2 =>
    - E₀ = 7.0711e-01 au = 363.6089 GV m^-1
    - A₀ = 0.1125 au
  – a Fixed carrier @ λ = 7.2516 nm (T = 24.1888 as, ω = 6.2832 Ha = 170.9742 eV, f = 41.3414 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±1.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 8.5598 Bohr = 452.9627 pm
  – Uₚ = 0.0032 Ha = 86.1591 meV => α = 0.0179 Bohr = 947.8211 fm

julia> A+B
┌ Linearly polarized field with
│   - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
│     - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
│     - A₀ = 0.3183 au
│   – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
│   – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
│   – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
│   – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm
⊕
│ Linearly polarized field with
│   - I₀ = 5.0000e-01 au = 1.7547226e16 W cm^-2 =>
│     - E₀ = 7.0711e-01 au = 363.6089 GV m^-1
│     - A₀ = 0.1125 au
│   – a Fixed carrier @ λ = 7.2516 nm (T = 24.1888 as, ω = 6.2832 Ha = 170.9742 eV, f = 41.3414 PHz)
│   – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±1.00σ)
│   – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 8.5598 Bohr = 452.9627 pm
└   – Uₚ = 0.0032 Ha = 86.1591 meV => α = 0.0179 Bohr = 947.8211 fm
source
ElectricFields.NegatedFieldType
NegatedField(a)

Represents a field whose vector_potential is the negative of that of a.

Example

julia> @field(A) do
           I₀ = 1.0
           T = 2.0
           σ = 3.0
           Tmax = 3.0
       end
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> B = -A
ElectricFields.NegatedField{ElectricFields.LinearField{ElectricFields.FixedCarrier{Quantity{Float64, 𝐋, Unitful.FreeUnits{(Eₕ^-1, ħ, c), 𝐋, nothing}}, Quantity{Float64, 𝐓, Unitful.FreeUnits{(Eₕ^-1, ħ), 𝐓, nothing}}, Float64, Int64}, ElectricFields.GaussianEnvelope{Float64}, Float64}}(Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm)

julia> field_amplitude(A, 0.5)
0.008830294133325867

julia> field_amplitude(B, 0.5)
-0.008830294133325867

julia> field_amplitude(A-A, 0.5)
0.0
source
ElectricFields.DelayedFieldType
DelayedField(a, t₀)

Represents a delayed copy of a, that appears at time t₀ instead of at 0, i.e. t₀>0 implies the field comes later.

Examples

julia> @field(A) do
           I₀ = 1.0
           T = 2.0
           σ = 3.0
           Tmax = 3.0
       end
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> delay(A, 1u"fs")
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm
  – delayed by 41.3414 jiffies = 1.0000 fs

julia> delay(A, 1.0)
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm
  – delayed by 1.0000 jiffies = 24.1888 as

julia> delay(A, π*u"rad")
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm
  – delayed by 1.0000 jiffies = 24.1888 as
source
ElectricFields.PaddedFieldType
  PaddedField(field, a, b)

Wrapper around any electric field, padded with a units of time before, and b units of time after the ordinary span of the field.

Example

julia> @field(A) do
           I₀ = 1.0
           T = 2.0
           σ = 3.0
           Tmax = 3.0
       end
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> B = PaddedField(A, 10.0, 30.0)
Padding before 10.0000 jiffies = 241.8884 as and after 30.0000 jiffies = 725.6653 as of
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> span(A), span(B)
(-6.0 .. 6.0, -16.0 .. 36.0)
source
ElectricFields.WindowedFieldType
WindowedField(field, a, b)

Wrapper around any electric field, windowed such that it is zero outside the time interval a..b.

Example

julia> @field(A) do
           I₀ = 1.0
           T = 2.0
           σ = 3.0
           Tmax = 3.0
       end
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> B = WindowedField(A, -3, 5)
Window from -3.0000 jiffies = -72.5665 as to 5.0000 jiffies = 120.9442 as of
Linearly polarized field with
  - I₀ = 1.0000e+00 au = 3.5094452e16 W cm^-2 =>
    - E₀ = 1.0000e+00 au = 514.2207 GV m^-1
    - A₀ = 0.3183 au
  – a Fixed carrier @ λ = 14.5033 nm (T = 48.3777 as, ω = 3.1416 Ha = 85.4871 eV, f = 20.6707 PHz)
  – and a Gaussian envelope of duration 170.8811 as (intensity FWHM; ±2.00σ)
  – and a bandwidth of 0.3925 Ha = 10.6797 eV ⟺ 2.5823 PHz ⟺ 34.2390 Bohr = 1.8119 nm
  – Uₚ = 0.0253 Ha = 689.2724 meV => α = 0.1013 Bohr = 5.3617 pm

julia> span(A), span(B)
(-6.0 .. 6.0, -3.0 .. 5.0)

julia> field_amplitude(A, -4)
-0.6395632362683398

julia> field_amplitude(B, -4)
0.0
source