CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Native Meshers: blockMesh

M4 / blockMesh

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

LinkBack Thread Tools Display Modes
Old   November 23, 2012, 10:01
Default M4 / blockMesh
Join Date: Oct 2012
Posts: 32
Rep Power: 7
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?

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

m4 blockMeshDict.m4 > blockMeshDict
an error occurs:

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
Join Date: Oct 2012
Posts: 32
Rep Power: 7
pythag0ra5 is on a distinguished road
Thanks a lot to startingwithCFD who gave the right hint, some perl-information was missing in the header:

define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
pythag0ra5 is offline   Reply With Quote


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
blockMesh - help atareen64 OpenFOAM Native Meshers: blockMesh 3 June 14, 2017 11:21
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
tutorial 2.2 Stress(...) trouble with blockMesh colinB OpenFOAM Native Meshers: blockMesh 8 January 22, 2012 11: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

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