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.

TRANSLATE - PROJECT - IUT - comsol/matlab

Please login with a confirmed email address before reporting spam

English

Hi All,

I am a student at the University at Orsay and we use Comsol/matlab since the last year. I used comsol/matlab to find the solutions of the eigen-equation of the laplacian u_n(x,y) in a square (1 x 1). I would like integrate the previous solution (for example the third solution u_3(x,y)) for x from -100 to +100 only (not with respect to y). Here the different steps that I used. I suppose that the solutions of the eigen-equation had already been find by comsol/matlab :

.....................................[script allowing to solve \delta u_n(x,y) = \lamda u_n(x,y) in a geometry square 1x1]
...............................................................

*I modify the previous script (see attachement) to put in a structure xfem the two geometries of my problem :
1) The initial 2d-geometry corresponding to a square 1x1, in which I want the u_n(x,y);
2) the 1d-geometry corresponding to a x-axis [-100 100] allowing the integration of u_n(x,y) with respect to x (post -processing step).

question 1)- How make an axis from - infinity to + infinity (to perform an integration on the full real axis ) ?

*Then at the end of my script, I write : postint(xfem, 'u', 'solnum', 3, 'Dl', 2) (see comsol's reference guide)
to perform the integration of u_3(x,y) for x from -100 to +100 (I mean on the geometry number 2-i.e. the previous axis).

question 2) (optional)- Is there a way more faster (more nicer) to perform this result ?
The solution obtained is a function of y. Is there a way to plot this new function of y ? In fact matlab has difficulties to know this new function and thus I cannot plot it easily.

Really, I already looked the different books written by comsol to find a solution of these problems but I do not understand the scripts to use and my english is very bad...

Thank you for your help

Chun







Français

Bonjour à tous,

Je suis étudiant à l'IUT d'Orsay et nous utilisons Comsol/matlab depuis l'année dernière. Je profite des vacances pour me faire la main avec ce merveilleux logiciel. J'ai réussis à utiliser comsol/matlab pour déterminer les solutions de l'équation aux valeurs propres du laplacien u_n(x,y) (correspondant physiquement à un flux) sur un carré de côté 1. Afin d'obtenir la densité, la quantité précédente doit être intégrée entre - infini et + infini (ou au mieux si cela n'est pas possible numériquement entre -100 et +100). Je souhaiterais utiliser les commandes matlab pour faire cela...Voici donc comment je procède (je suppose que le script m'ayant permis de déterminer les solutions u_n(x,y) a déjà été écrit - voir la pièce-jointe) :

.....................................[code permettant de résoudre \delta u_n(x,y) = \lamda u_n(x,y) dans un carré de côtés 1]
...............................................................

*Je modifie le code précédent pour mettre dans une structure xfem les deux géométries de mon problème :
1) la géométrie 2d- initiale correspondant à un carré de côtés 1, dans lequel je cherche les u_n(x,y);
2) la géométrie 1d- correspondant à un axe [-100 100] orienté suivant x me permettant l'intégration de u_n(x,y) (post -opération).

D'ailleurs comment faire un axe qui va de -l'infini à + l'infini (afin de réaliser une intégration sur l'axe réel entier) ?

*à la fin de mon script j'écris : postint(xfem, 'u', 'solnum', 3, 'Dl', 2) (voir le guide de référence)
afin de faire l'intégration de u_3(x,y) sur x entre -100 et +100 (c'est-à-dire sur la géométrie numéro 2-i.e. mon axe).

Est-ce-qu'il y a un moyen plus rapide (ou plus élégant) d'aboutir à ce résultat ?
La solution obtenue est une fonction de y. Y a t-il un moyen de visualiser cette nouvelle fonction en fonction de y ? En effet matlab a beaucoup de mal à reconnaître cette nouvelle fonction de sorte que je ne peux pas la visualiser.

Je sais que ça fait beaucoup de question mais croyez-moi j'ai beaucoup cherché avant de vous contacter mais aucune de mes tentatives n'a marché. Je pense en apprendre beaucoup après avoir lu vos réponses.

Merci

Antoine


2 Replies Last Post 2010年12月30日 GMT-5 07:12

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年12月30日 GMT-5 05:42
Nobody to help me ??

Nobody to help me ??

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 2010年12月30日 GMT-5 07:12
Hi

with 4.1 I hardly (or not even have) use(d) matlab anymore (sofar) so I cannot help alot. But your demand looks for me like a projection coupling operator task, or by addigng a separate ODE, there are a few threads on this, check the Forum with the search

--
Bonne Année et bien du plaisir avec COMSOL,
rien de tel pour étudier la Physique
Ivar
Hi with 4.1 I hardly (or not even have) use(d) matlab anymore (sofar) so I cannot help alot. But your demand looks for me like a projection coupling operator task, or by addigng a separate ODE, there are a few threads on this, check the Forum with the search -- Bonne Année et bien du plaisir avec COMSOL, rien de tel pour étudier la Physique Ivar

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.