CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

multiplying diameters to 0.001 in a grid that has the .msh format

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

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   May 1, 2013, 01:49
Default multiplying diameters to 0.001 in a grid that has the .msh format
  #1
Senior Member
 
Bobi
Join Date: Oct 2012
Posts: 286
Rep Power: 5
babakflame is on a distinguished road
Dear Buddies
Hi
I have created my 3d-grid in gambit software and then with the help of fluent software and fluentMeshToFoam directive, imported the grid to openfoam. Now, I have found that my diameters are in mm, instead of m; i.e. I need to multiply my diameters to 0.001 . Is there any way to do it now in OpenFOAM or I need to go back to gambit for the required modifications. In constant folder, there is a polymesh folder with some other sub folders.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   May 1, 2013, 07:07
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Bobi,

What you're looking for is transformPoints: http://openfoamwiki.net/index.php/TransformPoints

Best regards,
Bruno
babakflame likes this.
wyldckat is offline   Reply With Quote

Old   May 2, 2013, 08:52
Default
  #3
Senior Member
 
Bobi
Join Date: Oct 2012
Posts: 286
Rep Power: 5
babakflame is on a distinguished road
Hi Bruno
Thanks for ur help , I am going to work with transformpoints to become familiar with it.

Regards
Bobi
babakflame is offline   Reply With Quote

Old   May 5, 2013, 06:47
Default
  #4
Senior Member
 
Bobi
Join Date: Oct 2012
Posts: 286
Rep Power: 5
babakflame is on a distinguished road
Dear Bruno
Hi

The -scale utility is used in the incompressible/pimpleFoam/elipsekkLOmega

I think I need to make a Allrun file.
Would you PLZ hint me that which lines from the aforementioned file in elipsekkLOmega is needed for me; cause I need to multiply dimensions by 0.002 i.e. (0.002 , 0.002 , 0.002)
The Allrun file in elipsekkLOmega is as:

PHP Code:
#!/bin/sh
cd ${0%/*} || exit 1    # run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# Get application directory
application=`getApplication`

runApplication blockMesh
transformPoints -scale '(1.6666 1 1)'

cp system/changeDictionaryDict.X system/changeDictionaryDict
runApplication changeDictionary -instance system
runApplication mirrorMesh
rm log.mirrorMesh

rm log.changeDictionary
cp system/changeDictionaryDict.Y system/changeDictionaryDict
runApplication changeDictionary -instance system

runApplication mirrorMesh
cp -rf 0/polyMesh constant/

runApplication topoSet
runApplication createPatch -overwrite
runApplication $application 
I am sure that I need the
PHP Code:
transformPoints -scale '(1.6666 1 1)' 
in the bash file, But what about other lines, are they necessary for me?

Regards
Bobi
babakflame is offline   Reply With Quote

Old   May 5, 2013, 07:10
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Bobi,

Quote:
Originally Posted by babakflame View Post
I am sure that I need the
PHP Code:
transformPoints -scale '(1.6666 1 1)' 
in the bash file, But what about other lines, are they necessary for me?
Creating your own Allrun script is a good idea, since it'll make it easier for you to run the case more than one time.
From your description so far, it looks like you only need to transform the mesh points. Although, if you want to take advantage of the runApplication and runParallel functions, you'll need the following code at the top of the script:
Code:
#!/bin/sh
cd ${0%/*} || exit 1    # run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
Best regards,
Bruno
babakflame likes this.
wyldckat 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
Paraview file format for collocated grid hadian ParaView 0 February 13, 2008 10:55
ON ICEM grid format Lee Main CFD Forum 2 February 27, 2006 19:53
Anyone know the format of this grid file? Pete Main CFD Forum 1 January 6, 2005 04:06
Grid Generator for Plot3d format Jens Bennetsen Main CFD Forum 0 September 12, 2000 05:00
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 11:18


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