Goal amount for this year: 3000 USD, Received: 1207 USD (40%)

1. ## Roundup Function

Hey all!

I'm in need of a little help trying to get my "Start Reaction - Total" & "End Reaction - Total" on my beams to round up to the nearest 5k. I've searched around and I've seen in general how to use the roundup function, but can't seem to apply it to my label correctly! Any help would be greatly appreciated. To recap, I need my end reaction totals to always round up to the nearest 5k-10k.

MT

2. I'm guessing you've seen this post: https://www.revitforum.org/tutorials...day-usage.html ?

3. Depends on what isn't working. If it's an "inconsistent units" error, remember that the rounding functions expect unitless numbers, so you need to make them unitless for the rounding function and then re-unit them afterwards: rounddown((3'-5"/1") /(4"/1"))*1" -> gives you 10".

To use the rounding functions to round to an arbitrary increment, you need to perform your rounding operation after dividing by that increment. For example, to round x=157,386k up to the closest 5k (ignoring units): roundup(x/5)*5. (157,386/5=31,477.2, rounded up to 31,478, then multiplied by 5 to get 157,390)

This is handy for all sorts of modularizing needs.

4. That did it!!!! Thanks Chris!!! The key was to divide it by the rounding increment and then multiply it back in at the end! WORKS GLORIOUSLY!!!! My Boss thanks you too!

5. Originally Posted by cellersick
To use the rounding functions to round to an arbitrary increment, you need to perform your rounding operation after dividing by that increment. For example, to round x=157,386k up to the closest 5k (ignoring units): roundup(x/5)*5. (157,386/5=31,477.2, rounded up to 31,478, then multiplied by 5 to get 157,390)

This is handy for all sorts of modularizing needs.
I was going to suggest this same thing. I use it on my Electric Heating Coil and VAV families to pick the heater kW by 0.5 kW increments.

6. Originally Posted by Necro99
I was going to suggest this same thing. I use it on my Electric Heating Coil and VAV families to pick the heater kW by 0.5 kW increments.
Would love to see an example.

-TZ

7. Originally Posted by tzframpton
Would love to see an example.

-TZ
Sure! We size our heating coils to meet the largest of two heating loads: 1) the MBH required to lift the air to 85°F, or 2) the MBH required to offset the calculated heating load of the Space. (This is because often the heating load alone will dictate a coil Leaving Air Temperature of < 80°, which will feel cold to occupants. ASHRAE recommends staying above 85°F for this reason.)

So my kW formula then take the largest value (Thermal Comfort Heating Load or Heating Load_Total) and divides it by 3.413 to get kW. Then I do the roundup-multiply-divide trick to get it to consistently output values in 0.5 increments.

(roundup(2 * if(Heating Coil KW Override = 0, if(Thermal Comfort Heating Load > Heating Load_Total, (Thermal Comfort Heating Load / 3.413), (Heating Load_Total / 3.413)), Heating Coil KW Override))) / 2

The "override" value allows me to override the formula and use whatever kW I want. Very helpful for existing equipment! I use something similar for all of my calculated parameters.