Setting Correct Units for Named Expressions in Ansys Fluent
Hello. Today I'd like to talk about the sometimes confusing issue of assigning the right units to name expressions in Fluent.
Let's assume we have a time-dependent boundary condition, such as pressure based on time. How do we define that boundary condition? We can define it using a named expression. Here's how:
- Create a new named expression called inlet pressure.
- Define it as a function of time:
time, tfor time, multiplied by100 pascals. - This expression represents a linear function that goes from 0 to 100 pascals in 20 seconds.
We typically want to stick with SI units. Therefore, it's important to define the units correctly. Here's the process:
- Recognize that
tcomes with seconds as its unit. - Account for the unit of seconds in the expression.
- If all components were numbers without units, the expression would work directly. However, since
tincludes seconds, we must adjust for that.
To correct the units:
- Include the unit of seconds in the expression.
- Divide by another second to ensure the product meets the correct unit criteria.
Once these adjustments are made:
- Hit "OK" to save the expression.
- Reassign the expression to the inlet boundary condition.
As you can see, the software now accepts this with the correct unit. Thank you for your attention.
Note: This transcript is provided by Ozen Engineering, Inc.
Hello. Today I'd like to talk about the sometimes confusing issue of setting correct units for named expressions in Ansys Fluent. Let's assume we have a time-dependent boundary condition, like pressure based on time.
We can define it using a named expression, which I'll call "inlet pressure" and make it a function of time. For example, it could be time (t) times 100 Pascals, going from 0 to 100 Pascals in 20 seconds. It's a linear function. We typically want to stick with SI units.
So, I'll say, "this is pressure," and define the units, which we must.
I'll define this function and hit "okay." Now, I have a new named expression called "inlet pressure." This inlet is our pressure inlet, which I'll now assign to the expression "inlet press" and hit "apply." However, as you can see, there's a problem with the unit.
I thought I had it right, but there's an issue. Let me show you why. In the expression, when you look at it, "t" comes with seconds. That's why we have to account for that second. The way to do it is, if all these were numbers without units, this would have worked.
But because "t" comes with seconds, we have to account for that. So, I'll put our units here. Now, we have an extra second. To meet the right unit criteria, we have to take out our unit. So, if we divide it by another second, the product will be correct.
I'll hit "okay." I'll go back to my inlet boundary condition, reassign, and as you can see now, the software accepted this with the correct unit. Thank you.

