Draw Lines in COMSOL Without Knowing Point Coordinates

  • Thread starter Thread starter ra123
  • Start date Start date
  • Tags Tags
    Comsol
Click For Summary

Discussion Overview

The discussion revolves around the challenges of drawing lines in COMSOL without knowing the exact coordinates of the points, particularly in complex geometries. Participants explore methods for creating geometry, including potential workarounds and limitations of the software, as well as a separate inquiry about implementing periodic boundary conditions in a 1D model without using the GUI.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in constructing geometry in COMSOL without knowing point coordinates and asks if there is a way to select points directly on the geometry.
  • Another participant suggests that while lines can be drawn without specifying coordinates as separate entities, the user must still determine their location within the grid. They recommend using other geometric primitives and software for complex geometries.
  • A participant inquires about the process of drawing lines without entering coordinates, indicating confusion over the software's requirements.
  • It is clarified that in "draw mode," users can utilize the line or bezier tool to draw lines on the workbench.
  • One participant discovers that the ability to draw lines freely is limited to 2D, noting that they were working in 3D where this feature is not available.
  • Another participant confirms that much of the 3D work involves using 2D surfaces and highlights the limitations of COMSOL compared to traditional CAD software for model generation.
  • A separate inquiry is made about implementing periodic boundary conditions in a 1D model without using the GUI, with a specific code snippet provided that does not seem to work as intended.

Areas of Agreement / Disagreement

Participants generally agree that drawing lines in 3D is limited in COMSOL and that the software has constraints compared to traditional CAD tools. However, there is no consensus on the best approach for implementing periodic boundary conditions without the GUI, as the inquiry remains unresolved.

Contextual Notes

The discussion highlights limitations in COMSOL's geometry creation capabilities, particularly in 3D, and the challenges of implementing specific features without GUI support. There are unresolved aspects regarding the implementation of periodic boundary conditions.

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
 
Engineering 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
 
...when you're in "draw mode", pick the line tool (or the bezier tool) and then you can draw lines on the workbench.
 
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.
 

Similar threads

Replies
3
Views
2K
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
5K
Replies
3
Views
7K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 8 ·
Replies
8
Views
7K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
3
Views
9K