Gold nanoparticle in homogeneous medium
Solution (skip discussion - go to solution)_
The most simple case of particle in homogenious medium will be described. This simulations can be applied to modeling of chemically sintesized colloidal nanoparticles in solution.
Step 1. Geometry modeling
Geometry will consist four concentric spheres. The smallest with radius 30nm represents gold colloidal particle. One with 250nm radius is used for integration of the far-fields for calculation of scattering cross-section. 300nm radius sphere represents the interface between our domain of interest and perfectly matched layer (PML). Finally, the biggest, 350nm sphere, is the outer PML border.
Step 2. Domain characterization
Subdomains are characterized with optical properties, and now on, we will use refractive indices N. For the gold nanoparticle I will put complex value of refractive index, in the form N=n-j*k, that corresponds to the wavelength of the excitation. The rest of subdomains are N=1, while PML subdomain has to be defined as spherical PML. (Note that PML has to be made of the same material as the adjacent subdomain.)
Step 3. Setting excitation
Excitation can be set in 2 ways. In the sub-menu Physics, beside setting wavelength(frequency) in the edit field lambda0_rfw, there are fields E0ix_rfw, E0iy_rfw,E0iz_rfw that correspond to x,y and z components of the excitation. I will chose by default plane wave traveling in z-direction, by setting E0ix_rfw=1*exp(-j*k0_rfw*nair*z), the other 2 components are 0. (Note that you can analytically describe your excitation as pleased, for example, Gaussian beam or some sort of superposition, etc.)
Step 4. Seting boundary conditions
Outer boundary of PML is defined as SCATTERING Boundary Condition (Scattering BC), with no excitation defined, for spherical waves. This works very well in combination with PML. They role is to prevent any reflection of the scattered waves from the boundary that enclosed the model. Since reflection occur on the interface between different materials, it is important that PML has refractive index of adjacent media.
Other method of defining excitation is by Scattering BC, where you can define your excitation. I recommend to use former way, or to check carefully what is represented by each edit field in SBC tab. (Note that when defining variables in BC menu, some of them might be defined in normal direction to the surface, and not in direction of axis (Beta in PORT BC, see page X.))
Select all boundaries that make 250nm radius sphere, and press Far-Field tab. There u just need to set far-field variable name, and to press apply. After solving, you will have that variable in the list when plotting, and it is calculated by embedded Straton-Chu formula. (we´ll get back to it later in more details.)
Other method of defining excitation is by Scattering BC, where you can define your excitation. I recommend to use former way, or to check carefully what is represented by each edit field in SBC tab. (Note that when defining variables in BC menu, some of them might be defined in normal direction to the surface, and not in direction of axis (Beta in PORT BC, see page X.))
Select all boundaries that make 250nm radius sphere, and press Far-Field tab. There u just need to set far-field variable name, and to press apply. After solving, you will have that variable in the list when plotting, and it is calculated by embedded Straton-Chu formula. (we´ll get back to it later in more details.)
Step 5. Meshing preparation
Meshing is very important, and will be covered throughout the website.
Before starting dealing with meshing, we should divide our geometry with x=0,y=0 and z=0 planes. This is important for many reasons: to be able to mesh symmetrically some of the objects they should be divided through symmetry axis; when using symmetry to save CPU and memory usage. Here it is important for PML meshing as we will see.
To do it, go to Draw menu, and click Working plane, and choose x=0. Now Geometry 2 is active, and it is 2D, while Geometry 1 is our 3D. Draw rectangle bigger than actual geometry (side > 700nm), and press Draw/Embed. Now Geometry 1 will be active, select all geometry objects (or only the biggest sphere and rectangle; this is better cause then you can modify geometry inside.), and press Draw/Coerce to/Solid. Do the same for planes y=0 and z=0.
Before starting dealing with meshing, we should divide our geometry with x=0,y=0 and z=0 planes. This is important for many reasons: to be able to mesh symmetrically some of the objects they should be divided through symmetry axis; when using symmetry to save CPU and memory usage. Here it is important for PML meshing as we will see.
To do it, go to Draw menu, and click Working plane, and choose x=0. Now Geometry 2 is active, and it is 2D, while Geometry 1 is our 3D. Draw rectangle bigger than actual geometry (side > 700nm), and press Draw/Embed. Now Geometry 1 will be active, select all geometry objects (or only the biggest sphere and rectangle; this is better cause then you can modify geometry inside.), and press Draw/Coerce to/Solid. Do the same for planes y=0 and z=0.
Step 6. Meshing
The first rule is to have at least 10 elements per wavelength in the direction of the excitation propagation. Actually, propagation direction condition is more strict when calculating TOTAL field, see later. Let´s say that we should have 10 elements per wavelength, and that will be our starting point.
I strongly recommend to use symmetrical meshing whenever is possible, because solution might strongly depend on it, especially when working with Periodic BCs. To mesh any object symmetrically, first we have to mesh its edges carefully, and then to mesh boundaries manually using BOUNDARY MESH COPY. In Example 1, only colloidal nanoparticle was meshed carefully, edges with maximum element size of 5nm, boundaries are meshed symmetrically. The rest of geometry is meshed automatically, although I recommend to apply the same procedure. (There will be separate section about step to step meshing). Once edges and boundaries are meshed (do not do that with outher PML boundaries), select all subdomains except PMLs, and press Mesh Selected.
For PMLs it is recommended to use Swept mesh. In spherical geometry as here, dividing geometry as in step 5. is condition to be able to use swept mesh (Thanks to COMSOL support). After selecting PML domains and setting layer numbers to 5, by pressing Mesh Selected, meshing is finished
I strongly recommend to use symmetrical meshing whenever is possible, because solution might strongly depend on it, especially when working with Periodic BCs. To mesh any object symmetrically, first we have to mesh its edges carefully, and then to mesh boundaries manually using BOUNDARY MESH COPY. In Example 1, only colloidal nanoparticle was meshed carefully, edges with maximum element size of 5nm, boundaries are meshed symmetrically. The rest of geometry is meshed automatically, although I recommend to apply the same procedure. (There will be separate section about step to step meshing). Once edges and boundaries are meshed (do not do that with outher PML boundaries), select all subdomains except PMLs, and press Mesh Selected.
For PMLs it is recommended to use Swept mesh. In spherical geometry as here, dividing geometry as in step 5. is condition to be able to use swept mesh (Thanks to COMSOL support). After selecting PML domains and setting layer numbers to 5, by pressing Mesh Selected, meshing is finished
Step 7. Choosing solver
This depend on your CPU and memory resources.
If you don´t have any idea, mesh your geometry very coarse and pick one solver and see if you heave enough memory or if it is solving in reasonable time.
First try direct solvers if your meshing consist of less than 20-30.000 elements. They are fast, and my favorite is PARADISO.
If you are getting OUT OF MEMORY error try iterative solvers, they are slow, they can go crazy, and they can sometimes not converge. I was using before GMRES.
Estimation: PAR(A)DISO, 20.000 elements, 2GB of RAM should be more then enough.
Solution
If you don´t have any idea, mesh your geometry very coarse and pick one solver and see if you heave enough memory or if it is solving in reasonable time.
First try direct solvers if your meshing consist of less than 20-30.000 elements. They are fast, and my favorite is PARADISO.
If you are getting OUT OF MEMORY error try iterative solvers, they are slow, they can go crazy, and they can sometimes not converge. I was using before GMRES.
Estimation: PAR(A)DISO, 20.000 elements, 2GB of RAM should be more then enough.
Solution