CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Commercial meshers] multiplying diameters to 0.001 in a grid that has the .msh format (https://www.cfd-online.com/Forums/openfoam-meshing/117039-multiplying-diameters-0-001-grid-has-msh-format.html)

babakflame May 1, 2013 01:49

multiplying diameters to 0.001 in a grid that has the .msh format
 
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

wyldckat May 1, 2013 07:07

Greetings Bobi,

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

Best regards,
Bruno

babakflame May 2, 2013 08:52

Hi Bruno
Thanks for ur help :), I am going to work with transformpoints to become familiar with it.

Regards
Bobi

babakflame May 5, 2013 06:47

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?:confused::confused:

Regards
Bobi

wyldckat May 5, 2013 07:10

Hi Bobi,

Quote:

Originally Posted by babakflame (Post 425299)
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?:confused::confused:

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


All times are GMT -4. The time now is 21:07.