# dynamic viskosity field function

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 17, 2010, 05:13 dynamic viskosity field function #1 New Member   Join Date: Jun 2010 Posts: 3 Rep Power: 8 Hello, i have the following problem: Turbulent Flow 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! Jarry

 August 17, 2010, 06:56 #2 New Member   sven Join Date: Jul 2010 Location: Germany Posts: 7 Rep Power: 8 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 <

 August 18, 2010, 04:53 #3 New Member   Join Date: Jun 2010 Posts: 3 Rep Power: 8 Hello svenne, 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. jarry

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post nzy102 OpenFOAM Bugs 14 January 10, 2012 09:53 andrew FLUENT 5 June 24, 2011 10:53 gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11 stu CD-adapco 1 May 9, 2008 11:11 sushii FLUENT 2 October 11, 2007 01:04

All times are GMT -4. The time now is 21:37.