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.

definition of equations and boundaries using matlab

Please login with a confirmed email address before reporting spam

hii..

I have been trying to use MATLAB as a direct way to solve the problem, since my geometry is a bit complicated. However when I tried using the Application modes under Comsol Multiphysics, I found that nowhere in the documentation do they state the names of the variables and boundary conditions to be used, if we use Matlab directly.

For example the applications mode 'FlNavierStokes' defines the variables for boundary conditions:

bnd.U0out = {};
bnd.v0 = {};
bnd.opentype = {};
bnd.u0 = {};
bnd.Fbnd = {};
bnd.p0 = {};
bnd.type = {};
bnd.velType = {};
bnd.walltype = {};
bnd.uwall = {};
bnd.inttype = {};
bnd.U0in = {};
bnd.vwall = {};
bnd.ww = {};
bnd.name = {};
bnd.outtype = {};
bnd.f0 = {};
bnd.uvw = {};
bnd.intype = {};
bnd.stresstype = {};

however how do I know which variable corresponds to which boundary condition.

If somebody knows a way other than trial and error, kindly help me out.

4 Replies Last Post Jun 30, 2010, 10:31 a.m. EDT
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: 2 decades ago Sep 22, 2009, 4:34 p.m. EDT
Hi

My way to get around the definitions has been to build a simple geometry with the GUI's of comsol, save the file, and study the "history file", then by analogy you find out which variable to use when. Xou might have to go back and forth a few times.

Personally I use a CAD tool (SolidWorks in my case) to generate complex geometries

Good luck
Ivar
Hi My way to get around the definitions has been to build a simple geometry with the GUI's of comsol, save the file, and study the "history file", then by analogy you find out which variable to use when. Xou might have to go back and forth a few times. Personally I use a CAD tool (SolidWorks in my case) to generate complex geometries Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago Sep 22, 2009, 4:46 p.m. EDT
yaa..thats what I meant by trial and error...i guess there is no other way then....

i wish COMSOL had atleast specified the boundary names, equations names in the documentation...it would have been trivial for them to do that...
yaa..thats what I meant by trial and error...i guess there is no other way then.... i wish COMSOL had atleast specified the boundary names, equations names in the documentation...it would have been trivial for them to do that...

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: 2 decades ago Sep 23, 2009, 9:55 a.m. EDT
Hi

first of all you have certain amount of info names in the application descriptions, that depends on which application you are using, it's rater symmetric for most applications modes. Certain things can be found in the cadug, mlinterface and guide pdf files too.

Personaly, I use an externalCAD software for my geometries, Comsol is too limited once you have something more engineering than a few cubes. Thereafter I use the GUI to look after the internals. But it is true that during a years time I ued the script interface often, and feeling the same frustration as I read from you.

Finally for the Zimmermann ch8 case, I managed to get it running, but you must choose the "Spooles direct solver" otherwise the Navier-Stockes section did not converge.

You can also use the Comsol internal flsmhs(phi,1/n1) and fldsmhs(phi,1/n2) functions for the heaviside and dirac functions. and you do not need to switch to matlab in v3.5a, you can create the subdomain expressions of m1int, m2int, v and sd, and plot with a global domain plot.

Zimmermanns book was written some years ago, comsol s evolving quickly

Good luck
Ivar
Hi first of all you have certain amount of info names in the application descriptions, that depends on which application you are using, it's rater symmetric for most applications modes. Certain things can be found in the cadug, mlinterface and guide pdf files too. Personaly, I use an externalCAD software for my geometries, Comsol is too limited once you have something more engineering than a few cubes. Thereafter I use the GUI to look after the internals. But it is true that during a years time I ued the script interface often, and feeling the same frustration as I read from you. Finally for the Zimmermann ch8 case, I managed to get it running, but you must choose the "Spooles direct solver" otherwise the Navier-Stockes section did not converge. You can also use the Comsol internal flsmhs(phi,1/n1) and fldsmhs(phi,1/n2) functions for the heaviside and dirac functions. and you do not need to switch to matlab in v3.5a, you can create the subdomain expressions of m1int, m2int, v and sd, and plot with a global domain plot. Zimmermanns book was written some years ago, comsol s evolving quickly Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jun 30, 2010, 10:31 a.m. EDT
what is

bnd.outtype = {'p' ,'p' ,'p0'};

can someone explain me here.
what is bnd.outtype = {'p' ,'p' ,'p0'}; can someone explain me here.

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.