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.

Arrow volume expression

Please login with a confirmed email address before reporting spam

In the result temw.Hx and the coordinate x are both vectors. I want to use d(temw.Hx, x) as the expression for the arrow, so I want to take the modulus of the coordinate x and change the expression to d(temw.Hx, abs(x)). But the system reminds that x and y in d(x, y) must be variables。


3 Replies Last Post 2023年11月22日 GMT+1 15:46
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 12 months ago 2023年11月21日 GMT+1 19:55
Updated: 12 months ago 2023年11月21日 GMT+1 19:55

The quantities temw.Hx and x are both scalars. However, they are components of vectors and , respectively. The expression should give you the derivative of with respect to . For x>=0, this should be the same as the derivative with respect to abs(x). For x<0, this would simply flip the sign of the derivative. So if I were you, and if I truly needed the derivative with respect to |x|, then I would construct the derivative of temw.Hx with respect to x and (again, only if I had a good physics-based reason to do so) mutiply it by -1 for all cases where x<0. For example, just might do the job.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
The quantities temw.Hx and x are both scalars. However, they are *components* of vectors (temw.Hx, temw.Hy,temw.Hz) and (x,y,z), respectively. The expression d(temw.Hx, x) should give you the derivative of temw.Hx with respect to x. For x>=0, this should be the same as the derivative with respect to abs(x). For x

Please login with a confirmed email address before reporting spam

Posted: 12 months ago 2023年11月22日 GMT+1 15:22

when I do d(temw.Hz,y) - d(temw.Hy,z), d(temw.Hx,z) - d(temw.Hz,x), d(temw.Hy,x) - d(temw.Hx,y) for the x y and z components, nothing is showing up on the arrows.Do you know the reason for this?

when I do d(temw.Hz,y) - d(temw.Hy,z), d(temw.Hx,z) - d(temw.Hz,x), d(temw.Hy,x) - d(temw.Hx,y) for the x y and z components, nothing is showing up on the arrows.Do you know the reason for this?

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 12 months ago 2023年11月22日 GMT+1 15:46
Updated: 12 months ago 2023年11月22日 GMT+1 15:45

I suggest you post your .mph file to the forum.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I suggest you post your .mph file to the forum.

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.

Baidu
map