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.
How to get the average normal vector of a surface
Posted 2022年2月1日 GMT+8 00:55 Structural & Acoustics, General Version 5.6 5 Replies
Please login with a confirmed email address before reporting spam
Hi, I am new to COMSOL. I want to compute the volume velocity on a surface. I know I can use integration under the derived values to compute the the veloctiy over a surace. However, that is based on global coordinate system. In order to project the velocity from global coordinate system to the local coordinate system, I need the get the normal vector on the surface. How can I do it? I found some thread decade ago discussing the related topic. But not much detail was given. Any help will be appreciated.
Please login with a confirmed email address before reporting spam
Hello Junfeng,
This old thread may be helpful to you.
Best regards,
Jeff
-------------------Jeff Hiller
Please login with a confirmed email address before reporting spam
Jeff
Thank you so much! I have just used COMSOL for less than 2 month. My another question is, is there any way to find the list of build-in variables? For example the normal vector nx, ny, and nz in your previous thread. How am I supposed to know these names unless I read through the thousand-page manual?
Please login with a confirmed email address before reporting spam
Hello Junfeng,
Fair question. Quite a few years ago now, I used to give a "tips and tricks" presentation, and on one of the slides I told the attendees the answers to all their questions are found in the Reference Guide, as opposed to the other manuals that are included with the software. It's of course a bit of an exageration. With that said, when you are new to COMSOL it is a good idea to at least have browsed the Reference Guide once to know what's in its various chapters; almost all questions from new users refer to features documented in the Reference Guide. This thread proves that point. Once you've perused the Reference Manual -even just once briefly- you know that it contains the sort of definitions you were asking about in Chapter 5, and a quick search (Ctrl+F) for "normal vector" will take you to page 323 (in that manual for version 6.0). That manual also describes the syntax, the available pre-implemented functions, etc.
Nowadays, another very effective way of finding the name of predefined quantities is to, in the GUI itself, look at the postprocessing quantities available for plotting. See my attached screenshot: by pretending I want to generate an arrow plot on a geometry's surfaces, I can quickly determine that the normal vector is (nx, ny, nz).
Yet another approach is to do Ctrl+F in the GUI and search for "normal vector": if that string appears in the description of any quantity in any of the Settings windows of your model, this will find it!
Best,
Jeff
-------------------Jeff Hiller
Attachments:
Please login with a confirmed email address before reporting spam
Jeff
Thank you. I did try to find them under the expression drop-down windows. However I was looking at the wrong catogory.
I used "surface" node under "dataset" node to define a surface and then used " surface integration" under the "derived values" node to compute the volume velocity (Hopefully, this is a correct way.)
When I click the replace expression icon, there is a "geometry" catagory that is at the same level with "component1". There is no "nx, ny, nz" under this catagory. So here comes another question: what is the difference between "geometry" and "component1"=>"geometry"?
Please login with a confirmed email address before reporting spam
Actually, I don't know off hand.
Edit: I inquired with some colleagues, and we agreed that there is no fundamental reason for the existence of this Geometry category located outside of the Component category. It would be more logical for all the geometric quantities relevant to component 1 it to be found under Component. You can consider it a minor bug. I have reported it for correction. Thanks for pointing this out!
Jeff
-------------------Jeff Hiller
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.
Suggested Content
- BLOG How to Evaluate Stresses in COMSOL Multiphysics®
- KNOWLEDGE BASE How do I solve a PDE with space derivatives of order higher than two?
- KNOWLEDGE BASE My Flux Calculation Seems Wrong
- KNOWLEDGE BASE Error: Failed to compute elastoplastic strain variables
- FORUM Finding the normal vector of the surface
