ansys / pyaedt

AEDT Python Client Package
https://aedt.docs.pyansys.com
MIT License
204 stars 126 forks source link

Bug located in ... get_antenna_ffd_solution_data #4728

Closed pceato closed 5 months ago

pceato commented 5 months ago

Before submitting the issue

Description of the bug

I am trying to extract the fields of a setup with two sweeps in this way:

freq = np.linspace(fmin, fmax, numFreqs).tolist() data = hfss.get_antenna_ffd_solution_data(frequencies=freq, setup='Setup1 : Sweep', sphere="Infinite Sphere1")

When executing this code I get the error that the number of frequencies are different from the number of eep files. I have also tried to put the frequencies of the other sweep and change the setup, but I don't get it, what am I missing? thanks a lot.

Steps To Reproduce

  1. Create an interactive instance of HFSS and connect to an existing HFSS design hfss = pyaedt.Hfss(projectname="prueba", designname="2x2", specified_version="2023.2", non_graphical="False") OK

  2. Create the variable freq freq = np.linspace(fmin, fmax, numFreqs).tolist() OK

  3. Export the antenna parameters to Far Field Data (FFD) files data = hfss.get_antenna_ffd_solution_data(frequencies=freq, setup='Setup1 : Sweep', sphere="Infinite Sphere1") ERROR image

  4. Release desktop hfss.release_desktop() OK

Which Operating System are you using?

Windows

Which Python version are you using?

3.10

Installed packages

WARNING: Skipping C:\ProgramData\anaconda3\Lib\site-packages\vtk-9.0.3.egg-info due to invalid metadata entry 'name' aext_assistant @ file:///C:/b/abs_05zbnpu9if/croot/aext-assistant_1698112951886/work aext_assistant_server @ file:///C:/b/abs_83f6_dptu3/croot/aext-assistant-server_1698104652697/work/backend_lib/assistant aext_core @ file:///C:/b/abs_abml9re1ky/croot/aext-core_1698107590809/work aext_core_server @ file:///C:/b/abs_dev7ac1xol/croot/aext-core-server_1698098831843/work/backend_lib/core aext_shared @ file:///C:/b/abs_306_rwdm13/croot/aext-shared_1698068353440/work/backend_lib/shared aiobotocore @ file:///C:/b/abs_74o47svlua/croot/aiobotocore_1680004300264/work aiofiles @ file:///C:/b/abs_9ex6mi6b56/croot/aiofiles_1683773603390/work aiohttp @ file:///C:/ci_311/aiohttp_1676432932774/work aioitertools @ file:///tmp/build/80754af9/aioitertools_1607109665762/work aiosignal @ file:///tmp/build/80754af9/aiosignal_1637843061372/work aiosqlite @ file:///C:/b/abs_9djc_0pyi3/croot/aiosqlite_1683773915844/work alabaster @ file:///home/ktietz/src/ci/alabaster_1611921544520/work anaconda-anon-usage @ file:///C:/b/abs_ffxflkd4bw/croot/anaconda-anon-usage_1695037769762/work anaconda-catalogs @ file:///C:/b/abs_8btyy0o8s8/croot/anaconda-catalogs_1685727315626/work anaconda-client==1.12.0 anaconda-cloud-auth @ file:///C:/b/abs_27x7fzodlx/croot/anaconda-cloud-auth_1712794918678/work anaconda-navigator @ file:///C:/b/abs_d8d4a02c3t/croot/anaconda-navigator_1713464063970/work anaconda-project @ file:///C:/ci_311/anaconda-project_1676458365912/work anyio @ file:///C:/ci_311/anyio_1676425491996/work/dist appdirs==1.4.4 argon2-cffi @ file:///opt/conda/conda-bld/argon2-cffi_1645000214183/work argon2-cffi-bindings @ file:///C:/ci_311/argon2-cffi-bindings_1676424443321/work arrow @ file:///C:/ci_311/arrow_1678249767083/work astroid @ file:///C:/ci_311/astroid_1678740610167/work astropy @ file:///C:/ci_311_rebuilds/astropy_1678996071858/work asttokens @ file:///opt/conda/conda-bld/asttokens_1646925590279/work async-timeout @ file:///C:/ci_311/async-timeout_1676431518331/work atomicwrites==1.4.0 attrs @ file:///C:/ci_311/attrs_1676422272484/work Automat @ file:///tmp/build/80754af9/automat_1600298431173/work autopep8 @ file:///opt/conda/conda-bld/autopep8_1650463822033/work Babel @ file:///C:/ci_311/babel_1676427169844/work backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work backports.functools-lru-cache @ file:///tmp/build/80754af9/backports.functools_lru_cache_1618170165463/work backports.tempfile @ file:///home/linux1/recipes/ci/backports.tempfile_1610991236607/work backports.weakref==1.0.post1 bcrypt @ file:///C:/ci_311/bcrypt_1676435170049/work beautifulsoup4 @ file:///C:/b/abs_0agyz1wsr4/croot/beautifulsoup4-split_1681493048687/work binaryornot @ file:///tmp/build/80754af9/binaryornot_1617751525010/work black @ file:///C:/b/abs_620t6ndje8/croot/black_1680737261963/work bleach @ file:///opt/conda/conda-bld/bleach_1641577558959/work bokeh @ file:///C:/b/abs_e5qs_0dl2w/croot/bokeh_1690546119144/work boltons @ file:///C:/ci_311/boltons_1677729932371/work boto3 @ file:///C:/ci_311_rebuilds/boto3_1678997157581/work botocore @ file:///C:/ci_311/botocore_1676431559339/work Bottleneck @ file:///C:/ci_311/bottleneck_1676500016583/work brotlipy==0.7.0 certifi @ file:///home/conda/feedstock_root/build_artifacts/certifi_1707022139797/work/certifi cffi @ file:///C:/ci_311/cffi_1676423759166/work chardet @ file:///C:/ci_311/chardet_1676436134885/work charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work click @ file:///C:/ci_311/click_1676433091657/work cloudpickle @ file:///C:/b/abs_3796yxesic/croot/cloudpickle_1683040098851/work clr-loader @ file:///home/conda/feedstock_root/build_artifacts/clr_loader_1691434961632/work clyent==1.2.2 colorama @ file:///C:/ci_311/colorama_1676422310965/work colorcet @ file:///C:/ci_311/colorcet_1676440389947/work comm @ file:///C:/ci_311/comm_1678376562840/work conda @ file:///D:/bld/conda_1694556136997/work conda-build @ file:///C:/b/abs_cb65e4e7eh/croot/conda-build_1690382136553/work conda-content-trust @ file:///C:/b/abs_e3bcpyv7sw/croot/conda-content-trust_1693490654398/work conda-libmamba-solver @ file:///C:/b/abs_5a9xvt2a3k/croot/conda-libmamba-solver_1685032355900/work/src conda-pack @ file:///tmp/build/80754af9/conda-pack_1611163042455/work conda-package-handling @ file:///C:/b/abs_b9wp3lr1gn/croot/conda-package-handling_1691008700066/work conda-repo-cli==1.0.41 conda-token @ file:///Users/paulyim/miniconda3/envs/c3i/conda-bld/conda-token_1662660369760/work conda-verify==3.4.2 conda_index @ file:///C:/ci_311/conda-index_1678297406811/work conda_package_streaming @ file:///C:/b/abs_6c28n38aaj/croot/conda-package-streaming_1690988019210/work constantly==15.1.0 contourpy @ file:///C:/ci_311/contourpy_1676431756017/work cookiecutter @ file:///opt/conda/conda-bld/cookiecutter_1649151442564/work cryptography @ file:///C:/b/abs_13590mi9q9/croot/cryptography_1689373706078/work cssselect==1.1.0 cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work cytoolz @ file:///C:/ci_311/cytoolz_1676436342770/work daal4py==2023.1.1 dask @ file:///C:/b/abs_23lvfodys3/croot/dask-core_1686782960052/work datashader @ file:///C:/b/abs_59hmlbw_e3/croot/datashader_1689587660211/work datashape==0.5.4 debugpy @ file:///C:/b/abs_c0y1fjipt2/croot/debugpy_1690906864587/work decorator @ file:///opt/conda/conda-bld/decorator_1643638310831/work defusedxml @ file:///tmp/build/80754af9/defusedxml_1615228127516/work diff-match-patch @ file:///Users/ktietz/demo/mc3/conda-bld/diff-match-patch_1630511840874/work dill @ file:///C:/ci_311/dill_1676433323862/work distributed @ file:///C:/b/abs_7509xfv227/croot/distributed_1686866088894/work docstring-to-markdown @ file:///C:/ci_311/docstring-to-markdown_1677742566583/work docutils @ file:///C:/ci_311/docutils_1676428078664/work entrypoints @ file:///C:/ci_311/entrypoints_1676423328987/work et-xmlfile==1.1.0 executing @ file:///opt/conda/conda-bld/executing_1646925071911/work fastjsonschema @ file:///C:/ci_311/python-fastjsonschema_1679500568724/work filelock @ file:///C:/ci_311/filelock_1676427284139/work flake8 @ file:///C:/ci_311/flake8_1678376624746/work Flask @ file:///C:/ci_311/flask_1676436667658/work fonttools==4.25.0 frozenlist @ file:///C:/ci_311/frozenlist_1676428131576/work fsspec @ file:///C:/b/abs_07xig1rkra/croot/fsspec_1679418812895/work future @ file:///C:/ci_311_rebuilds/future_1678998246262/work gensim @ file:///C:/ci_311/gensim_1677743037820/work glob2 @ file:///home/linux1/recipes/ci/glob2_1610991677669/work greenlet @ file:///C:/ci_311/greenlet_1676436788118/work h11 @ file:///C:/b/abs_1czwoyexjf/croot/h11_1706652332846/work h5py @ file:///C:/ci_311/h5py_1676504676103/work HeapDict @ file:///Users/ktietz/demo/mc3/conda-bld/heapdict_1630598515714/work holoviews @ file:///C:/b/abs_13gytsh91v/croot/holoviews_1690480023447/work httpcore @ file:///C:/b/abs_55n7g233bw/croot/httpcore_1706728507241/work httpx @ file:///C:/b/abs_70wr6jzznw/croot/httpx_1706887145357/work hvplot @ file:///C:/b/abs_2b13wifauw/croot/hvplot_1685998632349/work hyperlink @ file:///tmp/build/80754af9/hyperlink_1610130746837/work idna @ file:///C:/ci_311/idna_1676424932545/work imagecodecs @ file:///C:/ci_311_rebuilds/imagecodecs_1678999255423/work imageio @ file:///C:/ci_311/imageio_1678373794394/work imagesize @ file:///C:/ci_311/imagesize_1676431905616/work imbalanced-learn @ file:///C:/b/abs_275a0acaq2/croot/imbalanced-learn_1685025644593/work importlib-metadata @ file:///C:/b/abs_20ndzb2j6v/croot/importlib-metadata_1678997085534/work incremental @ file:///tmp/build/80754af9/incremental_1636629750599/work inflection==0.5.1 iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work intake @ file:///C:/ci_311_rebuilds/intake_1678999914269/work intervaltree @ file:///Users/ktietz/demo/mc3/conda-bld/intervaltree_1630511889664/work ipykernel @ file:///C:/ci_311/ipykernel_1678734799670/work ipython @ file:///C:/b/abs_d1yx5tjhli/croot/ipython_1680701887259/work ipython-genutils @ file:///tmp/build/80754af9/ipython_genutils_1606773439826/work ipywidgets @ file:///C:/b/abs5awapknmz/croot/ipywidgets_1679394824767/work isort @ file:///tmp/build/80754af9/isort_1628603791788/work itemadapter @ file:///tmp/build/80754af9/itemadapter_1626442940632/work itemloaders @ file:///opt/conda/conda-bld/itemloaders_1646805235997/work itsdangerous @ file:///tmp/build/80754af9/itsdangerous_1621432558163/work jaraco.classes @ file:///tmp/build/80754af9/jaraco.classes_1620983179379/work jedi @ file:///C:/ci_311/jedi_1679427407646/work jellyfish @ file:///C:/ci_311/jellyfish_1676450868911/work Jinja2 @ file:///C:/ci_311/jinja2_1676424968965/work jinja2-time @ file:///opt/conda/conda-bld/jinja2-time_1649251842261/work jmespath @ file:///Users/ktietz/demo/mc3/conda-bld/jmespath_1630583964805/work joblib @ file:///C:/b/abs_1anqjntpan/croot/joblib_1685113317150/work json5 @ file:///tmp/build/80754af9/json5_1624432770122/work jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work jsonpointer==2.1 jsonschema @ file:///C:/b/abs_d40z05b6r1/croot/jsonschema_1678983446576/work jupyter @ file:///C:/ci_311/jupyter_1678249952587/work jupyter-console @ file:///C:/b/abs_82xaa6i2y4/croot/jupyter_console_1680000189372/work jupyter-events @ file:///C:/b/abs_4cak_28ewz/croot/jupyter_events_1684268050893/work jupyter-server @ file:///C:/ci_311/jupyter_server_1678228762759/work jupyter-ydoc @ file:///C:/b/abs_e7m6nh5lao/croot/jupyter_ydoc_1683747253535/work jupyter_client @ file:///C:/ci_311/jupyter_client_1676424009414/work jupyter_core @ file:///C:/b/abs_9d0ttho3bs/croot/jupyter_core_1679906581955/work jupyter_server_fileid @ file:///C:/b/abs_f1yjnmiq_6/croot/jupyter_server_fileid_1684273602142/work jupyter_server_ydoc @ file:///C:/b/abs_8ai39bligw/croot/jupyter_server_ydoc_1686767445888/work jupyterlab @ file:///C:/b/abs_c1msr8zz3y/croot/jupyterlab_1686179674844/work jupyterlab-pygments @ file:///tmp/build/80754af9/jupyterlab_pygments_1601490720602/work jupyterlab-widgets @ file:///C:/b/abs_38ad427jkz/croot/jupyterlab_widgets_1679055289211/work jupyterlab_server @ file:///C:/b/abs_e0qqsihjvl/croot/jupyterlab_server_1680792526136/work keyring @ file:///C:/b/abs_dbjc7g0dh2/croot/keyring_1678999228878/work kiwisolver @ file:///C:/ci_311/kiwisolver_1676431979301/work lazy-object-proxy @ file:///C:/ci_311/lazy-object-proxy_1676432050939/work lazy_loader @ file:///C:/b/abs_c9jlw06oq1/croot/lazy_loader_1687266162676/work libarchive-c @ file:///tmp/build/80754af9/python-libarchive-c_1617780486945/work libmambapy @ file:///C:/b/abs_1dshymu5qt/croot/mamba-split_1680096516212/work/libmambapy linkify-it-py @ file:///C:/ci_311/linkify-it-py_1676474436187/work llvmlite @ file:///C:/b/abs_a8i9keuf6p/croot/llvmlite_1683555140340/work lmdb @ file:///C:/b/abs_556ronuvb2/croot/python-lmdb_1682522366268/work locket @ file:///C:/ci_311/locket_1676428325082/work loguru @ file:///D:/bld/loguru_1695547447377/work lxml @ file:///C:/b/abs_c2bg6ck92l/croot/lxml_1679646459966/work lz4 @ file:///C:/b/abs_064u6aszy3/croot/lz4_1686057967376/work Markdown @ file:///C:/ci_311/markdown_1676437912393/work markdown-it-py @ file:///C:/b/abs_a5bfngz6fu/croot/markdown-it-py_1684279915556/work MarkupSafe @ file:///C:/ci_311/markupsafe_1676424152318/work matplotlib @ file:///C:/b/abs_49b2acwxd4/croot/matplotlib-suite_1679593486357/work matplotlib-inline @ file:///C:/ci_311/matplotlib-inline_1676425798036/work mccabe @ file:///opt/conda/conda-bld/mccabe_1644221741721/work mdit-py-plugins @ file:///C:/ci_311/mdit-py-plugins_1676481827414/work mdurl @ file:///C:/ci_311/mdurl_1676442676678/work menuinst @ file:///C:/ci_311/menuinst_1678730372782/work mistune @ file:///C:/ci_311/mistune_1676425149302/work mkl-fft==1.3.6 mkl-random @ file:///C:/Users/dev-admin/mkl/mkl_random_1682977971003/work mkl-service==2.4.0 more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work mpmath @ file:///C:/b/abs_7833jrbiox/croot/mpmath_1690848321154/work msgpack @ file:///C:/ci_311/msgpack-python_1676427482892/work multidict @ file:///C:/ci_311/multidict_1676428396308/work multipledispatch @ file:///C:/ci_311/multipledispatch_1676442767760/work munkres==1.1.4 mypy-extensions==0.4.3 navigator-updater==0.4.0 nbclassic @ file:///C:/b/abs_c8_rs7b3zw/croot/nbclassic_1681756186106/work nbclient @ file:///C:/ci_311/nbclient_1676425195918/work nbconvert @ file:///C:/ci_311/nbconvert_1676425836196/work nbformat @ file:///C:/ci_311/nbformat_1676424215945/work nest-asyncio @ file:///C:/ci_311/nest-asyncio_1676423519896/work networkx @ file:///C:/b/abs_e6gi1go5op/croot/networkx_1690562046966/work nltk @ file:///C:/b/abs_a638z6l1z0/croot/nltk_1688114186909/work notebook @ file:///C:/b/abs_e2qn6c85jb/croot/notebook_1690985290943/work notebook_shim @ file:///C:/ci_311/notebook-shim_1678144850856/work numba @ file:///C:/b/abs_b3bxhjeez4/croot/numba_1684245497898/work numexpr @ file:///C:/b/abs_afm0oewmmt/croot/numexpr_1683221839116/work numpy @ file:///C:/Users/dev-admin/mkl/numpy_and_numpy_base_1682982345978/work numpydoc @ file:///C:/ci_311/numpydoc_1676453412027/work openpyxl==3.0.10 packaging @ file:///C:/b/abs_ed_kb9w6g4/croot/packaging_1678965418855/work pandas @ file:///C:/ci_311_rebuilds/pandas_1679004481142/work pandocfilters @ file:///opt/conda/conda-bld/pandocfilters_1643405455980/work panel @ file:///C:/b/abs_3a8jdo31kd/croot/panel_1690837306872/work param @ file:///C:/b/abs_f5xzp6ism6/croot/param_1684915326009/work paramiko @ file:///opt/conda/conda-bld/paramiko_1640109032755/work parsel @ file:///C:/ci_311/parsel_1676443327188/work parso @ file:///opt/conda/conda-bld/parso_1641458642106/work partd @ file:///opt/conda/conda-bld/partd_1647245470509/work pathlib @ file:///Users/ktietz/demo/mc3/conda-bld/pathlib_1629713961906/work pathspec @ file:///C:/ci_311/pathspec_1679427644142/work patsy==0.5.3 pep8==1.7.1 pexpect @ file:///tmp/build/80754af9/pexpect_1605563209008/work pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work pillow @ file:///C:/b/abs_95ls_qh4c2/croot/pillow_1714398870615/work pkce @ file:///C:/b/abs_d0z4444tb0/croot/pkce_1690384879799/work pkginfo @ file:///C:/b/abs_d18srtr68x/croot/pkginfo_1679431192239/work platformdirs @ file:///C:/ci_311/platformdirs_1676422658103/work plotly @ file:///C:/ci_311/plotly_1676443558683/work pluggy @ file:///C:/ci_311/pluggy_1676422178143/work plumbum @ file:///home/conda/feedstock_root/build_artifacts/plumbum_1714378247975/work ply==3.11 pooch @ file:///tmp/build/80754af9/pooch_1623324770023/work poyo @ file:///tmp/build/80754af9/poyo_1617751526755/work prometheus-client @ file:///C:/ci_311/prometheus_client_1679591942558/work prompt-toolkit @ file:///C:/ci_311/prompt-toolkit_1676425940920/work Protego @ file:///tmp/build/80754af9/protego_1598657180827/work psutil @ file:///C:/ci_311_rebuilds/psutil_1679005906571/work ptyprocess @ file:///tmp/build/80754af9/ptyprocess_1609355006118/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl pure-eval @ file:///opt/conda/conda-bld/pure_eval_1646925070566/work py-cpuinfo @ file:///Users/ktietz/demo/mc3/conda-bld/py-cpuinfo_1629480366017/work pyaedt @ file:///D:/bld/pyaedt_1715665712157/work pyarrow==11.0.0 pyasn1 @ file:///Users/ktietz/demo/mc3/conda-bld/pyasn1_1629708007385/work pyasn1-modules==0.2.8 pycodestyle @ file:///C:/ci_311/pycodestyle_1678376707834/work pycosat @ file:///C:/ci_311/pycosat_1676438455539/work pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work pyct @ file:///C:/ci_311/pyct_1676438538057/work pycurl==7.45.2 pydantic @ file:///C:/b/abs_4bum6ajkso/croot/pydantic_1686125732638/work PyDispatcher==2.0.5 pydocstyle @ file:///C:/ci_311/pydocstyle_1678402028085/work pyerfa @ file:///C:/ci_311/pyerfa_1676503994641/work pyflakes @ file:///C:/ci_311/pyflakes_1678402101687/work Pygments @ file:///C:/b/absfay9dpq4n/croot/pygments_1684279990574/work PyJWT @ file:///C:/ci_311/pyjwt_1676438890509/work pylint @ file:///C:/ci_311/pylint_1678740302984/work pylint-venv @ file:///C:/ci_311/pylint-venv_1678402170638/work pyls-spyder==0.4.0 PyNaCl @ file:///C:/ci_311/pynacl_1676445861112/work pyodbc @ file:///C:/ci_311/pyodbc_1676489976744/work pyOpenSSL @ file:///C:/b/abs_08f38zyck4/croot/pyopenssl_1690225407403/work pyparsing @ file:///C:/ci_311/pyparsing_1678502182533/work PyQt5==5.15.10 PyQt5-sip @ file:///C:/b/abs_c0pi2mimq3/croot/pyqt-split_1698769125270/work/pyqt_sip PyQtWebEngine==5.15.6 pyrsistent @ file:///C:/ci_311/pyrsistent_1676422695500/work PySocks @ file:///C:/ci_311/pysocks_1676425991111/work pytest @ file:///C:/b/abs_48heoo_k8y/croot/pytest_1690475385915/work python-dateutil @ file:///tmp/build/80754af9/python-dateutil_1626374649649/work python-dotenv @ file:///C:/ci_311/python-dotenv_1676455170580/work python-json-logger @ file:///C:/b/abs_cblnsm6puj/croot/python-json-logger_1683824130469/work python-lsp-black @ file:///C:/ci_311/python-lsp-black_1678721855627/work python-lsp-jsonrpc==1.0.0 python-lsp-server @ file:///C:/b/abs_catecj7fv1/croot/python-lsp-server_1681930405912/work python-slugify @ file:///tmp/build/80754af9/python-slugify_1620405669636/work python-snappy @ file:///C:/ci_311/python-snappy_1676446060182/work pythonnet @ file:///home/conda/feedstock_root/build_artifacts/pythonnet_1693338669030/work pytoolconfig @ file:///C:/ci_311/pytoolconfig_1678402262175/work pytz @ file:///C:/ci_311/pytz_1676427070848/work pyvista @ file:///home/conda/feedstock_root/build_artifacts/pyvista_1715698347717/work pyviz-comms @ file:///C:/b/abs_6cq38vhwa5/croot/pyviz_comms_1685030740344/work PyWavelets @ file:///C:/ci_311/pywavelets_1676504105729/work pywin32==305.1 pywin32-ctypes @ file:///C:/ci_311/pywin32-ctypes_1676427747089/work pywinpty @ file:///C:/ci_311/pywinpty_1677707791185/work/target/wheels/pywinpty-2.0.10-cp311-none-win_amd64.whl PyYAML @ file:///C:/ci_311/pyyaml_1676432488822/work pyzmq @ file:///C:/ci_311/pyzmq_1676423601304/work QDarkStyle @ file:///tmp/build/80754af9/qdarkstyle_1617386714626/work qstylizer @ file:///C:/ci_311/qstylizer_1678502012152/work/dist/qstylizer-0.2.2-py2.py3-none-any.whl QtAwesome @ file:///C:/ci_311/qtawesome_1678402331535/work qtconsole @ file:///C:/b/abs_eb4u9jg07y/croot/qtconsole_1681402843494/work QtPy @ file:///C:/ci_311/qtpy_1676432558504/work queuelib==1.5.0 regex @ file:///C:/ci_311_rebuilds/regex_1679006156792/work requests @ file:///C:/b/abs_316c2inijk/croot/requests_1690400295842/work requests-file @ file:///Users/ktietz/demo/mc3/conda-bld/requests-file_1629455781986/work requests-toolbelt @ file:///C:/b/abs_2fsmts66wp/croot/requests-toolbelt_1690874051210/work rfc3339-validator @ file:///C:/b/abs_ddfmseb_vm/croot/rfc3339-validator_1683077054906/work rfc3986-validator @ file:///C:/b/abs_6e9azihr8o/croot/rfc3986-validator_1683059049737/work rope @ file:///C:/ci_311/rope_1678402524346/work rpyc @ file:///home/conda/feedstock_root/build_artifacts/rpyc_1610420736758/work Rtree @ file:///C:/ci_311/rtree_1676455758391/work ruamel-yaml-conda @ file:///C:/ci_311/ruamel_yaml_1676455799258/work ruamel.yaml @ file:///C:/ci_311/ruamel.yaml_1676439214109/work s3fs @ file:///C:/b/abs_9ctwhzh1il/croot/s3fs_1680018487962/work s3transfer @ file:///C:/ci_311/s3transfer_1676434371175/work sacremoses @ file:///tmp/build/80754af9/sacremoses_1633107328213/work scikit-image @ file:///C:/b/abs_2075zg1pia/croot/scikit-image_1682528361447/work scikit-learn @ file:///C:/b/abs_55olq_4gzc/croot/scikit-learn_1690978955123/work scikit-learn-intelex==20230426.121932 scipy==1.10.1 scooby @ file:///home/conda/feedstock_root/build_artifacts/scooby_1714897440316/work Scrapy @ file:///C:/ci_311/scrapy_1678502587780/work seaborn @ file:///C:/ci_311/seaborn_1676446547861/work semver @ file:///C:/b/abs_4bkbn3v6jp/croot/semver_1709243682483/work Send2Trash @ file:///tmp/build/80754af9/send2trash_1632406701022/work service-identity @ file:///Users/ktietz/demo/mc3/conda-bld/service_identity_1629460757137/work sip @ file:///C:/b/abs_edevan3fce/croot/sip_1698675983372/work six @ file:///tmp/build/80754af9/six_1644875935023/work smart-open @ file:///C:/ci_311/smart_open_1676439339434/work sniffio @ file:///C:/ci_311/sniffio_1676425339093/work snowballstemmer @ file:///tmp/build/80754af9/snowballstemmer_1637937080595/work sortedcontainers @ file:///tmp/build/80754af9/sortedcontainers_1623949099177/work soupsieve @ file:///C:/b/abs_a989exj3q6/croot/soupsieve_1680518492466/work Sphinx @ file:///C:/ci_311/sphinx_1676434546244/work sphinxcontrib-applehelp @ file:///home/ktietz/src/ci/sphinxcontrib-applehelp_1611920841464/work sphinxcontrib-devhelp @ file:///home/ktietz/src/ci/sphinxcontrib-devhelp_1611920923094/work sphinxcontrib-htmlhelp @ file:///tmp/build/80754af9/sphinxcontrib-htmlhelp_1623945626792/work sphinxcontrib-jsmath @ file:///home/ktietz/src/ci/sphinxcontrib-jsmath_1611920942228/work sphinxcontrib-qthelp @ file:///home/ktietz/src/ci/sphinxcontrib-qthelp_1611921055322/work sphinxcontrib-serializinghtml @ file:///tmp/build/80754af9/sphinxcontrib-serializinghtml_1624451540180/work spyder @ file:///C:/b/abs_e99kl7d8t0/croot/spyder_1681934304813/work spyder-kernels @ file:///C:/b/abs_862e4aayi8/croot/spyder-kernels_1681307297029/work SQLAlchemy @ file:///C:/ci_311/sqlalchemy_1676446707912/work stack-data @ file:///opt/conda/conda-bld/stack_data_1646927590127/work statsmodels @ file:///C:/b/abs_7bth810rna/croot/statsmodels_1689937298619/work sympy @ file:///C:/ci_311_rebuilds/sympy_1679009400182/work tables @ file:///C:/b/abs_52tcd9b9dp/croot/pytables_1685123233455/work tabulate @ file:///C:/ci_311/tabulate_1676494503192/work TBB==0.2 tblib @ file:///Users/ktietz/demo/mc3/conda-bld/tblib_1629402031467/work tenacity @ file:///C:/b/abs_ddkoa9nju6/croot/tenacity_1682972298929/work terminado @ file:///C:/ci_311/terminado_1678228513830/work text-unidecode @ file:///Users/ktietz/demo/mc3/conda-bld/text-unidecode_1629401354553/work textdistance @ file:///tmp/build/80754af9/textdistance_1612461398012/work threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work three-merge @ file:///tmp/build/80754af9/three-merge_1607553261110/work tifffile @ file:///tmp/build/80754af9/tifffile_1627275862826/work tinycss2 @ file:///C:/ci_311/tinycss2_1676425376744/work tldextract @ file:///opt/conda/conda-bld/tldextract_1646638314385/work toml @ file:///tmp/build/80754af9/toml_1616166611790/work tomlkit @ file:///C:/ci_311/tomlkit_1676425418821/work toolz @ file:///C:/ci_311/toolz_1676431406517/work tornado @ file:///C:/b/abs_61jhmrrua1/croot/tornado_1690848767317/work tqdm @ file:///C:/b/abs_f76j9hg7pv/croot/tqdm_1679561871187/work traitlets @ file:///C:/ci_311/traitlets_1676423290727/work transformers @ file:///tmp/build/80754af9/transformers_1633098115425/work Twisted @ file:///C:/b/abs_f1pc_rieoy/croot/twisted_1683796899561/work twisted-iocpsupport @ file:///C:/ci_311/twisted-iocpsupport_1676447612160/work typing_extensions @ file:///C:/b/abs_213vg2cd1l/croot/typing_extensions_1690297804941/work uc-micro-py @ file:///C:/ci_311/uc-micro-py_1676457695423/work ujson @ file:///C:/ci_311/ujson_1676434714224/work Unidecode @ file:///tmp/build/80754af9/unidecode_1614712377438/work urllib3 @ file:///C:/b/abs_889_loyqv4/croot/urllib3_1686163174463/work w3lib @ file:///Users/ktietz/demo/mc3/conda-bld/w3lib_1629359764703/work watchdog @ file:///C:/ci_311/watchdog_1676457923624/work wcwidth @ file:///Users/ktietz/demo/mc3/conda-bld/wcwidth_1629357192024/work webencodings==0.5.1 websocket-client @ file:///C:/ci_311/websocket-client_1676426063281/work Werkzeug @ file:///C:/b/abs8578rs2ra/croot/werkzeug_1679489759009/work whatthepatch @ file:///C:/ci_311/whatthepatch_1678402578113/work widgetsnbextension @ file:///C:/b/abs_882k4_4kdf/croot/widgetsnbextension_1679313880295/work win-inet-pton @ file:///C:/ci_311/win_inet_pton_1676425458225/work win32-setctime @ file:///home/conda/feedstock_root/build_artifacts/win32_setctime_1642883564726/work wrapt @ file:///C:/ci_311/wrapt_1676432805090/work xarray @ file:///C:/b/abs_5bkjiynp4e/croot/xarray_1689041498548/work xlwings @ file:///C:/ci_311_rebuilds/xlwings_1679013429160/work xyzservices @ file:///C:/ci_311/xyzservices_1676434829315/work y-py @ file:///C:/b/abs_b7f5go6r0j/croot/y-py_1683662173571/work yapf @ file:///tmp/build/80754af9/yapf_1615749224965/work yarl @ file:///C:/ci_311/yarl_1676432870023/work ypy-websocket @ file:///C:/b/abs_4e65ywlnv8/croot/ypy-websocket_1684172103529/work zict @ file:///C:/b/abs_fc7elavmem/croot/zict_1682698759288/work zipp @ file:///C:/ci_311/zipp_1676426100491/work zope.interface @ file:///C:/ci_311/zope.interface_1676439868776/work zstandard==0.19.0

Samuelopez-ansys commented 5 months ago

@pceato Did you check the solved frequencies?

In your screenshot, it looks like the setup do not exist:

image

Please provide a dummy example, if you do not find the issue. Try to debug this example, and maybe you will find what is wrong in your design.

https://aedt.docs.pyansys.com/version/stable/examples/02-HFSS/Array.html#sphx-glr-examples-02-hfss-array-py

pceato commented 5 months ago

Thanks for your answer @Samuelopez-ansys

Yes, I checked the frequencies and they are the ones that were in the sweep.

I can't run that example because of incompatibility with version 2023.2.

I have been trying to export the fields with one of the ansys example files and I have been able to do it using the jupyter that opens from adt desktop as shown in the image.

image

If I try to do it from a local script with another environment (spyder in my case), it gives me an error and when I do the release_desktop it deletes the project designs. image image

I don't understand what could be happening if the code used in both cases is the same, except for the “desktop” class generated by the jupyter. image image

Samuelopez-ansys commented 5 months ago

@pceato

If it works with the example, and with your project, it means you have some settings not correct, I guess the frequencies you are passing are not solved. If you debug your code, does data contains anything?

I played with the following examples, and it works as well:

import os
import pyaedt

project_name = pyaedt.generate_unique_project_name(project_name="dipole")

aedt_version = "2023.2"

non_graphical = False

d = pyaedt.launch_desktop(aedt_version, non_graphical=non_graphical, new_desktop_session=True)

hfss = pyaedt.Hfss(projectname=project_name, solution_type="Modal")

hfss["l_dipole"] = "13.5cm"

compfile = hfss.components3d["Dipole_Antenna_DM"]
geometryparams = hfss.get_components3d_vars("Dipole_Antenna_DM")
geometryparams["dipole_length"] = "l_dipole"
hfss.modeler.insert_3d_component(compfile, geometryparams)

hfss.create_open_region(frequency="1GHz")

setup = hfss.create_setup("MySetup")
setup.props["Frequency"] = "1GHz"
setup.props["MaximumPasses"] = 1
hfss.create_linear_count_sweep(setup=setup.name, units="GHz", start_frequency=0.5, stop_frequency=1.5,
                               num_of_freq_points=251, name="sweep1", save_fields=False, sweep_type="Interpolating",
                               interpolation_tol=3, interpolation_max_solutions=255)

hfss.analyze_setup("MySetup")

ffdata = hfss.get_antenna_ffd_solution_data(frequencies=["1000MHz"], setup=hfss.nominal_adaptive,
                                            sphere="Sphere_Custom")

ffdata.plot_2d_cut(quantity='RealizedGain', primary_sweep="theta", secondary_sweep_value=0, title='FarField',
                   quantity_format="dB20", is_polar=True)

ffdata.polar_plot_3d_pyvista()

d.release_desktop()

As you can see it works in 2023.2, so it is the same version as yours, try passing the frequencies as string like in my previous example. If does not work, please share a dummy project, to reproduce the issue.

pceato commented 5 months ago

Hi @Samuelopez-ansys ,

Sorry if I explained myself wrong, the problem I currently have is no longer the initial one. I have managed to export the files with my project if I open Jupyter from the AEDT window. However, when I do it from Spyder, no.

With several tests that I have carried out, I believe that the problem is in the Hfss function or in the Desktop function that, whenever I try to open a file with a specific path, it creates a file with that same name (that is, it overwrites the file that I I have on that route with that name). On the other hand, when I do it from Jupyter launch with AEDT, since a session is generated from that file, I can access it. How can I solve that?

Samuelopez-ansys commented 5 months ago

Hi @pceato ,

I think your problem is related to the project path. In python, you need to put "//" or a "r" at the beginning of any path.

https://docs.python.org/3/tutorial/introduction.html#text

For example in your case:

projectname = r"C:/Users/pcea/...."

Let me know if it works.

pceato commented 5 months ago

Hi @Samuelopez-ansys

I have tried with both, when I use "//" I get the attached message error, when I use "r" it generates a new empty project with the same name in the same path, as you can see in the second image. Any more ideas?

image

image

pceato commented 5 months ago

The ".aedt" extension was missing from the path, now it is working. Thank you very much, @Samuelopez-ansys