## Nanoparticle in inhomogeneous medium - substrate case (part II)

Here, I will show how to describe excitation in case of inhomogeneous
medium surrounding nanoparticle, I will cover the most simple, but at
the same time, the most important case-nanoparticle on dielectric
substrate (glass).

Majority of the steps are analogous to Example 1, and will not be described into details.

Majority of the steps are analogous to Example 1, and will not be described into details.

## skip discussion - go to solution

(click)

## Testing analytical definition of excitation

To learn how to define excitation in substrate case, I highly recommend to review Fresnel coefficients. You can find derivation of the analytical formula on this website, and it is adopted to be used in COMSOL (copy-paste will work). Without knowing Fresnel coefficients, you should not even think of using COMSOL!!!!

First, I will demonstrate how to define excitation in a simple geometry without scattering nanoparticle. Later, I will solve one model with metallic nanorod under oblique incidence.

First, I will demonstrate how to define excitation in a simple geometry without scattering nanoparticle. Later, I will solve one model with metallic nanorod under oblique incidence.

## Test model

## Step 1. Geometry modeling

Draw two spheres, one can be 200nm radius, and other can be 250nm. Inner volume is our modeling space, and 50nm thick encapsulating layer will be PML. Since, we will need interface, go to 2D, and draw 500nm square in z=0 plane, and embed it into 3D geometry (Geometry 1). Select the square and the bigger spher and press Draw/Coerce to solid. Now we have 4 subdomains. You can also make 4 half-spheres, but it is more time consuming.

Same square should be embedded twice from x=0 and y=0, and coerced to solid with outern sphere, for the sweep meshing of PMLs. (See EXAMPLE 1.)

Same square should be embedded twice from x=0 and y=0, and coerced to solid with outern sphere, for the sweep meshing of PMLs. (See EXAMPLE 1.)

## Step 2. Domain characterization

Upper two half-spheres are describe by n2, and in this example n2=1. Other two are defined as n1=1.52. Excitation is plane wave incident from the n1 medium, thus coming from glass side. Outer subdomains are set as PML for spherical waves.

## Step 3. Setting excitation

Excitation has to be defined in the "Scalar variables" menu. After defining wavelength/frequency, you need to fill in fields E0ix, E0iy, E0iz. We will choose p-polarization (see page about Fresnel coefficients), thus E0iy=0. Now, we should copy/paste formula formFresnel coefficients page for E0ix and E0iz. Incident angle you can choose, but stay below critical angle, since n1>n2.

## Step 4. Setting boundary conditions

Outer boundary of PML is defined as SCATTERING Boundary Condition (Scattering BC), with no excitation defined, for spherical waves.

In this example defining far-field variables will be omitted, since there is no scattering object.

In this example defining far-field variables will be omitted, since there is no scattering object.

## Step 5. Meshing

Meshing will be refined in couple of steps, and we will observe the solution. PML is sweep meshed with 5 layers.

## Step 7. Choosing solver

I will use PAR(A)DISO (direct solver), since I will not force extremely fine meshing.