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.

XYZ components in plotting arrow lines

Please login with a confirmed email address before reporting spam

I'm trying to plot flux arrow across a surface using something like D*cx where D is the diffusion coefficient and cx is the concentration gradient in the x-axis

But since it's a 3D system, there are three components in the x,y,z-axis i need to input what is the difference in physical meaning bewteen (D*cx, D*cy, D*cz) and (nx*D*cx, ny*D*cy, nz*D*cz)

Thank you



1 Reply Last Post Nov 1, 2023, 10:08 a.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 year ago Nov 1, 2023, 10:08 a.m. EDT
Updated: 1 year ago Nov 1, 2023, 10:13 a.m. EDT

I hope the following discussion helps. The unit vector (nx,ny,nz) is a unit normal to a surface. It varies from one surface to another in Comsol Multiphysics, because surfaces can be oriented in various ways and may also be curved. In other words, (nx,ny,nz) is a local (ie., it can be spatially dependent) unit normal vector. If (cx,cy,cz) is also a vector (and likely spatially dependent) quantity, then is the (again, local) scalar product of (cx,cy,cz) and (nx,ny,nz). But since (nx,ny,nz) is a unit normal to the surface, this scalar product nicely extracts the projection of the (cx,cy,cz) vector normal to that surface. In contrast, your quantity D, which (if I understand you correctly) is an ordinary scalar (which may or may not be spatially dependent, but is still a scaler). Multiplying a vector by a scalar simply "scales" the vector. And yes, you may have a good reason to do that. But it is not the same thing as forming the "scaler product" between two vectors. Ok, now notice how your final expression strangely attempts to form a new triplet of numbers by separately multiplying the x,y, and z components of two other vectors together? That is not a standard vector operation. I.e., one does not normally have any good physical reason to take two vectors, say: (Ax,Ay,Az) and (Bx,By,Bz) and form the abnormal-triplet construction: (AxBx,AyBy,AzBz). You see, that kind of operation is neither a scalar (aka "dot") product nor a vector (aka "cross") product. Computing that sort of thing is possible (and the software won't stop you from doing it) but it isn't likely to correspond to anything physical.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I hope the following discussion helps. The unit vector (nx,ny,nz) is a unit normal to a surface. It varies from one surface to another in Comsol Multiphysics, because surfaces can be oriented in various ways and may also be curved. In other words, (nx,ny,nz) is a local (ie., it can be *spatially dependent*) unit normal vector. If (cx,cy,cz) is also a vector (and likely spatially dependent) quantity, then nx*cx+ny*cy+nz*cz is the (again, local) scalar product of (cx,cy,cz) and (nx,ny,nz). But since (nx,ny,nz) is a *unit* normal to the surface, this scalar product nicely extracts the *projection* of the (cx,cy,cz) vector normal to that surface. In contrast, your quantity D, which (if I understand you correctly) is an ordinary scalar (which may or may not be spatially dependent, but is still a scaler). Multiplying a vector by a scalar simply "scales" the vector. And yes, you may have a good reason to do that. But it is not the same thing as forming the "scaler product" between two vectors. Ok, now notice how your final expression strangely attempts to form a new triplet of numbers by separately multiplying the x,y, and z components of two other vectors together? That is *not* a standard vector operation. I.e., one does not normally have any good physical reason to take two vectors, say: (Ax,Ay,Az) and (Bx,By,Bz) and form the abnormal-triplet construction: (AxBx,AyBy,AzBz). You see, that kind of operation is neither a scalar (aka "dot") product nor a vector (aka "cross") product. Computing that sort of thing is *possible* (and the software won't stop you from doing it) but it isn't likely to correspond to anything physical.

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.