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

[blockMesh] Create an axisymmetric grid from a 2D blockMeshDict

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2020, 07:29
Default Create an axisymmetric grid from a 2D blockMeshDict
  #1
Member
 
Mary
Join Date: Jul 2017
Posts: 87
Blog Entries: 1
Rep Power: 5
mkhm is on a distinguished road
Dear Foamers,


I have a 2 dimensional de laval nozzle. The meshing is done via the blockMeshDict. Now, I want to convert it to an axisymmetric one. So, instead of a symmetry PLANE, I would have a symmetry line and the front and back plane becomes of wedge type. I saw the following utility "makeAxialMesh" which does exactly what I want. However, the problem is that it is not available in OpenFOAM 4.x. Does anyone know any other alternatives ?



Thanks in advance for your help

Last edited by mkhm; April 20, 2020 at 11:08.
mkhm is offline   Reply With Quote

Old   August 19, 2020, 04:43
Default
  #2
New Member
 
Join Date: Jul 2017
Posts: 10
Rep Power: 5
dplamp is on a distinguished road
Hello,


Here a working example of a wedge :


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;        // m

radius    2.5e-3;
length    80e-3;
halfWedgeAngle    2.5;    // degrees

// wedge coordinates :
hAR        #calc "degToRad($halfWedgeAngle)";    // half angle in rad
wx        #calc "$radius*cos($hAR)";
wyp        #calc "$radius*sin($hAR)";
wyn        #calc "-1.0*$wyp";
cs        #calc "cos($hAR)";

//#calc "Info<< $halfWedgeAngle << $cs << $wx";
//#calc "Info<< $wx << endl";

vertices
(
    (0 0 0)
    (1 0 0)
    (0 1 0)
    (0 0 1)
    (0 0 $length)    // 4
    ($wx $wyn $length)
    ($wx $wyn 0)
    ($wx $wyp 0)
    ($wx $wyp $length)
);

blocks
(
    hex (0 6 7 0 4 5 8 4) (50 1 200) simpleGrading (0.5 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 7 6 0)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (4 5 8 4)
        );
    }
    wallPipe
    {
        type wall;
        faces
        (
            (5 6 7 8)
        );
    }
    front
    {
        type wedge;
        faces
        (
            (0 6 5 4)
        );
    }
    back
    {
        type wedge;
        faces
        (
            (0 4 8 7)
        );
    }
    axis
    {
        type symmetry;
        faces
        (
            (0 4 4 0)
        );
    }
);

mergePatchPairs
(
);


// ************************************************************************* //

dplamp is offline   Reply With Quote

Reply

Tags
axis-symmetric, mesh 2d, nozzleflow2d, openfaom, wedge

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
[GAMBIT] How to plot S pipe mariam.sara ANSYS Meshing & Geometry 36 November 7, 2013 16:22
Steps to create a quater O grid or Y grid brissyben ANSYS Meshing & Geometry 3 April 12, 2012 06:46
MapFields to New Grid For Extreme Grid Deformations due to Body Motion albcem OpenFOAM 0 May 5, 2009 15:17
Grid Independent Solution Chuck Leakeas Main CFD Forum 2 May 26, 2000 12:18


All times are GMT -4. The time now is 09:52.