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.

I want to update boundary condition as variable in matlab

Please login with a confirmed email address before reporting spam

Hi, I am solving inverse heat problem . I am using comsol to solve, and matlab to calculate the new boundary condition. I want to update the boundary condition with new one in every 'for' cycle. I used the help inside the comsol but it gives me error i cant use it.

7 Replies Last Post Oct 3, 2011, 1:45 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 Oct 1, 2011, 5:01 a.m. EDT
Hi

why cant you use COMSOl for everything ? thta is what the math part of COMSOL is all about, no ? solving means square optimisation problems

Add a general equation dependent on your variable to be optimised define possibly a weak condition too, ensure initial conditins are OK and if possible a derivative and off you go

--
Good luck
Ivar
Hi why cant you use COMSOl for everything ? thta is what the math part of COMSOL is all about, no ? solving means square optimisation problems Add a general equation dependent on your variable to be optimised define possibly a weak condition too, ensure initial conditins are OK and if possible a derivative and off you go -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 1, 2011, 11:08 a.m. EDT
thank you Ivar it seems that you are right . thanks for your time very much
Best regard
Siamak B
thank you Ivar it seems that you are right . thanks for your time very much Best regard Siamak B

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 1, 2011, 1:10 p.m. EDT
Hi again
I countered a problem during my modeling how I will include experimental data to comsol.
thanks for your time
Hi again I countered a problem during my modeling how I will include experimental data to comsol. thanks for your time

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 Oct 2, 2011, 9:54 a.m. EDT
Hi

experimental data can be entered as a "Definition Function", either with an interpolation or a piecewise function, the former has a derivative that helps the solver to not to get stuck on the steps

--
Good luck
Ivar
Hi experimental data can be entered as a "Definition Function", either with an interpolation or a piecewise function, the former has a derivative that helps the solver to not to get stuck on the steps -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 2, 2011, 2:02 p.m. EDT
I thank you very much for what you are doing you are life saver I am working on it. But as matter of curiosity . Is there a way to update boundary condition as matlab variable in a 'for' loop. The boundary condition is like 'p*sin t '
which 'p' up to dates in a loop it will be fun to compare to results.
thanks
I thank you very much for what you are doing you are life saver I am working on it. But as matter of curiosity . Is there a way to update boundary condition as matlab variable in a 'for' loop. The boundary condition is like 'p*sin t ' which 'p' up to dates in a loop it will be fun to compare to results. thanks

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 Oct 2, 2011, 5:01 p.m. EDT
Hi

normally your boundary conditions can also be driven by equations, so long i's mathematically correct without circular loops

--
Good luck
Ivar
Hi normally your boundary conditions can also be driven by equations, so long i's mathematically correct without circular loops -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Oct 3, 2011, 1:45 a.m. EDT
I appreciate your answer again however I want to define P as a variable that changes during each loop when I'm doing that it gives me error.
thank you
I appreciate your answer again however I want to define P as a variable that changes during each loop when I'm doing that it gives me error. thank you

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.