mphmin
Perform a minimum of expressions.
Syntax
[v1,...,vn] = mphmin(model,{e1,...,en},edim,...)
[v1,...,vn,unit] = mphmin(model,{e1,...,en},edim,...)
Description
[v1,...,vn] = mphmin(model,{e1,...,en},edim,...) evaluates the minimum of the string expressions e1,...,en and returns the result in N matrices v1,...,vn with M rows and P columns. M is the number of inner solution and P the number of outer solution used for the evaluation. edim defines the element dimension: line, surface, volume or as an integer value.
[v1,...,vn] = mphmin(model,{e1,...,en},edim,...) also returns the units in a 1xN cell array.
The function mphmin accepts the following property/value pairs:
none | average | integral | maximum | minimum | rms | stddev | variance
off | on
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 mean of expressions e1,...,en is evaluated for one or several solutions. Each solution generates an additional column in the returned matrix. The properties solnum and t control which solutions are used for the evaluation. 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.
The property solnum is used to select the solution number when a parametric, eigenvalue, or time-dependent solver has been used.
The property outersolnum is used to select the outer solution number when a parametric sweep has been used in the study step node.
If the matrix property is set to off the output is cell arrays of length P containing cell arrays of length M.
Example
Evaluate the minimum temperature in the model domain:
model = mphopen('model_tutorial_llmatlab');
std = model.study.create('std');
std.feature.create('stat','Stationary');
std.run;
maxT = mphmin(model,'T','volume');
Evaluate the minimum temperature on boundary 9:
maxT = mphmin(model,'T','surface','selection',9);
Evaluate minimum of expression using several solution:
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;
Evaluate the minimum of the temperature at every time step computed with power set to 30:
maxT = mphmin(model,'T','volume','dataset','dset2');
Evaluate the minimum of the temperature at the fifth time step:
maxT = mphmin(model,'T','volume','dataset','dset2',...
'solnum',5);
Evaluate the minimum of the temperature at 10.5 sec and 15.2 sec:
maxT = mphmin(model,'T','volume','dataset','dset2',...
't',[10.5,15.2]);
Evaluate the minimum of the temperature at every time step computed with power set to 90:
maxT = mphmin(model,'T','volume','dataset','dset2',....
'outersolnum',3);
See also
mphmax, mphmean