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
Sep 26, 2012, 9:06 a.m. EDT
Hi
probably the only way around is to write out two analyitcal function "ana1_f(x,y)" or some combination "ana1_fx(x,y)" and "ana2_fy(x,y)" such that the product "ana1_fx*ana2_fy" or your unique "ana1_f" function gives ou the appropriate elevation for any boundary coordinate (x,y)
Note that the (x,y) call is mostly implicit in COMSOL via the boundary selection
--
Good luck
Ivar
Hi
probably the only way around is to write out two analyitcal function "ana1_f(x,y)" or some combination "ana1_fx(x,y)" and "ana2_fy(x,y)" such that the product "ana1_fx*ana2_fy" or your unique "ana1_f" function gives ou the appropriate elevation for any boundary coordinate (x,y)
Note that the (x,y) call is mostly implicit in COMSOL via the boundary selection
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Sep 26, 2012, 9:28 a.m. EDT
Thanks a lot for your reply, but sincerely, I do not understand too much your point...
Just an extra question, wasn't there a way to write piecewise functions in form of a long expressions with "and, if" commands on it? I remember to have seen that somewhere...
edit: I have seen also called Matlab function. The (no-)help of COMSOL says that it is to define a function in Matlab, and use it here. It would solve my problem. Indeed, I have it working in Matlab :).
Any idea about this?
Thanks in advance for any answer,
Thanks a lot for your reply, but sincerely, I do not understand too much your point...
Just an extra question, wasn't there a way to write piecewise functions in form of a long expressions with "and, if" commands on it? I remember to have seen that somewhere...
edit: I have seen also called Matlab function. The (no-)help of COMSOL says that it is to define a function in Matlab, and use it here. It would solve my problem. Indeed, I have it working in Matlab :).
Any idea about this?
Thanks in advance for any answer,
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
Sep 26, 2012, 2:44 p.m. EDT
Hi
probably I did neither not fully understand your issue ;)
If you have Matlab (but perhaps you also need livelink to ... ?) then you can define a function in matlab and call it, indded, that is a way.
Still there must be a way within the GUI too
Using bollean expressions is always possible, it's like using if(,,) another way.
--
Good luck
Ivar
Hi
probably I did neither not fully understand your issue ;)
If you have Matlab (but perhaps you also need livelink to ... ?) then you can define a function in matlab and call it, indded, that is a way.
Still there must be a way within the GUI too
Using bollean expressions is always possible, it's like using if(,,) another way.
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Oct 1, 2012, 4:18 a.m. EDT
Thanks a lot (always) for your replies, Ivar. You really help hundreds of people here!.
Could you write a very simple example of how to use that? I do not have any idea of the syntaxes.
Consider this: x axis is mass, y axis is temperature (for example), and the function would be:
T=4m^2 (if 200<T<300) and T=2m (if T>=300)
It is a very simple example that I ask you to tell me to understand the syntaxes. I think that is easy for you, ;-)
writen in a single line, please. (this example is easy to implement with "piecewise function", the problem is that, in my piecewise function, the ranges depend on Temperatures, so I should write variables there, instead of Constants!!! I mean, looking at that function above, something like this: T=4m^2 (if var1<T<var2) and T=2m (if T>=var) , where "varx" are values that depends on Temperature... Quite complex for me!) The piecewise function does not allow me to introduce variables there in the ranges!
Thanks a lot!!
Thanks a lot (always) for your replies, Ivar. You really help hundreds of people here!.
Could you write a very simple example of how to use that? I do not have any idea of the syntaxes.
Consider this: x axis is mass, y axis is temperature (for example), and the function would be:
T=4m^2 (if 200
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
Oct 1, 2012, 5:19 a.m. EDT
Ey, I have just got it!!!!
For all the people:
H1*(x<var1)+H2*(x<=var1&&var3<x)+H3... Where Hi are the functions on each range.
:-)
Still, Ivar, thanks, and any other suggestion is more than welcome!
Ey, I have just got it!!!!
For all the people:
H1*(x
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, 2012, 3:52 p.m. EDT
Hi
often it's like this, once you write out an issue, then you find the solution. Anyhow, I'm also quite busy and not here on the Forum each day ;)
--
Good luck
Ivar
Hi
often it's like this, once you write out an issue, then you find the solution. Anyhow, I'm also quite busy and not here on the Forum each day ;)
--
Good luck
Ivar