Skip to main content

Solution

Description​

Provides access to the results of a three-dimensional, frequency-domain electromagnetic simulation performed by HighFrequency.solve.

The solution contains the simulated frequency values and provides methods for retrieving S-parameters and exporting electromagnetic field distributions for visualization and further analysis.

Field data can be exported for selected frequencies and excitation ports, allowing the electromagnetic response to be examined under different simulation conditions.

Construction​

obj

obj A HighFrequency object representing the configured electromagnetic model.

solution = obj.solve()

solution = obj.solve() Solves the configured electromagnetic model and returns a Solution object containing the computed results.

Properties​

frequency

Type numpy.ndarrayAccess read-onlyUnit Hz

Frequency values at which the electromagnetic solution was computed. The values are returned in the order of the configured frequency sweep.

Methods​

s_parameters

Retrieve the computed S-parameters as an SParameters object.

export_electric_field

Export electric field distributions for selected frequencies and excitation ports to VTU files.

export_magnetic_field

Export magnetic field distributions for selected frequencies and excitation ports to VTU files.

export_magnetic_flux

Export magnetic flux density distributions for selected frequencies and excitation ports to VTU files.

Examples​

solution = model.solve()

# Inspect the simulated frequencies
print(solution.frequency)

# Retrieve the S-parameters
sparams = solution.s_parameters()

# Export the electric field at the first frequency
# for excitation port 1
solution.export_electric_field(frequency_index=0, port=1)

Notes​

Frequency indices are zero-based and refer to positions in solution.frequency. For example, frequency_index=0 selects the first simulated frequency.

Excitation ports are numbered starting from 1. Field export methods require a valid port number corresponding to the computed solution.

Errors / Exceptions​

Error / Exceptions List
hado:solutionmessage:InvalidFrequencyIndex
Condition

A field export method receives a frequency index outside the simulated frequency range.

Resolution

Use a zero-based index between 0 and the number of simulated frequencies minus 1.

hado:solutionmessage:InvalidPortNumber
Condition

A field export method receives a port number outside the available excitation ports.

Resolution

Specify a valid excitation port number, starting from 1.