{{Note|In [[EM.Cube]], you can import external CAD models (such as STEP, IGES, STL models, etc.) only to [[CubeCAD]]. From [[CubeCAD]], you can then move the imported objects to EM.Libera.}}
== 3D Mesh Generation == === A Note on EM.Libera's Mesh Types === EM.Libera features two simulation engines, Wire MoM and Surface MoM, which require different mesh types. The Wire MoM simulator handles only wire objects and wireframe structures. These objects are discretized as elementary linear elements (filaments). A wire is simply subdivided into smaller segments according to a mesh density criterion. Curved wires are first converted to multi-segment polylines and then subdivided further if necessary. At the connection points between two or more wires, junction basis functions are generated to ensure current continuity.  On the other hands, EM.Libera's Surface MoM solver requires a triangular surface mesh of surface and [[Solid Objects|solid objects]].The mesh generating algorithm tries to generate regularized triangular cells with almost equal surface areas across the entire structure. You can control the cell size using the "Mesh Density" parameter. By default, the mesh density is expressed in terms of the free-space wavelength. The default mesh density is 10 cells per wavelength. For meshing surfaces, a mesh density of 7 cells per wavelength roughly translates to 100 triangular cells per squared wavelength. Alternatively, you can base the definition of the mesh density on "Cell Edge Length" expressed in project units. [[Image:Info_icon.png|40px]] Click here to learn more about '''[[Mesh_Generation_Schemes_in_EM.Cube#Working_with_Mesh_Generator | Working with Mesh Generator ]]'''. [[Image:Info_icon.png|40px]] Click here to learn more about EM.Libera's '''[[Mesh_Generation_Schemes_in_EM.Cube#The_Triangular_Surface_Mesh_Generator | Triangular Surface Mesh Generator ]]'''. [[Image:Info_icon.png|40px]] Click here to learn more about EM.Libera's '''[[Mesh_Generation_Schemes_in_EM.Cube#The_Linear_Wireframe_Mesh_Generator | Linear Wireframe Mesh Generator ]]'''. === Mesh of Connected Objects ===  [[Image:MOM3.png|thumb|300px|EM.Libera's Mesh Hierarchy dialog.]] All the objects belonging to the same PEC or dielectric group are merged together using the Boolean union operation before meshing. If your structure contains attached, interconnected or overlapping [[Solid Objects|solid objects]], their internal common faces are removed and only the surface of the external faces is meshed. Similarly, all the [[Surface Objects|surface objects]] belonging to the same PEC group are merged together and their internal edges are removed before meshing. Note that a solid and a surface object belonging to the same PEC group might not always be merged properly.  When two objects belonging to two different material groups overlap or intersect each other, EM.Libera has to determine how to designate the overlap or common volume or surface. As an example, the figure below shows a dielectric cylinder sitting on top of a PEC plate. The two object share a circular area at the base of the cylinder. Are the cells on this circle metallic or do they belong to the dielectric material group? Note that the cells of the junction are displayed in a different color then those of either groups. To address problems of this kind, EM.Libera does provide a "Material Hierarchy" table, which you can modify. To access this table, select '''Menu > Simulate < discretization < Mesh Hierarchy...'''. The PEC groups by default have the highest priority and reside at the top of the table. You can select an group from the table and change its hierarch using the {{key|Move Up}} or {{key|Move Down}} buttons of the dialog. You can also change the color of junction cells that belong to each group.  <table><tr><td> [[Image:MOM1.png|thumb|360px|A dielectric cylinder attached to a PEC plate.]] </td><td> [[Image:MOM2.png|thumb|360px|The surface mesh of the dielectric cylinder and PEC plate.]] </td></tr></table> === Using Polymesh Objects to Connect Wires to Wireframe Surfaces ===  If the project workspace contains a line object, the wireframe mesh generator is used to discretize your physical structure. From the point of view of this mesh generator, all PEC [[Surface Objects|surface objects]] and PEC [[Solid Objects|solid objects]] are treated as wireframe objects. If you want to model a wire radiator connected to a metal surface, you have to make sure that the resulting wireframe mesh of the surface has a node exactly at the location where you want to connect your wire. This is not guaranteed automatically. However, you can use [[EM.Cube]]'s polymesh objects to accomplish this objective.  {{Note|In [[EM.Cube]], polymesh objects are regards as already-meshed objects and are not re-meshed again during a simulation.}}  You can convert any surface object or solid object to a polymesh using [[CubeCAD]]'s '''Polymesh Tool'''.  [[Image:Info_icon.png|40px]] Click here to learn more about '''[[Discretizing_Objects#Converting_Objects_to_Polymesh | Converting Object to Polymesh]]''' in [[EM.Cube]]. Once an object is converted to a polymesh, you can place your wire at any of its nodes. In that case, EM.Libera's Wire MoM engine will sense the coincident nodes between line segments and will create a junction basis function to ensure current continuity.  <table><tr><td> [[Image:MOM4.png|thumb|360px|Geometry of a monopole wire connected to a PEC plate.]] </td><td> [[Image:MOM5.png|thumb|360px|Placing the wire on the polymesh version of the PEC plate.]] </td></tr></table> == Excitation Sources ==
[[Image:MOM6B.png|thumb|320px|EM.Libera's Strip Gap Source dialog.]]
</table>
== Running 3D MoM Simulations == === EM.Libera's Simulation Modes === Once you have set up your structure in EM.Libera, have defined sources and observables and have examined the quality of the structure's mesh, you are ready to run a 3D MoM simulation. EM.Libera offers five simulation modes: {| class="wikitable"|-! scope="col"| Simulation Mode! scope="col"| Usage! scope="col"| Number of Engine Runs! scope="col"| Frequency ! scope="col"| Restrictions|-| style="width:120px;" | Single-Frequency Analysis| style="width:270px;" | Simulates the planar structure "As Is"| style="width:80px;" | Single run| style="width:250px;" | Runs at the center frequency fc| style="width:80px;" | None|-| style="width:120px;" | Frequency Sweep| style="width:270px;" | Varies the operating frequency of the surface MoM or wire MoM solvers | style="width:80px;" | Multiple runs | style="width:250px;" | Runs at a specified set of frequency samples or adds more frequency samples in an adaptive way| style="width:80px;" | None|-| style="width:120px;" | Parametric Sweep| style="width:270px;" | Varies the value(s) of one or more project variables| style="width:80px;" | Multiple runs| style="width:250px;" | Runs at the center frequency fc| style="width:80px;" | None|-| style="width:120px;" | Optimization| style="width:270px;" | Optimizes the value(s) of one or more project variables to achieve a design goal | style="width:80px;" | Multiple runs | style="width:250px;" | Runs at the center frequency fc| style="width:80px;" | None|-| style="width:120px;" | HDMR Sweep| style="width:270px;" | Varies the value(s) of one or more project variables to generate a compact model| style="width:80px;" | Multiple runs | style="width:250px;" | Runs at the center frequency fc| style="width:80px;" | None|} You can set the simulation mode from EM.Libera's "Simulation Run Dialog". A single-frequency analysis is a single-run simulation. All the other simulation modes in the above list are considered multi-run simulations. If you run a simulation without having defined any observables, no data will be generated at the end of the simulation. In multi-run simulation modes, certain [[parameters]] are varied and a collection of simulation data files are generated. At the end of a sweep simulation, you can graph the simulation results in EM.Grid or you can animate the 3D simulation data from the navigation tree. === Running a Single-Frequency MoM Analysis ===  In a single-frequency analysis, the structure of your project workspace is meshed at the center frequency of the project and analyzed by one of EM.Libera's two MoM solvers. If your project contains at least one line or curve object, the Wire MoM solver is automatically selected. Otherwise, the Surface MoM solver will always be used to simulate your numerical problem. In either case, the engine type is set automatically.  To open the Run Simulation Dialog, click the '''Run''' [[File:run_icon.png]] button of the '''Simulate Toolbar''' or select '''Menu > Simulate > Run...''' or use the keyboard shortcut {{key|Ctrl+R}}. By default, the Surface MoM solver is selected as your simulation engine. To start the simulation, click the {{key|Run}} button of this dialog. Once the 3D MoM simulation starts, a new dialog called '''Output Window''' opens up that reports the various stages of MoM simulation, displays the running time and shows the percentage of completion for certain tasks during the MoM simulation process. A prompt announces the completion of the MoM simulation.  <table><tr><td> [[Image:MOM9C.png|thumb|360px|EM.Libera's Simulation Run dialog showing Wire MoM engine as the solver.]] </td><td> [[Image:MOM9A.png|thumb|360px|EM.Libera's Simulation Run dialog showing Surface MoM engine as the solver.]] </td></tr></table> === Setting MoM Numerical Parameters ===  [[Image:MOM9B.png|thumb|360px|EM.Libera's Wire MoM Engine Settings dialog.]] MoM simulations involve a number of numerical [[parameters]] that normally take default values unless you change them. You can access these [[parameters]] and change their values by clicking on the '''Settings''' button next to the "Select Engine" dropdown list in the '''Run Dialog'''. Depending on which MoM solver has been chosen for solving your problem, the corresponding Engine Settings dialog opens up. First we discuss the Wire MoM Engine Settings dialog. In the '''Solver''' section of this dialog, you can choose the type of '''Linear Solver'''. The current options are '''LU''' and '''Bi-Conjugate Gradient (BiCG)'''. The LU solver is a direct solver and is the default option of the Wire MoM solver. The BiCG solver is iterative. If BiCG is selected, you have to set a '''Tolerance''' for its convergence. You can also change the maximum number of BiCG iterations by setting a new value for '''Max. No. of Solver Iterations / System Size'''.  The Surface MoM Engine Settings dialog is bit more extensive and provides more options. In the "Integral Equation" section of the dialog, you can choose among the three PEC formulations: EFIE, MFIE and CFIE. The EFIE formulation is the default option. In the case of the CFIE formulation, you can set a value for the "Alpha" parameter, which determines the weights for the EFIE and MFIE terms of the combine field formulation. The default value of this parameter is α = 0.4. The Surface MoM solver provides two types of linear solver: iterative TFQMR and direct LU. The former is the default option and asks for additional [[parameters]]: '''Error Tolerance''' and '''Max. No. of Solver Iterations'''. When the system size is large, typically above 3000, EM.Libera uses an acceleration technique called the Adaptive Integral Method (AIM) to speed up the linear system inversion. You can set the "AIM Grid Spacing" parameter in wavelength, which has a default value of 0.05λ<sub>0</sub>. EM.Libera's Surface MoM solver has been highly parallelized using MPI framework. When you install [[EM.Cube]] on your computer, the installer program also installs the [[Windows]] MPI package on your computer. If you are using a multicore CPU, taking advantage of the MPI-parallelized solver can speed up your simulations significantly. In the "MPI Settings" of the dialog, you can set the "Number of CPU's Used", which has a default value of 4 cores.  For both Wire MoM and Surface MoM solvers, you can instruct EM.Libera to write the contents of the MoM matrix and excitation and solutions vectors into data files Working with '''.DAT1''' file extensions. These files can be accessed from the '''Input/Output Files''' tab of the Data Manager. In both case, you have the option to uncheck the check box labeled "Superpose Incident plane Wave Fields". This option applies when your structure is excited by a plane wave source. When checked, the field sensors plot the total electric and magnetic field distributions including the incident field. Otherwise, only the scattered electric and magnetic field distributions are visualized.  <table><tr><td> [[Image:MOM9.png|thumb|600px|EM.Libera's Surface MoM Engine Settings dialog.]] </td></tr></table> == Working with 3D MoM Simulation Data ==
At the end of a 3D MoM simualtion, EM.Libera generates a number of output data files that contain all the computed simulation data. The primary solution of the Wire MoM simulation engine consists of the linear electric currents on the wires and wireframe structures. The primary solution of the Surface MoM simulation engine consists of the electric and magnetic surface currents on the PEC and dielectric objects. EM.Libera currently offers the following types of observables:
<td> [[Image:wire_pic52_tn.png|thumb|230px|The RCS of a metal plate structure: σ<sub>φ</sub>.]] </td>
<td> [[Image:wire_pic53_tn.png|thumb|230px|The total RCS of a metal plate structure: σ<sub>tot</sub>.]] </td>
</tr>
</table>
Â
== 3D Mesh Generation in EM.Libera ==
Â
=== A Note on EM.Libera's Mesh Types ===
Â
EM.Libera features two simulation engines, Wire MoM and Surface MoM, which require different mesh types. The Wire MoM simulator handles only wire objects and wireframe structures. These objects are discretized as elementary linear elements (filaments). A wire is simply subdivided into smaller segments according to a mesh density criterion. Curved wires are first converted to multi-segment polylines and then subdivided further if necessary. At the connection points between two or more wires, junction basis functions are generated to ensure current continuity.
Â
On the other hands, EM.Libera's Surface MoM solver requires a triangular surface mesh of surface and [[Solid Objects|solid objects]].The mesh generating algorithm tries to generate regularized triangular cells with almost equal surface areas across the entire structure. You can control the cell size using the "Mesh Density" parameter. By default, the mesh density is expressed in terms of the free-space wavelength. The default mesh density is 10 cells per wavelength. For meshing surfaces, a mesh density of 7 cells per wavelength roughly translates to 100 triangular cells per squared wavelength. Alternatively, you can base the definition of the mesh density on "Cell Edge Length" expressed in project units.
Â
[[Image:Info_icon.png|40px]] Click here to learn more about '''[[Mesh_Generation_Schemes_in_EM.Cube#Working_with_Mesh_Generator | Working with Mesh Generator ]]'''.
Â
[[Image:Info_icon.png|40px]] Click here to learn more about EM.Libera's '''[[Mesh_Generation_Schemes_in_EM.Cube#The_Triangular_Surface_Mesh_Generator | Triangular Surface Mesh Generator ]]'''.
Â
[[Image:Info_icon.png|40px]] Click here to learn more about EM.Libera's '''[[Mesh_Generation_Schemes_in_EM.Cube#The_Linear_Wireframe_Mesh_Generator | Linear Wireframe Mesh Generator ]]'''.
Â
=== Mesh of Connected Objects ===
Â
[[Image:MOM3.png|thumb|300px|EM.Libera's Mesh Hierarchy dialog.]]
All the objects belonging to the same PEC or dielectric group are merged together using the Boolean union operation before meshing. If your structure contains attached, interconnected or overlapping [[Solid Objects|solid objects]], their internal common faces are removed and only the surface of the external faces is meshed. Similarly, all the [[Surface Objects|surface objects]] belonging to the same PEC group are merged together and their internal edges are removed before meshing. Note that a solid and a surface object belonging to the same PEC group might not always be merged properly.
Â
When two objects belonging to two different material groups overlap or intersect each other, EM.Libera has to determine how to designate the overlap or common volume or surface. As an example, the figure below shows a dielectric cylinder sitting on top of a PEC plate. The two object share a circular area at the base of the cylinder. Are the cells on this circle metallic or do they belong to the dielectric material group? Note that the cells of the junction are displayed in a different color then those of either groups. To address problems of this kind, EM.Libera does provide a "Material Hierarchy" table, which you can modify. To access this table, select '''Menu > Simulate < discretization < Mesh Hierarchy...'''. The PEC groups by default have the highest priority and reside at the top of the table. You can select an group from the table and change its hierarch using the {{key|Move Up}} or {{key|Move Down}} buttons of the dialog. You can also change the color of junction cells that belong to each group.
Â
<table>
<tr>
<td> [[Image:MOM1.png|thumb|360px|A dielectric cylinder attached to a PEC plate.]] </td>
<td> [[Image:MOM2.png|thumb|360px|The surface mesh of the dielectric cylinder and PEC plate.]] </td>
</tr>
</table>
Â
=== Using Polymesh Objects to Connect Wires to Wireframe Surfaces ===
Â
If the project workspace contains a line object, the wireframe mesh generator is used to discretize your physical structure. From the point of view of this mesh generator, all PEC [[Surface Objects|surface objects]] and PEC [[Solid Objects|solid objects]] are treated as wireframe objects. If you want to model a wire radiator connected to a metal surface, you have to make sure that the resulting wireframe mesh of the surface has a node exactly at the location where you want to connect your wire. This is not guaranteed automatically. However, you can use [[EM.Cube]]'s polymesh objects to accomplish this objective.
Â
{{Note|In [[EM.Cube]], polymesh objects are regards as already-meshed objects and are not re-meshed again during a simulation.}}
Â
You can convert any surface object or solid object to a polymesh using [[CubeCAD]]'s '''Polymesh Tool'''.
Â
[[Image:Info_icon.png|40px]] Click here to learn more about '''[[Discretizing_Objects#Converting_Objects_to_Polymesh | Converting Object to Polymesh]]''' in [[EM.Cube]].
Â
Once an object is converted to a polymesh, you can place your wire at any of its nodes. In that case, EM.Libera's Wire MoM engine will sense the coincident nodes between line segments and will create a junction basis function to ensure current continuity.
Â
<table>
<tr>
<td> [[Image:MOM4.png|thumb|360px|Geometry of a monopole wire connected to a PEC plate.]] </td>
<td> [[Image:MOM5.png|thumb|360px|Placing the wire on the polymesh version of the PEC plate.]] </td>
</tr>
</table>
Â
== Running 3D MoM Simulations in EM.Libera ==
Â
=== EM.Libera's Simulation Modes ===
Â
Once you have set up your structure in EM.Libera, have defined sources and observables and have examined the quality of the structure's mesh, you are ready to run a 3D MoM simulation. EM.Libera offers five simulation modes:
Â
{| class="wikitable"
|-
! scope="col"| Simulation Mode
! scope="col"| Usage
! scope="col"| Number of Engine Runs
! scope="col"| Frequency
! scope="col"| Restrictions
|-
| style="width:120px;" | Single-Frequency Analysis
| style="width:270px;" | Simulates the planar structure "As Is"
| style="width:80px;" | Single run
| style="width:250px;" | Runs at the center frequency fc
| style="width:80px;" | None
|-
| style="width:120px;" | Frequency Sweep
| style="width:270px;" | Varies the operating frequency of the surface MoM or wire MoM solvers
| style="width:80px;" | Multiple runs
| style="width:250px;" | Runs at a specified set of frequency samples or adds more frequency samples in an adaptive way
| style="width:80px;" | None
|-
| style="width:120px;" | Parametric Sweep
| style="width:270px;" | Varies the value(s) of one or more project variables
| style="width:80px;" | Multiple runs
| style="width:250px;" | Runs at the center frequency fc
| style="width:80px;" | None
|-
| style="width:120px;" | Optimization
| style="width:270px;" | Optimizes the value(s) of one or more project variables to achieve a design goal
| style="width:80px;" | Multiple runs
| style="width:250px;" | Runs at the center frequency fc
| style="width:80px;" | None
|-
| style="width:120px;" | HDMR Sweep
| style="width:270px;" | Varies the value(s) of one or more project variables to generate a compact model
| style="width:80px;" | Multiple runs
| style="width:250px;" | Runs at the center frequency fc
| style="width:80px;" | None
|}
Â
You can set the simulation mode from EM.Libera's "Simulation Run Dialog". A single-frequency analysis is a single-run simulation. All the other simulation modes in the above list are considered multi-run simulations. If you run a simulation without having defined any observables, no data will be generated at the end of the simulation. In multi-run simulation modes, certain [[parameters]] are varied and a collection of simulation data files are generated. At the end of a sweep simulation, you can graph the simulation results in EM.Grid or you can animate the 3D simulation data from the navigation tree.
Â
=== Running a Single-Frequency MoM Analysis ===
Â
In a single-frequency analysis, the structure of your project workspace is meshed at the center frequency of the project and analyzed by one of EM.Libera's two MoM solvers. If your project contains at least one line or curve object, the Wire MoM solver is automatically selected. Otherwise, the Surface MoM solver will always be used to simulate your numerical problem. In either case, the engine type is set automatically.
Â
To open the Run Simulation Dialog, click the '''Run''' [[File:run_icon.png]] button of the '''Simulate Toolbar''' or select '''Menu > Simulate > Run...''' or use the keyboard shortcut {{key|Ctrl+R}}. By default, the Surface MoM solver is selected as your simulation engine. To start the simulation, click the {{key|Run}} button of this dialog. Once the 3D MoM simulation starts, a new dialog called '''Output Window''' opens up that reports the various stages of MoM simulation, displays the running time and shows the percentage of completion for certain tasks during the MoM simulation process. A prompt announces the completion of the MoM simulation.
Â
<table>
<tr>
<td> [[Image:MOM9C.png|thumb|360px|EM.Libera's Simulation Run dialog showing Wire MoM engine as the solver.]] </td>
<td> [[Image:MOM9A.png|thumb|360px|EM.Libera's Simulation Run dialog showing Surface MoM engine as the solver.]] </td>
</tr>
</table>
Â
=== Setting MoM Numerical Parameters ===
Â
[[Image:MOM9B.png|thumb|360px|EM.Libera's Wire MoM Engine Settings dialog.]]
MoM simulations involve a number of numerical [[parameters]] that normally take default values unless you change them. You can access these [[parameters]] and change their values by clicking on the '''Settings''' button next to the "Select Engine" dropdown list in the '''Run Dialog'''. Depending on which MoM solver has been chosen for solving your problem, the corresponding Engine Settings dialog opens up.
Â
First we discuss the Wire MoM Engine Settings dialog. In the '''Solver''' section of this dialog, you can choose the type of '''Linear Solver'''. The current options are '''LU''' and '''Bi-Conjugate Gradient (BiCG)'''. The LU solver is a direct solver and is the default option of the Wire MoM solver. The BiCG solver is iterative. If BiCG is selected, you have to set a '''Tolerance''' for its convergence. You can also change the maximum number of BiCG iterations by setting a new value for '''Max. No. of Solver Iterations / System Size'''.
Â
The Surface MoM Engine Settings dialog is bit more extensive and provides more options. In the "Integral Equation" section of the dialog, you can choose among the three PEC formulations: EFIE, MFIE and CFIE. The EFIE formulation is the default option. In the case of the CFIE formulation, you can set a value for the "Alpha" parameter, which determines the weights for the EFIE and MFIE terms of the combine field formulation. The default value of this parameter is α = 0.4. The Surface MoM solver provides two types of linear solver: iterative TFQMR and direct LU. The former is the default option and asks for additional [[parameters]]: '''Error Tolerance''' and '''Max. No. of Solver Iterations'''. When the system size is large, typically above 3000, EM.Libera uses an acceleration technique called the Adaptive Integral Method (AIM) to speed up the linear system inversion. You can set the "AIM Grid Spacing" parameter in wavelength, which has a default value of 0.05λ<sub>0</sub>. EM.Libera's Surface MoM solver has been highly parallelized using MPI framework. When you install [[EM.Cube]] on your computer, the installer program also installs the [[Windows]] MPI package on your computer. If you are using a multicore CPU, taking advantage of the MPI-parallelized solver can speed up your simulations significantly. In the "MPI Settings" of the dialog, you can set the "Number of CPU's Used", which has a default value of 4 cores.
Â
For both Wire MoM and Surface MoM solvers, you can instruct EM.Libera to write the contents of the MoM matrix and excitation and solutions vectors into data files with '''.DAT1''' file extensions. These files can be accessed from the '''Input/Output Files''' tab of the Data Manager. In both case, you have the option to uncheck the check box labeled "Superpose Incident plane Wave Fields". This option applies when your structure is excited by a plane wave source. When checked, the field sensors plot the total electric and magnetic field distributions including the incident field. Otherwise, only the scattered electric and magnetic field distributions are visualized.
Â
<table>
<tr>
<td> [[Image:MOM9.png|thumb|600px|EM.Libera's Surface MoM Engine Settings dialog.]] </td>
</tr>
</table>