mphevalpoint
Evaluate expressions at geometry vertices.
Syntax
[v1,...,vn] = mphevalpoint(model,{e1,...,en},...)
[v1,...,vn,unit] = mphevalpoint(model,{e1,...,en},...)
Description
[v1,...,vn] = mphevalpoint(model,{e1,...,en},...) returns the results from evaluating the expressions e1,...,en at the geometry vertices. The values v1,...,vn can either be a cell array or a matrix depending on the options.
[v1,...,vn,unit] = mphevalpoint(model,{e1,...,en},...) also returns the unit of all expressions e1,...,en in the 1xN cell array unit.
The function mphevalpoint accepts the following property/value pairs:
none | mean | int | max | min | rms | std | var
off | on
real | abs
The value being treated if dataseries is set to max or min
on | off
The property Dataset controls which dataset is used for the evaluation. Datasets contain or refer to the source of data for postprocessing purposes. Evaluation is supported only on Solution datasets.
The Dataseries property is used to control any filtering of the data series. The supported operations are: average (mean), integral (int), maximum (max), minimum (min), root mean square (rms), standard deviation (std) and variance (var).
Set the property Matrix to off to get the results in a cell array format.
In case the property Datseries is either min or max, you can specify how the values are treated using the property Minmaxobj. Use either the real data or the absolute data.
The property Solnum is used to select the solution to plot when a parametric, eigenvalue, or time-dependent solver has been used to solve the problem.
The expressions e1,...,en are evaluated for one or several solutions. Each solution generates an additional row in the data fields of the post data output structure. The properties Solnum and t control which solutions are used for the evaluations. The Solnum property is available when the dataset has multiple solutions — for example in the case of parametric, eigenfrequency, or time-dependent solutions. The t property is available only for time-dependent problems. If Solnum is provided, the solutions indicated by the indices provided with the Solnum property are used. If t is provided, solutions are interpolated. If neither Solnum nor t is provided, all solutions are evaluated.
For time-dependent problems, the variable t can be used in the expressions ei. The value of t is the interpolation time when the property t is provided, and the time for the solution, when Solnum is used. Similarly, lambda and the parameter are available as eigenvalues for eigenvalue problems and as parameter values for parametric problems, respectively.
Example
Evaluate the temperature on all geometry points:
model = mphopen('model_tutorial_llmatlab');
std = model.study.create('std');
std.feature.create('stat','Stationary'); std.run;
T = mphevalpoint(model,'T');
Evaluate the temperature on point 5:
T = mphevalpoint(model,'T','selection',5);
Evaluate the temperature and the magnitude of the total heat flux on point 5:
[T, heatflux, unit] = mphevalpoint(model,{'T','ht.tfluxMag'},...
'selection',5);
Evaluate the temperature at every time step computed with power set to 30:
model = mphopen('model_tutorial_llmatlab');
std = model.study.create('std');
param = std.feature.create('param','Parametric');
time = std.feature.create('time','Transient');
time.set('tlist', 'range(0,1,25)');
param.setIndex('pname','power',0)
param.setIndex('plistarr','30 60 90',0);
std.run;
T = mphevalpoint(model,'T','selection',5,'dataset','dset2');
Evaluate the temperature at the seventh time step:
T = mphevalpoint(model,'T','selection',5,'dataset','dset2',...
'solnum',7);
Evaluate the temperature at 10.5 sec:
T = mphevalpoint(model,'T','selection',5,'dataset','dset2',...
't',10.5);
Evaluate the temperature on point 5 computed with power set to 90:
T = mphevalpoint(model,'T','selection',5,'dataset','dset2',...
'outersolnum',3)
Evaluate the temperature average over all time steps:
T_avg = mphevalpoint(model,'T','selection',5,...
'dataset','dset2','dataseries','average');
See also
mpheval, mphevalglobalmatrix, mphevalpointmatrix, mphglobal, mphint2, mphinterp, mphparticle, mphray