CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

dynamic viskosity field function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2010, 05:13
Default dynamic viskosity field function
  #1
New Member
 
Join Date: Jun 2010
Posts: 3
Rep Power: 15
jarry is on a distinguished road
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
jarry is offline   Reply With Quote

Old   August 17, 2010, 06:56
Default
  #2
New Member
 
sven
Join Date: Jul 2010
Location: Germany
Posts: 7
Rep Power: 15
svenne is on a distinguished road
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 <

svenne is offline   Reply With Quote

Old   August 18, 2010, 04:53
Default
  #3
New Member
 
Join Date: Jun 2010
Posts: 3
Rep Power: 15
jarry is on a distinguished road
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
jarry is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
LiencubiclowRemodel nzy102 OpenFOAM Bugs 14 January 10, 2012 08:53
UDF vs Custom field function andrew FLUENT 5 June 24, 2011 10:53
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
field function in STAR-CCM+ stu Siemens 1 May 9, 2008 11:11
Custom Field function...>>>Please HELP..! sushii FLUENT 2 October 11, 2007 01:04


All times are GMT -4. The time now is 18:05.