CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to use y_ as dimensionless argument?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By klausb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2016, 15:41
Default How to use y_ as dimensionless argument?
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
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
Luttappy likes this.
klausb is offline   Reply With Quote

Old   February 19, 2016, 15:53
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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))));
alexeym is offline   Reply With Quote

Old   February 23, 2016, 05:09
Default
  #3
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Have you tried y_.value()?
jherb 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
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
[Commercial meshers] star-ccm mesh to O\/F DLC OpenFOAM Meshing & Mesh Conversion 77 September 19, 2016 09:25
meshing of a compound volume in GMSH shawn3531 OpenFOAM 4 March 12, 2015 10:45
how to convert to dimensionless scalar in openfoam mehdi kamyabi OpenFOAM Programming & Development 10 February 25, 2014 08:47
how to use dimensionless argument? D.ko CFX 3 April 8, 2013 07:51


All times are GMT -4. The time now is 09:59.