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

How can I define functions with m4?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 21, 2014, 10:07
Default How can I define functions with m4?
  #1
New Member
 
Olivia Nalen
Join Date: Apr 2014
Location: Vancouver
Posts: 18
Rep Power: 2
entropie is on a distinguished road
Dear OF-Users,

I'm trying to create a blockMeshDict with m4. I need to define all coordinates on the Z-axis as functions of coordinates on the X-axis. So far my m4-code looks like this:

define (x1, 7)
define (x2, 5)
...
define (x20, 4)

define (z1, calc(x1*2+1))
define (z2, calc(x2*2+1))
...
define (z20, calc(x20*2+1))
etc.

And the problem is, I have about 100 coordinates and it is a bit awkward to define all 100 coordinates one by one.

Maybe can somebody tell me how can I just once define a function for all Z-coordinates, if it's possible?

Best regards,
Olivia
entropie is offline   Reply With Quote

Reply

Tags
functions, mesh

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
Hydrogen storage by metal hydride longbk FLUENT 1 February 9, 2014 20:06
Different define of psi uesd in pEqn.H zqlhzx OpenFOAM Running, Solving & CFD 0 December 24, 2013 08:45
Define steam flow rate belkadi OpenFOAM Programming & Development 0 June 27, 2013 07:24
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 0 May 25, 2009 09:39
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 13:47.