How to set active variation from pyaedt


Hello, I have a parametric sweep set up and solved in the eddy current solver for maxwell 3D and I am trying to use the fields calculator through pyaedt to export the B field and grad B at the different frequencies in the parametric sweep (NB not the standard frequency sweep!).

  • The project I am using has lots of variables set up to dependent on each other i.e. the frequency is defined as 1/time_period and another variable delta contains the skin depth (to allow for correct mesh settings throughout the sweep etc)
  • SO, I need to pass the values of these variables to the fields calculator to export the values I want for each variation.

  • I have tried using things like set_active_variation() and get_solution_data_per_variation() but is not clear to me how these interact with the variables in maxwell and when I do something like:

    eval_freq = m3d.get_evaluated_value("freq_vde")
    eval_period = m3d.get_evaluated_value("t_vde")
    eval_delta = m3d.get_evaluated_value("delta")
    The values returned are not affected by the set_active_variation() method. Can someone tell me how to use the set_activate_variation method with Maxwell3D in order to do what in the GUI seems to be equivalent to "apply solved variation", or give me an idea of a better way to do it. Thank you.