We are going to delve into “User Expressions”. This is a topic that scares many an eQUEST user, so let me be clear, you can very easily complete an eQUEST model without “User Expressions”. They are optional, but they can be very helpful.
What is a User Expression in eQUEST?
A User Expression, also called a User Input Expression, is an input that is dependent on another input. This is very powerful because it allows interdependence of inputs, and allows dynamic modeling. To really explain a user expression, let’s start out with a simple example.
Let’s say we wish to place one window on each wall in our simulation. It’s common that a band of glass will be based on the length of the wall. Let’s say that for most walls, we want a 5 foot band of glass, starting 3 feet off the ground that starts and stops 1 foot from each end of the wall.
Since a window is a child of a wall, eQUEST can create the window based on known wall data. To do this, set up your window like this:
Then right click the field for width and select Edit/View User Expression:
Then Enter: #p("WIDTH")-2
Voila! You will see the value for window width in Magenta, indicating that it comes from a user expression.
How does this User Expression work?
This User input expression translates to “Window width = Parent (#p) WIDTH minus 2. Since the #p or parent of a window is the wall, the result is a window width that is 2 feet less than the wall.
Why does this user expression save time?
The reason this user input expression can save a lot of time is because the walls are usually all completed by the time you reach detailed mode, but the windows need some fine tuning. Manually entering each window requires the user to find each wall value (often a decimal), subtract 2, and then repeat this for a number of windows.
Instead, one can enter a user expression for window width and bypass the hand calculation (of the window width).
Example 2: Combination of Global Parameters and user expressions
- Add a numeric global parameter. We call it “LPD Office” with a value of 1.2
- Go to your lighting load and select “Edit/View User Expression”
- Type: #pa(“LPD OFFICE”)
- The new lighting value will be in magenta, and have a value of 1.2
Why does this save time?
As we all know, the lighting power density can change frequently. If we had setup all of our office spaces with this user expression, then it is very easy to change all of them later by simply changing the global parameter.
Alternatively, if you are performing energy conservation measures via parametric runs, the global parameter(s) can be varied in the parametric run, saving countless amounts of time. We have an example of this in here in our eQUEST course
eQUEST User Expressions can be much more powerful
These two examples are just the tip of the iceberg. User expressions allow the use of mathematical operators, and even programmatic language like “if/else”. Really good eQUEST users have made some incredibly clever user input expressions. For instance, some users have developed a system that changes the lighting power density based on patterns found in the space name. Such a user expression is very complicated, and not a good place to start (and maybe you will never need this complexity).
The downside to user expressions is that they require a detailed knowledge of DOE2 code and also require a bit of coding ability. Sometimes the best user expressions are ones that someone else wrote!
Interested in more? We are gauging interest on this topic and have quite the collection of user expressions, but they need to be put into context.
If interested, please sign up for our eQUEST Hacks list here: