This section describes how to create objects with surface roughness.
Simple roughness example
The structure group named surface roughness simple which is located in usr_surface_roughness.fsp shows a simple technique for adding surface roughness to a ridge waveguide. Rather than creating the structure from a single rectangle, it is composed of many thin slices, each with a random variance in width.
Advanced surface roughness
The structure group named surface roughness advanced which is located in usr_surface_roughness.fsp shows a more advanced surface roughness model. In this case, the roughness is characterized by a specified sigma RMS (s) and correlation length (Lc). These quantities are related to the correlation function by
$$ \langle H( r )H( r + \delta) \rangle = \sigma^2 e^{\left( -\left( \frac{\delta}{L_c} \right)^2 \right)} $$
The roughness is generated creating a matrix of uniform random numbers in k space. The high frequency components are removed, and the resulting values are transformed back to real space.
In this case, a single import object (surface option) is used to define the entire object, rather than building the surface from many simple primitives like the previous example. The upper surface of this object is defined by a 2D matrix containing the surface height as a function of x and y.
The set up script initially fills the surface matrix in K-space with uniform random numbers. A filter is applied to remove all high frequency components. The matrix is transformed back into real space, where the amplitude is corrected. The import object is then added to the simulation.
An example of a ridge waveguide with rough sidewalls based on this technique can be found in rough_waveguide.fsp.
The surface roughness plot can also be applied to wrap around a wire. In this structure group, each slice of x containing the array of height adjustments (y) is used to perturb points in a circle. When stacked, just like the rough ridge waveguide example from above, it creates a continuous structure with a rough exterior.
Note that the detail setting for the graphical rendering is increased because this is a complex surface. A higher detail setting makes the surface look better in the CAD editor, but will make the drawing slow if you have many complex surfaces with many data points. The detail setting has no effect on the actual meshing of the structure.