=PDEVAL(col1, exprn, stamp, opr, pt, [options])
PDEVAL to compute a single value from a solution array obtained by any of the partial differential equations solvers.
PDEVAL computes the value using a specified calculus operation including interpolation, differentiation or integration.
In a dynamical optimization problem,
PDEVAL can be used to define dynamic constraints on the solution array of the partial differential equations solver.
A constraint formula is typically defined as the difference between the computed value by
PDEVAL and a target value. The constraint formulas are input to
col1 a reference to the first column in the solution array. This defines the time or spatial range for the calculus operation.
You may select a sub range of column 1 although this reduces the accuracy of the calculus operation.
exprn a reference to the operand for the calculus operation.
The reference may be to single variable or a formula implicating mulutiple variables. If your operand is a single variable, just pass its name in this argument.
the time or spatial point value that identifies the target block within the solution array.
The stamp must be selected from the available output points in the first row of the solution array.
See Output Format section for
opr a string value specifying the calculus operation to perform. Supported values are
INTERP, DERIV, and INTEG.
pt defines the point of interpolation or differentiation for the calculus operation.
Not required if the calculus operation is INTEG.
order controls the calculus operation as described in below:
opr is INTERP or INTEG
Enter 1 to use linear splines, or 3 to use cubic splines. Default is 3.
opr is DERIV
Enter the derivative order: 1, 2 or 3. Default is 1.
Consider the array result shown in Table 1 and obtained by PDSOLVE for heat transfer problem. The results are in the default format which gives you a snapshot of the system variables spatial distribution at selected temporal values. The first row specifies the time points (in this example 0, 0.5 and 1), and the first column specifies the spatial points.
You can use PDEVAL to extract or compute values of interest from the simulation result:
Find derivative of u(x, t=0.5) at x=0.5.
Note that it matches the value of ux(x=0.5,t=0.5), cell Q17 of Table 1.
|Integrate u(x, t=0.5) from x=0 to 1.||
|Interpolate u(x,t=0.5) at x = 0.75.||
|Integrate the square of u(x, t=0.5) from x=0 to 1.||
When solving a parametrized dynamical optimization problem, PDEVAL is used to define constraints on the dynamical system solution typically as the difference between a computed value by PDEVAL and a target value. You can then use the nonlinear solver NLSOLVE to find optimal values for the design parameters that will minimize the differences in your defined constraints.