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

[blockMesh] M4 / blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2012, 09:01
Default M4 / blockMesh
  #1
Member
 
Join Date: Oct 2012
Posts: 32
Rep Power: 13
pythag0ra5 is on a distinguished road
Hi there,

can someone tell me if it is possible to calculate the arctan of some value in the M4 Preproccesor?

Code:
define(height_step, 1.5)
define(length_step, 3)
define(alpha, calc(atan(height_step/length_step)))
If i compile my m4-file with

Code:
m4 blockMeshDict.m4 > blockMeshDict
an error occurs:

Code:
Undefined subroutine &main::atan called at -e line 1.
In the final blockmeshdict nothing is calculated.

Can someone help?

Thanks a lot in advance!
pythag0ra5 is offline   Reply With Quote

Old   November 23, 2012, 09:24
Default
  #2
Member
 
Join Date: Oct 2012
Posts: 32
Rep Power: 13
pythag0ra5 is on a distinguished road
Thanks a lot to startingwithCFD who gave the right hint, some perl-information was missing in the header:

Code:
define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
pythag0ra5 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
[OpenFOAM.org] blockMesh issue on openfoam6 startup - ubuntu 16.04 bjdarrer OpenFOAM Installation 7 August 25, 2020 19:15
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
[blockMesh] External flow around cube with blockMesh Woody8 OpenFOAM Meshing & Mesh Conversion 0 March 31, 2015 14:54
[blockMesh] set of xyz data in blockMesh psk OpenFOAM Meshing & Mesh Conversion 12 August 27, 2013 08:37
Blockmesh cavity error message tonitoney OpenFOAM Installation 2 March 17, 2008 11:59


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