diff --git a/examples/00-EDB/00_EDB_Create_VIA.py b/examples/00-EDB/00_EDB_Create_VIA.py index 86073dc44e8..4ddbb65ba5d 100644 --- a/examples/00-EDB/00_EDB_Create_VIA.py +++ b/examples/00-EDB/00_EDB_Create_VIA.py @@ -15,7 +15,7 @@ ###################################################################### # Import EDB layout object # ~~~~~~~~~~~~~~~~~~~~~~~~ -# Import the EDB layout object and initialize it on version 2023 R1. +# Import the EDB layout object and initialize it on version 2023 R2. ###################################################################### import time @@ -26,7 +26,7 @@ aedb_path = os.path.join(pyaedt.generate_unique_folder_name(), pyaedt.generate_unique_name("pcb") + ".aedb") print(aedb_path) -edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.1") +edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.2") #################### # Add stackup layers diff --git a/examples/00-EDB/01_edb_example.py b/examples/00-EDB/01_edb_example.py index 5808c020b8a..6df7a797c2d 100644 --- a/examples/00-EDB/01_edb_example.py +++ b/examples/00-EDB/01_edb_example.py @@ -25,8 +25,8 @@ ############################################################################### # Launch EDB # ~~~~~~~~~~ -# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R1 and SI units. -edb_version = "2023.1" +# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R2 and SI units. +edb_version = "2023.2" if os.path.exists(aedt_file): os.remove(aedt_file) edb = pyaedt.Edb(edbpath=targetfile, edbversion=edb_version) @@ -164,7 +164,7 @@ # Open Siwave and generate a report. This works on Window only. # from pyaedt import Siwave -# siwave = Siwave("2023.1") +# siwave = Siwave("2023.2") # siwave.open_project(siwave_file) # report_file = os.path.join(temp_folder,'Ansys.htm') # diff --git a/examples/00-EDB/02_edb_to_ipc2581.py b/examples/00-EDB/02_edb_to_ipc2581.py index c15a15746c3..f5733929697 100644 --- a/examples/00-EDB/02_edb_to_ipc2581.py +++ b/examples/00-EDB/02_edb_to_ipc2581.py @@ -30,9 +30,9 @@ ############################################################################### # Launch EDB # ~~~~~~~~~~ -# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R1 and SI units. +# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R2 and SI units. -edb = pyaedt.Edb(edbpath=targetfile, edbversion="2023.1") +edb = pyaedt.Edb(edbpath=targetfile, edbversion="2023.2") ############################################################################### diff --git a/examples/00-EDB/03_5G_antenna_example.py b/examples/00-EDB/03_5G_antenna_example.py index eec89135854..4d490fccef5 100644 --- a/examples/00-EDB/03_5G_antenna_example.py +++ b/examples/00-EDB/03_5G_antenna_example.py @@ -72,7 +72,7 @@ def points(self): tmpfold = tempfile.gettempdir() aedb_path = os.path.join(tmpfold, pyaedt.generate_unique_name("pcb") + ".aedb") print(aedb_path) -edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.1") +edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.2") ############################################################################### @@ -213,7 +213,7 @@ def points(self): # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Launch HFSS 3D Layout and open EDB. -h3d = pyaedt.Hfss3dLayout(projectname=aedb_path, specified_version="2023.1", new_desktop_session=True, +h3d = pyaedt.Hfss3dLayout(projectname=aedb_path, specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) ############################################################################### diff --git a/examples/00-EDB/04_edb_parametrized_design.py b/examples/00-EDB/04_edb_parametrized_design.py index b2431084a9e..abc2ed53286 100644 --- a/examples/00-EDB/04_edb_parametrized_design.py +++ b/examples/00-EDB/04_edb_parametrized_design.py @@ -8,7 +8,7 @@ # Perform required imports # ~~~~~~~~~~~~~~~~~~~~~~~~ # Perform required imports, which includes importing the ``Hfss3dlayout`` object -# and initializing it on version 2023 R1. +# and initializing it on version 2023 R2. import pyaedt import os @@ -27,7 +27,7 @@ aedb_path = os.path.join(pyaedt.generate_unique_folder_name(), pyaedt.generate_unique_name("pcb") + ".aedb") print(aedb_path) -edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.1") +edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.2") ###################################################################### # Define parameters @@ -281,8 +281,8 @@ # ~~~~~~~~~~~~~~~~ # Open EDB in AEDT. -h3d = pyaedt.Hfss3dLayout(projectname=aedb_path, specified_version="2023.1", - non_graphical=non_graphical) +h3d = pyaedt.Hfss3dLayout(projectname=aedb_path, specified_version="2023.2", + non_graphical=non_graphical, new_desktop_session=True) ############################################################################### # Add HFSS simulation setup diff --git a/examples/00-EDB/05_Plot_nets.py b/examples/00-EDB/05_Plot_nets.py index 7cce06c79ef..19a909f51cb 100644 --- a/examples/00-EDB/05_Plot_nets.py +++ b/examples/00-EDB/05_Plot_nets.py @@ -25,9 +25,9 @@ ############################################################################### # Launch EDB # ~~~~~~~~~~ -# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R1 and SI units. +# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R2 and SI units. -edb = pyaedt.Edb(edbpath=targetfolder, edbversion="2023.1") +edb = pyaedt.Edb(edbpath=targetfolder, edbversion="2023.2") ############################################################################### # Plot custom set of nets colored by layer diff --git a/examples/00-EDB/06_Advanced_EDB.py b/examples/00-EDB/06_Advanced_EDB.py index b346464d29d..b0cfab95b74 100644 --- a/examples/00-EDB/06_Advanced_EDB.py +++ b/examples/00-EDB/06_Advanced_EDB.py @@ -38,7 +38,7 @@ def _create_ground_planes(edb, layers): # ~~~~~~~~~~ # Create EDB. If the path doesn't exist, PyAEDT automatically generates a new AEDB folder. -edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.1") +edb = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.2") ################################################################################## # Create stackup layers diff --git a/examples/00-EDB/08_CPWG.py b/examples/00-EDB/08_CPWG.py index 6f5c9adf9c7..cf64d4be237 100644 --- a/examples/00-EDB/08_CPWG.py +++ b/examples/00-EDB/08_CPWG.py @@ -9,7 +9,7 @@ # Perform required imports # ~~~~~~~~~~~~~~~~~~~~~~~~ # Peform required imports. Importing the ``Hfss3dlayout`` object initializes it -# on version 2023 R1. +# on version 2023 R2. import pyaedt import os @@ -29,7 +29,7 @@ aedb_path = os.path.join(pyaedt.generate_unique_folder_name(), pyaedt.generate_unique_name("pcb") + ".aedb") print(aedb_path) -edbapp = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.1") +edbapp = pyaedt.Edb(edbpath=aedb_path, edbversion="2023.2") ############################################################################### # Define parameters @@ -123,8 +123,8 @@ # ~~~~~~~~~~~~~~~~ # Open EDB in AEDT. -h3d = pyaedt.Hfss3dLayout(projectname=aedb_path, specified_version="2023.1", - non_graphical=non_graphical) +h3d = pyaedt.Hfss3dLayout(projectname=aedb_path, specified_version="2023.2", + non_graphical=non_graphical, new_desktop_session=True) ############################################################################### # Create wave ports diff --git a/examples/00-EDB/09_Configuration.py b/examples/00-EDB/09_Configuration.py index eb980184079..d8a96cafdad 100644 --- a/examples/00-EDB/09_Configuration.py +++ b/examples/00-EDB/09_Configuration.py @@ -10,7 +10,7 @@ # Perform required imports # ~~~~~~~~~~~~~~~~~~~~~~~~ # Peform required imports. Importing the ``Hfss3dlayout`` object initializes it -# on version 2023 R1. +# on version 2023 R2. import os import pyaedt @@ -35,9 +35,9 @@ ############################################################################### # Launch EDB # ~~~~~~~~~~ -# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R1 and SI units. +# Launch the :class:`pyaedt.Edb` class, using EDB 2023 R2 and SI units. -edbapp = pyaedt.Edb(target_aedb, edbversion="2023.1") +edbapp = pyaedt.Edb(target_aedb, edbversion="2023.2") ############################################################################### # Import Definitions # ~~~~~~~~~~~~~~~~~~ @@ -174,7 +174,7 @@ # Open Aedt # ~~~~~~~~~ # Project folder aedb will be opened in AEDT Hfss3DLayout and loaded. -h3d = pyaedt.Hfss3dLayout(specified_version="2023.1", projectname=target_aedb, non_graphical=non_graphical) +h3d = pyaedt.Hfss3dLayout(specified_version="2023.2", projectname=target_aedb, non_graphical=non_graphical, new_desktop_session=True) ############################################################################### # Analyze diff --git a/examples/00-EDB/10_GDS_workflow.py b/examples/00-EDB/10_GDS_workflow.py index 3eb651fe34c..119dd7d6437 100644 --- a/examples/00-EDB/10_GDS_workflow.py +++ b/examples/00-EDB/10_GDS_workflow.py @@ -88,7 +88,7 @@ from pyaedt import Edb -edb = Edb(gds_out, edbversion="2023.1", technology_file=os.path.join(temppath, "output.xml")) +edb = Edb(gds_out, edbversion="2023.2", technology_file=os.path.join(temppath, "output.xml")) ############################################################################### # Plot Stackup diff --git a/examples/00-EDB/11_post_layout_parameterization.py b/examples/00-EDB/11_post_layout_parameterization.py index 376d9ddc076..4925a6e4217 100644 --- a/examples/00-EDB/11_post_layout_parameterization.py +++ b/examples/00-EDB/11_post_layout_parameterization.py @@ -27,7 +27,7 @@ # Download and open example layout file in edb format # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ edb_fpath = pyaedt.downloads.download_file('edb/ANSYS-HSD_V1.aedb',destination=temppath) -appedb = Edb(edb_fpath, edbversion="2023.1") +appedb = Edb(edb_fpath, edbversion="2023.2") ############################################################################### # Cutout diff --git a/examples/01-HFSS3DLayout/Dcir_in_3DLayout.py b/examples/01-HFSS3DLayout/Dcir_in_3DLayout.py index 1dcc0870644..d780f782671 100644 --- a/examples/01-HFSS3DLayout/Dcir_in_3DLayout.py +++ b/examples/01-HFSS3DLayout/Dcir_in_3DLayout.py @@ -21,7 +21,7 @@ ##################################################################################### # Load example board into EDB -edbversion = "2023.1" +edbversion = "2023.2" appedb = pyaedt.Edb(local_path, edbversion=edbversion) ##################################################################################### diff --git a/examples/01-HFSS3DLayout/EDB_in_3DLayout.py b/examples/01-HFSS3DLayout/EDB_in_3DLayout.py index d5c48dd42fd..48e973b8e9a 100644 --- a/examples/01-HFSS3DLayout/EDB_in_3DLayout.py +++ b/examples/01-HFSS3DLayout/EDB_in_3DLayout.py @@ -39,7 +39,7 @@ # ~~~~~~~~~~~ # Launch AEDT 2022R2 in graphical mode using SI units. -desktopVersion = "2023.1" +desktopVersion = "2023.2" ############################################################################### # Initialize AEDT and launch HFSS 3D Layout diff --git a/examples/01-HFSS3DLayout/HFSS3DLayout_Via.py b/examples/01-HFSS3DLayout/HFSS3DLayout_Via.py index 6a6571da01e..e769c1a26b6 100644 --- a/examples/01-HFSS3DLayout/HFSS3DLayout_Via.py +++ b/examples/01-HFSS3DLayout/HFSS3DLayout_Via.py @@ -18,14 +18,14 @@ # Set non-graphical mode. # You can set ``non_graphical`` either to ``True`` or ``False``. -non_graphical = False +non_graphical = True ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. -h3d = pyaedt.Hfss3dLayout(specified_version="2023.1", new_desktop_session=True, non_graphical=non_graphical) +h3d = pyaedt.Hfss3dLayout(specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) ############################################################################### # Set up variables diff --git a/examples/01-HFSS3DLayout/Hfss3DComponent.py b/examples/01-HFSS3DLayout/Hfss3DComponent.py index 1ba8dfb8f74..2fcf13eaa54 100644 --- a/examples/01-HFSS3DLayout/Hfss3DComponent.py +++ b/examples/01-HFSS3DLayout/Hfss3DComponent.py @@ -25,7 +25,7 @@ sig_height = "5mil" max_steps = 3 freq = "3GHz" -desktop_version = "2023.1" +desktop_version = "2023.2" new_session = True ############################################################################### @@ -46,7 +46,7 @@ # ~~~~~~~~~~~ # Launch HFSS application -hfss = pyaedt.Hfss(new_desktop_session=True, specified_version="2023.1", non_graphical=non_graphical) +hfss = pyaedt.Hfss(new_desktop_session=True, specified_version="2023.2", non_graphical=non_graphical) hfss.solution_type = "Terminal" diff --git a/examples/01-Modeling-Setup/Configurations.py b/examples/01-Modeling-Setup/Configurations.py index af24e1c0dd6..b87f31de41b 100644 --- a/examples/01-Modeling-Setup/Configurations.py +++ b/examples/01-Modeling-Setup/Configurations.py @@ -48,7 +48,7 @@ project_full_name = pyaedt.downloads.download_icepak(pyaedt.generate_unique_folder_name(folder_name="Graphic_Card")) -ipk = pyaedt.Icepak(projectname=project_full_name, specified_version="2023.1", +ipk = pyaedt.Icepak(projectname=project_full_name, specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) ipk.autosave_disable() diff --git a/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py b/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py index 1e925194858..6f38864eb4b 100644 --- a/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py +++ b/examples/01-Modeling-Setup/HFSS_CoordinateSystem.py @@ -23,9 +23,9 @@ ############################################################################### # Launch AEDT in graphical mode # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. -d = pyaedt.launch_desktop(specified_version="2023.1", non_graphical=non_graphical, new_desktop_session=True) +d = pyaedt.launch_desktop(specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True) ############################################################################### # Insert HFSS design diff --git a/examples/01-Modeling-Setup/Optimetrics.py b/examples/01-Modeling-Setup/Optimetrics.py index bf8e4c93dc7..c1b2009ac28 100644 --- a/examples/01-Modeling-Setup/Optimetrics.py +++ b/examples/01-Modeling-Setup/Optimetrics.py @@ -27,7 +27,7 @@ # Initialize the ``Hfss`` object and create two needed design variables, # ``w1`` and ``w2``. -hfss = pyaedt.Hfss(specified_version="2023.1", new_desktop_session=True, non_graphical=non_graphical) +hfss = pyaedt.Hfss(specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) hfss["w1"] = "1mm" hfss["w2"] = "100mm" diff --git a/examples/01-Modeling-Setup/Polyline_Primitives.py b/examples/01-Modeling-Setup/Polyline_Primitives.py index 76ce2c669c8..c3c3a35c984 100644 --- a/examples/01-Modeling-Setup/Polyline_Primitives.py +++ b/examples/01-Modeling-Setup/Polyline_Primitives.py @@ -24,7 +24,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~ # Create a :class:`pyaedt.maxwell.Maxwell3d` object and set the unit type to ``"mm"``. -M3D = pyaedt.Maxwell3d(solution_type="Transient", designname="test_polyline_3D", specified_version="2023.1", +M3D = pyaedt.Maxwell3d(solution_type="Transient", designname="test_polyline_3D", specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical, ) M3D.modeler.model_units = "mm" prim3D = M3D.modeler diff --git a/examples/02-HFSS/01-Cable_Modeling_Workflow.py b/examples/02-HFSS/01-Cable_Modeling_Workflow.py deleted file mode 100644 index db885785ae7..00000000000 --- a/examples/02-HFSS/01-Cable_Modeling_Workflow.py +++ /dev/null @@ -1,420 +0,0 @@ -""" -HFSS: Cable Modeling --------------------- -This example shows how you can use PyAEDT to use all the cable modeling features available in HFSS. -Cable Modeling requires a pre-defined JSON file with all the cables and cable harness properties to set. -In this example the properties are explicitly set but the user can also set them manually inside the file, save it -and instantiate the Cable class to access all the available methods. -""" - -############################################################################### -# Perform required imports -# ~~~~~~~~~~~~~~~~~~~~~~~~ -# Perform required imports. - -import os -import pyaedt -from pyaedt.modules.CableModeling import Cable - -# Set local temporary folder to export the cable library into. -# set_cable_properties.json is the required json file to work with the Cable class. -# Its structure must never change except for the properties values. -temp_folder = pyaedt.generate_unique_folder_name() -project_path = pyaedt.downloads.download_file("cable_modeling", "cable_modeling.aedt", temp_folder) -json_path = pyaedt.downloads.download_file("cable_modeling", "set_cable_properties.json", temp_folder) - -############################################################################### -# Launch AEDT -# ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. This example uses SI units. - -desktopVersion = "2023.1" - -############################################################################### -# Set non-graphical mode -# ~~~~~~~~~~~~~~~~~~~~~~ -# Set non-graphical mode. -# You can set ``non_graphical`` either to ``True`` or ``False``. - -non_graphical = False - -############################################################################### -# Launch AEDT -# ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. - -d = pyaedt.launch_desktop(desktopVersion, non_graphical=non_graphical, new_desktop_session=True) - -############################################################################### -# Launch HFSS -# ~~~~~~~~~~~ -# Launch HFSS 2023 R1 in graphical mode. - -hfss = pyaedt.Hfss(projectname=project_path, non_graphical=non_graphical) -hfss.modeler.model_units = "mm" - -############################################################################### -# New instance of Cable modeling class -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# New instance of Cable modeling class which requires as input -# the aedt app and the json file path containing all the cable properties. - -cable = Cable(hfss, json_path) - -############################################################################### -# Create cable bundle -# ~~~~~~~~~~~~~~~~~~~ -# Properties for cable bundle are updated (user can change them manually -# in json file). -# A cable bundle with insulation jacket type is created. - -cable_props = pyaedt.data_handler.json_to_dict(json_path) - -cable_props["Add_Cable"] = "True" -cable_props["Cable_prop"]["CableType"] = "bundle" -cable_props["Cable_prop"]["IsJacketTypeInsulation"] = "True" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["InsulationJacketParams"][ - "InsThickness" - ] = "3.66mm" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["InsulationJacketParams"][ - "JacketMaterial" - ] = "pec" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["InsulationJacketParams"][ - "InnerDiameter" - ] = "2.88mm" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleAttribs"]["Name"] = "Bundle_Cable_Insulation" - -cable = Cable(hfss, cable_props) -cable.create_cable() - -############################################################################### -# Create cable bundle -# ~~~~~~~~~~~~~~~~~~~ -# A cable bundle with no jacket type is created. - -cable_props["Cable_prop"]["IsJacketTypeInsulation"] = "False" -cable_props["Cable_prop"]["IsJacketTypeNoJacket"] = "True" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleAttribs"]["Name"] = "Bundle_Cable_NoJacket" - -# Cable class has to be reinitialized because json has changed. -# It accepts in input both a json file path and a dictionary. -cable = Cable(hfss, cable_props) -cable.create_cable() - -############################################################################### -# Create cable bundle -# ~~~~~~~~~~~~~~~~~~~ -# A cable bundle with shielding jacket type is created. - -cable_props["Cable_prop"]["IsJacketTypeNoJacket"] = "False" -cable_props["Cable_prop"]["IsJacketTypeBraidShield"] = "True" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["BraidShieldJacketParams"][ - "JacketMaterial" - ] = "pec" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["BraidShieldJacketParams"][ - "InnerDiameter" - ] = "6mm" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["BraidShieldJacketParams"][ - "NumCarriers" - ] = "36" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["BraidShieldJacketParams"][ - "NumWiresInCarrier" - ] = "52" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["BraidShieldJacketParams"][ - "WireDiameter" - ] = "0.242424mm" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["BraidShieldJacketParams"][ - "WeaveAngle" - ] = "33deg" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleAttribs"]["Name"] = "Bundle_Cable_Shielding" - -cable = Cable(hfss, cable_props) -cable.create_cable() - -############################################################################### -# Update cable bundle -# ~~~~~~~~~~~~~~~~~~~ -# The first cable bundle (insulation jacket type) is updated. - -cable_props["Update_Cable"] = "True" -cable_props["Cable_prop"]["IsJacketTypeNoJacket"] = "False" -cable_props["Cable_prop"]["IsJacketTypeBraidShield"] = "False" -cable_props["Cable_prop"]["IsJacketTypeInsulation"] = "True" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleAttribs"]["Name"] = "Bundle_Cable_Insulation" -cable_props["Cable_prop"]["UpdatedName"] = "New_updated_name_cable_bundle_insulation" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["InsulationJacketParams"][ - "InsThickness" - ] = "4mm" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["InsulationJacketParams"][ - "JacketMaterial" - ] = "pec" -cable_props["CableManager"]["Definitions"]["CableBundle"]["BundleParams"]["InsulationJacketParams"][ - "InnerDiameter" - ] = "1.2mm" - -cable = Cable(hfss, cable_props) -cable.update_cable_properties() - -############################################################################### -# Create straight wire cable -# ~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Create straight wire cable. - -cable_props["Add_Cable"] = "True" -cable_props["Cable_prop"]["CableType"] = "straight wire" -cable_props["Update_Cable"] = "False" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["WireStandard"] = "ISO" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["WireGauge"] = "2.5" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["CondDiameter"] = "10mm" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["CondMaterial"] = "pec" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["InsThickness"] = "0.9mm" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["InsMaterial"] = "copper" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireParams"]["InsType"] = "Thin Wall" -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireAttribs"]["Name"] = "straight_wire_cable" - -cable = Cable(hfss, cable_props) -cable.create_cable() - -# Create 3 straight wire cables for late to create the cable harness. - -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireAttribs"]["Name"] = "stwire1" -cable = Cable(hfss, cable_props) -cable.create_cable() -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireAttribs"]["Name"] = "stwire2" -cable = Cable(hfss, cable_props) -cable.create_cable() -cable_props["CableManager"]["Definitions"]["StWireCable"]["StWireAttribs"]["Name"] = "stwire3" -cable = Cable(hfss, cable_props) -cable.create_cable() - -############################################################################### -# Create twisted pair cable -# ~~~~~~~~~~~~~~~~~~~~~~~~~ -# Create twisted pair cable. - -cable_props["Add_Cable"] = "True" -cable_props["Cable_prop"]["CableType"] = "twisted pair" -cable_props["Update_Cable"] = "False" -cable_props["CableManager"]["Definitions"]["TwistedPairCable"]["TwistedPairParams"][ - "StraightWireCableID" - ] = 1023 -cable_props["CableManager"]["Definitions"]["TwistedPairCable"]["TwistedPairParams"][ - "IsLayLengthSpecified" - ] = "False" -cable_props["CableManager"]["Definitions"]["TwistedPairCable"]["TwistedPairParams"]["LayLength"] = "34mm" -cable_props["CableManager"]["Definitions"]["TwistedPairCable"]["TwistedPairParams"]["TurnsPerMeter"] = "99" -cable_props["CableManager"]["Definitions"]["TwistedPairCable"]["TwistedPairAttribs"][ - "Name" - ] = "twisted_pair_cable" - -cable = Cable(hfss, cable_props) -cable.create_cable() - -############################################################################### -# Add cables to bundle -# ~~~~~~~~~~~~~~~~~~~~ -# Add straight wire cables to bundle. - -cable_props["Add_Cable"] = "False" -cable_props["Update_Cable"] = "False" -cable_props["Add_CablesToBundle"] = "True" -cable_props["CablesToBundle_prop"]["CablesToAdd"] = "straight_wire_cable" -cable_props["CablesToBundle_prop"]["BundleCable"] = "New_updated_name_cable_bundle_insulation" -cable_props["CablesToBundle_prop"]["NumberOfCableToAdd"] = 3 - -cable = Cable(hfss, cable_props) -cable.add_cable_to_bundle() - -############################################################################### -# Remove a cable or a list of cables -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Remove a cable or a list of cables. - -cable_props["Add_Cable"] = "False" -cable_props["Update_Cable"] = "False" -cable_props["Add_CablesToBundle"] = "False" -cable_props["Remove_Cable"] = "True" -cable_props["Cable_prop"]["CablesToRemove"] = "Bundle_Cable_Shielding" - -cable = Cable(hfss, cable_props) -cable.remove_cables() - -############################################################################### -# Create clock sources -# ~~~~~~~~~~~~~~~~~~~~ -# Create and update a clock source. - -cable_props["Add_Cable"] = "False" -cable_props["Update_Cable"] = "False" -cable_props["Add_CablesToBundle"] = "False" -cable_props["Remove_Cable"] = "False" -cable_props["Add_Source"] = "True" -cable_props["Source_prop"]["AddClockSource"] = "True" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["Period"] = "40us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["LowPulseVal"] = "0.1V" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["HighPulseVal"] = "2V" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["Risetime"] = "5us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["Falltime"] = "10us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["PulseWidth"] = "23us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["TDSourceAttribs"]["Name"] = "clock_test_1" - -cable = Cable(hfss, cable_props) -cable.create_clock_source() - -cable_props["Add_Source"] = "False" -cable_props["Update_Source"] = "True" -cable_props["Source_prop"]["UpdateClockSource"] = "True" -cable_props["Source_prop"]["UpdatedSourceName"] = "update_clock_test_1" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["TDSourceAttribs"]["Name"] = "clock_test_1" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["Period"] = "45us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["LowPulseVal"] = "0.3V" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["HighPulseVal"] = "3V" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["Risetime"] = "4us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["Falltime"] = "15us" -cable_props["CableManager"]["TDSources"]["ClockSourceDef"]["ClockSignalParams"]["PulseWidth"] = "26us" - -cable = Cable(hfss, cable_props) -cable.update_clock_source() - -############################################################################### -# Create pwl sources -# ~~~~~~~~~~~~~~~~~~ -# Create a pwl source. - -cable_props["Add_Cable"] = "False" -cable_props["Update_Cable"] = "False" -cable_props["Add_CablesToBundle"] = "False" -cable_props["Remove_Cable"] = "False" -cable_props["Add_Source"] = "True" -cable_props["Update_Source"] = "False" -cable_props["Source_prop"]["AddClockSource"] = "False" -cable_props["Source_prop"]["AddPwlSource"] = "True" -cable_props["CableManager"]["TDSources"]["PWLSourceDef"]["PWLSignalParams"]["SignalValues"] = [ - "0V", - "0.5V", - "0V", - "3V", - "4V", - "0V", - ] -cable_props["CableManager"]["TDSources"]["PWLSourceDef"]["PWLSignalParams"]["TimeValues"] = [ - "0ns", - "1ns", - "2ns", - "3ns", - "4ns", - "5ns", - ] -cable_props["CableManager"]["TDSources"]["PWLSourceDef"]["TDSourceAttribs"]["Name"] = "pwl4" - -cable = Cable(hfss, cable_props) -cable.create_pwl_source() - -# Update a pwl source. - -cable_props["Add_Source"] = "False" -cable_props["Update_Source"] = "True" -cable_props["Source_prop"]["AddClockSource"] = "False" -cable_props["Source_prop"]["AddPwlSource"] = "False" -cable_props["Source_prop"]["UpdateClockSource"] = "False" -cable_props["Source_prop"]["UpdatePwlSource"] = "True" -cable_props["Source_prop"]["UpdatedSourceName"] = "update_pwl_source" -cable_props["CableManager"]["TDSources"]["PWLSourceDef"]["PWLSignalParams"]["SignalValues"] = [ - "0V", - "0.5V", - "0V", - "3V", - "4V", - "9V", - "0V", - ] -cable_props["CableManager"]["TDSources"]["PWLSourceDef"]["PWLSignalParams"]["TimeValues"] = [ - "0ns", - "1ns", - "2ns", - "3ns", - "4ns", - "5ns", - "6ns", - ] -cable_props["CableManager"]["TDSources"]["PWLSourceDef"]["TDSourceAttribs"]["Name"] = "pwl1" -cable_props["Source_prop"]["UpdatedSourceName"] = "updated_pwl1" - -cable = Cable(hfss, cable_props) -cable.update_pwl_source() - -# Create a pwl source from file. - -pwl_path = pyaedt.downloads.download_file("cable_modeling", "import_pwl.pwl", temp_folder) - -cable_props["Add_Source"] = "True" -cable_props["Update_Source"] = "False" -cable_props["Source_prop"]["AddClockSource"] = "False" -cable_props["Source_prop"]["AddPwlSource"] = "True" -cable_props["Source_prop"]["UpdateClockSource"] = "False" -cable_props["Source_prop"]["UpdatePwlSource"] = "False" -cable_props["Source_prop"]["AddPwlSourceFromFile"] = pwl_path - -cable = Cable(hfss, cable_props) -cable.create_pwl_source_from_file() - -# Remove clock source. - -cable_props["Add_Cable"] = "False" -cable_props["Update_Cable"] = "False" -cable_props["Add_CablesToBundle"] = "False" -cable_props["Remove_Cable"] = "False" -cable_props["Add_Source"] = "False" -cable_props["Update_Source"] = "False" -cable_props["Remove_Source"] = "True" -cable_props["Source_prop"]["AddClockSource"] = "False" -cable_props["Source_prop"]["AddPwlSource"] = "False" -cable_props["Source_prop"]["SourcesToRemove"] = "update_clock_test_1" - -cable = Cable(hfss, cable_props) -cable.remove_source() - -############################################################################### -# Create cable harness -# ~~~~~~~~~~~~~~~~~~~~ -# Create cable harness. - -cable_props["Add_Cable"] = "False" -cable_props["Update_Cable"] = "False" -cable_props["Add_CablesToBundle"] = "False" -cable_props["Remove_Cable"] = "False" -cable_props["Add_Source"] = "False" -cable_props["Update_Source"] = "False" -cable_props["Remove_Source"] = "False" -cable_props["Add_CableHarness"] = "True" -cable_props["CableHarness_prop"]["Name"] = "cable_harness_test" -cable_props["CableHarness_prop"]["Bundle"] = "New_updated_name_cable_bundle_insulation" -cable_props["CableHarness_prop"]["TwistAngleAlongRoute"] = "20deg" -cable_props["CableHarness_prop"]["Polyline"] = "Polyline1" -cable_props["CableHarness_prop"]["AutoOrient"] = "False" -cable_props["CableHarness_prop"]["XAxis"] = "Undefined" -cable_props["CableHarness_prop"]["XAxisOrigin"] = ["0mm", "0mm", "0mm"] -cable_props["CableHarness_prop"]["XAxisEnd"] = ["0mm", "0mm", "0mm"] -cable_props["CableHarness_prop"]["ReverseYAxisDirection"] = "True" -cable_props["CableHarness_prop"]["CableTerminationsToInclude"][0]["CableName"] = "straight_wire_cable" -cable_props["CableHarness_prop"]["CableTerminationsToInclude"][1]["CableName"] = "straight_wire_cable1" -cable_props["CableHarness_prop"]["CableTerminationsToInclude"][2]["CableName"] = "straight_wire_cable2" - -cable = Cable(hfss, cable_props) -cable.create_cable_harness() - -############################################################################### -# Plot model -# ~~~~~~~~~~ -# Plot the model. - -hfss.plot(show=False, export_path=os.path.join(hfss.working_directory, "Cable.jpg"), plot_air_objects=True) - - -############################################################################### -# Save project and close AEDT -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Save the project and close AEDT. - -hfss.save_project() -hfss.release_desktop() diff --git a/examples/02-HFSS/Array.py b/examples/02-HFSS/Array.py index a024d0c3558..1d3950e471c 100644 --- a/examples/02-HFSS/Array.py +++ b/examples/02-HFSS/Array.py @@ -33,7 +33,7 @@ # Launch HFSS and save the project. project_name = pyaedt.generate_unique_project_name(project_name="array") hfss = pyaedt.Hfss(projectname=project_name, - specified_version="2023.1", + specified_version="2023.2", designname="Array_Simple", non_graphical=non_graphical, new_desktop_session=True) diff --git a/examples/02-HFSS/Flex_CPWG.py b/examples/02-HFSS/Flex_CPWG.py index 20e9c56a6bc..9c16dbb82db 100644 --- a/examples/02-HFSS/Flex_CPWG.py +++ b/examples/02-HFSS/Flex_CPWG.py @@ -24,9 +24,9 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. -hfss = pyaedt.Hfss(specified_version="2023.1", +hfss = pyaedt.Hfss(specified_version="2023.2", solution_type="DrivenTerminal", new_desktop_session=True, non_graphical=non_graphical) diff --git a/examples/02-HFSS/HFSS_Choke.py b/examples/02-HFSS/HFSS_Choke.py index 30684013ec6..d6501bc473c 100644 --- a/examples/02-HFSS/HFSS_Choke.py +++ b/examples/02-HFSS/HFSS_Choke.py @@ -25,10 +25,10 @@ ############################################################################### # Launch HFSS # ~~~~~~~~~~~ -# Launches HFSS 2023 R1 in graphical mode. +# Launches HFSS 2023 R2 in graphical mode. hfss = pyaedt.Hfss(projectname=project_name, - specified_version="2023.1", + specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True, solution_type="Terminal") diff --git a/examples/02-HFSS/HFSS_Dipole.py b/examples/02-HFSS/HFSS_Dipole.py index 965a769d55f..9ea2fafc8ce 100644 --- a/examples/02-HFSS/HFSS_Dipole.py +++ b/examples/02-HFSS/HFSS_Dipole.py @@ -25,14 +25,14 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. -d = pyaedt.launch_desktop("2023.1", non_graphical=non_graphical, new_desktop_session=True) +d = pyaedt.launch_desktop("2023.2", non_graphical=non_graphical, new_desktop_session=True) ############################################################################### # Launch HFSS # ~~~~~~~~~~~ -# Launch HFSS 2023 R1 in graphical mode. +# Launch HFSS 2023 R2 in graphical mode. hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal") diff --git a/examples/02-HFSS/HFSS_Spiral.py b/examples/02-HFSS/HFSS_Spiral.py index 796ee0c94ef..beda948c8cc 100644 --- a/examples/02-HFSS/HFSS_Spiral.py +++ b/examples/02-HFSS/HFSS_Spiral.py @@ -25,10 +25,10 @@ ############################################################# # Launch HFSS # ~~~~~~~~~~~ -# Launch HFSS 2023 R1 in non-graphical mode and change the +# Launch HFSS 2023 R2 in non-graphical mode and change the # units to microns. -hfss = pyaedt.Hfss(specified_version="2023.1", non_graphical=non_graphical, designname="A1", new_desktop_session=True) +hfss = pyaedt.Hfss(specified_version="2023.2", non_graphical=non_graphical, designname="A1", new_desktop_session=True) hfss.modeler.model_units = "um" p = hfss.modeler diff --git a/examples/02-HFSS/HFSS_eigenmode.py b/examples/02-HFSS/HFSS_eigenmode.py index a2e74354e23..5208c5b7109 100644 --- a/examples/02-HFSS/HFSS_eigenmode.py +++ b/examples/02-HFSS/HFSS_eigenmode.py @@ -41,9 +41,9 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. -desktop_version = "2023.1" +desktop_version = "2023.2" ############################################################################### # Set non-graphical mode @@ -56,14 +56,14 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. d = pyaedt.launch_desktop(desktop_version, non_graphical=non_graphical, new_desktop_session=True) ############################################################################### # Launch HFSS # ~~~~~~~~~~~ -# Launch HFSS 2023 R1 in graphical mode. +# Launch HFSS 2023 R2 in graphical mode. hfss = pyaedt.Hfss(projectname=project_path, non_graphical=non_graphical) diff --git a/examples/02-HFSS/Waveguide_Filter.py b/examples/02-HFSS/Waveguide_Filter.py index 97e523fd04c..42ed095620e 100644 --- a/examples/02-HFSS/Waveguide_Filter.py +++ b/examples/02-HFSS/Waveguide_Filter.py @@ -56,7 +56,7 @@ # Instantiate the HFSS application hfss = pyaedt.Hfss(projectname=project_name + '.aedt', - specified_version="2023.1", + specified_version="2023.2", designname="filter", non_graphical=non_graphical, new_desktop_session=True, diff --git a/examples/02-SBR+/SBR_City_Import.py b/examples/02-SBR+/SBR_City_Import.py index d3095988199..88b66b020a1 100644 --- a/examples/02-SBR+/SBR_City_Import.py +++ b/examples/02-SBR+/SBR_City_Import.py @@ -30,7 +30,7 @@ app = Hfss( designname="Ansys", solution_type="SBR+", - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical ) diff --git a/examples/02-SBR+/SBR_Doppler_Example.py b/examples/02-SBR+/SBR_Doppler_Example.py index ea2e09aae13..07a015299d6 100644 --- a/examples/02-SBR+/SBR_Doppler_Example.py +++ b/examples/02-SBR+/SBR_Doppler_Example.py @@ -17,7 +17,7 @@ # ~~~~~~~~~~~ # Launch AEDT. -aedt_version = "2023.1" +aedt_version = "2023.2" projectname = "MicroDoppler_with_ADP" designname = "doppler" library_path = pyaedt.downloads.download_multiparts() diff --git a/examples/02-SBR+/SBR_Example.py b/examples/02-SBR+/SBR_Example.py index 11685e9f3f3..c9d979f77e8 100644 --- a/examples/02-SBR+/SBR_Example.py +++ b/examples/02-SBR+/SBR_Example.py @@ -33,14 +33,14 @@ projectname=project_full_name, designname="Cassegrain_", solution_type="SBR+", - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical ) source = pyaedt.Hfss(projectname=target.project_name, designname="feeder", - specified_version="2023.1", + specified_version="2023.2", ) ############################################################################### diff --git a/examples/02-SBR+/SBR_Time_Plot.py b/examples/02-SBR+/SBR_Time_Plot.py index 69c2c343696..247e4c69a85 100644 --- a/examples/02-SBR+/SBR_Time_Plot.py +++ b/examples/02-SBR+/SBR_Time_Plot.py @@ -28,7 +28,7 @@ project_file = downloads.download_sbr_time() -hfss = Hfss(projectname=project_file, specified_version="2023.1", non_graphical=non_graphical, new_desktop_session=True) +hfss = Hfss(projectname=project_file, specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True) hfss.analyze() diff --git a/examples/03-Maxwell/Maxwell2D_DCConduction.py b/examples/03-Maxwell/Maxwell2D_DCConduction.py index 5c6cea080b7..d65034dddf6 100644 --- a/examples/03-Maxwell/Maxwell2D_DCConduction.py +++ b/examples/03-Maxwell/Maxwell2D_DCConduction.py @@ -17,7 +17,7 @@ # ``Maxwell2d`` class named ``m2d``. m2d = pyaedt.Maxwell2d( - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, close_on_exit=True, solution_type="DCConduction", diff --git a/examples/03-Maxwell/Maxwell2D_Electrostatic.py b/examples/03-Maxwell/Maxwell2D_Electrostatic.py index 818071780e7..df21b3763f8 100644 --- a/examples/03-Maxwell/Maxwell2D_Electrostatic.py +++ b/examples/03-Maxwell/Maxwell2D_Electrostatic.py @@ -20,7 +20,7 @@ # Initialize Maxwell 2D, providing the version, path to the project, and the design # name and type. -desktopVersion = '2023.1' +desktopVersion = '2023.2' sName = 'MySetupAuto' sType = 'Electrostatic' diff --git a/examples/03-Maxwell/Maxwell2D_NissanLeaf.py b/examples/03-Maxwell/Maxwell2D_NissanLeaf.py index 4a2a60cc299..77550391bfc 100644 --- a/examples/03-Maxwell/Maxwell2D_NissanLeaf.py +++ b/examples/03-Maxwell/Maxwell2D_NissanLeaf.py @@ -21,7 +21,7 @@ # Initialize Maxwell 2D, providing the version, path to the project, and the design # name and type. -desktopVersion = "2023.1" +desktopVersion = "2023.2" sName = "MySetupAuto" sType = "TransientXY" @@ -701,11 +701,11 @@ def create_cs_magnets(pm_id, cs_name, point_direction): # ~~~~~~~~~~~~~~~~~~~~~~~ # Create a multiplot report. -for k, v in post_params_multiplot.items(): - M2D.post.create_report(expressions=list(k), setup_sweep_name="", domain="Sweep", variations=None, - primary_sweep_variable="Time", secondary_sweep_variable=None, - report_category=None, plot_type="Rectangular Plot", context=None, subdesign_id=None, - polyline_points=1001, plotname=v) +# for k, v in post_params_multiplot.items(): +# M2D.post.create_report(expressions=list(k), setup_sweep_name="", domain="Sweep", variations=None, +# primary_sweep_variable="Time", secondary_sweep_variable=None, +# report_category=None, plot_type="Rectangular Plot", context=None, subdesign_id=None, +# polyline_points=1001, plotname=v) ########################################################## # Create flux lines plot on region @@ -725,7 +725,7 @@ def create_cs_magnets(pm_id, cs_name, point_direction): # Analyze and save the project. M2D.save_project() -M2D.analyze_setup(sName) +M2D.analyze_setup(sName, use_auto_settings=False) ############################################### # Close AEDT diff --git a/examples/03-Maxwell/Maxwell2D_Transient.py b/examples/03-Maxwell/Maxwell2D_Transient.py index fc0748a85c6..c65c9b89ab8 100644 --- a/examples/03-Maxwell/Maxwell2D_Transient.py +++ b/examples/03-Maxwell/Maxwell2D_Transient.py @@ -39,7 +39,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Insert a Maxwell 2D design and save the project. -maxwell_2d = pyaedt.Maxwell2d(solution_type="TransientXY", specified_version="2023.1", non_graphical=non_graphical, +maxwell_2d = pyaedt.Maxwell2d(solution_type="TransientXY", specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True, projectname=pyaedt.generate_unique_project_name()) ############################################################################### diff --git a/examples/03-Maxwell/Maxwell3DTeam7.py b/examples/03-Maxwell/Maxwell3DTeam7.py index b594ce03929..f04c2031d93 100644 --- a/examples/03-Maxwell/Maxwell3DTeam7.py +++ b/examples/03-Maxwell/Maxwell3DTeam7.py @@ -32,7 +32,7 @@ Project_Name = "COMPUMAG" Design_Name = "TEAM 7 Asymmetric Conductor" Solver = "EddyCurrent" -DesktopVersion = "2023.1" +DesktopVersion = "2023.2" M3D = Maxwell3d( projectname=generate_unique_project_name(), diff --git a/examples/03-Maxwell/Maxwell3D_Choke.py b/examples/03-Maxwell/Maxwell3D_Choke.py index 6c18263d640..d21690b8d1e 100644 --- a/examples/03-Maxwell/Maxwell3D_Choke.py +++ b/examples/03-Maxwell/Maxwell3D_Choke.py @@ -19,12 +19,12 @@ # You can define ``non_graphical`` either to ``True`` or ``False``. non_graphical = False -version = "2023.1" +version = "2023.2" ############################################################################### # Launch Maxwell3D # ~~~~~~~~~~~~~~~~ -# Launch Maxwell 3D 2023 R1 in graphical mode. +# Launch Maxwell 3D 2023 R2 in graphical mode. m3d = pyaedt.Maxwell3d(projectname=pyaedt.generate_unique_project_name(), solution_type="EddyCurrent", diff --git a/examples/03-Maxwell/Maxwell3D_Segmentation.py b/examples/03-Maxwell/Maxwell3D_Segmentation.py index 7b18de40721..e012e6b4e18 100644 --- a/examples/03-Maxwell/Maxwell3D_Segmentation.py +++ b/examples/03-Maxwell/Maxwell3D_Segmentation.py @@ -34,7 +34,7 @@ # Launch Maxwell 3D. m3d = Maxwell3d(projectname=aedt_file, - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) diff --git a/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py b/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py index 68666243fca..d93025e6f78 100644 --- a/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py +++ b/examples/03-Maxwell/Maxwell3D_Team3_bath_plate.py @@ -30,7 +30,7 @@ project_name = "COMPUMAG" design_name = "TEAM 3 Bath Plate" Solver = "EddyCurrent" -desktop_version = "2023.1" +desktop_version = "2023.2" m3d = pyaedt.Maxwell3d( projectname=pyaedt.generate_unique_project_name(), diff --git a/examples/03-Maxwell/Maxwell_Control_Program.py b/examples/03-Maxwell/Maxwell_Control_Program.py index 7127b9f57c2..182bccaf34c 100644 --- a/examples/03-Maxwell/Maxwell_Control_Program.py +++ b/examples/03-Maxwell/Maxwell_Control_Program.py @@ -38,7 +38,7 @@ # Launch Maxwell 2D. m2d = Maxwell2d(projectname=aedt_file, - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) diff --git a/examples/03-Maxwell/Maxwell_Magnet.py b/examples/03-Maxwell/Maxwell_Magnet.py index 0d8b664f2fa..5a5abc53db4 100644 --- a/examples/03-Maxwell/Maxwell_Magnet.py +++ b/examples/03-Maxwell/Maxwell_Magnet.py @@ -24,10 +24,10 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. m3d = Maxwell3d(projectname=generate_unique_project_name(), - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical) diff --git a/examples/04-Icepak/Icepak_3DComponents_Example.py b/examples/04-Icepak/Icepak_3DComponents_Example.py index feb38307621..9f498290f99 100644 --- a/examples/04-Icepak/Icepak_3DComponents_Example.py +++ b/examples/04-Icepak/Icepak_3DComponents_Example.py @@ -21,7 +21,7 @@ # ~~~~~~~~~~~~~~~ # Open a new project in non-graphical mode. -ipk = Icepak(projectname=os.path.join(temp_folder, "Heatsink.aedt"), specified_version="2023.1", non_graphical=True, +ipk = Icepak(projectname=os.path.join(temp_folder, "Heatsink.aedt"), specified_version="2023.2", non_graphical=True, close_on_exit=True, new_desktop_session=True) # Remove air region created by default because it is not needed as the heatsink will be exported as a 3dcomponent diff --git a/examples/04-Icepak/Icepak_CSV_Import.py b/examples/04-Icepak/Icepak_CSV_Import.py index 0363f0f3f96..4a7c09826f4 100644 --- a/examples/04-Icepak/Icepak_CSV_Import.py +++ b/examples/04-Icepak/Icepak_CSV_Import.py @@ -33,7 +33,7 @@ temp_folder = pyaedt.generate_unique_folder_name() ipk = pyaedt.Icepak(projectname=os.path.join(temp_folder, "Icepak_CSV_Import.aedt"), - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical ) diff --git a/examples/04-Icepak/Icepak_ECAD_Import.py b/examples/04-Icepak/Icepak_ECAD_Import.py index 871410c6e81..29015d05934 100644 --- a/examples/04-Icepak/Icepak_ECAD_Import.py +++ b/examples/04-Icepak/Icepak_ECAD_Import.py @@ -39,7 +39,7 @@ temp_folder = pyaedt.generate_unique_folder_name() ipk = pyaedt.Icepak(projectname=os.path.join(temp_folder, "Icepak_ECAD_Import.aedt"), - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical ) diff --git a/examples/04-Icepak/Icepak_Example.py b/examples/04-Icepak/Icepak_Example.py index 0fa20a3d9ae..f66fe1f7501 100644 --- a/examples/04-Icepak/Icepak_Example.py +++ b/examples/04-Icepak/Icepak_Example.py @@ -29,7 +29,7 @@ project_temp_name = pyaedt.downloads.download_icepak(temp_folder) ipk = pyaedt.Icepak(projectname=project_temp_name, - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical ) diff --git a/examples/04-Icepak/Sherlock_Example.py b/examples/04-Icepak/Sherlock_Example.py index 8ab012175a8..94cf9b5a538 100644 --- a/examples/04-Icepak/Sherlock_Example.py +++ b/examples/04-Icepak/Sherlock_Example.py @@ -43,9 +43,9 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. +# Launch AEDT 2023 R2 in graphical mode. -d = pyaedt.launch_desktop(specified_version="2023.1", non_graphical=non_graphical, new_desktop_session=True) +d = pyaedt.launch_desktop(specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True) start = time.time() material_list = os.path.join(input_dir, material_name) diff --git a/examples/05-Q3D/Q2D_Example_CPWG.py b/examples/05-Q3D/Q2D_Example_CPWG.py index 5f3afd0253e..c7f12e637f8 100644 --- a/examples/05-Q3D/Q2D_Example_CPWG.py +++ b/examples/05-Q3D/Q2D_Example_CPWG.py @@ -19,11 +19,11 @@ # You can set ``non_graphical`` either to ``True`` or ``False``. non_graphical = False -desktop_version = "2023.1" +desktop_version = "2023.2" ############################################################################### # Launch AEDT and 2D Extractor # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode and launch 2D Extractor. This example +# Launch AEDT 2023 R2 in graphical mode and launch 2D Extractor. This example # uses SI units. q = pyaedt.Q2d(specified_version=desktop_version, diff --git a/examples/05-Q3D/Q2D_Example_Stripline.py b/examples/05-Q3D/Q2D_Example_Stripline.py index 12bae97a6a7..a36df6f8956 100644 --- a/examples/05-Q3D/Q2D_Example_Stripline.py +++ b/examples/05-Q3D/Q2D_Example_Stripline.py @@ -24,12 +24,12 @@ ############################################################################### # Launch AEDT and 2D Extractor # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode and launch 2D Extractor. This example +# Launch AEDT 2023 R2 in graphical mode and launch 2D Extractor. This example # uses SI units. q = pyaedt.Q2d(projectname=project_path, designname="differential_stripline", - specified_version="2023.1", + specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True ) diff --git a/examples/05-Q3D/Q3D_DC_IR.py b/examples/05-Q3D/Q3D_DC_IR.py index a4989b41737..cabbe6c6ea3 100644 --- a/examples/05-Q3D/Q3D_DC_IR.py +++ b/examples/05-Q3D/Q3D_DC_IR.py @@ -32,7 +32,7 @@ # ~~~~~~~~ # Open the EDB project and create a cutout on the selected nets # before exporting to Q3D. -edb = pyaedt.Edb(aedb_project, edbversion="2023.1") +edb = pyaedt.Edb(aedb_project, edbversion="2023.2") edb.cutout(["1.2V_AVDLL_PLL", "1.2V_AVDDL", "1.2V_DVDDL", "NetR106_1"], ["GND"], output_aedb_path=output_edb, @@ -89,7 +89,7 @@ edb.save_edb() edb.close_edb() -h3d = pyaedt.Hfss3dLayout(output_edb, specified_version="2023.1", non_graphical=False, new_desktop_session=True) +h3d = pyaedt.Hfss3dLayout(output_edb, specified_version="2023.2", non_graphical=False, new_desktop_session=True) ############################################################################### # Export to Q3D diff --git a/examples/05-Q3D/Q3D_Example.py b/examples/05-Q3D/Q3D_Example.py index 55113af9fc8..2bf882c57f0 100644 --- a/examples/05-Q3D/Q3D_Example.py +++ b/examples/05-Q3D/Q3D_Example.py @@ -34,10 +34,10 @@ ############################################################################### # Launch AEDT and Q3D Extractor # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode and launch Q3D Extractor. This example uses SI units. +# Launch AEDT 2023 R2 in graphical mode and launch Q3D Extractor. This example uses SI units. q = pyaedt.Q3d(projectname=pyaedt.generate_unique_project_name(), - specified_version="2023.1", + specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True) @@ -166,5 +166,6 @@ # ~~~~~~~~~~ # After the simulation completes, you can close AEDT or release it using the # ``release_desktop`` method. All methods provide for saving projects before closing. - +pyaedt.settings.enable_debug_logger = False +pyaedt.settings.enable_debug_methods_argument_logger = False q.release_desktop(close_projects=True, close_desktop=True) diff --git a/examples/05-Q3D/Q3D_from_EDB.py b/examples/05-Q3D/Q3D_from_EDB.py index 18b07893660..022ddc41c63 100644 --- a/examples/05-Q3D/Q3D_from_EDB.py +++ b/examples/05-Q3D/Q3D_from_EDB.py @@ -31,7 +31,7 @@ # ~~~~~~~~ # Open the edb project and created a cutout on the selected nets # before exporting to Q3D. -edb = pyaedt.Edb(aedb_project, edbversion="2023.1") +edb = pyaedt.Edb(aedb_project, edbversion="2023.2") edb.cutout(["CLOCK_I2C_SCL", "CLOCK_I2C_SDA"], ["GND"], output_aedb_path=output_edb, use_pyaedt_extent_computing=True, ) @@ -73,7 +73,7 @@ edb.save_edb() edb.close_edb() -h3d = pyaedt.Hfss3dLayout(output_edb, specified_version="2023.1", non_graphical=True, new_desktop_session=True) +h3d = pyaedt.Hfss3dLayout(output_edb, specified_version="2023.2", non_graphical=True, new_desktop_session=True) ############################################################################### # Export to Q3D diff --git a/examples/06-Multiphysics/Hfss_Icepak_Coupling.py b/examples/06-Multiphysics/Hfss_Icepak_Coupling.py index d89d914e07a..393d46ca912 100644 --- a/examples/06-Multiphysics/Hfss_Icepak_Coupling.py +++ b/examples/06-Multiphysics/Hfss_Icepak_Coupling.py @@ -25,7 +25,7 @@ # You can set ``non_graphical`` either to ``True`` or ``False``. non_graphical = False -desktopVersion = "2023.1" +desktopVersion = "2023.2" ############################################################################### # Open project @@ -308,15 +308,6 @@ surflist = ipkapp.modeler.get_object_faces("inner") + ipkapp.modeler.get_object_faces("outer") plot5 = ipkapp.post.create_fieldplot_surface(surflist, "SurfTemperature") -ipkapp.post.plot_field_from_fieldplot( - plot5.name, - project_path=results_folder, - meshplot=False, - imageformat="jpg", - view="isometric", - show=False, -) - aedtapp.save_project() ################################################################################ @@ -356,7 +347,7 @@ report.add_sub_chapter("Temperature Plot") report.add_text("This section contains Multiphysics temperature plot.") -report.add_image(os.path.join(results_folder, plot5.name+".jpg"), "Coaxial Cable Temperatures") +#report.add_image(os.path.join(results_folder, plot5.name+".jpg"), "Coaxial Cable Temperatures") report.add_toc() report.save_pdf(results_folder, "AEDT_Results.pdf") diff --git a/examples/06-Multiphysics/Hfss_Mechanical.py b/examples/06-Multiphysics/Hfss_Mechanical.py index 675459e85b7..da3989e7235 100644 --- a/examples/06-Multiphysics/Hfss_Mechanical.py +++ b/examples/06-Multiphysics/Hfss_Mechanical.py @@ -33,7 +33,7 @@ # ~~~~~~~~~~ # Start HFSS and initialize the PyAEDT object. -version = "2023.1" +version = "2023.2" hfss = pyaedt.Hfss(projectname=project_temp_name, specified_version=version, non_graphical=non_graphical, new_desktop_session=True) pin_names = hfss.excitations diff --git a/examples/07-Circuit/Circuit_AMI.py b/examples/07-Circuit/Circuit_AMI.py index 91a350b17ed..21045388daa 100644 --- a/examples/07-Circuit/Circuit_AMI.py +++ b/examples/07-Circuit/Circuit_AMI.py @@ -24,9 +24,9 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. This example uses SI units. +# Launch AEDT 2023 R2 in graphical mode. This example uses SI units. -desktopVersion = "2023.1" +desktopVersion = "2023.2" ########################################################## # Set non-graphical mode diff --git a/examples/07-Circuit/Circuit_Example.py b/examples/07-Circuit/Circuit_Example.py index d88fc3b0212..500170b4a1b 100644 --- a/examples/07-Circuit/Circuit_Example.py +++ b/examples/07-Circuit/Circuit_Example.py @@ -17,9 +17,9 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. This example uses SI units. +# Launch AEDT 2023 R2 in graphical mode. This example uses SI units. -desktop_version = "2023.1" +desktop_version = "2023.2" ############################################################################### # Set non-graphical mode diff --git a/examples/07-Circuit/Circuit_Siwave_Multizones.py b/examples/07-Circuit/Circuit_Siwave_Multizones.py index 370b91951b9..25dc68945bf 100644 --- a/examples/07-Circuit/Circuit_Siwave_Multizones.py +++ b/examples/07-Circuit/Circuit_Siwave_Multizones.py @@ -30,9 +30,9 @@ ############################################################################### # AEDT version # ~~~~~~~~~~~~ -# Sets the Aedt version to 2023 R1. +# Sets the Aedt version to 2023 R2. -edb_version = "2023.1" +edb_version = "2023.2" ##################################################################################### # Ground net diff --git a/examples/07-Circuit/Circuit_Subcircuit_Example.py b/examples/07-Circuit/Circuit_Subcircuit_Example.py index 670def7e6b6..ed2cffd087e 100644 --- a/examples/07-Circuit/Circuit_Subcircuit_Example.py +++ b/examples/07-Circuit/Circuit_Subcircuit_Example.py @@ -24,10 +24,10 @@ ############################################################################### # Launch AEDT with Circuit # ~~~~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode with Circuit. +# Launch AEDT 2023 R2 in graphical mode with Circuit. circuit = pyaedt.Circuit(projectname=pyaedt.generate_unique_project_name(), - specified_version="2023.1", + specified_version="2023.2", non_graphical=non_graphical, new_desktop_session=True ) diff --git a/examples/07-Circuit/Circuit_Transient.py b/examples/07-Circuit/Circuit_Transient.py index 1d8a31c0e81..4f1f1fa994c 100644 --- a/examples/07-Circuit/Circuit_Transient.py +++ b/examples/07-Circuit/Circuit_Transient.py @@ -26,10 +26,10 @@ ############################################################################### # Launch AEDT with Circuit # ~~~~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode with Circuit. +# Launch AEDT 2023 R2 in graphical mode with Circuit. cir = pyaedt.Circuit(projectname=pyaedt.generate_unique_project_name(), - specified_version="2023.1", + specified_version="2023.2", new_desktop_session=True, non_graphical=non_graphical ) diff --git a/examples/07-Circuit/Create_Netlist.py b/examples/07-Circuit/Create_Netlist.py index a520cd693b9..e71a1de0778 100644 --- a/examples/07-Circuit/Create_Netlist.py +++ b/examples/07-Circuit/Create_Netlist.py @@ -22,8 +22,8 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. This example uses SI units. -desktopVersion = "2023.1" +# Launch AEDT 2023 R2 in graphical mode. This example uses SI units. +desktopVersion = "2023.2" ############################################################################### # Set non-graphical mode diff --git a/examples/07-Circuit/Reports.py b/examples/07-Circuit/Reports.py index d0cd28e0386..5c3a5d2fc6a 100644 --- a/examples/07-Circuit/Reports.py +++ b/examples/07-Circuit/Reports.py @@ -21,9 +21,9 @@ ############################################################################### # Launch AEDT # ~~~~~~~~~~~ -# Launch AEDT 2023 R1 in graphical mode. This example uses SI units. +# Launch AEDT 2023 R2 in graphical mode. This example uses SI units. -desktopVersion = "2023.1" +desktopVersion = "2023.2" ########################################################## # Set non-graphical mode @@ -55,7 +55,7 @@ # or a fully customized one. The following code creates a simple setup and changes # the JSON file to customize it. In a spectrum report, you can add limitilines and # notes and edit axes, the grid, and the legend. You can create custom reports -# in non-graphical mode in AEDT 2023 R1 and later. +# in non-graphical mode in AEDT 2023 R2 and later. report1 = cir.post.create_report_from_configuration(os.path.join(project_path,'Spectrum_CISPR_Basic.json')) @@ -68,7 +68,7 @@ # Create a transient report. You can read and modify the JSON file # before running the script. The following code modifies the traces # before generating the report. You can create custom reports in non-graphical -# mode in AEDT 2023 R1 and later. +# mode in AEDT 2023 R2 and later. if non_graphical: props = pyaedt.data_handler.json_to_dict(os.path.join(project_path, 'Transient_CISPR_Basic.json')) @@ -85,7 +85,7 @@ # ~~~~~~~~~~~~~~~~~~ # Create an eye diagram. If the JSON file contains an eye mask, you can create # an eye diagram and fully customize it. You can create custom reports in -# non-graphical mode in AEDT 2023 R1 and later. +# non-graphical mode in AEDT 2023 R2 and later. report4 = cir.post.create_report_from_configuration(os.path.join(project_path, 'EyeDiagram_CISPR_Basic.json')) diff --git a/examples/07-EMIT/EMIT_Example.py b/examples/07-EMIT/EMIT_Example.py index 771b3a2900e..81ddfefe08f 100644 --- a/examples/07-EMIT/EMIT_Example.py +++ b/examples/07-EMIT/EMIT_Example.py @@ -25,7 +25,7 @@ non_graphical = False NewThread = True -desktop_version = "2023.1" +desktop_version = "2023.2" ############################################################################### diff --git a/examples/07-EMIT/EMIT_HFSS_Example.py b/examples/07-EMIT/EMIT_HFSS_Example.py deleted file mode 100644 index 9bdfb50b604..00000000000 --- a/examples/07-EMIT/EMIT_HFSS_Example.py +++ /dev/null @@ -1,135 +0,0 @@ -""" -EMIT: HFSS to EMIT coupling ---------------------------- -This example shows how you can use PyAEDT to open an AEDT project with -an HFSS design, create an EMIT design in the project, and link the HFSS design -as a coupling link in the EMIT design. -""" -############################################################################### -# Perform required imports -# ~~~~~~~~~~~~~~~~~~~~~~~~ -# Perform required imports. -# -# sphinx_gallery_thumbnail_path = "Resources/emit_hfss.png" - -import os - -# Import required modules -import pyaedt -from pyaedt.generic.filesystem import Scratch -from pyaedt.emit_core.emit_constants import TxRxMode, ResultType - -############################################################################### -## Set non-graphical mode -# ~~~~~~~~~~~~~~~~~~~~~~ -# Set non-graphical mode. -# You can set ``non_graphical`` either to ``True`` or ``False``. -# The Boolean parameter ``new_thread`` defines whether to create a new instance -# of AEDT or try to connect to an existing instance of it. -# -# The following code uses AEDT 2023 R1. - -non_graphical = False -NewThread = True -desktop_version = "2023.1" -scratch_path = pyaedt.generate_unique_folder_name() - -############################################################################### -# Launch AEDT with EMIT -# ~~~~~~~~~~~~~~~~~~~~~ -# Launch AEDT with EMIT. The ``Desktop`` class initializes AEDT and starts it -# on the specified version and in the specified graphical mode. - -d = pyaedt.launch_desktop(desktop_version, non_graphical, NewThread) - -temp_folder = os.path.join(scratch_path, ("EmitHFSSExample")) -if not os.path.exists(temp_folder): - os.mkdir(temp_folder) - -example_name = "Cell Phone RFI Desense" -example_aedt = example_name + ".aedt" -example_lock = example_aedt + ".lock" -example_pdf_file = example_name + " Example.pdf" - -example_dir = os.path.join(d.install_path, "Examples\\EMIT") -example_project = os.path.join(example_dir, example_aedt) -example_pdf = os.path.join(example_dir, example_pdf_file) - -######################################################################################################## -# If the ``Cell Phone RFT Defense`` example is not -# in the installation directory, exit from this example. - -if not os.path.exists(example_project): - msg = """ - Cell phone RFT Desense example file is not in the - Examples/EMIT directory under the EDT installation. You cannot run this example. - """ - print(msg) - d.release_desktop(True, True) - exit() - -my_project = os.path.join(temp_folder, example_aedt) -my_project_lock = os.path.join(temp_folder, example_lock) -my_project_pdf = os.path.join(temp_folder, example_pdf_file) - -if os.path.exists(my_project): - os.remove(my_project) - -if os.path.exists(my_project_lock): - os.remove(my_project_lock) - -with Scratch(scratch_path) as local_scratch: - local_scratch.copyfile(example_project, my_project) - if os.path.exists(example_pdf): - local_scratch.copyfile(example_pdf, my_project_pdf) - -aedtapp = pyaedt.Emit(my_project) - -############################################################################### -# Create and connect EMIT components -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Create two radios with antennas connected to each one. - -rad1, ant1 = aedtapp.modeler.components.create_radio_antenna("Bluetooth Low Energy (LE)") -rad2, ant2 = aedtapp.modeler.components.create_radio_antenna("Bluetooth Low Energy (LE)") - -############################################################################### -# Define coupling among RF systems -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Define coupling among the RF systems. - -for link in aedtapp.couplings.linkable_design_names: - aedtapp.couplings.add_link(link) - -for link in aedtapp.couplings.coupling_names: - aedtapp.couplings.update_link(link) - -############################################################################### -# Run EMIT simulation -# ~~~~~~~~~~~~~~~~~~~ -# Run the EMIT simulation. This portion of the EMIT API is not yet implemented. -# -# This part of the example requires Ansys AEDT 2023 R2. - -if desktop_version > "2023.1": - rev = aedtapp.results.analyze() - rx_bands = rev.get_band_names(rad1.name, TxRxMode.RX) - tx_bands = rev.get_band_names(rad2.name, TxRxMode.TX) - domain = aedtapp.results.interaction_domain() - domain.set_receiver(rad1.name, rx_bands[0], -1) - domain.set_interferer(rad2.name,tx_bands[0]) - interaction = rev.run(domain) - worst = interaction.get_worst_instance(ResultType.EMI) - if worst.has_valid_values(): - emi = worst.get_value(ResultType.EMI) - print("Worst case interference is: {} dB".format(emi)) - -############################################################################### -# Save project and close AEDT -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# After the simulation completes, you can close AEDT or release it using the -# :func:`pyaedt.Desktop.force_close_desktop` method. -# All methods provide for saving the project before closing. - -aedtapp.save_project() -aedtapp.release_desktop(close_projects=True, close_desktop=True) diff --git a/examples/07-TwinBuilder/01-RC_Circuit_Example.py b/examples/07-TwinBuilder/01-RC_Circuit_Example.py index f5d45b7fc14..e568f1ec53b 100644 --- a/examples/07-TwinBuilder/01-RC_Circuit_Example.py +++ b/examples/07-TwinBuilder/01-RC_Circuit_Example.py @@ -17,14 +17,14 @@ # Select version and set launch options # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Select the Twin Builder version and set the launch options. The following code -# launches Twin Builder 2023 R1 in graphical mode. +# launches Twin Builder 2023 R2 in graphical mode. # # You can change the Boolean parameter ``non_graphical`` to ``True`` to launch # Twin Builder in non-graphical mode. You can also change the Boolean parameter # ``new_thread`` to ``False`` to launch Twin Builder in an existing AEDT session # if one is running. -desktop_version = "2023.1" +desktop_version = "2023.2" non_graphical = False new_thread = True diff --git a/examples/07-TwinBuilder/02-Wiring_A_Rectifier.py b/examples/07-TwinBuilder/02-Wiring_A_Rectifier.py index bed89068c8e..35af45a0691 100644 --- a/examples/07-TwinBuilder/02-Wiring_A_Rectifier.py +++ b/examples/07-TwinBuilder/02-Wiring_A_Rectifier.py @@ -19,14 +19,14 @@ # Select version and set launch options # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Select the Twin Builder version and set the launch options. The following code -# launches Twin Builder 2023 R1 in graphical mode. +# launches Twin Builder 2023 R2 in graphical mode. # # You can change the Boolean parameter ``non_graphical`` to ``True`` to launch # Twin Builder in non-graphical mode. You can also change the Boolean parameter # ``new_thread`` to ``False`` to launch Twin Builder in an existing AEDT session # if one is running. -desktop_version = "2023.1" +desktop_version = "2023.2" non_graphical = False new_thread = True diff --git a/examples/07-TwinBuilder/03-Dynamic_ROM_Creation_And_Visualization.py b/examples/07-TwinBuilder/03-Dynamic_ROM_Creation_And_Visualization.py index 695ac774258..5ec8d9652e3 100644 --- a/examples/07-TwinBuilder/03-Dynamic_ROM_Creation_And_Visualization.py +++ b/examples/07-TwinBuilder/03-Dynamic_ROM_Creation_And_Visualization.py @@ -1,12 +1,12 @@ """ -Twin Builder: dynamic ROM creation and simulation (2023 R1 beta) +Twin Builder: dynamic ROM creation and simulation (2023 R2 beta) ---------------------------------------------------------------- This example shows how you can use PyAEDT to create a dynamic ROM in Twin Builder and run a Twin Builder time-domain simulation. .. note:: - This example uses functionality only available in Twin Builder 2023 R1 and later. - For 2023 R1, the build date must be 8/7/2022 or later. + This example uses functionality only available in Twin Builder 2023 R2 and later. + For 2023 R2, the build date must be 8/7/2022 or later. """ ############################################################################### @@ -27,14 +27,14 @@ # Select version and set launch options # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Select the Twin Builder version and set launch options. The following code -# launches Twin Builder 2023 R1 in graphical mode. +# launches Twin Builder 2023 R2 in graphical mode. # # You can change the Boolean parameter ``non_graphical`` to ``True`` to launch # Twin Builder in non-graphical mode. You can also change the Boolean parameter # ``new_thread`` to ``False`` to launch Twin Builder in an existing AEDT session # if one is running. -desktop_version = "2023.1" +desktop_version = "2023.2" non_graphical = False new_thread = True diff --git a/examples/07-TwinBuilder/04-Static_ROM_Creation_And_Visualization.py b/examples/07-TwinBuilder/04-Static_ROM_Creation_And_Visualization.py index 40195ec8802..c863ce8de20 100644 --- a/examples/07-TwinBuilder/04-Static_ROM_Creation_And_Visualization.py +++ b/examples/07-TwinBuilder/04-Static_ROM_Creation_And_Visualization.py @@ -1,12 +1,12 @@ """ -Twin Builder: static ROM creation and simulation (2023 R1 beta) +Twin Builder: static ROM creation and simulation (2023 R2 beta) --------------------------------------------------------------- This example shows how you can use PyAEDT to create a static ROM in Twin Builder and run a Twin Builder time-domain simulation. .. note:: - This example uses functionality only available in Twin Builder 2023 R1 and later. - For 2023 R1, the build date must be 8/7/2022 or later. + This example uses functionality only available in Twin Builder 2023 R2 and later. + For 2023 R2, the build date must be 8/7/2022 or later. """ ############################################################################### @@ -28,14 +28,14 @@ # Select version and set launch options # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Select the Twin Builder version and set launch options. The following code -# launches Twin Builder 2023 R1 in graphical mode. +# launches Twin Builder 2023 R2 in graphical mode. # # You can change the Boolean parameter ``non_graphical`` to ``True`` to launch # Twin Builder in non-graphical mode. You can also change the Boolean parameter # ``new_thread`` to ``False`` to launch Twin Builder in an existing AEDT session # if one is running. -desktop_version = "2023.1" +desktop_version = "2023.2" non_graphical = False new_thread = True ############################################################################### diff --git a/pyaedt/desktop.py b/pyaedt/desktop.py index bc69a7bb992..7564f218513 100644 --- a/pyaedt/desktop.py +++ b/pyaedt/desktop.py @@ -503,6 +503,8 @@ def __init__( self.launched_by_pyaedt = False if os.getenv("PYAEDT_NON_GRAPHICAL", "False").lower() in ("true", "1", "t"): non_graphical = os.getenv("PYAEDT_NON_GRAPHICAL", "False").lower() in ("true", "1", "t") + if os.getenv("PYAEDT_DOC_GENERATION", "False").lower() in ("true", "1", "t"): + new_desktop_session = True # used in toolkit scripts if os.getenv("PYAEDT_SCRIPT_PROCESS_ID", None): print("found process id") diff --git a/pyaedt/edb_core/padstack.py b/pyaedt/edb_core/padstack.py index 1f77490c505..b4952df342f 100644 --- a/pyaedt/edb_core/padstack.py +++ b/pyaedt/edb_core/padstack.py @@ -832,7 +832,7 @@ def create( add_default_layer=False, anti_pad_x_size="600um", anti_pad_y_size="600um", - hole_range="from_upper_to_lower_pad", + hole_range="upper_pad_to_lower_pad", ): """Create a padstack. diff --git a/pyaedt/generic/configurations.py b/pyaedt/generic/configurations.py index e92a7caa1ae..63efd11639d 100644 --- a/pyaedt/generic/configurations.py +++ b/pyaedt/generic/configurations.py @@ -1173,8 +1173,9 @@ def _export_coordinate_systems(self, dict_out): dict_out["coordinatesystems"] = {} for cs in self._app.modeler.coordinate_systems: if isinstance(cs, CoordinateSystem): - dict_out["coordinatesystems"][cs.name] = cs.props - dict_out["coordinatesystems"][cs.name]["Reference CS"] = cs.ref_cs + if cs.props: + dict_out["coordinatesystems"][cs.name] = cs.props + dict_out["coordinatesystems"][cs.name]["Reference CS"] = cs.ref_cs # @pyaedt_function_handler() # def _export_face_coordinate_systems(self, dict_out): diff --git a/pyaedt/generic/general_methods.py b/pyaedt/generic/general_methods.py index fed2c7ffaf0..aa5a5bdf56a 100644 --- a/pyaedt/generic/general_methods.py +++ b/pyaedt/generic/general_methods.py @@ -1823,7 +1823,7 @@ def __init__(self): self._desktop_launch_timeout = 90 self._aedt_process_id = None self._is_student = False - self._number_of_grpc_api_retries = 3 + self._number_of_grpc_api_retries = 6 @property def number_of_grpc_api_retries(self): diff --git a/pyaedt/generic/plot.py b/pyaedt/generic/plot.py index ef30a973b35..0f114f32a29 100644 --- a/pyaedt/generic/plot.py +++ b/pyaedt/generic/plot.py @@ -225,6 +225,7 @@ def _parse_aedtplt(filepath): num_nodes_per_element = elements[4] header_length = 5 elements_nodes = [] + # Todo Aedt 23R2 supports mixed elements size. To be implemented. for i in range(0, len(elements), num_nodes_per_element + header_length): elements_nodes.append([elements[i + header_length + n] for n in range(num_nodes_per_element)]) if solution: diff --git a/pyaedt/modeler/cad/Modeler.py b/pyaedt/modeler/cad/Modeler.py index 2165bc8553b..c0e5bb9a90d 100644 --- a/pyaedt/modeler/cad/Modeler.py +++ b/pyaedt/modeler/cad/Modeler.py @@ -663,6 +663,7 @@ def props(self): if self._props or settings.aedt_version <= "2022.2" or self.name is None: return self._props self._get_coordinates_data() + return self._props @property def ref_cs(self): diff --git a/pyaedt/modules/monitor_icepak.py b/pyaedt/modules/monitor_icepak.py index a639fbdb7fb..23aa57bc4e9 100644 --- a/pyaedt/modules/monitor_icepak.py +++ b/pyaedt/modules/monitor_icepak.py @@ -244,21 +244,21 @@ def assign_point_monitor(self, point_position, monitor_quantity="Temperature", m ['monitor1', 'monitor2'] """ - if isinstance(point_position[0], str): - if isinstance(point_position, list): - point_names = point_position + if isinstance(point_position, str) or ( + not isinstance(point_position[0], list) and point_position[0] not in self._app.modeler.point_names + ): + point_position = [point_position] + point_names = [] + ppos = [] + for p in point_position: + if isinstance(p, str): + point_names.append(p) else: - point_names = [point_position] - point_position = [] - else: - point_names = [] - if not isinstance(point_position[0], list): - point_position = [point_position] - + ppos.append(p) if not isinstance(monitor_quantity, list): monitor_quantity = [monitor_quantity] if "Point" in self._check_quantities(monitor_quantity): - for p_p in point_position: + for p_p in ppos: point_name = generate_unique_name("Point") self._app.modeler.oeditor.CreatePoint( [ diff --git a/pyproject.toml b/pyproject.toml index 163cd032182..b880f14c607 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,14 +59,14 @@ tests = [ ] doc = [ - "ansys-sphinx-theme==0.10.0", + "ansys-sphinx-theme==0.10.2", "imageio==2.31.1", "imageio-ffmpeg==0.4.8", "ipython==8.13.0; python_version < '3.9'", "ipython==8.14.0; python_version >= '3.9'", "ipywidgets==8.1.0", "joblib==1.3.1", - "jupyterlab==4.0.3", + "jupyterlab==4.0.4", "matplotlib==3.5.3; python_version <= '3.7'", "matplotlib==3.7.2; python_version > '3.7'", "nbsphinx==0.9.2",