|
[Sponsors] |
November 15, 2011, 06:13 |
Trying to understand Allrun script
|
#1 |
Member
Avdeev Evgeniy
Join Date: Jan 2011
Location: Togliatty, Russia
Posts: 69
Blog Entries: 1
Rep Power: 21 |
Hello,
I'm working with $FOAM_TUTORIALS/multiphase/interFoam/laminar and trying to understand work of Allrun script, particularly Code:
setDamBreakFine () { blockMeshDict="constant/polyMesh/blockMeshDict" controlDict="system/controlDict" sed \ -e s/"23 8"/"46 10"/g \ -e s/"19 8"/"40 10"/g \ -e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \ -e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \ -e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \ $blockMeshDict > temp.$$ mv temp.$$ $blockMeshDict sed \ -e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \ -e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \ $controlDict > temp.$$ mv temp.$$ $controlDict } Code:
blocks ( hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) ); |
|
November 15, 2011, 06:57 |
link to manual
|
#2 |
New Member
Martin Holecek
Join Date: Nov 2011
Location: Prague
Posts: 21
Rep Power: 14 |
Hello Avdeev,
The blockMesh is quite well described in user manual http://www.openfoam.com/docs/user/ But in short the line: hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) Means "create a box of hex elements" "between vertices 0 1 5 4 12 13 17 and 16", in first direction of this box create 23 elements, in second direction 8 and in third direction 1. Use simple grading algorythm with coefficients 1 1 1 (no grading, all elements should have the same proportional dimensions) Martin. |
|
November 15, 2011, 07:26 |
|
#3 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
In addition to what Martin said: sed is used to modify text files. In this instance, it will take the blockMesh description file from the dambreak tutorial and increase the cell count as well as the refinement to generate a second, finer mesh.
|
|
November 16, 2011, 02:22 |
|
#4 |
Member
Avdeev Evgeniy
Join Date: Jan 2011
Location: Togliatty, Russia
Posts: 69
Blog Entries: 1
Rep Power: 21 |
Thank you for answers.
But what the reason of creating second mesh? Is it right to say that case will run two times - first time with first mesh, second time with second (changed by sed) mesh? Also in Allrun changes endTime variable |
|
November 16, 2011, 02:47 |
|
#5 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
The discretization will be more accurate on the finer mesh. Thus you do mesh refinement to check if you have a grid independent solution by running a second simulation.
If I remember correctly, in the dam break case you will see a pocket of air on the fine mesh that is not there on the coarse mesh. Since the simulation will need more time to complete on a fine mesh, the end time is reduced for the tutorial case so it can complete in a reasonable time. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Script: problems with face names | Maweil | ANSYS Meshing & Geometry | 3 | April 16, 2019 09:10 |
[ANSYS Meshing] Problem with Icem Script | Krish | ANSYS Meshing & Geometry | 0 | October 18, 2011 12:10 |
how I can write the file script to submite via HPC cluster at my UNI | happy | CFX | 2 | October 17, 2011 02:18 |
CFX mesh script error | Malik77 | CFX | 0 | June 24, 2011 07:42 |
Perl script for intialisation | pratik mehta | CFX | 2 | September 10, 2008 03:09 |