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
05.07.2010, 01:25 GMT-4
Hi
I suppose you should understand this as "any field in COMSOl can be used for an eqution/ a function so if you define your force as F(x,y) (instead of a constant like juts 10[N]) via a mapping function you should have a Force field ready
But try to make it sufficiently smooth so that the solver manages to follow
Good luck
Ivar
Hi
I suppose you should understand this as "any field in COMSOl can be used for an eqution/ a function so if you define your force as F(x,y) (instead of a constant like juts 10[N]) via a mapping function you should have a Force field ready
But try to make it sufficiently smooth so that the solver manages to follow
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
05.07.2010, 04:04 GMT-4
Hi Ivar,
Thanks for your reply. What I have calculated using MATLAB is a force filed induced by focusing an ultrasound beam. I guess one way would be to do what you suggested but I would need to think about how to put it into equations.
But since I have it simulated in MATLAB, do you know how to save that matrix as a txt file and import into Comsol as the applied force?
Many thanks
Brian
Hi Ivar,
Thanks for your reply. What I have calculated using MATLAB is a force filed induced by focusing an ultrasound beam. I guess one way would be to do what you suggested but I would need to think about how to put it into equations.
But since I have it simulated in MATLAB, do you know how to save that matrix as a txt file and import into Comsol as the applied force?
Many thanks
Brian
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
12.11.2010, 00:01 GMT-5
Hi Brian,
Did you ever figure this out? I am trying to do a very similar thing.
Thanks,
Hi Brian,
Did you ever figure this out? I am trying to do a very similar thing.
Thanks,
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
12.11.2010, 00:55 GMT-5
a working way to do this is defines a GLOBAL matlab function F(x,y) and call it where you need in your model .
it it is very simple.
Just be CAREFUL in reading comsol guidelines about matlab function to be used by Comsol....EVERY word matters there and if these guidelines are not followed the call will not work properly ....
if you have a tabulated set of precalculated value matlab provides you with interp.... functions that are already vectorized...
so your functions should just call matlab interpolation funciton to work on your data file and return a calculated value fe each x,y
This work [ in 4.0a ].. I use it.[ almost] everyday..
but again be careful about coding of F it need to be a vectorized function as explained in the guidelines aforementionned
jf
a working way to do this is defines a GLOBAL matlab function F(x,y) and call it where you need in your model .
it it is very simple.
Just be CAREFUL in reading comsol guidelines about matlab function to be used by Comsol....EVERY word matters there and if these guidelines are not followed the call will not work properly ....
if you have a tabulated set of precalculated value matlab provides you with interp.... functions that are already vectorized...
so your functions should just call matlab interpolation funciton to work on your data file and return a calculated value fe each x,y
This work [ in 4.0a ].. I use it.[ almost] everyday..
but again be careful about coding of F it need to be a vectorized function as explained in the guidelines aforementionned
jf
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
19.11.2012, 01:30 GMT-5
Mr. Leon,
Are you saying that you can use MATLAB to find interpolated function for the force matrix? Then use that function in COMSOL? Thanks.
--
Austin Roth
Mr. Leon,
Are you saying that you can use MATLAB to find interpolated function for the force matrix? Then use that function in COMSOL? Thanks.
--
Austin Roth