Draw Lines in COMSOL Without Knowing Point Coordinates

  • Thread starter Thread starter ra123
  • Start date Start date
  • Tags Tags
    Comsol
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 19K views
ra123
Messages
7
Reaction score
0
Hi, I am pretty newish to comsol.
Im having a simple problem in constructing my geometry
How exactly can you draw lines from one point to another when you don't know the coordinates of the points?
My geometry is pretty complicated and its difficult to find the coordinates of the points. So is there like a way I can select the 2 points on the geometry to draw a line.
Or is there a way to find out the exact coordinates my my points.
Thanks a lot
 
Physics news on Phys.org
You can certainly define lines simply by "drawing them" without specifying the points as separate entities explicitly, but you're still forced to take a stand on their location (in the grid for example). If the geometry is complicated, it may be appropriate to try to model it using other primitives likes circles, ellipses, splines etc. and then cut, merge, edit sections and so on (like to avoid having to calculate specific auxiliary points which don't really "exist" in your geometry). Comsol isn't (yet) really strong in creating geometry and that's why the solidworks link is pretty strong what comes to model generation (so depending on what modules and so forth you've included in your install of comsol doing the geometry with a more appropriate software package might be an option as well).
 
  • Like
Likes   Reactions: yabi
so how exactly do you just "draw" these lines? I always see the option to enter coordinates
 
hmm..yeah i know you just click the "line" tool. But when i click that I have to enter coordinates to specify my line.
I was looking for a way to just draw a line on the workbench itself by just clicking anywhere and moving the mouse...like how some CAD programs are.
 
oh i figured out what's going on, you can only draw lines like that in 2D..I was working in 3D all the time. But I guess Comsol doesn't allow you to do that in 3D just yet, huh?
Thanks for the help!
 
yeah I didn't figure out you were in 3D ... yeah, lots of the 3D work is done on 2D surfaces of the 3D objects and then have to specify how to generate the object from the planar surface. And as you've probably noticed it's not like a "real CAD" software in terms of generating a model and anything beyond relatively simple troublesome fast. Being able to edit the sections and then reassemble them works pretty good though.
 
Hello.
Does anybody know how to implement periodic boundary conditions in 1D model without usage of GUI? Old fem.equiv is removed and something like this (found in mph file) doesn't work:
pair{1}.type= 'identity';
pair{1}.name= 'Pair 1';
pair{1}.src.dl = 1;
pair{1}.dst.dl = 4;
bnd.pair = pair;
fem.bnd = bnd;
Let say I want to use periodic at the 1 and 4 boundaries. How can I do it?
Thank you.