Extract power balance
-
Hi, I have issues with extracting the specific values of the Power Balance into Python. I've tried 2 methods so far with both a different error.
simulation_extractor = simulation.Results()
em_sensor_extractor = simulation_extractor["Overall Field"]
inputs = em_sensor_extractor.Outputs["Power Balance"]
inputs.Update()
print(inputs.Data.DataSimpleDataCollection.FieldAxisValue(0))Gives me this error:
Changing that last line into
print(inputs.Data.DataSimpleDataCollection.FieldValue("Pin"))
Gives another error
Also AttributeSimpleDataCollection instead of DataSimpleDataCollection gives the same errors.
What is the best way to get the radiated power? Thanks
-
Here is an example showing how you can print the power balance available keys and how you can get the radiated power value.
powerBalance = em_sensor_extractor.Outputs["Power Balance"] powerBalance.Update() print(powerBalance.Data.DataSimpleDataCollection.Keys()) powerBalance_RadPower = powerBalance.Data.DataSimpleDataCollection.FieldValue('RadPower',0) print(f"Power Balance - Radiated Power = {powerBalance_RadPower} W")