Skip to content

Commit

Permalink
Laser circular polarization (#1191)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxThevenet authored Dec 18, 2024
1 parent 3d0e4af commit 9b84317
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/laser/MultiLaser.H
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private:
* the central wavelength influences the solver. As long as all the lasers are on the same grid
* (part of MultiLaser), this must be a property of MultiLaser. */
amrex::Real m_lambda0 {0.};
bool m_linear_polarization {true}; /**< Whether polarization is linear. Otherwise, circular */
amrex::Vector<std::string> m_names {"no_laser"}; /**< name of the laser */
int m_nlasers; /**< Number of laser pulses */
amrex::Vector<Laser> m_all_lasers; /**< Each is a laser pulse */
Expand Down
10 changes: 9 additions & 1 deletion src/laser/MultiLaser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ MultiLaser::ReadParameters ()
if (!m_use_laser) return;
queryWithParser(pp, "lambda0", m_lambda0);
DeprecatedInput("lasers", "3d_on_host", "comms_buffer.on_gpu", "", true);
std::string polarization = "linear";
queryWithParser(pp, "polarization", polarization);
AMREX_ALWAYS_ASSERT(polarization == "linear" || polarization == "circular");
m_linear_polarization = polarization == "linear";
queryWithParser(pp, "use_phase", m_use_phase);
queryWithParser(pp, "solver_type", m_solver_type);
AMREX_ALWAYS_ASSERT(m_solver_type == "multigrid" || m_solver_type == "fft");
Expand Down Expand Up @@ -250,6 +254,7 @@ MultiLaser::UpdateLaserAabs (const int islice, const int current_N_level, Fields
const int y_lo = m_slice_box.smallEnd(1);
const int y_hi = m_slice_box.bigEnd(1);

const bool linear_polarization = m_linear_polarization;
amrex::ParallelFor(
amrex::TypeList<amrex::CompileTimeOptions<0, 1, 2, 3>>{},
{m_interp_order},
Expand Down Expand Up @@ -279,7 +284,10 @@ MultiLaser::UpdateLaserAabs (const int islice, const int current_N_level, Fields
}
}
}

// The ponderomotive force is 2x larger in circular polarization:
// - circular: <|a|^2> = <|a_env|^2>
// - linear : <|a|^2> = <|a_env|^2 * cos^2(k*z)> = <|a_env|^2> * 1/2
if (!linear_polarization) aabs *= 2;
field_arr(i,j) = aabs;
});
}
Expand Down

0 comments on commit 9b84317

Please sign in to comment.