12.1.2                    Working with QuickWave project


Medium Adding


med
=QW_Modeller.addQWMedium("NAME")


Adds QuickWave medium with the given "NAME" to the Project Media Library. If the medium of name "NAME" already exists in the Project Media, the name of added medium will be "NAME001" or "NAME002" or have consecutive number.


med
is a new medium object. The medium parameters are set through medium object med. The exemplary medium parameters are set in the following way:


1.Medium type can be set using materialtype property of the medium object, using one of the following key words:

"PEC", "PMC", "Isotropic", "Anisotropic", "Dielectric_dispersive", "Meta_material", "Ferrite", "Plasma", "Metallic".


med.materialtype="Isotropic"


2.Permittivity can be set using Eps property:

med.Eps=2

or

med.Eps= [2,2.7,2.8] for an anisotropic medium.


Other parameters can be set in the similar way.



Medium Accessing


med
=QW_Modeller.getQWMedium("NAME")


Gets QuickWave medium with the given name "NAME" from Project Media. If there is no medium of name "NAME" an error message will appear.


med
is a medium of name "NAME".



QuickWave Objects Adding


obj
=QW_Modeller.addQWObject("TYPE","NAME")

obj=QW_Modeller.addQWObject("TYPE")


Adds QuickWave object of the given type "TYPE" and name "NAME" to the active project. If the name is not specified, the default name will be set. If the name "NAME" is already used in the project, the name of the added object will be "NAME001" or "NAME002" or have consecutive number.


The following key words for the TYPE are allowed:

"QW_Modeller::TemplatePort"

"QW_Modeller::PointPort"

"QW_Modeller::LumpedPointPort"

"QW_Modeller::MonitorBox"

"QW_Modeller::SnappingPlane"

"QW_Modeller::MeshBox"

"QW_Modeller::PlaneWaveBox"

"QW_Modeller::AbsorbingBox"

"QW_Modeller::AbsorbingWall"

"QW_Modeller::NTFBox"

"QW_Modeller::Wire"

"QW_Modeller::BHMRotationAxis"

"QW_Modeller::SubregionBorder"


obj
is a new QuickWave object. We can set object’s parameters (dependent on the object’s type) in the following way:


obj=QW_Modeller.addQWObject("QW_Modeller::TemplatePort","Port1")

obj.Type = "Source"



QuickWave Objects Accessing


obj
=QW_Modeller.getQWObject("NAME")


Gets QuickWave object with the given name "NAME". If there is no object of name "NAME", an error message will appear.


obj
is an already existing object of name "NAME". Using obj we can set object’s parameters (dependent on the type of the object).



QuickWave Settings
Objects Accessing


QuickWave Settings
objects contain various settings for QuickWave project and usually are not graphical objects. In QuickWave Settings objects group we find:


QW_QuickWave
– keeps export options settings (see Export Options chapter for more information)

QW_MediaLibrary – keeps active media and background medium settings (see Media chapter for more information)

QW_Circuit – keeps circuit settings and energy stop criterion settings (see Circuit Settings and Energy Stop Criterion chapters for more information)

QW_BHM – keeps settings for Basic Heating Module (see Basic Heating Module chapter for more information)

QW_PostprocessingS – keeps settings for S-Parameters postprocessing (see S-Parameters chapter for more information)

QW_PostprocessingNTF – keeps settings for NTF postprocessing (see NTF chapter for more information)

QW_PostprocessingNTFFA – keeps settings for NTFFA postprocessing (see NTF Fixed Angle chapter for more information)

QW_PostprocessingFD – keeps settings for FD-Probing postprocessing (see FD-Probing chapter for more information)

QW_PostprocessingPav – keeps settings for Power Available postprocessing (see Power Available chapter for more information)

QW_PostprocessingFieldMonitor – keeps settings for Fields Monitor postprocessing (see Fields Monitor chapter for more information)

QW_PostprocessingExH – keeps settings for ExH Time Integral postprocessing (see ExH Time Integral chapter for more information)

QW_PostprocessingQProny – keeps settings for QProny module (see QProny chapter for more information)

QW_Mesh – keeps settings for FDTD mesh and for mesh visualisation (see FDTD Mesh chapter for more information)

QW_Mesh_Borders – keeps settings for boundary conditions (see Borders chapter for more information)

QW_Tools – keeps settings for additional tools (i.e. show or hide bounding box of the whole project) and is reserved for future use

QW_SubregionBorders – keeps settings for Subregion Borders (see Subregions chapter for more information)


All QuickWave settings are available from python script by using directly the name of one of the above QuickWave settings object:


App.ActiveDocument.QW_Circuit.CircuitType = "3D"


App.ActiveDocument.QW_BHM.AllowBHM = True


App.ActiveDocument.QW_PostprocessingNTF.Frequencies = [5,10.5]


App.ActiveDocument.QW_Mesh.CellX = 1

App.ActiveDocument.QW_Mesh.CellY = 1.5

App.ActiveDocument.QW_Mesh.CellZ = 1.5


App.ActiveDocument.QW_Mesh_Borders.BorderYMin = "PMC"



Gui.ActiveDocument.QW_Mesh.LineColorElectric = (0.0,1.0,0.3)


Gui.ActiveDocument.QW_Tools.ShowBoundingBox = True



Project Bounding Box


bbox
=QW_Modeller.getProjectBoundingBoxAll()


Calculates and returns bounding box (boundary coordinates) for all objects in the active project.


bbox
contains bounding box in the vector form of Xmin, Ymin, Zmin, Xmax, Ymax, Zmax.


bbox=QW_Modeller.getProjectBoundingBoxAll()

box

BoundBox (-1, -2, -3, 9, 18, 27)



Mesh Generation


QW_Modeller.generateMesh("NAME")


Recalculates mesh in the project of name "NAME".



Export


App.ActiveDocument.saveAs("NAME")

QW_Modeller.exportToUDO(App.ActiveDocument.Name)


Exports project to QuickWave UDO file. The project should be saved firstly.



QuickWave


QW_Modeller.setQWEditorPath
("QW_EDITOR_PATH")


Set path to QW-Editor. QW_EDITOR_PATH should contain full path and QW-Editor file name.



path=QW_Modeller.getQWEditorPath
()


Get path to QW-Editor.



QW_Modeller.runQWEditor
()


Start QW-Editor.



QW_Modeller.setQWSimulatorPath
("QW_SIMULATOR_PATH")


Set path to QW-Simulator. QW_SIMULATOR_PATH should contain full path and QW-Simulator file name.



path=QW_Modeller.getQWSimulatorPath
()


Get path to QW-Simulator.



QW_Modeller.runQWSimulator
()


Start QW-Simulator.