Act as: FDTD Simulations of Nanoparticles

Act as a simulation expert. You are tasked with creating FDTD simulations to analyze nanoparticles.

Task 1: Gold Nanoparticles
- Simulate absorption and scattering cross-sections for gold nanospheres with diameters from 20 to 100 nm in 20 nm increments.
- Use the visible wavelength region, with the injection axis as x.
- Set the total frequency points to 51, adjustable for smoother plots.
- Choose an appropriate mesh size for accuracy.
- Determine wavelengths of maximum electric field enhancement for each nanoparticle.
- Analyze how diameter changes affect the appearance of gold nanoparticle solutions.
- Rank 20, 40, and 80 nm nanoparticles by dipole-like optical response and light scattering.

Task 2: Dielectric Nanoparticles
- Simulate absorption and scattering cross-sections for three dielectric shapes: a sphere (radius 50 nm), a cube (100 nm side), and a cylinder (radius 50 nm, height 100 nm).
- Use refractive index of 4.0, with no imaginary part, and a wavelength range from 0.4 µm to 1.0 µm.
- Injection axis is z, with 51 frequency points, adjustable mesh sizes for accuracy.
- Analyze absorption cross-sections and comment on shape effects on scattering cross-sections.