|
[Sponsors] |
[blockMesh] Flow in pipe with porous region - How to define cellzone? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 17, 2016, 13:11 |
Flow in pipe with porous region - How to define cellzone?
|
#1 |
New Member
Join Date: May 2016
Posts: 4
Rep Power: 10 |
I am new OpenFoam user I want to do something very simple:
There is a 2d pipe and in the middle there is a porous wall. I used blockmesh with 3 blocks with equal sizes and the block in the middle should be the porous media. How do I indicate to OpenFoam that there is a porous region? I read about CellZone and Setset, but I can't find exactly what must I write and were I'm using porousSimpleFoam and blockMesh. If someone has the codes for such simulation to share, I and the Internet will be very thankfull to you and many people in the future will love you. The "tutorials" that come with openFoam are very unclear. |
|
May 17, 2016, 21:52 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
Look at the topoSet utility: https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict You can define your cellZone using that. There are multiple options: boxToCell, cylinderToCell etc that you can use to get your cellZone. Cheers, Antimony |
|
May 18, 2016, 09:22 |
|
#3 |
New Member
Join Date: May 2016
Posts: 4
Rep Power: 10 |
Thank you for your reply!
I created the file topoSetDict and I put it in /system Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } actions ( // Load initial cellSet { name porosity; type cellSet; action new; source boxToCell; sourceInfo { box (20 0 0) (40 20 1); } } ); With this mesh 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 0.001; vertices // points in the flow space ( (0 0 0) // 0 (20 0 0) // 1 (20 20 0) // 2 (0 20 0) // 3 (0 0 1) // 4 (20 0 1) // 5 (20 20 1) // 6 (0 20 1) // 7 (40 0 0) // 8 (40 20 0) // 9 (40 0 1) // 10 (40 20 1) // 11 (60 0 0) // 12 (60 20 0) // 13 (60 0 1) // 14 (60 20 1) // 15 ); blocks ( hex (0 1 2 3 4 5 6 7) (30 30 1) // the order of the numbers in hex ( ) defines the vertices of the tetrahedron (region of flow) // Important: The first two digits in hex ( ) defines x-direction, the first and the third // defines the Y, and the first and the fifth defines the Z simpleGrading (1 1 1) //defines the grid hex (1 8 9 2 5 10 11 6) (30 30 1) simpleGrading (1 1 1) //defines the grid hex (8 12 13 9 10 14 15 11) (30 30 1) simpleGrading (1 1 1) //defines the grid ); edges // used in the case of drawing curves ( ); boundary // names the faces ( inlet { type patch; faces ( (0 3 4 7) //face determinated by this vertices is the inlet ); } outlet { type patch; faces ( (12 13 15 14) ); } walls { type wall; faces ( (0 1 5 4) (2 3 6 7) (8 12 14 10) (9 13 11 15) ); } porosityWall { type wall; faces ( (1 8 5 10) // (2 9 6 11) // ); } frontAndBack { type empty; faces ( (0 3 2 1) (4 5 6 7) (5 10 11 6) (1 8 9 2) (8 12 13 9) (10 14 15 11) ); } ); mergePatchPairs ( ); //*************************************************// but I get this error when I run porousSimpleFoam Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 3.0.1-119cac7e8750 Exec : porousSimpleFoam Date : May 18 2016 Time : 14:12:17 Host : "ubuntu-mate-1510" PID : 29189 Case : /home/ofuser/OpenFOAM/ofuser-3.0.1/run/sq_porous nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 SIMPLE: no convergence criteria found. Calculations will run for 100 steps. Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; C3 -0.33; sigmak 1; sigmaEps 1.3; } No MRF models present Creating porosity model list from porosityProperties Porosity region porosity1: selecting model: DarcyForchheimer creating porous zone: porosity --> FOAM FATAL ERROR: cannot find porous cellZone porosity From function Foam::porosityModel::porosityModel(const Foam::word&, const Foam::word&, const Foam::fvMesh&, const Foam::dictionary&, const Foam::word&) in file cfdTools/general/porosityModel/porosityModel/porosityModel.C at line 121. FOAM exiting |
|
May 18, 2016, 09:56 |
|
#4 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
Hi,
At the moment it is still a cellSet, not a cellZone. You will need to do one more step in your topoSet to get that. Look for setToCellZone to do the conversion. Hope this helps. Cheers, Antimony |
|
Tags |
cellzones, pipe flow, porosity;niyama, porous interface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 05:04 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |