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.

Import boundary condition from matlab

Please login with a confirmed email address before reporting spam

Hello everybody,

I already have a program in Matlab which calculate the solar radiation for 24 hours per day and i have a model in comsol 3.5a where one boundary condition is the solar heat flux calculated in Matlab and it is time dependent.

1) I would like to know if I can use my previous program in Matlab like a boundary condition even if I didn´t use the fem language because I've been reading the matlab interface guide and i didn't understand all the statements used there.

My point is when my comsol model runs the matlab program gives him the quantity of solar radiation for one boundary changing with the time.

2) Do I need to change the language in Matlab like the fem language?

Thank you so much, i really apreciate any answer!!!

Ivette.


3 Replies Last Post 29 mars 2011, 19:26 UTC−4
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 31 oct. 2010, 10:52 UTC−4
Hi

I beleive you need to adapt your matlab code if you want to "drive" Comsol. But what if you make a list table and import that into COMSOL, your data should be rather smooth I believe, so only a few points should do, COMSOL would then interpolate in-between. If ou output the data in a text file, you can import it into a piecevise COMSOL function, see the doc.

--
Good luck
Ivar
Hi I beleive you need to adapt your matlab code if you want to "drive" Comsol. But what if you make a list table and import that into COMSOL, your data should be rather smooth I believe, so only a few points should do, COMSOL would then interpolate in-between. If ou output the data in a text file, you can import it into a piecevise COMSOL function, see the doc. -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 oct. 2010, 11:15 UTC−4
Hello, Ivar

I've read what you wrote, that's what I was afraid... to change my Malab language but I'll try your advice.

Thank you so much,

Ivette.
Hello, Ivar I've read what you wrote, that's what I was afraid... to change my Malab language but I'll try your advice. Thank you so much, Ivette.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 29 mars 2011, 19:26 UTC−4
How exactly do you import the list table into comsol?

Thanks,
Greg McDaniel
jgm@bu.edu


Hi

I beleive you need to adapt your matlab code if you want to "drive" Comsol. But what if you make a list table and import that into COMSOL, your data should be rather smooth I believe, so only a few points should do, COMSOL would then interpolate in-between. If ou output the data in a text file, you can import it into a piecevise COMSOL function, see the doc.

--
Good luck
Ivar


How exactly do you import the list table into comsol? Thanks, Greg McDaniel jgm@bu.edu [QUOTE] Hi I beleive you need to adapt your matlab code if you want to "drive" Comsol. But what if you make a list table and import that into COMSOL, your data should be rather smooth I believe, so only a few points should do, COMSOL would then interpolate in-between. If ou output the data in a text file, you can import it into a piecevise COMSOL function, see the doc. -- Good luck Ivar [/QUOTE]

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.