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
2013年5月6日 GMT-4 12:02
Hi
I'm not fully sure how to fix that and get the transition to be "smooth", be also aware that the "cell Reynolds numner of COMSOL is not exactly the clasical fluid Reynolds number as the latter depends on a characterisitic length COMSOL cannot gues, so it uses its mesh average size "h"
But if you define a variable Reynolds with your fomula you can make it as a field, and then you can try with Bolean or better some combination of smoothing functions (step, rect ...)
--
Good luck
Ivar
Hi
I'm not fully sure how to fix that and get the transition to be "smooth", be also aware that the "cell Reynolds numner of COMSOL is not exactly the clasical fluid Reynolds number as the latter depends on a characterisitic length COMSOL cannot gues, so it uses its mesh average size "h"
But if you define a variable Reynolds with your fomula you can make it as a field, and then you can try with Bolean or better some combination of smoothing functions (step, rect ...)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
2013年5月6日 GMT-4 12:12
Ivar,
Thank you for the answer.
I defined a variable like Re and set to a number. So I guess it is a constant and fixed number.
for the other part I try something like this
I omit "H" variable and just work with u2 and Fr instead of Re.(Fr is a constant number)
(-u2*1/(Fr^2))*(u2>=0 && u2<=1)+(floor(u2)/-(Fr^2))*(u2>1 && u2<2)+((floor(u2)+1)/-(Fr^2))*(u2<0 && u2>=-1)+((floor(u2)-1)/-(Fr^2))*(u2>=2 && u2<3)+((floor(u2)+2)/-(Fr^2))*(u2<-1 && u2>=-2)+((floor(u2)-2)/-(Fr^2))*(u2>=3 && u2<4)+((floor(u2)+3)/-(Fr^2))*(u2<-2 && u2>=-3)+((floor(u2)-3)/-(Fr^2))*(u2>=4 && u2<5)+((floor(u2)+4)/-(Fr^2))*(u2<-3 && u2>=-4)+((floor(u2)-4)/-(Fr^2))*(u2>=5 && u2<6)+((floor(u2)+5)/-(Fr^2))*(u2<-4 && u2>=-5)+((floor(u2)-5)/-(Fr^2))*(u2>=6 && u2<7)+((floor(u2)+6)/-(Fr^2))*(u2<-5 && u2>=-6)
By this way I can run the simulation,but as you see I can not extend to formula to infinity!
I mean I can not set u2 by that way to 1 if u2 is for instance 98 or -105.
I need a general way
Can we use for loop in variable definition part?
Thanks,
Hooman
Ivar,
Thank you for the answer.
I defined a variable like Re and set to a number. So I guess it is a constant and fixed number.
for the other part I try something like this
I omit "H" variable and just work with u2 and Fr instead of Re.(Fr is a constant number)
(-u2*1/(Fr^2))*(u2>=0 && u21 && u2=2 && u2=3 && u2=4 && u2=5 && u2=6 && u2
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
2013年5月8日 GMT-4 13:05
I have found something new and I guess it works.
Just need to add max(min(u2,1),0) to have u2 between 0 and 1.
I have found something new and I guess it works.
Just need to add max(min(u2,1),0) to have u2 between 0 and 1.
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
2013年5月8日 GMT-4 14:19
Hi
indeed, but remains that oyur function is rather spiky oe of sharp angles from what I imagine, this might give some difficulties for the solver as it cannot easily determine the derivatives for the next step estimations, but with the complexity of your function, it's worth a try :)
--
Good luck
Ivar
Hi
indeed, but remains that oyur function is rather spiky oe of sharp angles from what I imagine, this might give some difficulties for the solver as it cannot easily determine the derivatives for the next step estimations, but with the complexity of your function, it's worth a try :)
--
Good luck
Ivar