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

[blockMesh] Cavity with Internal Solid Cylinder

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2018, 17:15
Default Cavity with Internal Solid Cylinder
  #1
New Member
 
Join Date: Feb 2018
Posts: 5
Rep Power: 8
mucgoo is on a distinguished road
I'm modelling a water filled cavity with a heated central cylinder.

I've created geometry as shown below


I've done this by creating the outer cavity, and then an inner cylinder block.

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

convertToMeters 1;

vertices
(
   	(0 0 0)
    (1 0 0)
    (1 0.5 0)
    (0 0.5 0)
    (0 0 1)
    (1 0 1)
    (1 .5 1)
    (0 0.5 1)
	
	(0.40454 0.022 0.40454)
	(0.59546 0.022 0.40454)
	(0.59546 0.478 0.40454)
	(0.40454 0.478 0.40454)
	(0.40454 0.022 0.59546)
	(0.59546 0.022 0.59546)
	(0.59546 0.478 0.59546)
	(0.40454 0.478 0.59546)
);

geometry 
{
};

blocks
(
    hex (0 1 2 3 4 5 6 7) (50 50 50) 
    simpleGrading 
    ( 
        1 
        1                   
        1              
    ) 
	hex (8 9 10 11 12 13 14 15) (10 10 10) 
    simpleGrading 
    ( 
        1 
        1                   
        1              
    ) 
);

edges
(
	arc 8 9 (0.5 0.022 0.365)
	arc 10 11 (0.5 0.478 0.365)
	arc 9 13 (0.635 0.022 0.5)
	arc 10 14 (0.635 0.478 0.5)
	arc 13 12 (0.5 0.022 0.635)
	arc 14 15 (0.5 0.478 0.635)
	arc 12 8 (0.365 0.022 0.5)
	arc 15 11 (0.365 0.478 0.5)
);

boundary
( 
  defaultFaces
    {
        type wall;
        faces
        (
            (9 13 14 10)
            (13 14 15 12)
            (12 8 11 15)
            (8 9 10 11)
            (8 9 13 12)
            (11 10 14 15)
        );
    }
  fixedWalls
    {
        type wall;
        faces
        (
            (0 3 2 1)
            (4 5 6 7)
        );
    }
    leftWall
    {
        type wall;
        faces
        (
            (0 4 7 3)
        );
    }
    rightWall
    {
        type wall;
        faces
        (
            (1 2 6 5)
        );
    }
    front
    {
        type cyclic;
        neighbourPatch back;
        faces
        (
            (0 1 5 4)
        );
    }
    back
    {
        type cyclic;
        neighbourPatch front;
        faces
        (
            (2 3 7 6)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
I've then specified the cylinder wall temperature as uniform. However, only the interior of the cylinder heats, and not the surrounding cavity.

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

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293.15;

boundaryField
{
    defaultFaces
	{
		type            fixedValue;
        value           uniform 353.15;
    }
	leftWall
    {
        type            zeroGradient;
    }
    rightWall
    {
        type            zeroGradient;
    }
    fixedWalls
    {
        type            zeroGradient;
    }
    front
    {
        type            zeroGradient;
    }

    back
    {
        type            zeroGradient;
    }
}

// ************************************************************************* //
How do I get the exterior of the cylinder to interact, or is there a better way of going about this?
mucgoo is offline   Reply With Quote

Old   March 22, 2018, 01:34
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
You need to define the boundary between the cylinder and the surroundings as wall or patch and give boundary conditions.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 22, 2018, 05:17
Default
  #3
New Member
 
Join Date: Feb 2018
Posts: 5
Rep Power: 8
mucgoo is on a distinguished road
Quote:
Originally Posted by piu58 View Post
You need to define the boundary between the cylinder and the surroundings as wall or patch and give boundary conditions.
Is that not done? (Poor naming but defaultFaces=the cylinder)

Code:
  defaultFaces
    {
        type wall;
        faces
        (
            (9 13 14 10)
            (13 14 15 12)
            (12 8 11 15)
            (8 9 10 11)
            (8 9 13 12)
            (11 10 14 15)
        );
    }
Code:
boundaryField
{
    defaultFaces
	{
		type            fixedValue;
        value           uniform 353.15;
    }
mucgoo is offline   Reply With Quote

Old   March 22, 2018, 06:16
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
I don't recommend to use defaultFaces. Give the boundary a name and set the condition. Then you know for sure everything is ok.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 22, 2018, 09:34
Default
  #5
New Member
 
Join Date: Feb 2018
Posts: 5
Rep Power: 8
mucgoo is on a distinguished road
I've changed the face name to "Core" for all boundary conditions but the problem remains.

The interior wall of the Cylinder is heating the internal volume (I don't care what happens in this space), while the exterior isn't heating the surrounding air filled cavity.
mucgoo is offline   Reply With Quote

Old   March 22, 2018, 09:44
Default
  #6
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Now I understand.

A patch has only one direction, because the other side is thought to be the boundary of the domain to be computed. To define it for two adjacent regions you have to note the patches twice, with an alternativ counting of nodes.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 22, 2018, 09:52
Default
  #7
New Member
 
Join Date: Feb 2018
Posts: 5
Rep Power: 8
mucgoo is on a distinguished road
So how do I reverse the direction so the cylinder becomes outward facing, and computation occurs between the cavity/cylinder.

Thank you very much for your help so far!
mucgoo is offline   Reply With Quote

Old   March 22, 2018, 12:24
Default
  #8
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
If you don't need the region inside the cylinder you should not mesh it but let it empty.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   March 23, 2018, 06:10
Default
  #9
New Member
 
Join Date: Feb 2018
Posts: 5
Rep Power: 8
mucgoo is on a distinguished road
That result in a blockMesh error?

Code:
Creating topology blocks
Creating topology patches

Creating block mesh topology


--> FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(9 13 14 10)

    From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 124.
mucgoo 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
[ANSYS Meshing] Meshing solid cylinder Sunlight311 ANSYS Meshing & Geometry 0 September 30, 2018 14:32
Drag force coefficient too high for a flow past a cylinder using komega sst Scabbard OpenFOAM Running, Solving & CFD 37 March 21, 2016 17:16
Help in Meshing Solid Cylinder in Gambit. Andy Singh FLUENT 5 August 31, 2004 08:31
Turbulent steady flow around a circular cylinder Mirek Kabacinski FLUENT 0 July 23, 2003 19:40
Heating of a solid cylinder with internal heat generation Sriram Popuri Main CFD Forum 6 July 13, 1999 19:09


All times are GMT -4. The time now is 12:03.