Ansys Learning Forum Maintenance

NOTICE: We will be performing backend maintenance of our Learning Forum from April 5 to April 12, 2021. The result will be a new infrastructure but with little impact to user experience and design. Currently the forum is accessible in read-only mode as we complete our final migration. Thank you for your patience. For urgent issues please visit HERE.

Time domain scripting for dipole source — Ansys Learning Forum

Time domain scripting for dipole source

MANNANMANNAN Member Posts: 9

I would like to manually script the properties of a dipole source in FDTD so that the waveform of dipole looks as shown above. I need help how to script my dipole properties in the time domain as shown in the example below

How can I manually script in the dipole source code to add the following parameters in set time-domain data like pulse-type (broadband), frequency, pulse length, offset, and bandwidth?

looking forward to a fruitful discussion.




  • gsungsun Ansys Employee Posts: 227

    you can use set("set time domain",1); to enable a tab property. One this is enabled, you can set other properties, as you did in the script, such as


    please note that the units in scripting are international standard, meter, second, kg etc.

    you can use

    ?set; when an object is selected to know all its parameters


    ?setnamed("object_name") to know the parameters for a specific object.

    Please try and check if all the set results are what you expect.

  • gsungsun Ansys Employee Posts: 227

    Please note that since the source is a pulse, even through you set the wavelength bandwidth zero, it will still be a pulse, meaning it will radiate em waves in a broadband.

  • MANNANMANNAN Member Posts: 9

    Thanks a lot it worked

  • gsungsun Ansys Employee Posts: 227

    Thank you for letting me know this! good luck in your project!

  • MANNANMANNAN Member Posts: 9

    Could you please further help in regarding the this

    x=linspace(-d/2,d/2,N); # x position vector

    for (i=1:N) {





    This code will make a line of N dipoles along the x-axis between length -d till d. with equal spacing

    Suggestions required in making a script that will make a cone of dipole along xz direction with radius r in x-direction and depth along z-axis 

    Looking forward to hearing soo

  • gsungsun Ansys Employee Posts: 227

    The code looks good for me. In order to make the dipoles to be in a cone in xz plane, you will need to change x(i) and z(i) as a cone, and then place the dipoles there. Please try to modify your script.

Sign In or Register to comment.