The first example is a single-valued expression that calculates
the pressure drop through a pipe. The names of inlet and outlet boundaries
are "inlet
" and "outlet
".
Create a new expression named "dp
":
dp = massFlowAve(Pressure)@inlet – massFlowAve(Pressure)@outlet
When you click
, the value is shown below the editor.Tip: Alternatively, type the expression in a table cell and prefix with ‘=’ sign. The cell displays the result when you click outside of the cell.
The second example is a variable expression that plots the pressure coefficient variation on a surface or a line:
Click the Expressions tab, then right-click in the Expressions area and select .
Create these three expressions:
RefPressure = 100000 [Pa] dynHead = 0.5 * areaAve(Density)@inlet * areaAve(Velocity)@inlet^2 cpExp = (Pressure - RefPressure)/dynHead
Click the Variables tab, then right-click and select .
Create a user variable defined by
cpExp
.Select Insert > Location > Line and use the details view to position the line in the simulation.
From the details view Color tab, plot the user variable on a surface or a line (just as you would with any other variable).