CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Altering the mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 16, 2006, 08:04
Default Hi all Im new openFoam user.
  #1
New Member
 
Alejandro Arrieta
Join Date: Mar 2009
Location: Dortmund, Dortmund, Germany
Posts: 5
Rep Power: 8
alejo is on a distinguished road
Hi all
Im new openFoam user. Im doing a very simple mesh and I read about using m4 for change the points by defining the points. It is possible to change the mesh by using equations in m4? How should I proceed?.
Thanks.
Alejandro
alejo is offline   Reply With Quote

Old   February 16, 2006, 08:21
Default Hi Alejandro You can let perl
  #2
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 8
hemph is on a distinguished road
Hi Alejandro
You can let perl do the calculations if you add the command
define(calc, [esyscmd(perl -e 'printf ($1)')])
in the header of your m4-file. You can then use the newly defined calculator by calling calc(expression)
example:
define(CX, calc(R*cos((PI/180)*45)))
would assign to CX, the x-value of a point at a distance R, with an angle of 45 degrees.
//Rasmus
hemph is offline   Reply With Quote

Old   February 16, 2006, 09:06
Default Thanks Rasmus, I was trying
  #3
New Member
 
Alejandro Arrieta
Join Date: Mar 2009
Location: Dortmund, Dortmund, Germany
Posts: 5
Rep Power: 8
alejo is on a distinguished road
Thanks Rasmus,
I was trying to doit, but I have to say that it is the first time that I heard about m4, and less about m4 files. Im using kDevelop c/c++ to change set the mesh manually, and then the blockMesh utility. I do not understand how to use the m4 command. If u have some comment about I would appreciate it.
Thanks again.
alejo is offline   Reply With Quote

Old   February 16, 2006, 09:15
Default you have to be careful then, a
  #4
Senior Member
 
Rasmus Hemph
Join Date: Mar 2009
Location: Sweden
Posts: 108
Rep Power: 8
hemph is on a distinguished road
you have to be careful then, apparently m4 can take over your life...
(http://www.gnu.org/software/m4/manua...tro.html#Intro)
There is a section in the WIKI on how to use m4 to generate a blockMesh. Did you see it?
http://openfoamwiki.net/index.php/HowTo_blockMesh _with_m4
hemph 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
2D Low Speed Airfoil Problem when altering Inlet mike wilson CFX 12 August 3, 2010 11:06
Create fine mesh that grows to coarse mesh (Urgent CZ FLUENT 1 January 3, 2009 11:36
Altering properties of fluid within the domain Nikhil Dani FLUENT 3 December 12, 2008 05:26
Oscillatory mesh motion setup mesh flux ERROR jaswi OpenFOAM Running, Solving & CFD 5 August 23, 2007 04:41
Altering Legend Bo Jensen CD-adapco 2 July 9, 2001 03:07


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