Draw Lines in COMSOL Without Knowing Point Coordinates

  • Thread starter ra123
  • Start date
  • Tags
    Comsol
In summary: If you want to use periodic boundary conditions in 1D, you can use the Comsol fem.equiv directive. This directive sets up the necessary equations for the boundary conditions and assigns them to the appropriate pairs.
  • #1
ra123
7
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 alot
 
Engineering news on Phys.org
  • #2
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 yabi
  • #3
so how exactly do you just "draw" these lines? I always see the option to enter coordinates
 
  • #4
...when you're in "draw mode", pick the line tool (or the bezier tool) and then you can draw lines on the workbench.
 
  • #5
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.
 
  • #6
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!
 
  • #7
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.
 
  • #8
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.
 

1. How can I draw lines in COMSOL without knowing the point coordinates?

In COMSOL, you can use the "Draw Line" tool to draw lines without knowing the exact coordinates. Simply click on the "Draw Line" button, and then click on the desired starting and ending points on your model. You can also use the "Snap to Geometry" option to snap the line to existing geometry, making it easier to draw precise lines.

2. Can I edit or modify the lines after drawing them?

Yes, you can edit and modify lines in COMSOL by selecting them and using the "Edit Line" tool. This allows you to change the starting and ending points, as well as the thickness and style of the line.

3. Is it possible to create curves or arcs using the "Draw Line" tool?

No, the "Draw Line" tool only allows for the creation of straight lines. To create curves or arcs, you can use the "Draw Arc" tool or the "Draw Spline" tool, depending on the type of curve you want to create.

4. How can I ensure that the lines I draw are aligned with existing geometry?

To ensure that your lines are aligned with existing geometry, you can use the "Snap to Geometry" option while drawing the lines. This will automatically snap the line to the nearest point on the existing geometry, making it easier to create precise lines.

5. Can I import point coordinates from an external file to draw lines in COMSOL?

Yes, you can import point coordinates from an external file by using the "Import Data" functionality in COMSOL. This allows you to import a file containing the point coordinates and then use them to draw lines in your model.

Similar threads

Replies
3
Views
1K
Replies
2
Views
1K
  • Special and General Relativity
2
Replies
51
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
2K
  • Linear and Abstract Algebra
Replies
9
Views
201
Replies
40
Views
2K
  • Mechanical Engineering
Replies
2
Views
3K
  • Special and General Relativity
Replies
4
Views
1K
Replies
29
Views
1K
Back
Top