From 5104e9e61f876de309e52123bd9bbe2288e7f6e6 Mon Sep 17 00:00:00 2001 From: Sebastien Morais Date: Wed, 21 Feb 2024 11:00:09 +0100 Subject: [PATCH] FIX: example 08_CPWG.py Note: the analyze part was commented but post processing was still performed so the example was failing. --- examples/00-EDB/08_CPWG.py | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/examples/00-EDB/08_CPWG.py b/examples/00-EDB/08_CPWG.py index 2f1bf9420..7481b6eba 100644 --- a/examples/00-EDB/08_CPWG.py +++ b/examples/00-EDB/08_CPWG.py @@ -11,7 +11,7 @@ import os -from ansys.pyaedt.examples.constants import EDB_VERSION +from ansys.pyaedt.examples.constants import AEDT_VERSION, EDB_VERSION import numpy as np import pyaedt @@ -117,7 +117,7 @@ h3d = pyaedt.Hfss3dLayout( projectname=aedb_path, - specified_version="2023.2", + specified_version=AEDT_VERSION, non_graphical=non_graphical, new_desktop_session=True, ) @@ -161,31 +161,29 @@ h3d.modeler.edb.nets.plot(None, None, color_by_net=True) cp_name = h3d.modeler.clip_plane() - -h3d.save_project() # - -# ## Start HFSS solver +# ## Solve the active design -# Start the HFSS solver by uncommenting the ``h3d.analyze()`` command. +# Uncomment the following code to start the HFSS solver and perform post processing. # + # h3d.analyze() + +# solutions = h3d.get_touchstone_data()[0] +# solutions.log_x = False +# solutions.plot() + +# h3d.post.create_fieldplot_cutplane( +# cp_name, "Mag_E", h3d.nominal_adaptive, intrinsincDict={"Freq": "3GHz", "Phase": "0deg"} +# ) # - # ## Save AEDT -# + aedt_path = aedb_path.replace(".aedb", ".aedt") h3d.logger.info("Your AEDT project is saved to {}".format(aedt_path)) -solutions = h3d.get_touchstone_data()[0] -solutions.log_x = False -solutions.plot() - -h3d.post.create_fieldplot_cutplane( - cp_name, "Mag_E", h3d.nominal_adaptive, intrinsincDict={"Freq": "3GHz", "Phase": "0deg"} -) -# - +h3d.save_project() # ## Release AEDT