Hello all,
I'm interested in creating named expressions in PyAEDT and then evaluating them within the fields calculator. I'm running Maxwell 2D simulations, and as a starting point into learning these capabilities of PyAEDT, I'm trying to do something straightforward, which is the find the max B field in a non-model sheet named "Greg". Unfortunately, I do not find any similar examples, as most of them concern calculations over a line.
Is there any example of using PyAEDT fields calculator over sheets in a 2D simulations? Or if not, can someone explain how it's achieved to do field calculations over a sheet object in PyAEDT? Thank you for any help. I'm attaching a code snippet that doesn't work for reference.
```python
Bmax = {
"name": "Bmax",
"description": "Highest Magnetic Flux Density in Tube",
"design_type": ["Maxwell 2D"],
"fields_type": ["Fields"],
"primary_sweep": "",
"assignment": "",
"assignment_type": ["Sheet"],
"operations": [
"Fundamental_Quantity('B')",
"Operation('Mag')",
"EnterRegion('assignment')",
"Operation('Max')"
],
"report": ["Data Table"],
}
fc = m2d.post.fields_calculator
chamber = m2d.modeler.get_object_from_name("Greg")
expression = fc.add_expression(Bmax, chamber)
print("Created expression: ", expression)
temp = fc.evaluate(expression)
print("Bmax value is: ", temp)'''