Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

Piecewise function as material variable

Please login with a confirmed email address before reporting spam

Hello,

I've implemented a piecewise function and now I want to use it as a dynamic viscosity for my model, but the program doesnt use it at all. I've plotted the function I made and it worked well, but I cant apply it as a function for the viscosity. Any ideas?

Thx in advance!

P.S. I've attached my model.


4 Replies Last Post 1 juin 2012, 15:15 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 mai 2012, 16:29 UTC−4
Hi

replace your usage of the mua[Pa*s] by mua(T). You need to tell COMSOL to use the temperature explicitely, in the analytical function definition the argument nameis a local "dummy" name, not linked to the true variable names.
Then as you have already defined the units in the analytical functions, you do not need to add tem again, else you will "suare" the units

--
Good luck
Ivar
Hi replace your usage of the mua[Pa*s] by mua(T). You need to tell COMSOL to use the temperature explicitely, in the analytical function definition the argument nameis a local "dummy" name, not linked to the true variable names. Then as you have already defined the units in the analytical functions, you do not need to add tem again, else you will "suare" the units -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 juin 2012, 05:22 UTC−4
Hello Ivar,
I´ve subsituted mua Pa*s with mua (T) but it still doesnt work. Am I missing something?

Thx for your response!
Hello Ivar, I´ve subsituted mua Pa*s with mua (T) but it still doesnt work. Am I missing something? Thx for your response!

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 1 juin 2012, 06:07 UTC−4
Hi

if you look up a few materials there are several with T or p dependance, compare the COSMOl way and yours

--
Good luck
Ivar
Hi if you look up a few materials there are several with T or p dependance, compare the COSMOl way and yours -- Good luck Ivar

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 1 juin 2012, 15:15 UTC−4
Hi

you need finally to write

mua(T[1/K])

obviosly in v4.2a everything is not yet up for the units in operators. with this it runs without warnings, but I cannot tell if your results are correct, as I'm not really understanding what you are doing ;)

Ony suggestion: consider smoothened step or rect function for your transitions, as "dirac type too steep transisitons tend to give solver issues

--
Good luck
Ivar
Hi you need finally to write mua(T[1/K]) obviosly in v4.2a everything is not yet up for the units in operators. with this it runs without warnings, but I cannot tell if your results are correct, as I'm not really understanding what you are doing ;) Ony suggestion: consider smoothened step or rect function for your transitions, as "dirac type too steep transisitons tend to give solver issues -- Good luck Ivar

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.