Photonics

Photonics

Topics related to Lumerical and more

Setting variables of “::model” in FDTD using Python script

    • kai.w.ab
      Subscriber

      I want to set user properties in variables tab in "::model" by Python script .Please tell me which command should I use.


       

    • Guilin Sun
      Ansys Employee

      Before using Python, I would suggest you to first test the script, say:

      setnamed("::model","f2",150e12)

      this will assign the frequency "f2" to 150e12 Hz.

      Once it works, you can use Python to set it as like other parameters.

      Please note that, by default, the script will use SI units: Units and normalization conventions in Lumerical solvers 

      • kai.w.ab
        Subscriber

        Thank you for your support.
        The command "setnamed" works. However, what I want to do is not to set the value of a property that has already been added, but to add a new property first.
        How can I do that by using Python?

    • Guilin Sun
      Ansys Employee

       

      Again, you have to first test how to set new properties using Script. FOr exmaple:

      select(“::model”);adduserprop(“radius1”,2,0.6e-6);

      Python can only manipulate when Lumerical script works.

       

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.