## Electronics

Topics relate to HFSS, Maxwell, SIwave, Icepak, Electronics Enterprise and more

#### How to Use cum_sum Function in Ansys HFSS?

• Ata Vafi
Subscriber

Currently, I am working on implementing a geometry and I have encountered an expression involving a cumulative sum operation. To efficiently implement this in Ansys HFSS, I came across the built-in function called 'cum_sum.'

However, I am unsure about the proper usage of 'cum_sum' integration of it with my user-defined functions effectively for my simulation in Ansys HFSS. Does anyone know how this function should be used, and what are the inputs to this function?

To provide an example of what I'm trying to achieve: I want to calculate the sum of i^2, where 'i' ranges from 0 to some variable 'N'. Could someone please help me understand how to properly utilize the 'cum_sum' function for this purpose in Ansys HFSS?

Thank you for your help!

• Aymen
Ansys Employee

The cumulative sum function returns a data set that has the same length as the original set of points. Element I of the set returned by cum_sum is the sum of elements 1 through I of the original data set.
Try to play a bit with this function and see what it outputs depending on your data.

• Ata Vafi
Subscriber

@Aymen: The information you provided can be found in the HFSS help and other sources as well. Since you are an Ansys employee, I was hoping for a more specific and detailed answer from you. I have spent a considerable amount of time trying to figure it out myself, which is why I reached out here for some authentic assistance. It would be much more helpful if you could provide me with some practical examples that demonstrate the usage of the function. Simply directing me to experiment with the software isnâ€™t enough.

• Ata Vafi
Subscriber

.

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