Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Plots - Edit Expressions: Normalization to a Certain Value

Please login with a confirmed email address before reporting spam

I have a square, centered in (0,0).

After running my simulation, I get the value of the Magnetic Field all over the square.

I run a Parametric Sweep. In order to compare my results, I want to plot the "normalized mf.Bx", I mean, I want to plot the magnetic field x-component along the x-Axis divided by its value at the center of the square.

I have a 1D Line Plot and I would like to plot (as y-Axis data) Bx/Bx(0,0) as a function of x.

I tried to write, as expression:
- mf.Bx/mf.Bx(0,0)
- mf.Bx/ppb1 (where ppb1 is a Domain Point Probe placed in (0,0) )
- mf.Bx/MAX (where MAX is a global variable: MAX = mf.Bx(0,0) )
- mf.Bx/MAX2 (where MAX2 is a model variable: MAX2 = mf.Bx(0,0) )
- mf.Bx/MAX (where MAX is a global variable: MAX = ppb1)
- NORM (where NORM is a variable: NORM = mf.Bx/mf.Bx(0,0) )
...
but no one worked.

Any suggestion to solve this problem?

1 Reply Last Post Feb 5, 2014, 5:49 a.m. EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2014, 5:49 a.m. EST
Following the suggestion given by Magnus Ringh
(www.comsol.com/community/forums/general/thread/33096/)
here's the solution.

From the Definitions node under the Model branch you can define a Maximum coupling operator.
In its settings window, define its source as the point where you want to normalize your plot. If the point is not "available" you can edit the geometry and do some "design tricks" in order the get that point available/selectable.
Notice the name of the maximum operator; by default it is maxop1.
Notice that the maximum value of a variable evaluated in a point... is that value itself!!
After re-solving the solution, you can then plot mf.Bz/maxop1(mf.Bz), which will be "normalized".
Following the suggestion given by Magnus Ringh (http://www.comsol.com/community/forums/general/thread/33096/) here's the solution. From the Definitions node under the Model branch you can define a Maximum coupling operator. In its settings window, define its source as the point where you want to normalize your plot. If the point is not "available" you can edit the geometry and do some "design tricks" in order the get that point available/selectable. Notice the name of the maximum operator; by default it is maxop1. Notice that the maximum value of a variable evaluated in a point... is that value itself!! After re-solving the solution, you can then plot mf.Bz/maxop1(mf.Bz), which will be "normalized".

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.