|
[Sponsors] |
May 20, 2019, 07:08 |
fixValues inside of a Mesh openFoam
|
#1 |
Member
Christophk
Join Date: Oct 2018
Posts: 33
Rep Power: 8 |
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 |
|
May 20, 2019, 07:10 |
|
#2 |
Member
Christophk
Join Date: Oct 2018
Posts: 33
Rep Power: 8 |
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 ( ); // ************************************************************************* // 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" } // ************************************************************************* // |
|
|
|
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 16:15 |
[snappyHexMesh] Snappyhex mesh: poor inlet mesh | Swagga5aur | OpenFOAM Meshing & Mesh Conversion | 1 | December 3, 2016 17:59 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 08:05 |
New OpenFOAM Forum Structure | jola | OpenFOAM | 2 | October 19, 2011 07:55 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |