Skip to main content

How to set mesh?

1.Mesh type

Grid settings correspond to the spatial step sizes ∆x, ∆y, and ∆z in the iteration formula. Max-Optics Studio provides two mesh partitioning methods: Uniform and Auto Non-Uniform.

SolverFDEEMEFDTDdescription
UniformThe grid size in the x, y, and z directions are the same in the structure.
Auto Non-UniformThe size of the Auto Non-Uniform is determined by CPW (Cells Per Wavelength).

The grid size calculation formula for Auto Non-Uniform is as follows, where the λmin\lambda_{min} is the minimum wavelength in the simulation and the nmn_{m} is the material refractive index:

gridsize=λmin/nmCPWgridsize=\frac{\lambda_{min}/n_{m}}{CPW}

In the FDTD simulation, implementing a uniform grid is relatively simple because each grid cell is the same size, leading to lower algorithmic complexity and better stability. However, for complex geometries or regions requiring fine resolution, uniform grids can result in excessive computational and storage resource consumption, and may provide insufficient local accuracy where higher resolution is needed. The auto non-uniform grids address this by using smaller grid cells in critical areas to enhance computational precision, while larger grid cells in less critical areas reduce computational load and storage requirements, thereby improving overall computational efficiency. The auto non-uniform grids offer significant advantages in flexibility and resource utilization, making them particularly suitable for complex geometries and high-resolution scenarios. The default slection is auto non-uniform grids.

When the Mesh Type is set to Uniform, it divides the simulation area into equal dx, dy, and dz steps, which can be configured in the Mesh Step Settings.

Note that if local mesh is added and it has a finer grid than the global mesh, the uniform grid will automatically switch to non-uniform grid.

2.Cells Per Wavelength

The CPW (Cells Per Wavelength) value represents the number of grid cells per unit wavelength within the simulation region, using the minimum wavelength in the Source settings as the unit wavelength. The relationship between CPW and the commonly used mesh accuracy m is given by:

CPW=2+4mCPW=2+4*m

The specific numerical correspondence is shown in the table below:

Mesh Accuracy12345
Cells Per Wavelength of Max-Optics610141822

CPW setting recommendations for different waveguide dimensions:

1) The CPW is not greatly affected by waveguide dimensions; generally, setting the value of CPW as 14 or higher is recommended to meet accuracy requirements.

2) If only transmission is of concern, setting CPW to 22 or higher is usually not necessary (typically, setting the value of CPW as 18 is enough for achieving transmission accuracy within ±0.01 compared to higher value).

3) For more precise reflectance measurements (below -60 dB), it is recommended to set the value of CPW as 26 or higher.

3.Mesh Refinement

Mesh Refinement : This refers to the type of refined mesh used in calculations. By default, Curve Mesh is employed.

The Staircase method can compute any point within the Yee grid cell to determine which material fills that point, and the properties of that material are used to describe the E-field at that point. Consequently, the discrete structure fails to accurately represent structural variations within a single Yee cell, resulting in a staircase dielectric constant grid that aligns perfectly with Cartesian grids, which means that thicknesses cannot be resolved with better accuracy than dx.

Curve Mesh utilizes Faraday's law of electromagnetic induction, Ampère's circuital law, and boundary conditions involving curved material interfaces to compute corresponding equivalent material parameters. This approach allows for a more precise interpretation of material information at complex curved interfaces without altering the hexahedral (3D) or rectangular (2D) grid structures. By integrating equivalent material parameters that account for both material distribution and curved shapes, this technique offers a more accurate solution for complex curved boundaries compared to the traditional Staircase grid method.

The Curve Mesh addresses the limitations of traditional Staircase grids with complex curved structures in two key ways:

  1. Improved Accuracy Without Increased Computational Load: Equivalent material parameters can more precisely describe the information at curved material interfaces, eliminating the need for additional mesh refinement for such cases. This maintains computational efficiency while achieving high simulation accuracy.

  2. Seamless Integration with Existing Algorithms: As the calculation of equivalent material parameters is based on hexahedral and rectangular grids, there is no need to modify the FDTD algorithm formulas. Thus, the Curve Mesh Conformity technique can be seamlessly integrated with existing algorithms, avoiding common issues with algorithm compatibility.

Figure illustrates the mesh discretization and FDTD simulation results of a typical curved coupling device using the Curve Mesh. The results show that the low mesh precision (CPW = 15, cells per wavelength) using Curve Mesh is already very close to the high mesh precision (CPW = 30) Staircase results. Therefore, the Curve Mesh Conformity technique demonstrates superior accuracy.

4.Min Mesh Step and Grading

In the simulation domain, the maximum mesh size for different material regions is given by:

max(Δx,Δy,Δz)=λCPWmax(\Delta x, \Delta y, \Delta z) = \frac{\lambda}{CPW}

where λ\lambda is the wavelength in the material.

The actual mesh size depends on the structure size. When different materials meet, there will be a gradual mesh transition in this region, with the transition ratio determined by the Grating Factor. In the Minimum Mesh Step Settings, the parameter Min Mesh Step can constrain the minimum allowable mesh size throughout the entire simulation region:

min(Δx,Δy,Δz)=MinMeshStepmin(\Delta x, \Delta y, \Delta z) = {Min Mesh Step}

If the mesh size computed for a given region based on λCPW \frac{\lambda}{CPW} is smaller than the Min Mesh Step, the mesh size will be set to the Min Mesh Step value.

Grading Factor refers to the changing rate at the boundaries between different mesh sizes.

In scenarios where Auto Non-Uniform and/or Local Mesh are applied, the mesh sizes within the simulation region are not uniform. In such cases, the Grading Factor parameter controls the degree of mesh size gradient. The default value is 1.2.

The mesh gradient trend is illustrated as shown in the figure below:

As shown in the figure, in the case of non-uniform meshes, the Grading Factor cannot be 1. Suppose the mesh size in a smaller mesh region is aa and the mesh size in an adjacent larger mesh region is bb. With a Grading Factor of nn, the mesh sizes will transition according to the following pattern: a,an,an2,a, an, an^2,··· gradually changing until reaching the mesh size b.