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

How to use y_ as dimensionless argument?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 19, 2016, 16:41
Default How to use y_ as dimensionless argument?
  #1
Member
 
Klaus
Join Date: Mar 2009
Posts: 89
Rep Power: 10
klausb is on a distinguished road
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
klausb is offline   Reply With Quote

Old   February 19, 2016, 16:53
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,666
Rep Power: 27
alexeym will become famous soon enoughalexeym will become famous soon enough
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, 06:09
Default
  #3
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 421
Rep Power: 12
jherb is on a distinguished road
Have you tried y_.value()?
jherb is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
star-ccm mesh to O\/F DLC OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 77 September 19, 2016 09:25
meshing of a compound volume in GMSH shawn3531 OpenFOAM 4 March 12, 2015 11:45
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 17 February 11, 2015 10:47
how to convert to dimensionless scalar in openfoam mehdi kamyabi OpenFOAM Programming & Development 10 February 25, 2014 09:47
how to use dimensionless argument? D.ko CFX 3 April 8, 2013 07:51


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