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.

can extract such kind of coordinations to build the model?

Please login with a confirmed email address before reporting spam

Hi, everyone,

I’m building a heat transfer model, so the dependent variable is the temperature T. During the model, I want to obtain the location or coordination (x,y) where the temperature is equal to a specified value, for instance, T=3425[K]. I actually known the contour plot in the result node, and I can extract the data into a .txt file (contain the x,y coordination and the corresponding value of contour). However, as far as I known, the kind of process “postprocessing” can’t be used in the model automatically (am I wrong?).

what I want is
1. obtain the data of the contour (x,y coordination);
2. do some calculation with or without Matlab using the data of the contour;
3. return value(s) after the above-mentioned calculation to the COMSOL to continue the study.
The data of the contour is supervised and extracted at each time-step, and after the specified calculation, the resultant value is imported into the COMSOL though function or something similar.

Is there any accessible way to do this?
Thanks in advance for your advice and guidance.
Best wishes to you and your family.

2 Replies Last Post Nov 3, 2012, 12:10 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: 1 decade ago Feb 9, 2012, 1:48 a.m. EST
Hi

you can easily track the maximum with the maxop1(T,x) (resp. x,y,z,r) check the doc. But a T0cte is not necesarily a location it could be a contour, or a surface or ...

--
Good luck
Ivar
Hi you can easily track the maximum with the maxop1(T,x) (resp. x,y,z,r) check the doc. But a T0cte is not necesarily a location it could be a contour, or a surface or ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 3, 2012, 12:10 a.m. EDT

Hi

you can easily track the maximum with the maxop1(T,x) (resp. x,y,z,r) check the doc. But a T0cte is not necesarily a location it could be a contour, or a surface or ...

--
Good luck
Ivar


In matlab, I find it doesn't work if I use A=mphglobal(model, 'maxop1(emw.Ey, x )'); trying to get the position of the maximum Ey. It always goes wrong here. But if I use A=mphglobal(model, 'maxop1(emw.Ey)'); just to get the maximum value, it works here.

How can I get the position of the maximum in Matlab?

Thanks!
[QUOTE] Hi you can easily track the maximum with the maxop1(T,x) (resp. x,y,z,r) check the doc. But a T0cte is not necesarily a location it could be a contour, or a surface or ... -- Good luck Ivar [/QUOTE] In matlab, I find it doesn't work if I use A=mphglobal(model, 'maxop1(emw.Ey, x )'); trying to get the position of the maximum Ey. It always goes wrong here. But if I use A=mphglobal(model, 'maxop1(emw.Ey)'); just to get the maximum value, it works here. How can I get the position of the maximum in Matlab? Thanks!

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.