|
[Sponsors] |
[blockMesh] Sloped Mesh | Backward Facing Step |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 29, 2013, 03:56 |
Sloped Mesh | Backward Facing Step
|
#1 |
Member
Join Date: Oct 2012
Posts: 32
Rep Power: 13 |
Dear FOAMers,
i want to build a parameterized model of a backward facing step: As i want to have all dimensions variable, i created a blockMeshDict.m4-file which you can see below: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // changecom(//)changequote([,]) define(calc, [esyscmd(perl -e 'printf ($1)')]) convertToMeters 1; // General dimensions define(depth, 1) define(total_height, 5) define(step_height, 1) define(inlet_height, 1) define(length_before_step, calc(5*step_height)) define(length_after_step, calc(10*step_height)) define(cell_size, 0.2) // Points vertices ( // front (-length_after_step 0 0) // 00 (0 step_height 0) // 01 (-calc(length_after_step+length_before_step) step_height 0) // 02 (-length_after_step step_height 0) // 03 (0 step_height 0) // 04 (-calc(length_after_step+length_before_step) calc(step_height+inlet_height) 0) // 05 (-length_after_step calc(step_height+inlet_height) 0) // 06 (0 calc(step_height+inlet_height) 0) // 07 (-calc(length_after_step+length_before_step) total_height 0) // 08 (-length_after_step total_height 0) // 09 (0 total_height 0) // 10 // back (-length_after_step 0 -depth) // 11 (0 step_height -depth) // 12 (-calc(length_after_step+length_before_step) step_height -depth) // 13 (-length_after_step step_height -depth) // 14 (0 step_height -depth) // 15 (-calc(length_after_step+length_before_step) calc(step_height+inlet_height) -depth) // 16 (-length_after_step calc(step_height+inlet_height) -depth) // 17 (0 calc(step_height+inlet_height) -depth) // 18 (-calc(length_after_step+length_before_step) total_height -depth) // 19 (-length_after_step total_height -depth) // 20 (0 total_height -depth) // 21 ); blocks ( hex (0 1 12 11 3 4 15 14) (calc(length_after_step/cell_size) calc(depth/cell_size) calc(step_height/cell_size)) simpleGrading (1 1 1) // I hex (2 3 14 13 5 6 17 16) (calc(length_before_step/cell_size) calc(depth/cell_size) calc(inlet_height/cell_size)) simpleGrading (1 1 1) // II hex (3 4 15 14 6 7 18 17) (calc(length_after_step/cell_size) calc(depth/cell_size) calc(inlet_height/cell_size)) simpleGrading (1 1 1) // III hex (5 6 17 16 8 9 20 19) (calc(length_before_step/cell_size) calc(depth/cell_size) calc((total_height-inlet_height-step_height)/cell_size)) simpleGrading (1 1 1) // IV hex (6 7 18 17 9 10 21 20) (calc(length_after_step/cell_size) calc(depth/cell_size) calc((total_height-inlet_height-step_height)/cell_size)) simpleGrading (1 1 1) // V ); edges ( ); // Patches boundary ( water_inlet { type patch; faces ( (2 5 16 13) ); } air_inlet { type patch; faces ( (5 8 19 16) ); } outlet { type patch; faces ( (1 4 15 12) (4 7 18 15) (7 10 21 18) ); } front { type empty; faces ( (0 1 4 3) (2 3 6 5) (3 4 7 6) (5 6 9 8) (6 7 10 9) ); } back { type empty; faces ( (11 12 15 14) (13 14 17 16) (14 15 18 17) (16 17 20 19) (17 18 21 20) ); } atmosphere { type patch; faces ( (8 9 20 19) (9 10 21 20) ); } ground { type wall; faces ( (0 3 14 11) (2 3 14 13) (0 1 12 11) ); } ); // ************************************************************************* // Is there any option to get better mesh results at the end of the slope at the outlet? Thanks in advance, Mathias |
|
January 30, 2013, 05:23 |
|
#2 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18 |
Dear Mathias,
looks like you make some progress with your calculations Perhaps I can also help you with this problem. Attached you find a sketch of a proposed domain decomposition which avoids highly skewed cells. I hope with this decomposition it is still possible to parametrize your domain. good luck Colin Edit: I forgot to mention an additional layer of blocks for the separated water inlet: Just include another line between the top and the middle line. I know its quite self explaining, but for the sake of completeness. Last edited by colinB; January 30, 2013 at 05:50. Reason: forgot the separated water inlet |
|
January 31, 2013, 03:16 |
|
#3 |
Member
Join Date: Oct 2012
Posts: 32
Rep Power: 13 |
Good morning Colin,
thank you very much, i think is a nice idea to get not so bad shaped elements! |
|
January 31, 2013, 09:27 |
|
#4 |
Member
Join Date: Oct 2012
Posts: 32
Rep Power: 13 |
Hi Colin,
i implemented your suggestions into my blockMeshDict.m4-file, below you can see the resulting mesh, it looks really nice, thank you very much (again)! |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
unsteady backward facing step simulation | zkzkzk010537 | FLUENT | 0 | February 13, 2016 15:14 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |
Corner Vortex for Backward Facing Step | Patrick G. Hu | Main CFD Forum | 0 | August 6, 2002 10:34 |