CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

M4 / blockMesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 23, 2012, 10:01
Default M4 / blockMesh
  #1
Member
 
Join Date: Oct 2012
Posts: 30
Rep Power: 4
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, 10:24
Default
  #2
Member
 
Join Date: Oct 2012
Posts: 30
Rep Power: 4
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

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
tutorial 2.2 Stress(...) trouble with blockMesh colinB OpenFOAM Native Meshers: blockMesh 8 January 22, 2012 11:32
blockMesh - help atareen64 OpenFOAM Native Meshers: blockMesh 2 June 16, 2011 15:32
Dimensionsproblems SLT-file and blockMesh suitup OpenFOAM Bugs 3 November 19, 2009 04:00
Blockmesh cavity error message tonitoney OpenFOAM Installation 2 March 17, 2008 12:59
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 8 March 12, 2008 05:58


All times are GMT -4. The time now is 17:23.