# HFSS-help with defining output variable

1. ## HFSS-help with defining output variable

Hello! I have run a frequency sweep analysis in HFSS and have plotted a variable (let's call it Q) versus frequency. I have selected a Linear Count setup, with 1000 points, so it is as if I have calculated 1000 values of Q (each at a different frequency). Could you please help me on how I can define a new output variable that will give me the sum of all Q values (in HFSS)?? (that is S= Q(f1)+Q(f2)+...+Q(f1000))?

•

2. ## Re: HFSS-help with defining output variable

Instead of using HFSS to get the sum of all the Q values, use Matlab, it is much more easy.
After you plot the variable Q against frequency. Right click on the graph and export to .csv file. Then you can use Matlab to find the sum of all Q values.

-sv

•

3. ## Re: HFSS-help with defining output variable

thank you for your answer. However, I need to calculate this value as a variable in HFSS (because I need to use it as an optimization parameter to perform an optimization analysis). Is it possible to do that? Or if it is simpler..is it possible to get a variable denoting the maximum value of Q? (i.e. max (Q(f1),Q(f2)..Q(f1000)).
Again thanks a lot!

•

4. ## Re: HFSS-help with defining output variable

When you create your output variable, create another variable that makes use of the range functions...this is exactly what they are there for! in your case use the Catagory == Math -> Function == sum() function of a given existing output variable over a given calculation range of frequencies. Look up range functions in the HFSS help for more info!

later-- :)

--[[ ]]--