[[Image:Splash-generic2.jpg|right|720px]]
<table>
<tr>
<td>[[image:Cube-icon.png | link=Getting_Started_with_EM.Cube]] [[image:cad-ico.png | link=Building Geometrical Constructions in CubeCAD]] [[image:fdtd-ico.png | link=EM.Tempo]] [[image:prop-ico.png | link=EM.Terrano]] [[image:static-ico.png | link=EM.Ferma]] [[image:planar-ico.png | link=EM.Picasso]] [[image:metal-ico.png | link=EM.Libera]] [[image:po-ico.png | link=EM.Illumina]] </td>
<tr>
</table>
[[Image:Back_icon.png|30px]] '''[[EM.Cube | Back to EM.Cube Main Page]]'''
Â
== Assigning Material Properties to the Physical Structure ==
<table>
<tr>
<td> [[Image:FDTD5E.png|thumb|left|300px320px|The Add New Material dialog.]]
</td>
</tr>
<table>
<tr>
<td> [[Image:FDTD5F.png|thumb|left|600px720px|A new custom material entry in the Materials List.]] </td>
</tr>
</table>
[[Image:Info_icon.png|30px]] Click here to access '''[[Glossary of EM.Cube's Materials, Sources, Devices & Other Physical Object Types]]'''.
== Computing Port Characteristics From Time-Domain Data Exciting Multiport Structures in EM.Cube ==
For the computation of the SIn many electromagnetic modeling problems, your physical structure can be treated as a one-parameters in [[EMport, two-port or multiport circuit.Tempo]], the Each port may contain a voltage or current source associated with each port is excited separately with all the other ports turned off. Due to the existence of an internal source resistances, tuning the other sources off is indeed equivalent to terminating the other ports resistance or may have been terminated in their characteristics impedances (matched ports)a resistive or complex impedance. When the jth port is excitedTo characterize such circuits, all the S<sub>ij</sub> a number of parameters are calculated together based on the following definition:Â :<math> S_{ij} = \sqrt{\frac{Re(Z_i)}{Re(Z_j)}} \cdot \frac{V_j - Z_j^*I_j}{V_i+Z_i I_i} </math>Â where V<sub>i</sub> is the voltage across Port i, I<sub>i</sub> is the current flowing into Port i and Z<sub>i</sub> is the characteristic impedance of Port itypically defined. The sweep loop then moves to the next most widely used port until all ports have been excited. Besides the characteristics are scattering (S) parameters, the admittance (Y) and impedance (Z) parameters are also calculated based on the following relationships:Â :<math>\mathbf{ [Z] = [\sqrt{Z_0}] \cdot and admittance ([U]+[S]Y) \cdot ([U]parameters. One-[S])^{-1} \cdot [\sqrt{Z_0}] }</math>Â :<math> \mathbf{ [Y] = [Z]^{-1} } </math>Â where <math>\mathbf{[U]}</math> is the identity matrix of order N, and <math>\mathbf{\sqrt{Z_0}}</math> is port circuits are typically excited using a diagonal matrix whose diagonal elements are the square roots of port characteristic impedancesvoltage source in series with an internal resistance. The voltage standing wave ratio (VSWR) of the structure at the first port is also computed based source might be lumped and confined to a single point or to an infinitesimal region, or it can be distributed on the following definition:Â :<math> \text{VSWR} = \frac{|V_{max}|}{|V_{min}|} = \frac{1+|S_{11}|}{1-|S_{11}|} </math>Â == Admittance/Impedance Characteristics of Gap Sources in the MoM Solvers ==Â a specified surface. The [[EM.Cube]]'s MoM-based computational modulesthat offer voltage sources are [[EM.Tempo]], [[EM.Picasso]] and [[EM.Libera]]. In other words, provide a number of gap source types for which there three modules are the only ones that allow you can to compute the port characteristics, <i>i.e.</i> S/Z/Y parametersof a physical structure. These Each modules offers a number of special source types are:for this purpose.
{| class="wikitable"
! scope="col"| Module
! scope="col"| Host Types
! scope="col"| Computed Primary Port Parameters|-| Lumped Source| [[EM.Tempo]]| PEC and thin wire lines| S-parameters|-| Distributed Source| [[EM.Tempo]]| Virtual rectangular region (rectangle strip)| S-parameters|-| Microstrip Port Source| [[EM.Tempo]]| PEC rectangle strips| S-parameters|-| CPW Port Source| [[EM.Tempo]]| PEC rectangle strips| S-parameters|-| Coaxial Port Source| [[EM.Tempo]]| PEC cylinders| S-parameters|-| Waveguide Port Source| [[EM.Tempo]]| Hollow box objects| S-parameters
|-
| Strip Gap Circuit
| [[EM.Picasso]]
| Metal Rectangular metal (PEC or conductive sheet) traces
| Y-parameters
|-
| Strip Gap Circuit
| [[EM.Picasso]]
| Slot Rectangular slot traces
| Z-parameters
|-
| Wire Gap Circuit
| [[EM.Libera]] - Wire MoM
| PEC lines and thin wireswire lines and polylines
| Y-parameters
|}
Once one set Each of the above source types is used to compute a certain type of port characteristics, i.e. either S parameters, or Y parameters or Z parameters. Once one set of parameters are computed, the other parameters are calculated based on the well-known matrix relationships given in the previous section.
If your physical structure has two or more sources, but you have not defined any ports, all the lumped sources excite the structure simultaneously. However, when you assign N ports to the sources, then you have a multiport structure that is characterized by an NÃN scattering matrix, an NÃN impedance matrix, and an NÃN admittance matrix. To calculate these matrices, [[EM.Cube]] uses a binary excitation scheme in conjunction with the principle of linear superposition. In this binary scheme, the structure is analyzed N times. Each time one of the N port-assigned sources is excited, and all the other port-assigned sources are turned off. The N solution vectors that are generated through the N binary excitation analyses are finally superposed to produce the actual solution to the problem. However, in this process, [[EM.Cube]] also calculates all the port characteristics.  For example, [[EM.Tempo]] primarily computes the S-parameters, which relates the incident and reflected power waves at the port of the structure as follows: :<math> \mathbf{ [b] = [S][a] } </math> where the incident and reflected power waves a<sub>i</sub> and b<sub>i</sub> at port i are related to the voltage V<sub>i</sub> across port i and the current I<sub>i</sub> flowing into port i in the following manner:  :<math> a_i = \frac{V_i + Z_i I_i}{2\sqrt{|Re(Z_i)|}}, \quad\quad b_i = \frac{V_i - Z_i^* I_i}{2\sqrt{|Re(Z_i)|}} </math> and Z<sub>i</sub> is the reference or characteristic impedance of port i. For the computation of the S-parameters in [[EM.Tempo]], the source associated with each port is excited separately with all the other ports turned off. Due to the existence of internal source resistances, tuning the other sources off is indeed equivalent to terminating the other ports in their characteristics impedances (matched ports). When the jth port is excited, all the S<sub>ij</sub> parameters are calculated together based on the following definition: :<math> S_{ij} = \sqrt{\frac{|Re(Z_i)|}{|Re(Z_j)|} } \cdot \frac{V_j - Z_j^*I_j}{V_i+Z_i I_i} </math> The sweep loop then moves to the next port until all ports have been excited. The other parameters are then calculated as: :<math>\mathbf{ [Z] = [\sqrt{Z_0}] \cdot ([U]+[S]) \cdot ([U]-[S])^{-1} \cdot [\sqrt{Z_0}] }</math> :<math> \mathbf{ [Y] = [Z]^{-1} } </math> where <math>\mathbf{[U]}</math> is the identity matrix of order N, and [<math>\mathbf{\sqrt{Z_0}}</math>] is a diagonal matrix whose diagonal elements are the square roots of port characteristic impedances. In [[EM.Picasso]] and [[EM.Libera]], the Y-parameters are computed directly from the gap voltage sources. A gap source on a metal strip or a metal wire behaves like a series voltage source with a prescribed strength (of 1V and zero phase by default) that creates a localized discontinuity on the path of electric current flow (<b>J</b><sub>s</sub>). At the end of the MoM simulation, the electric current passing through the voltage source (V<sub>s</sub>) is computed and integrated to find the total input current (I<sub>in</sub>). From this one can calculate the input admittance as
:<math> Y_{in} = \frac{I_{in}}{V_s} = \frac {\int_W \hat{y} \cdot \mathbf{J_s} \, dy} {V_s} </math>
<tr>
<td> [[Image:PMOM60(1).png|thumb|left|480px|Placing a gap source a quarter guide wavelength away from the open end of a feed line to effectively short it to the ground at the gap location.]] </td>
</tr>
</table>
Â
On the other hand, a gap source on a slot trace behaves like a shunt current source with a prescribed strength (of 1A and zero phase by default) that creates a localized discontinuity on the path of magnetic current flow (<b>M</b><sub>s</sub>). At the end of a planar MoM simulation, the magnetic current passing through the current source (I<sub>s</sub>) is computed and integrated to find the total input voltage across the current filament (V<sub>in</sub>). From this one can calculate the input impedance as
Â
:<math> Z_{in} = \frac{V_{in}}{I_s} = \frac{\int_W \hat{y} \cdot \mathbf{M_s} \,dy} {V_s} = \frac{\int_W E_y \, dy}{V_s} </math>
Â
The same principle applies to the gap sources on slot traces. The figure below shows how to place two gap sources with opposite polarities a quarter guide wavelength away from their shorted ends to calculate the correct input impedance of the CPW line looking to the left of the gap sources. Note that in this case, you deal with shunt filament current sources across the two slot lines and that the slot line carry magnetic currents. The end of the slot lines look open to the magnetic currents, but in reality they short the electric field. The quarter-wave CPW line acts as an open circuit to the current sources.
Â
<table>
<tr>
<td> [[Image:PMOM61(1).png|thumb|left|480px|Placing two oppositely polarized gap sources a quarter guide wavelength away from the short end of a CPW line to effectively create an open circuit beyond the gap location.]] </td>
</tr>
</table>
</table>
Once In the case of gap sources on metal traces and probe sources on PEC vias, turning a source off means shorting a series voltage source. The electric currents passing through these sources are then found at each port location, and the admittance or impedance parameters are determinedfound as follows:Â :<math> I_m = \sum_{n=1}^N Y_{mn} V_n, one can find their complementary parameter set\quad \quad Y_{mn} = \frac{I_m}{V_n} \bigg|_{V_k=0, k \ne n}</math> The other parameters are then calculated as: Â :<math>\mathbf{ [S] = [Y_0] \cdot ([Z]-[Z_0]) \cdot ([Z]+[Z_0])^{-1} \cdot [Z_0] }</math>
:<math> \mathbf{ [Z] = [Y]^{-1} } </math>
:where ['''Z<mathsub> \mathbf{ [Y0</sub>'''] = is a diagonal matrix whose diagonal elements are the port characteristic impedances, and [Z]^{-1} } '''Y<sub>0</mathsub>'''] is a diagonal matrix whose diagonal elements are the port characteristic admittances.
The scattering parameters can then be On the other hand, a gap source on a slot trace behaves like a shunt current source with a prescribed strength (of 1A and zero phase by default) that creates a localized discontinuity on the path of magnetic current flow (<b>M</b><sub>s</sub>). At the end of a planar MoM simulation, the magnetic current passing through the current source (I<sub>s</sub>) is computed from and integrated to find the impedance parameters using total input voltage across the following relationship:current filament (V<sub>in</sub>). From this one can calculate the input impedance as
:<math>Z_{in} = \mathbffrac{ [S] V_{in}}{I_s} = [Y_0] \cdot ([Z]-[Z_0]) frac{\cdot ([Z]+[Z_0])^int_W \hat{-1y} \cdot [Z_0] \mathbf{M_s} \,dy} {V_s} = \frac{\int_W E_y \, dy}{V_s}</math>
where ['''Z<sub>0</sub>'''] is The same principle applies to the gap sources on slot traces. The figure below shows how to place two gap sources with opposite polarities a diagonal matrix whose diagonal elements are quarter guide wavelength away from their shorted ends to calculate the port characteristic impedancescorrect input impedance of the CPW line looking to the left of the gap sources. Note that in this case, you deal with shunt filament current sources across the two slot lines and ['''Ythat the slot line carry magnetic currents. The end of the slot lines look open to the magnetic currents, but in reality they short the electric field. The quarter-wave CPW line acts as an open circuit to the current sources. In the case of gap sources on slot traces, turning a source off means opening a shunt filament current source. The magnetic currents passing through the source locations, and thus the voltages across them, are then found at all ports, and the impedance parameters are found as follows: :<submath>V_m = \sum_{n=1}^N Z_{mn} I_n, \quad \quad Z_{mn} = \frac{V_m}{I_n} \bigg|_{I_k=0, k \ne n}</submath>'''] is  <table><tr><td> [[Image:PMOM61(1).png|thumb|left|480px|Placing two oppositely polarized gap sources a diagonal matrix whose diagonal elements are quarter guide wavelength away from the port characteristic admittancesshort end of a CPW line to effectively create an open circuit beyond the gap location.]] </td></tr></table>
== Calculating Scattering Parameters Using Prony's Method ==
[[EM.Picasso]] provides a special source type called '''[[Glossary of EMGlossary_of_EM.Cube's Excitation Sourcess_Materials,_Sources,_Devices_&_Other_Physical_Object_Types#Scattering Wave Port Scattering_Wave_Port | Scattering Wave Port]]''' that is specifically intended for computing the S-parameters of planar structures. This is done by analyzing the current distribution patterns on the port transmission lines. The discontinuity at the end of a port line (junction region) gives rise to a standing wave pattern in the line's current distribution. From the location of the current minima and maxima and their relative levels, one can determine the reflection coefficient at the discontinuity, <i>i.e.</i> the S<sub>11</sub> parameter. A more rigorous technique is Pronyâs method, which is used for exponential approximation of functions. A complex function f(x) can be expanded as a sum of complex exponentials in the following form:
:<math> f(x) \approx \sum_{n=1}^N c_i e^{-j\gamma_i x} </math>
</tr>
</table>
Â
== Exciting Multiport Structures Using Linear Superposition ==
Â
If your physical structure has two or more sources, but you have not defined any ports, all the lumped sources excite the structure simultaneously. However, when you assign N ports to the sources, then you have a multiport structure that is characterized by an NÃN scattering matrix, an NÃN impedance matrix, and an NÃN admittance matrix. To calculate these matrices, [[EM.Cube]] uses a binary excitation scheme in conjunction with the principle of linear superposition. In this binary scheme, the structure is analyzed N times. Each time one of the N port-assigned sources is excited, and all the other port-assigned sources are turned off.
Â
In the case of gap sources on metal traces and probe sources on PEC vias, turning a source off means shorting a series voltage source. The electric currents passing through these sources are then found at each port location, and the admittance parameters are found as follows:
Â
:<math> I_m = \sum_{n=1}^N Y_{mn} V_n, \quad \quad Y_{mn} = \frac{I_m}{V_n} \bigg|_{V_k=0, k \ne n}</math>
Â
In the case of gap sources on slot traces, turning a source off means opening a shunt filament current source. The magnetic currents passing through the source locations, and thus the voltages across them, are then found at all ports, and the impedance parameters are found as follows:
Â
:<math> V_m = \sum_{n=1}^N Z_{mn} I_n, \quad \quad Z_{mn} = \frac{V_m}{I_n} \bigg|_{I_k=0, k \ne n}</math>
Â
The N solution vectors that are generated through the N binary excitation analyses are finally superposed to produce the actual solution to the problem. However, in this process, [[EM.Cube]] also calculates all the port characteristics. Keep in mind that the impedance (Z) and admittance (Y) matrices are inverse of each other. From the impedance matrix, the scattering matrix is calculated using the following relation:
== Modeling Coupled Sources & Ports ==
You couple two or more sources using the '''Port Definition Dialog'''. To do so, you need to change the default port assignments. First, delete all the ports that are to be coupled from the Port List of the dialog. Then, define a new port by clicking the '''Edit''' button of the dialog. This opens up the Add Port dialog, which consists of two tables: '''Available''' sources on the left and '''Associated''' sources on the right. A right arrow {{key|-->}} button and a left arrow {{key|<--}} button let you move the sources freely between these two tables. You will see in the "Available" table a list of all the sources that you deleted earlier. You may even see more available sources. Select all the sources that you want to couple and move them to the "Associated" table on the right. You can make multiple selections using the keyboard's {{key|Shift}} and {{key|Ctrl}} keys. Closing the Add Port dialog returns you to the Port Definition dialog, where you will now see the names of all the coupled sources next to the name of the newly added port.
{{Note|It When not using [[EM.Cube]]'s wizards, it is your the user's responsibility to set up coupled ports and coupled transmission lines properly. For example, to excite the desirable odd mode of a coplanar waveguide (CPW), you need to create two rectangular slots parallel to and aligned with each other and place two gap sources on them with the same offsets and opposite polarities. To excite the even mode of the CPW, you use the same polarity for the two collocated gap sources. Whether you define a coupled port for the CPW or not, the right definition of sources will excite the proper mode. The couple ports are needed only for correct calculation of the port characteristics.}}
<table>
== Modeling Finite-Sized Source Arrays ==
You scan can define arrays of sources on arrays of legitimate host objects. If your project in [[EM.Tempo]] has a line array object, you can define a lumped source array associated with it. If your project in [[EM.Picasso]] has an array of rectangle strips or an array of PEC vertical via objects, you can define and place a gap array or an array of probe sources on them, respectively. Similarly, if your project in [[EM.Libera]] has a line array object, a polyline array object, or an array of long, narrow rectangle strips, you can define and place a line gap array or a strip gap array on them, respectively. In all of these cases, the legitimate array objects will also be listed as an eligible object for source placement. A lumped or gap source will then be placed on each element of the array. All the individual sources will have identical direction and offset.
You can prescribe certain amplitude and/or phase distribution over the array of gap or probe sources. By default, all the gap or probe sources have identical amplitudes of 1V (or 1A for the slot case) and zero phase. The available amplitude distributions to choose from include '''Uniform''', '''Binomial''' and '''Chebyshev''' and '''Date File'''. In the Chebyshev case, you need to set a value for minimum side lobe level ('''SLL''') in dB. You can also define '''Phase Progression''' in degrees along all three principal axes. You can view the amplitude and phase of individual sources by right clicking on the top '''Sources''' item in the Navigation Tree and selecting '''Show Source Label''' from the contextual menu.
<table>
<tr>
<td> [[Image:PMOM49.png|thumb|left|480px|Defining gap sources on an array of rectangle strip objects.]] </td><td> [[Image:PMOM49_2nd.png|thumb|left|480px|Defining gap sources on an array of rectangle strip objects with a Chebyshev amplitude distribution.]] </td>
</tr>
</table>
<br />
<b> The Nonlinear Diode Device </b>
A diode is a rectifying device. The time-domain relationship between the voltage and current of a diode is given by the nonlinear equation:
All the mesh generators of [[EM.Cube]]'s individual computational modules have default settings, which produce a reasonably fine discretization of your physical structure. The most important mesh parameter is the mesh resolution. This can be expressed either as a global mesh density, i.e. the number of cells per wavelength, or by a cell size or maximum cell edge length. Many of [[EM.Cube]] mesh types can be customized at the local level of object groups or even at the level of individual objects.
== Generating & Viewing To generating and viewing the Mesh ==Â ICON: mesh of your physical structure in any [[File:mesh_iconEM.pngCube]]Â MENU: Â '''Simulate → Discretization → Show Mesh'''Â '''Simulate → Discretization → Regenerate Mesh'''Â KEYBOARD SHORTCUT: '''Ctrl+M'''Â TO GENERATE AND VIEW A MESHmodule, follow the steps below:
# Click the '''Show Mesh''' [[File:mesh_tool.png]] button of the Simulate Toolbar.
# To exit the mesh view mode, press the keyboard's {{key|Esc}} key or click the '''Show Mesh''' [[File:mesh_tool.png]] button once again.
Once a mesh is generated, it stays in the memory until the structure is changed or the mesh density or other settings are modified. Every time you view mesh, the one in the memory is displayed. You can force [[EM.Cube]] to create a new mesh from the ground up by selecting the menu item '''Simulate → Discretization → Regenerate Mesh''' or by right clicking on the '''Mesh''' item in the "Discretization" section of the navigation tree and selecting '''Regenerate''' from the contextual menu.
PYTHON COMMAND: To customize the mesh()  NOTES, SPECIAL CASES OR EXCEPTIONS: Once a mesh is generated, it stays in the memory until the of your physical structure is changed or change some of the mesh density or other settings are modified. Every time you view mesh, the one in the memory is displayed. You can force each [[EM.Cube]] to create a new mesh from module, follow the ground up by selecting the menu item '''Simulate → Discretization → Regenerate Mesh''' or by right clicking on the '''Mesh''' item in the "Discretization" section of the navigation tree and selecting '''Regenerate''' from the contextual menu. == Customizing the Mesh == ICON: [[File:meshset_icon.png]] MENU: '''Simulate → Discretization → Mesh Settings...''' KEYBOARD SHORTCUT: '''Ctrl+G''' TO CUSTOMIZE A MESHsteps below:
# Click the '''Mesh Settings''' [[File:mesh_settings.png]] button of the Simulate Toolbar.
# The Mesh Settings dialog of the currently c=active [[EM.Cube]] module opens up.
# From the '''Host''' drop-down list, select a line object. Note that only line parallel to one of the three principal axes are listed.
# By default, the lumped source is placed at the midpoint of the host line object. You can modify the '''Offset''' parameter, which is measured from the start point of the line and is always positive.
# Click the OK button of the dialog to return to the project workspace.
You can change the mesh algorithm from the dropdown list labeled '''Mesh Type''' if there is more than one option. You can also enter a different value for '''Mesh Density''' in cells per effective wavelength (λ<sub>eff</sub>). For each value of mesh density, the dialog also shows the average "Cell Edge Length" in the free space.
== The Triangular Surface Mesh Generator ==
PYTHON COMMAND: mesh() cubecad_mesh_settings(cell_size[[EM.Illumina]],angle_tol) emtempo_mesh_settings(cells_per_lambda,ratio_contour,ratio_thin,ratio_abs) emterrano_mesh_settings(edge_length,angle_tol) emillumina_mesh_settings(cells_per_lambda) emferma_mesh_settings(cell_size_x,cell_size_y[[EM.Libera]],cell_size_z) empicasso_mesh_settings(cells_per_lambda) emlibera_mesh_settings(cells_per_lambda) == Adaptive Yee Mesh == MODULE: [[EM.TempoTerrano]] FUNCTION: Generates and [[EM.Picasso]] use a Yee brick triangular surface mesh that adapts to discretize the fine geometric details and material composition structure of your project workspace. All these modules assume an unbounded, open-boundary computational domain, wherein the physical structure   PYTHON COMMAND: emtempo_mesh_settings(cells_per_lambda,ratio_contour,ratio_thin,ratio_abs)  ADAPTIVE YEE MESH PARAMETERS{| class="wikitable"|-! scope="col"| Parameter Name! scope="col"| Value Type! scope="col"| Units! scope="col"| Default Value! scope="col"| Notes|-! scope="row" | minimum mesh density| real numeric| cells/lambda_eff | 20| effective wavelength in the material is placed against some sort of background medium |-! scope="row" | minimum grid spacing for geometric contours| real numeric| - | 0with infinite extents.4 | as a fraction of maximum grid spacing in free space |It is important to note that only finite-! scope="row" | minimum grid spacing at thin extent surfaces or narrow regions| real numeric| - | 0.4 | as a fraction the surface of maximum grid spacing in free space |finite-! scope="row" | absolute minimum grid spacing| real numeric| - | 0extent volumes are discretized.15 | as a fraction of maximum grid spacing in free space |-! scope="row" | maximum adjacent cell size ratio| real numeric| - | 1.3 | controls gradual grid transitions |-! scope="row" | curved edge angle tolerance| real numeric| degrees | 15 | controls The surface mesh generating algorithm tries to produce regularized triangular cells with almost equal surface areas across the initial tessellation of the physical entire structure |}.
<table>
<tr>
<td> [[Image:Tempo L1 Fig10PO2.png|thumb|720px420px|EM.Tempo's mesh settings dialog.]] </td></tr></table> == Adding Fixed Grid Points to the Adaptive Yee Mesh == Adding fixed grid points to an FDTD mesh increases its resolution locally. Each fixed grid point adds three grid lines along the three principal axes passing through that point. You can add as many fixed grid points as you desire and create dense meshes at certain regions. Fixed grid points appear as grey points in the project workspace. To insert a new fixed grid point, follow these steps: * Open the Fixed Grid Points Dialog by selecting '''Menu > Simulate > Discretization > Fixed Grid Points...''' or by right-clicking on the '''FDTD''' '''Mesh''' item Two ellipsoids of the navigation tree and selecting '''Fixed Grid Points Settings...'''* Click the {{key|Add/Edit}} button to open the "Add Fixed Grid Point" dialog.* Enter the (X, Y, Z) coordinates of the new fixed point in the coordinate boxes and click the {{key|OK}} button.* To modify the coordinates of an existing fixed grid point, select it from the table and click the {{key|Add/Edit}} button.* You can also remove a fix grid point from the FDTD mesh using the {{key|Delete}} button. <table><tr><td> [[Image:FDTD36.png|thumb|left|480px|A user-defined fixed grid point in an FDTD mesh.]] </td></tr><tr><td> [[Image:FDTD38.png|thumb|left|480px|Adding a new fixed grid point in EM.Tempo's fixed grid points settings dialogdifferent compositions.]] </td>
</tr>
<tr>
<td> [[Image:FDTD39PO3.png|thumb|left420px|480px|The "Add Fixed Grid Point" dialogTrinagular surface mesh of the two ellipsoids.]] </td>
</tr>
</table>
According to the Courant-Friedrichs-Levy (CFL) stability criterion, the FDTD time step is determined by the smallest cell size in your FDTD mesh. Occasionally, [[FDTD Module]]'s adaptive mesh generator may create extremely tiny grid cells that would result in extremely small time steps. This would then translate into a very long computation time. [[EM.Cube]] offers the "Regular" FDTD mesh generator, which is a simplified version of the adaptive mesh generator. In a regular FDTD mesh, the grid cell sizes stay rather the same in objects of the same material composition. The mesh resolution increases in materials of higher permittivity and/or permeability based on the effective wavelength in exactly the same way as the adaptive mesh. == Profiling the Brick Mesh == A volumetric brick mesh is overwhelming for visualization in the 3D space. For this reason, [[EM.Cube]]'s mesh view shows only the outline of the cells on exterior surface of the (staircased) meshed objects. The mesh grid planes provide a 2D profile of the mesh cells along the principal coordinate planes. To display a mesh grid plane, select '''Menu > Simulate > Discretization > Grid Planes >''' and pick one of the three options: '''XY Plane''', '''YZ Plane''' or '''ZX Plane'''. You may also right click on one of the '''XY Plane''', '''YZ Plane''' or '''ZX Plane''' items in the '''Discretization''' section of the navigation tree and select '''Show''' from the contextual menu. While a mesh grid plane is visible, you can move it back and forth between the two boundary planes at the two opposite sides of the computational domain. You can do this in one of the following four ways: * Using the keyboard's Page Up {{key|PgUp}} key and Page Down {{key|PgDn}} key.* By selecting '''Menu > Simulate > Discretization > Grid Planes > Increment Grid''' or ''' Decrement Grid'''.* By right clicking on one of the '''XY Plane''', '''YZ Plane''' or '''ZX Plane''' items in the '''Discretization''' section of the navigation tree and selecting '''Increment Grid''' or ''' Decrement Grid''' from the contextual menu.* Using the keyboard shortcut {{key|>}} or {{key|<}}. As you âstep throughâ or profile the mesh grid, you can see how the structure is discretized along internal planes of the computational domain. <table><tr><td> [[Image:Tempo L1 Fig11.png|thumb|left|360px|The XY mesh grid plane.]] </td><td> [[Image:Tempo L1 Fig12.png|thumb|left|360px|The YZ mesh grid plane.]] </td></tr></table> == The FDTD Grid Coordinate System (GCS) == When your physical structure is discretized using the brick mesh generator, a second coordinate system becomes available general rules apply to you. The mesh grid coordinate system allows you to specify any location in the computational domain in terms of node indices on the mesh grid. [[EM.Cube]] displays the total number of mesh grid lines of the simulation domain (N<sub>x</sub> à N<sub>y</sub> à N<sub>z</sub>) along the three principal axes on the '''Status Bar'''. Therefore, the number of cells in each direction is one less than the number of grid lines, i.e. (N<sub>x</sub>-1)à (N<sub>y</sub>-1) à (N<sub>z</sub>-1). The lower left front corner of the domain box (Xmin, Ymin, Zmin) becomes the origin of the mesh grid coordinate system (I = 0, J = 0, K = 0). The upper right back corner of the domain box (Xmax, Ymax, Zmax) therefore becomes (I = N<sub>x</sub>-1, J = N<sub>y</sub>-1, K = N<sub>z</sub>-1). [[EM.Cube]] allows you to navigate through the mesh grid and evaluate the grid points individually. Every time you display one of the three mesh grid planes, the "'''Grid Coordinate System (GCS)'''" is automatically activated. On the Status Bar, you will see [[Image:statusgrid.png]] instead of the default [[Image:statusworld.png]]. This means that the current coordinates reported on Status Bar are now expressed in grid coordinate system. The current grid point is displayed by a small white circle on the current mesh grid plane, and it always starts from (I = 0, J = 0, K = 0). Using the keyboard's '''Arrow Keys''', you can move the white circle through the surface mesh grid plane and read the current node's (I, J, K) indices on the status bar. You can switch back to the "'''World Coordinate System (WCS)'''" or change to the "'''Domain Coordinate System'''" by double-clicking the status bar box that shows the current coordinate system and cycling through the three options. The domain coordinate system is one that establishes its origin at the lower left front corner of the computational domain and measure distances in project unit just like the WCS. <table><tr><td> [[Imagegenerators:FDTD35(1).png|thumb|left|480px|The grid cursor on the XY grid plane and its grid coordinates (I, J, K) displayed on the status bar.]]</td></tr></table> == Fixed-Cell Brick Mesh == MODULE: [[EM.Tempo]], [[EM.Ferma]] FUNCTION: Generates a uniform 3D brick mesh with specified cell dimensions along the three principal axes to which the physical structure is adapted   PYTHON COMMAND: emferma_mesh_settings(cell_size_x,cell_size_y,cell_size_z)  FIXED-CELL BRICK MESH PARAMETERS{| class="wikitable"|-! scope="col"| Parameter Name! scope="col"| Value Type! scope="col"| Units! scope="col"| Default Value! scope="col"| Notes|-! scope="row" | cell_size_x| real numeric| project units | 1 | -|-! scope="row" | cell_size_y| real numeric| project units | 1 | -|-! scope="row" | cell_size_z| real numeric| project units | 1 | -|} == General Rules of EM.Cube's Surface Mesh Generators ==
* The surface mesh generator merges all the objects that belong to the same group in the navigation Tree using the Boolean Union operation before meshing. The union operation is carried out temporarily and solely for the purpose of mesh generation.
* All '''Polymesh''' objects as well as [[EM.Terrano]]'s terrain objects are considered already discretized and are not re-meshed once again by the surface mesh generator.
== Triangular Controlling the Resolution & Quality of the Surface Mesh ==
MODULE: You can control the average mesh cell size using the "Mesh Density" parameter. By default, the mesh density of [[EM.Illumina]], and [[EM.Libera]], is expressed in terms of the free-space wavelength. The default mesh density is 10 cells per wavelength. This usually creates slightly more than 100 regular triangular cells per squared wavelength. The default mesh density of [[EM.Picasso]]is expressed in terms of the effective wavelength, which takes into account the material properties of a planar structure's substrate layers. The default planar mesh density is 20 cells per effective wavelength. Alternatively, you can base the definition of the mesh density on "Cell Edge Length" expressed in project units. [[EM.Terrano]]'s mesh density is always expressed in cell edge length and its default value is 100 units. This large edge length is intended to create the fewest number of triangular facets on cubic objects with rectangular faces.
FUNCTION: Generates You can change the value of '''Mesh Density''' from the Mesh Settings dialog and generate a highly regular triangular surface mesh based on with a mesh density expressed in cells per effective wavelength   PYTHON COMMAND(S):  emillumina_mesh_settings(cells_per_lambda) emlibera_mesh_settings(cells_per_lambda)  TRIANGULAR SURFACE MESH PARAMETERS{| class="wikitable"|-! scope="col"| Parameter Name! scope="col"| Value Type! scope="col"| Units! scope="col"| Default Value! scope="col"| Notes|-! scope="row" | density| real numeric| cells/lambda_eff | 10 | determines the mesh higher or lower resolution as a function of operating frequency |-! scope="row" | curved edge angle tolerance| real numeric| degrees | 15 | controls the initial tessellation of the physical structure |-! scope="row" | chord height| real numeric| project units | 0 | controls the initial tessellation of the physical structure |-! scope="row" | maximum edge segment length| real numeric| project units | 0 | controls the initial tessellation of the physical structure |}.
Surface mesh generation in [[EM.Cube]] is a two-step process. First, a tessellated version of an object in your project workspace is created. Then, the tessellated object undergoes a surface re-meshing to generate regularized triangular cells. This process is fairly straightforward in the case of flat planar structures. For curved surfaces and curved solid objects, the quality of the initial tessellation of the object is very important and directly affects the quality of the final surface mesh. You can access some additional mesh parameters by clicking the {{key|Tessellation Options}} button of the Mesh Settings dialog. In the Tessellation Options dialog, you can change '''Curvature Angle Tolerance''' expressed in degrees, which as a default value of 15°. This parameter can affect the shape of the mesh especially in the case of solid CAD objects. It determines the apex angle of the triangular cells of the primary tessellation mesh which is generated initially before cell regularization. Lower values of the angle tolerance result in a less smooth and more pointed mesh of curved surface like a sphere.
<table>
<tr>
<td> [[Image:MESH MAN16PROP20B.png|thumb|left400px|480px|The surface MoM triangular mesh settings dialogThree building objects with different basic and composite shapes in EM.Terrano.]] </td></tr><tr><td> [[Image:MESH MAN17prop_manual-29A.png|thumb|left|480px320px|The physical optics triangular surface mesh settings Tessellation Options dialog.]] </td>
</tr>
</table>
Â
== Facet Mesh ==
Â
MODULE: [[EM.Terrano]]
Â
FUNCTION: Generates a triangular surface mesh based on a specified edge length
Â
Â
PYTHON COMMAND: emterrano_mesh_settings(edge_length,angle_tol)
Â
Â
FACET MESH PARAMETERS
{| class="wikitable"
|-
! scope="col"| Parameter Name
! scope="col"| Value Type
! scope="col"| Units
! scope="col"| Default Value
! scope="col"| Notes
|-
! scope="row" | cell edge length
| real numeric
| project units
| 100
| determines the mesh resolution
|-
! scope="row" | curved edge angle tolerance
| real numeric
| degrees
| 45
| controls the initial tessellation of the physical structure
|-
! scope="row" | chord height
| real numeric
| project units
| 0
| controls the initial tessellation of the physical structure
|-
! scope="row" | maximum edge segment length
| real numeric
| project units
| 0
| controls the initial tessellation of the physical structure
|}
Â
<table>
<tr>
<td> [[Image:MESH MAN18PROP20C.png|thumb|left|480px360px|The facet default mesh settings dialog.]] </td></tr></table> == Wireframe Mesh == MODULE: [[of the three building objects in EM.Libera]] FUNCTION: Generates a polygonized mesh Terrano with an edge length of curve objects 100m and a regular triangular mesh curvature angle tolerance of surface and [[Solid Objects|solid objects45°.]]   PYTHON COMMAND: emlibera_mesh_settings(cells_per_lambda)  WIREFRAME MESH PARAMETERS{| class="wikitable"|-! scope="col"| Parameter Name! scope="col"| Value Type! scope="col"| Units! scope="col"| Default Value! scope="col"| Notes|-! scope="row" | density| real numeric| cells</lambda_eff | 10 | determines the mesh resolution as a function of operating frequency |-! scope="row" | curved edge angle tolerance| real numeric| degrees | 15 | controls the initial tessellation of the physical structure |-! scope="row" | chord height| real numeric| project units | 0 | controls the initial tessellation of the physical structure |-! scope="row" | maximum edge segment length| real numeric| project units | 0 | controls the initial tessellation of the physical structure |} <table><trtd><td> [[Image:MESH MAN15PROP20D.png|thumb|left|480px360px|The wire MoM refined mesh settings dialog.]] </td></tr></table> == Hybrid Planar Mesh == MODULE: [[of the three building objects in EM.Picasso]] FUNCTION: Generates a surface mesh Terrano with an edge length of planar structures containing mixed rectangular 10m and triangular cells   PYTHON COMMAND: empicasso_mesh_settings(cells_per_lambda)  HYBRID PLANAR MESH PARAMETERS{| class="wikitable"|-! scope="col"| Parameter Name! scope="col"| Value Type! scope="col"| Units! scope="col"| Default Value! scope="col"| Notes|-! scope="row" | mesh density| real numeric| cells/lambda_eff | 20 | determines the mesh resolution as a function curvature angle tolerance of operating frequency |-! scope="row" | maximum angle for defective cell removal| real numeric| degrees | 5 | eliminates narrow cells with angles smaller than this value |} <table><tr><td> [[Image:MESH MAN19.png|thumb|left|480px|The planar hybrid mesh settings dialog10°.]] </td>
</tr>
</table>
<tr>
<td>
[[Image:MESH MAN12.png|thumb|left|480px600px|Locking the mesh density in the property dialog of a material group.]]
</td>
</tr>
<tr>
<td>
[[Image:MESH MAN9.png|thumb|left|640px540px|The geometry of two dielectric spheres with the same material properties but belonging to two different object groups.]]
</td>
</tr>
<tr>
<td>
[[Image:MESH MAN11.png|thumb|left|640px540px|The FDTD mesh of the two dielectric spheres. The left sphere is meshed using a global density of 20 cells/λ<sub>eff</sub>, while the right sphere is meshed using a locked density of 100 cells/λ<sub>eff</sub>.]]
</td>
</tr>
<tr>
<td>
[[Image:MESH MAN10.png|thumb|left|640px540px|The top view of the mesh of the two dielectric spheres also showing the XY grid plane.]]
</td>
</tr>
<hr>
[[Image:Top_icon.png|48px30px]] '''[[Preparing_Physical_Structures_for_Electromagnetic_Simulation#Perfect_Electric_Conductor_.28PEC.29 Assigning_Material_Properties_to_the_Physical_Structure | Back to the Top of the Page]]'''
[[Image:Back_icon.png|40px30px]] '''[[EM.Cube | Back to EM.Cube Main Page]]'''