Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Beginners questions about Comsol and Matlab

Please login with a confirmed email address before reporting spam

Hi,
I need to work with Comsol in my new student job and I'm completely new to Comsol and FEM, so this is quite a challenge for me :) Because I want to understand the basic concept of how to work with Comsol:

Would a 'typical workflow' in Comsol look like this:
1. import a CAD-file or create a model of some physical item in the Comsol editor
2. define the properties of the item and create a mesh in that model
3. run a simulation

I googled it, but I still do not clearly understand what Matlab is capable to do when linked to Comsol or what the benefits are in using Matlab with Comsol. Would one typically use it like this:
1. establish a model in Comsol (like in 1. and 2. in my first question)
2. export it as an m-file
3. run the model from within Matlab (linked to Comsol using it as a FEM solver)
4. process the results in Matlab

Is it possible to change/manipulate the mesh of a model from within Matlab (like refining the mesh structure in certain areas of the model)?

Best,
Eli





2 Replies Last Post 20 gen 2011, 13:01 GMT-5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 gen 2011, 16:21 GMT-5
Hi

here re several discussion on the forum on this, but you need to search a little.

basically I do agree, I would say:
1) define the coordinates: 3D, 2D, 2D-Axis, 1D, ...
2) define the physics: ST, EC, TH ...
3) define the solver type: stationary, transient eigenfrequency ...
4) create your parameters, variables, definition, selections... (you might need to loop back here a few times)
5) create your geoemetry (or import it)
6) decide if you work in "continuation" mode or hand knitting mode
7) define your physics, and boundary conditions (BC), initial conditions, hysics linking ...
8) mesh and mesh strategy
9) set up the solver
10) solve
11) postprocess, plot dump data ...

ANd whatever I have missed ;

Yes you can also refine the mesh, there are differnet ways in 2D and in 3D, index/check the doc


--
Good luck
Ivar
Hi here re several discussion on the forum on this, but you need to search a little. basically I do agree, I would say: 1) define the coordinates: 3D, 2D, 2D-Axis, 1D, ... 2) define the physics: ST, EC, TH ... 3) define the solver type: stationary, transient eigenfrequency ... 4) create your parameters, variables, definition, selections... (you might need to loop back here a few times) 5) create your geoemetry (or import it) 6) decide if you work in "continuation" mode or hand knitting mode 7) define your physics, and boundary conditions (BC), initial conditions, hysics linking ... 8) mesh and mesh strategy 9) set up the solver 10) solve 11) postprocess, plot dump data ... ANd whatever I have missed ; Yes you can also refine the mesh, there are differnet ways in 2D and in 3D, index/check the doc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 gen 2011, 13:01 GMT-5
Hi Ivar,
thank you very much for the detailed explanation, it helped me a lot.
Best,
Eli
Hi Ivar, thank you very much for the detailed explanation, it helped me a lot. Best, Eli

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.