Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laser circular polarization #1191

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading