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.

Global Evaluation Problem

Please login with a confirmed email address before reporting spam

I'm just trying to understand the syntax and procedure for using global variables and I keep running into problems with measuring the displacements. I defined a local variable, a point and a displacement direction. I then referenced this local variable with a global variable so it shows up in the global evaluation list. My global variable is mod1.(local variable). I get an error saying "Failed to Evaluate Variable" meanwhile, the point evaluation works great. Can someone explain what I am missing? The model is attached. Thanks.


1 Reply Last Post Dec 19, 2011, 2:50 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 19, 2011, 2:50 a.m. EST
Hi

i believe you are getting confused about the local variables (defined as per (x,y,z) position) that needs to be integrated over a boundary (or edge or summed over points) and global variables that are independent of the spatial coordinates

In your case i would rather define an model1.Definition.AveW as aveop1(w) over the top area.

w is the "local variabel" but its a field w(x,y,z) so you need to perform an "intop1(w)/intop1(1)" over the top boundary, this means you are doing a integration_over_area_of(w*dx*dy)/Area to get the average value

--
Good luck
Ivar
Hi i believe you are getting confused about the local variables (defined as per (x,y,z) position) that needs to be integrated over a boundary (or edge or summed over points) and global variables that are independent of the spatial coordinates In your case i would rather define an model1.Definition.AveW as aveop1(w) over the top area. w is the "local variabel" but its a field w(x,y,z) so you need to perform an "intop1(w)/intop1(1)" over the top boundary, this means you are doing a integration_over_area_of(w*dx*dy)/Area to get the average value -- Good luck Ivar

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.