Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Maximum over time - at operator, point/line evaluation

Please login with a confirmed email address before reporting spam

Hi all

I've done a Parametric Sweep and I'm trying to Evaluate a Line or set of Points at a time instant corresponding to a maximum of a variable, mfh.By. This time instant is dependent on the solution.

When I evaluate (Point Evaluation) the expression "at(attimemax(0, 0.25, mfh.By,t),mfh.By)" it gives me this error:

The solution specification is nonscalar or out of range. - Operator: at - Geometry: geom2 - Domain: 2 Failed to evaluate expression. - Expression: at(attimemax(0,0.25,comp1.mfh.By,t),comp1.mfh.By) Failed to evaluate expression. - Expression: at(attimemax(0,0.25,comp1.mfh.By,t),comp1.mfh.By)

Also, I find "Geometry: geom2" weird because I only have Geometry 1.

However when I evaluate the arguments of the "at" operator separately, they are evaluated with no problem. The same if I put them on an expression in a Point Graph.

Also, I have a Cut Point 2D Data Set over which I'm evaluating, which has more than one point (five) in a line with different x-coordinates. When I evaluate, the different points are different columns. Is there anyway I can put them in rows, so than I can plot the Table Graph in as a function of x? Or another way to do this?

Thank you


1 Reply Last Post Nov 21, 2017, 9:38 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Nov 21, 2017, 9:38 a.m. EST

Well, just doing "attimemax(0,0.25,mfh.By, mfh.By)" in a Line Graph appears to have solved my problem, as I just need to plot mfh.By as a function of x.

However, for cases where one might need the actual time instant, for instance, to plot the variable as a function of time, I can't see such a straightforward approach.

Well, just doing "*attimemax(0,0.25,mfh.By, mfh.By)*" in a Line Graph appears to have solved my problem, as I just need to plot *mfh.By* as a function of *x*. However, for cases where one might need the actual time instant, for instance, to plot the variable as a function of time, I can't see such a straightforward approach.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.