Changes

*Field Visualization
*Data Manager
*EM.Grid
|All versions|{{download|http://www.emagtech.com/downloads/ProjectRepo/EMFerma_Lesson1.zip EMFerma_Lesson1}} }}
{{Note|We strongly recommend that you read through the first few tutorials and study them carefully before setting up your own projects.}}
 
[[Image:Back_icon.png|30px]] '''[[EM.Ferma | Back to EM.Ferma Manual]]'''
 
[[Image:Back_icon.png|30px]] '''[[EM.Cube#EM.Ferma_Documentation | Back to EM.Ferma Tutorial Gateway]]'''
 
[[Image:Download2x.png|30px]] '''[http://www.emagtech.com/downloads/ProjectRepo/EMFerma_Lesson1.zip Download projects related to this tutorial lesson]'''
==Getting Started==
Open the [[EM.Cube]] application by double-clicking on its icon on your desktop. By default, [[EM.Cube]] opens a blank project with the name “UntitledProj1” “UntitledProj0” in its [[Building_Geometrical_Constructions_in_CubeCAD | CubeCAD]] Module. You can start drawing objects and build up your physical structure right away. Or you can initiate a new project by selecting the <b>New</b> [[Image:fdtd_newb.png]] button of the System Toolbar or using the keyboard shortcut {{key|Ctrl+N}}. This opens up the '''New Project Dialog''', where you can enter a title for your new project and set its path on your hard drive. From the same dialog, you can also set the project’s length units, frequency units, center frequency and bandwidth.
<table>
== Creating a Charge Source Group ==
Before you draw a spherical charge object, you have to create a charge object category on the navigation tree. In [[EM.Ferma]], objects are grouped together and organized by their static behavior under the “Physical Structure” node of the navigation tree. There are several categories to choose from: fixed-potential PEC objects, dielectric/magnetic materials, volume charges, <i>etc</i>. All the objects belonging to the same charge group have the same color and the same charge density.
To create a new charge category, right-click on the '''Volume Charges(Heat Sources)''' item in the navigation tree and select <b>Insert New Charge Source...</b> from the contextual menu. The New Charge Source dialog opens up with a default name CS_1 and a default purple color. In the section titled "Source Properties", you will see a default value of -1e-5C/m<sup>3</sup> for '''Charge /Heat Density'''. This means a default negative charge. Replace this with a positive value of +1e-8 C/m<sup>3</sup>. Close Click the OK button and close the dialog and return to the project workspace (main window). The last object group created in the navigation tree remains as the "Active" group, and its name is displayed in bold letters, meaning that all the objects you draw will belong to this group.
<table>
<tr>
<td>
[[Image:Ferma_L1_Fig3a.png|thumb|left|480px|Creating a new charge category in EM.Ferma.]]
</td>
</tr>
<tr>
<td>
== Drawing a Spherical Object ==
Select the <b>Sphere Tool</b> from [[Image:sphereiconc.png]] button of the Object Toolbar or select the menu item '''Object &rarr; Solid &rarr; Sphere'''.
<table>
==Visualizing the Simulation Data==
[[EM.Cube]]’s computational modules usually generate two types of data: 2D and 3D. 2D data are graphed in <b>EM.Grid</b>. 3D data are visualized in [[EM.Cube]]’s project workspace, and the plots are usually overlaid on the physical structure. The field sensor section of the navigation tree has a list of twelve amplitude and phase plots for all the six field components: E<sub>x</sub>, E<sub>y</sub>, E<sub>z</sub>, and H<sub>x</sub>, H<sub>y</sub>, H<sub>z</sub>. There are also two additional plots for the magnitude of total electric field and total magnetic field as well as the electric scalar potential and the magnitude of the magnetic vector potential. In an electrostatic simulation, the magnetic field is assumed to be zero. Therefore, you will only have electric field and electric potential plots. Moreover, both the field and potential are real-valued. The electric potential is plotted on a color-coded intensity plots that may involve both negative and positive values. Click on any of these plots to display them in the project workspace. You can use the standard view operations such as dynamic zoom, rotate view, pan view, <i>etc</i>. to better examine these plots.
<table>
<tr>
<td>
[[Image:Ferma L1 Fig13Ferma_L1_Fig13_new.png|thumb|left|640px|The X-component of electric field distribution in the XY plane.]]
</td>
</tr>
<tr>
<td>
[[Image:Ferma L1 Fig17.png|thumb|left|550px680px|EM.Ferma's data manager showing a list of available 2D graphs and data files.]]
</td>
</tr>
</table>
Select the data files “Sensor_1_X_ETotal.DAT” and "Sensor_1_X_EPotential.DAT" by highlighting them in the data manager's list. Note that you can make multiple selections using your keyboard's {{key|Ctrl}} or {{key|Shift}} keys. Click the {{key|Plot}} button to open "EMof the dialog.Grid", [[EM.Cube]]'s graphing utility. The A PyPlot graph window pops up that shows the the total E-field and the electric potential are plotted as functions of the coordinate X on two Cartesian graphs in EM.Grid as shown in the figures below. The EM.Grid graphs are interactive. If you move the mouse around the graph, you can read the values of the graph on EM.Grid's Status Bar. You can also track the data on the plots. Click the '''Track Selected Plot''' [[file:Grid track icon.png]] button of EM.Grid's top toolbar. In this mode, a pair of crosshair lines appears on the graph that trace the data points on the selected plot. The horizontal and vertical axis values of each data point are displayed in the status bar.
The graphs are interactive. As you move the mouse on the graph, you can read the value of the horizontal axis (X) and the corresponding value of the total electric field distribution along the Y direction on the lower right corner of the status bar. The PyPlot window has also a number of controls that let you change the settings of your graph using your mouse. For example, using the Pan/Zoom button [[Image:Py_zoom_icon.png]], you can pan the graph with the left mouse button and zoom it in or out with the right mouse button. A combination of the two operations usually gives you an ideal scaling of your graph.  From the figure below, you can see that the electric field increases linearly from r = 0 to r = 5mm, where it reaches a value of 1.89V9V/m as read by the tracking crosshairs. This is very close to the value we calculated earlier. The electric field then quickly drops down as 1/r<sup>2</sup> in the free space.
<table>
<tr>
<td>
[[Image:Ferma L1 Fig18Fig19.png|thumb||left|480px|THE The 2D Cartesian graph of the total electric potential field along the X-axis.]]
</td>
</tr>
<tr>
<td>
[[Image:Ferma L1 Fig19Fig18.png|thumb||left|480px|THE The 2D Cartesian graph of the total electric field potential along the X-axis.]]
</td>
</tr>
== Adding a Second Identical Spherical Charge ==
While the "CS_1" charge group is active in the navigation tree, you can draw new geometric objects in the workspace under the same group and all of those object will have the same purple color and the same positive charge density. You can also copy and paste objects. Select Sphere_1 by clicking on it. It color changes to bright yellow, which is the default selection color. Click the '''Copy''' [[file:Copy.png]] button of the System Toolbar at the top of the project workspace or simply use the keyboard shortcut {{{key|Ctrl+C}}. Next, click the '''Paste''' [[file:Paste.png]] button of the System Toolbar or simply use the keyboard shortcut {{{key|Ctrl+V}} to place a copy of the selected object. When you paste a geometric object in [[EM.Cube]], the "Place" dialog pops up at the lower right corner of the screen. This gives you a chance to move and place your copy at the desired location. You can either enter the X, Y , Z components of the translation vector or just enter the coordinates of the destination. In this case, enter the coordinates (20mm, 0, 0).
<table>
</table>
The 3D field plots are displayed as intensity plots by default. You can also shows them as vector plots made up of a collection of arrows whose orientation, color and length indicate both the direction and strength of the field. To do so, right-click on the name of "Sensor_1 " in the navigation tree and select '''Properties''' from the contextual menu. In the field sensor dialog, choose '''Vector''' as the '''Plot Type'''. Also, set the values of '''Max Size''' to 0.5mm and '''Cone Length Ratio''' and '''Cone Radius Ratio''' to 0.9 5 as shown below. You can freeze any geometric objects to see other objects hidden behind, beneath or inside it. In that case, you will see a wireframe outline of the frozen object and you cannot select it. To freeze an object, right-click on its surface in the project workspace or right-click on its name in the navigation tree and select '''Freeze''' from the contextual menu. To unfreeze, repeat the same procedure. Freeze Sphere_1 and Sphere_2 objects. Now visualize the total electric field map as shown in the figure below.
<table>
<td>
[[Image:Ferma L1 Fig24.png|thumb|left|480px|Setting the plot type in the field sensor dialog.]]
</td>
</tr>
</table>
 
<table>
<tr>
<td>
[[Image:Ferma_L1_Fig25freeze.png|thumb|left|360px|Freezing an object in EM.Ferma.]]
</td>
</tr>
== Simulating Two Opposite Spherical Charges ==
In the last part of this tutorial lesson, you will add a negative spherical charge to your physical structure. For this purpose, you need to define a new volume charge source group. Repeat the same procedure as in the beginning of this tutorial lesson and define a charge source group called "CS_2". Choose a hot pink color for it and set its charge density to -1e-88C/m<sup>3</sup>.
<table>
<p>&nbsp;</p>
[[Image:Top_icon.png|30px]] '''[[#What_You_Will_Learn | Back to the Top of the Page]]'''
 
[[Image:Back_icon.png|40px]] '''[[EM.Cube#EM.Ferma_Tutorial_Lessons | Back to EM.Ferma Tutorial Gateway]]'''
4,612
edits