Electronics

Electronics

Topics related to HFSS, Maxwell, SIwave, Icepak, Electronics Enterprise and more.

Cant figure out how to round down a variable to the nearest whole number

TAGGED: ,

    • Timothy
      Subscriber

      Ansys Electronics Desktop 2021R1 (Icepak)

      I am trying to optimize a design by varying the size and number of fins along a plate by patterning blocks along the length.

      I would get an error if the number has decimals.

      I cant figure out how to write an expression or use the IF statement to arrive at the nearest whole number below the calculated FinNumber.

    • Praneeth
      Ansys Employee

      You can use int() or nint() for the integer truncated value or the nearest integer values in your expression.
      You have to use "==" instead of "=" for using in if function.
      For more information on this please refer "Defining an Expression" in the HFSS help document.
      All the very best.
Viewing 1 reply thread
  • The topic ‘Cant figure out how to round down a variable to the nearest whole number’ is closed to new replies.