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
11 mar 2011, 08:13 GMT-5
Hi
the discontinuity issue is when you use such Dirac functions for the physics, then the solver might "jump over them"
perhaps if you use more (), or try a boolean
(x==0)*(T==300)*YourValue
--
Good luck
Ivar
Hi
the discontinuity issue is when you use such Dirac functions for the physics, then the solver might "jump over them"
perhaps if you use more (), or try a boolean
(x==0)*(T==300)*YourValue
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
11 mar 2011, 09:56 GMT-5
Hi Ivar,
Thanks for the quick reply.
I understand what you are saying.
However I wish to assign the variable xi to the value of x when T=300 and y=0.
So that if both T=300 and y=0 are true (then equal to one) then whatever the x coordinate at the point is gets assigned to xi.
If I use the expression you suggested then xi comes back with a value of 0.
I am trying to use an if statement to get the value I want but keep getting a value of 0 for xi:
if(T==300 && y == 0,xi == x)
I hope I have made my problem clear!
I would really appreciate some help!
Thanks,
-Adam
Hi Ivar,
Thanks for the quick reply.
I understand what you are saying.
However I wish to assign the variable xi to the value of x when T=300 and y=0.
So that if both T=300 and y=0 are true (then equal to one) then whatever the x coordinate at the point is gets assigned to xi.
If I use the expression you suggested then xi comes back with a value of 0.
I am trying to use an if statement to get the value I want but keep getting a value of 0 for xi:
if(T==300 && y == 0,xi == x)
I hope I have made my problem clear!
I would really appreciate some help!
Thanks,
-Adam
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
11 mar 2011, 11:06 GMT-5
Hi
then what about:
Your_value = (y==0)*(T==300)*(My_New_Value - Some_other_value) + Some_other_value
--
Good luck
Ivar
Hi
then what about:
Your_value = (y==0)*(T==300)*(My_New_Value - Some_other_value) + Some_other_value
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
11 mar 2011, 17:56 GMT-5
There are some descriptions about the if operator in the User's Guide. It said the expression is if(cond, expr1, expr2), I am not sure whether expr2 is necessary or not. You can see the Guide for details.
There are some descriptions about the if operator in the User's Guide. It said the expression is if(cond, expr1, expr2), I am not sure whether expr2 is necessary or not. You can see the Guide for details.
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
12 mar 2011, 04:36 GMT-5
Hi
there are two places whree aou can test out formulas:
- the parameter line that calcualtes out your value (and translates the units)
- the analytical function, whcih allows you quickly to plot a function. I mostly write my complex fomulas as functions, as then I can plot them easily to check how they look, its so easy to forget a sign, or an offset. Alwaysmverify and validate your work,in steps it's easier ;)
--
Good luck
Ivar
Hi
there are two places whree aou can test out formulas:
- the parameter line that calcualtes out your value (and translates the units)
- the analytical function, whcih allows you quickly to plot a function. I mostly write my complex fomulas as functions, as then I can plot them easily to check how they look, its so easy to forget a sign, or an offset. Alwaysmverify and validate your work,in steps it's easier ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
24 lug 2012, 20:52 GMT-4
Are there any way to make a 2D function?
I can easily plot the function f=(x<= 5).
But how to plot a function f=(x<=5,y<=5) in a 2D plan.
Cheers,
Dao
Are there any way to make a 2D function?
I can easily plot the function f=(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
25 lug 2012, 02:09 GMT-4
Hi
have you tried the filter and (x<5)*(y>2) condition, or whatever Boolena condition you need ?
--
Good luck
Ivar
Hi
have you tried the filter and (x2) condition, or whatever Boolena condition you need ?
--
Good luck
Ivar