# How to use y_ as dimensionless argument?

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

 February 19, 2016, 16:41 How to use y_ as dimensionless argument? #1 Member   Klaus Join Date: Mar 2009 Posts: 89 Rep Power: 10 Hello, I want to extend the function to calculate nut_ by multiplication with 0.1*tanh(pow((0.003*y_),6)). nut_ = ((existing function)*(0.1*tanh(pow((0.003*y_),6)))); Compilation works fine but when I use the new turbulence model, I get an error: [0] --> FOAM FATAL ERROR: [0] Argument of trancendental function not dimensionless [0] [0] From function trans(const dimensionSet&) [0] in file dimensionSet/dimensionSet.C at line 430. [0] FOAM parallel run aborting ... I assume y_ is not a dimensionless argument for tanh(). How can I deal with that? Klaus

 February 19, 2016, 16:53 #2 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,666 Rep Power: 27 Hi, You can do something like: Code: ```dimensionedScalar unitY_("y_", y_.dimensions(), 1.0); nut_ = ((existing function)*(0.1*tanh(pow((0.003*y_/unitY_),6))));```

 February 23, 2016, 06:09 #3 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 421 Rep Power: 12 Have you tried y_.value()?

 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 DLC OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 77 September 19, 2016 09:25 shawn3531 OpenFOAM 4 March 12, 2015 11:45 varunjain89 Main CFD Forum 17 February 11, 2015 10:47 mehdi kamyabi OpenFOAM Programming & Development 10 February 25, 2014 09:47 D.ko CFX 3 April 8, 2013 07:51

All times are GMT -4. The time now is 08:26.