Changes
[[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>
== Exciting Multiport Structures Using Linear Superposition Defining an Excitation Source ==
An electromagnetic boundary value problem requires an excitation source that typically appears as the right-hand-side (RHS) term of a differential or integral equation. A source can be an impressed electric or magnetic field or an impressed electric or magnetic current that produces an impressed electric or magnetic field. Sources can be lumped, confined to a single point or an infinitesimal region, or they can be distributed over a sizable area or volume of the computational domain. [[EM.Cube]] provides a large variety of source types for the excitation of your physical structure. Some source type have identical definitions in different computational modules. For example, plane waves behave exactly the same way in [[EM.Tempo]], [[EM.Illumina]], [[EM.Libera]] or [[EM.Picasso]]. Or Hertzian short dipole sources are identical in [[EM.Terrano]], [[EM.Illumina]], [[EM.Libera]] or [[EM.Picasso]]. On the other hand, some source types apply only to certain computational modules. For example, Gaussian beam sources appear only in [[EM.Tempo]]. In all of [[EM.Cube]]'s computational modules except for [[EM.Ferma]], the source types are listed under the '''Sources''' section of the navigation tree. In these modules, the sources either exist on their own as virtual objects or they are associated with the existing geometric objects in the project workspace. In [[EM.Ferma]], electrostatic and magnetostatic sources like volume charges or wire currents are defined as geometric objects side by side of material objects in the project workspace. In each of [[EM.Cube]]'s computational modules, you need to choose the right source type depending on the purpose of your simulation and based on the observables you define for your project. For example, for computing the radar cross section (RCS) of a target, you need a plane wave source. If you are interested in computing the S/Z/Y parameters of your structure, then you have to choose a source type like a gap or lumped source that supports a "Port Definition" observable. For a detailed description of each source type in the context of its application, please refer to the manual of individual computational modules. [[Image:Info_icon.png|30px]] Click here to access '''[[Glossary of EM.Cube's Materials, Sources, Devices & Other Physical Object Types]]'''. == Exciting Multiport Structures in EM.Cube == In many electromagnetic modeling problems, your physical structure can be treated as a one-port, two-port or multiport circuit. Each port may contain a voltage or current source with an internal resistance or may have been terminated in a resistive or complex impedance. To characterize such circuits, a number of parameters are typically defined. The most widely used port characteristics are scattering (S) parameters, impedance (Z) parameters and admittance (Y) parameters. One-port circuits are typically excited using a voltage source in series with an internal resistance. The voltage source might be lumped and confined to a single point or to an infinitesimal region, or it can be distributed on a specified surface. The [[EM.Cube]] modules that offer voltage sources are [[EM.Tempo]], [[EM.Picasso]] and [[EM.Libera]]. In other words, there three modules are the only ones that allow you to compute S/Z/Y parameters of a physical structure. Each modules offers a number of special source types for this purpose. {| class="wikitable"|-! scope="col"| Soure Type! scope="col"| Module! scope="col"| Host Types! scope="col"| 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]]| Rectangular metal (PEC or conductive sheet) traces| Y-parameters|-| Strip Gap Circuit| [[EM.Picasso]]| Rectangular slot traces| Z-parameters|-| Probe Gap Circuit| [[EM.Picasso]]| Embedded PEC vias| Y-parameters|-| Strip Gap Circuit| [[EM.Libera]] - Surface MoM| PEC strips| Y-parameters|-| Wire Gap Circuit| [[EM.Libera]] - Wire MoM| PEC and thin wire lines and polylines| Y-parameters|} 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 well-known matrix relationships. 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> for gap sources on metal traces, where the line integration is performed across the width of the metal strip. In the case of a wire gap, the current solution is indeed the total current. It is important to note that the input admittance defined at a gap source port is referenced to the two terminals of the voltage source connected across the gap as shown in the figure below. This is different than the input admittance that one may normally define for a microstrip port, which is referenced to the substrate's ground. To resolve this problem, you can place a gap source on a metal strip line by a distance of a quarter guide wavelength (λ<sub>g</sub>/4) away from its open end. Note that λ<sub>g</sub> = 2π/β, where β is the propagation constant of the metallic transmission line. As show in the figure below, the impedance looking into an open quarter-wave line segment is zero, which effectively shorts the gap source to the planar structure's ground. The gap admittance in this case is identical to the input admittance of the planar structure. <table><tr><td> [[Image:PMOM59(1).png|thumb|left|480px|Definition of different input impedances at the gap location.]] </td></tr><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> In [[EM.Picasso]], a probe source on a PEC via 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 the vertical electric current flow (<b>J</b><sub>p</sub>). At the end of the planar MoM simulation, the electric current passing through the voltage source is computed and integrated to find the total input current. From this one can calculate the input admittance as :<math> Y_{in} = \frac{I_{in}}{V_s} = \frac {\int_S \hat{z} \cdot \mathbf{J_p} \, ds} {V_s} </math> where the surface integration is performed over the cross section of the via. The case of a probe source placed on a PEC via that is connected to a ground plane is more straightforward. In this case, the probe source's gap discontinuity is placed at the middle plane of the PEC via. If the via is short, it is meshed using a single prismatic element, which is connected to the ground from one side and to the metal strip line from the other. Therefore, the probe admittance is equal to that of the structure at a reference plane that passed through the host via. <table><tr><td> [[Image:PMOM62(2).png|thumb|left|480px|Input impedance of a probe source on a PEC via connected to a ground plane.]] </td></tr></table>
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>
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<sub>0</sub>'''] is a diagonal matrix whose diagonal elements are the port characteristic impedances, and ['''Y<sub>0</sub>'''] is a diagonal matrix whose diagonal elements are the port characteristic admittances.
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.
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>
== 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:
| Surface Mesh
| [[EM.Illumina]], [[EM.Libera]], [[EM.Picasso]], [[EM.Terrano]]
|-
| Hybrid Planar Mesh
| Surface Mesh
| [[EM.Picasso]]
|-
| Facet Mesh
| Linear Mesh
| [[EM.Libera]]
|}
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.
# 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.
# 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 ==
<table>
<tr>
<td> [[Image:Tempo L1 Fig10PO2.png|thumb|720px420px|EM.Tempo's mesh settings dialogTwo ellipsoids of different compositions.]] </td>
</tr>
<tr>
<td> [[Image:FDTD36PO3.png|thumb|left420px|480px|A user-defined fixed grid point in an FDTD Trinagular surface 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 dialog.]] </td></tr><tr><td> [[Image:FDTD39.png|thumb|left|480px|The "Add Fixed Grid Point" dialogof the two ellipsoids.]] </td>
</tr>
</table>
* 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 ==
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>
<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]]'''