dynamic viskosity field function
i have the following problem:
non newton viskosity (paint)
i have to create an user defined field function for viskosity depends on strainrate.
my formulation is:
($StrainRate <= 10) ? 0.01 : ((10 < $StrainRate > 1000 ) : (1.35*$StrainRate*pow(-0.25)) : 0.14)
What is wrong with my formulation?
Thank you for your answer!
The tertiary operator works like this
(if) ? (then) : (else)
if you want to use multiple if clauses use
(if1) ? (then1) : (
(if2) ? (then2) : (
(if3) ? (then3) : (finalElse)
in your case it should be something like this:
($StrainRate <= 10) ? 0.01 : (
($StrainRate < 1000 ) ? (1.35*$StrainRate*pow(-0.25)) : 0.14
(10 < $StrainRate > 1000 ) <-- you already checked in the first if clause that $StrainRate > 10, so its unnecessary to check it again you use an > then where I assume <
thank you for your answer.
I tried you formulation, but you make a little mistake. This are the formulation that works:
($StrainRate < 10) ? 0.01 : (($StrainRate < 1000 ) ? (3.2*pow($StrainRate,-0.35)) : 0.14)
For all ather users who have the same problem.
|All times are GMT -4. The time now is 21:02.|