CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Commercial meshers] multiplying diameters to 0.001 in a grid that has the .msh format

Register Blogs Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread 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
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
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
 
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 15
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[General] Paraview file format for collocated grid hadian ParaView 0 February 13, 2008 09:55
ON ICEM grid format Lee Main CFD Forum 2 February 27, 2006 18:53
Anyone know the format of this grid file? Pete Main CFD Forum 1 January 6, 2005 03: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 03:05.