get_solution_data#

SetupHFSSAuto.get_solution_data(expressions=None, domain=None, variations=None, primary_sweep_variable=None, report_category=None, context=None, polyline_points=1001, math_formula=None, sweep=None)[source]#

Get a simulation result from a solved setup and cast it in a SolutionData object. Data to be retrieved from Electronics Desktop are any simulation results available in that specific simulation context. Most of the argument have some defaults which works for most of the Standard report quantities.

Parameters:
expressionsstr or list, optional

One or more formulas to add to the report. Example is value "dB(S(1,1))" or a list of values. Default is None which will return all traces.

domainstr, optional

Plot Domain. Options are “Sweep” for frequency domain related results and “Time” for transient related data.

variationsdict, optional

Dictionary of all families including the primary sweep. The default is None which will use the nominal variations of the setup.

primary_sweep_variablestr, optional

Name of the primary sweep. The default is "None" which, depending on the context, will internally assign the primary sweep to: 1. Freq for frequency domain results, 2. Time for transient results, 3. Theta for radiation patterns, 4. distance for field plot over a polyline.

report_categorystr, optional

Category of the Report to be created. If None default data Report will be used. The Report Category can be one of the types available for creating a report depend on the simulation setup. For example for a Far Field Plot in HFSS the UI shows the report category as “Create Far Fields Report”. The report category will be in this case “Far Fields”. Depending on the setup different categories are available. If None default category will be used (the first item in the Results drop down menu in AEDT). To get the list of available categories user can use method available_report_types.

contextstr, dict, optional

This is the context of the report. The default is None. It can be: 1. None 2. Infinite Sphere name for Far Fields Plot. 3. Dictionary. If dictionary is passed, key is the report property name and value is property value.

polyline_pointsint, optional

Number of points on which to create the report for plots on polylines. This parameter is valid for Fields plot only.

math_formulastr, optional

One of the available AEDT mathematical formulas to apply. For example, abs, dB.

sweepstr, optional

Name of the sweep adaptive setup to get solutions from. the default is LastAdaptive.

Returns:
ansys.aedt.core.modules.solutions.SolutionData

Solution Data object.

References

>>> oModule.GetSolutionDataPerVariation

Examples

>>> from ansys.aedt.core import Hfss
>>> aedtapp = Hfss()
>>> aedtapp.post.create_report("dB(S(1,1))")
>>> variations = aedtapp.available_variations.nominal_w_values_dict
>>> variations["Theta"] = ["All"]
>>> variations["Phi"] = ["All"]
>>> variations["Freq"] = ["30GHz"]
>>> data1 = aedtapp.post.get_solution_data("GainTotal", aedtapp.nominal_adaptive,
...                                        variations=variations, primary_sweep_variable="Phi",
...                                        report_category="Far Fields", context="3D")
>>> data2 =aedtapp.post.get_solution_data("S(1,1)",aedtapp.nominal_sweep,variations=variations)
>>> data2.plot()
>>> from ansys.aedt.core import Maxwell2d
>>> maxwell_2d = Maxwell2d()
>>> data3 = maxwell_2d.post.get_solution_data("InputCurrent(PHA)",domain="Time",primary_sweep_variable="Time")
>>> data3.plot("InputCurrent(PHA)")
>>> from ansys.aedt.core import Circuit
>>> circuit = Circuit()
>>> context = {"algorithm": "FFT", "max_frequency": "100MHz", "time_stop": "2.5us", "time_start": "0ps"}
>>> spectralPlotData = circuit.post.get_solution_data(expressions="V(Vprobe1)", domain="Spectral",
...                                                   primary_sweep_variable="Spectrum", context=context)