### 15.5.21. maxVal

Returns the maximum value of the specified variable or expression on the specified locator. You should create a user variable if you want to find the maximum value of an expression.

    maxVal(<Variable|Expression>)@<Location>

where:

- `<Variable|Expression>` is a variable or expression.

- `<Location>` is, in the context of CFX-Solver, a 2D region or 3D region (such as a domain or subdomain) or, in the context of CFD-Post, a Point object or a 1D, 2D, or 3D locator.

#### 15.5.21.1. Tools > Command Editor Example

    >calculate maxVal, <Variable|Expression>, <Location>

#### 15.5.21.2. Tools > Function Calculator Example

This will return the maximum Yplus value on the default wall boundaries:

Function: `maxVal`, Location: `Default`, Variable: `Yplus`

Release 18.2 - © ANSYS, Inc. All rights reserved.