CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

fixValues inside of a Mesh openFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2019, 06:08
Default fixValues inside of a Mesh openFoam
  #1
Member
 
Christophk
Join Date: Oct 2018
Posts: 33
Rep Power: 7
syntex is on a distinguished road
Hello,

does anyone know, how to create a patch inside of a Mesh, where you can set fix values for velocity, pressure etc.

I amnaged to do it for a boundary patch, where I coul set fix values, by just editing the numbers in the boundary conditions inside 0/U etc. to be a nonuniform list like they are stored in restart files at different timesteps.

My problem is, that I fail to create a boundary patch inside the mesh, which seems rather logical to me, since boundaries are usually not inside of a mesh.
But like this I can't set fix values to that special face, since in 0/U etc.-files the values are only grouped for different boundary conditions.

I added a little drawing , to visualize the idea (I know it's not good, but it should help to understand me)

I also attached my blockMeshdict and my 0/U-file to give you an idea of what I did.

I want to put the inlet velocity distribution inside the mesh at the red marked face in the last picture
Attached Images
File Type: png inlet.png (45.7 KB, 4 views)
File Type: png Mesh.png (24.0 KB, 3 views)
File Type: png patch.png (6.0 KB, 3 views)
syntex is offline   Reply With Quote

Old   May 20, 2019, 06:10
Default
  #2
Member
 
Christophk
Join Date: Oct 2018
Posts: 33
Rep Power: 7
syntex is on a distinguished road
blockMesh
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}

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


vertices
(
    (-0.5 -0.5 -0.5)
    ( 1   -0.5 -0.5)
    ( 1    0.5 -0.5)
    (-0.5  0.5 -0.5)
    (-0.5 -0.5  0.5)
    ( 1   -0.5  0.5)
    ( 1    0.5  0.5)
    (-0.5  0.5  0.5)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (45 30 30) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    upperWall
    {
        type patch;
        faces
        (
            (3 7 6 2)
        );
    }

    lowerWall
    {
        type patch;
        faces
        (
            (1 5 4 0)
        );
    }

    inlet
    {
        type patch;
        faces
        (
            (0 4 7 3)
        );
    }

    outlet
    {
        type patch;
        faces
        (
            (2 6 5 1)
        );
    }

    symFront
    {
        type patch;
        faces
        (
            (4 5 6 7)
        );
    }

    symBack
    {
        type patch;
        faces
        (
            (0 3 2 1)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
0/U:

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

#include        "include/initialConditions"

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform $flowVelocity;

boundaryField
{
    inlet 
    {
        type            fixedValue;
        value           nonuniform List<vector>
11304(
(24.99764786 0.0173272802 0.01732712403)
(24.99726486 -0.04879046604 0.004803705961)
...
...
...

(24.99726486 0.04899951816 0.001605197322)
(24.99250984 -0.1716389954 -0.1606982499)
);
}

    outlet
    {
        type            zeroGradient;
    }

    NACA0012
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    #include "include/frontBackTopBottomPatches"
}


// ************************************************************************* //
syntex 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
y+ = 1 boundary layer mesh with snappyHexMesh Arzed23 OpenFOAM Running, Solving & CFD 6 November 23, 2022 15:15
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 16:59
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 07:05
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


All times are GMT -4. The time now is 16:10.