CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Adding porous zones in icoFoam solver

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By josephn
  • 2 Post By josephn

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2015, 17:31
Default Adding porous zones in icoFoam solver
  #1
New Member
 
Joseph Nichols
Join Date: Dec 2014
Posts: 5
Rep Power: 12
josephn is on a distinguished road
I am trying to simulate a fluid leak from a capillary into surrounding porous media. I was experimenting with porousSimpleFoam, but my Reynolds number is around 1e-3 so what I really need is a laminar solver and it seems icoFoam is the best option. My problem is that the porous regions do not seem to affect fluid flow regardless of the porosity values that I use. I am not sure if icoFoam is acknowledging the porous zones at all.

Here is my checkMesh file

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : checkMesh
Date   : Mar 03 2015
Time   : 14:28:34
Host   : "josephn-NY639AA-ABA-p6213w"
PID    : 27184
Case   : /home/josephn/Work/porousSimpleFoam/EruptionTest
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           99432
    internal points:  0
    faces:            196790
    internal faces:   97360
    cells:            49025
    faces per cell:   6
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       4

Overall number of cells of each type:
    hexahedra:     49025
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    inlet               10       22       ok (non-closed singly connected)  
    outlet              10       22       ok (non-closed singly connected)  
    porousTumorSide     625      1252     ok (non-closed singly connected)  
    capWall             735      1476     ok (non-closed singly connected)  
    frontAndBack        98050    99432    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (0 0 0) (0.0002405 0.000201 1e-06)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-1.07221e-18 3.85003e-19 -1.18515e-15) OK.
    Max cell openness = 1.00974e-16 OK.
    Max aspect ratio = 10 OK.
    Minimum face area = 2e-14. Maximum face area = 1e-12.  Face area magnitudes OK.
    Min volume = 2e-20. Max volume = 1e-18.  Total volume = 4.81005e-14.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 4.54296, 205 highly skew faces detected which may impair the quality of the results
  <<Writing 205 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
You can see that the cellZones are being read in. Is there another trick to adding porous resistance to an icoFoam solver?

Thanks,

Joe
Zhiheng Wang likes this.
josephn is offline   Reply With Quote

Old   March 4, 2015, 02:55
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

It is rather interesting switch, from porousSimpleFoam to icoFoam. The first is steady-state solver, the second is transient solver.

It is much easier to make (for example) pimpleFoam to behave like icoFoam (i.e. set number of outer correctors to 1, set RASModel to laminar) then to add porous zones to icoFoam (add corresponding pieces of code to solver, recompile solver, test new solver). Also with pimpleFoam (or simpleFoam if you need steady state solution) you can use explicitPorositySource to set porous zones.
alexeym is offline   Reply With Quote

Old   March 6, 2015, 00:12
Default PimpleFoam still not recognizing porosity
  #3
New Member
 
Joseph Nichols
Join Date: Dec 2014
Posts: 5
Rep Power: 12
josephn is on a distinguished road
I converted to pimpleFoam as you suggested, but I am still struggling to see any resistance.

When I ran the tutorial for porousSimpleFoam, the start of the simulation read like this.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : porousSimpleFoam
Date   : Mar 05 2015
Time   : 20:49:04
Host   : "josephn-NY639AA-ABA-p6213w"
PID    : 6908
Case   : /home/josephn/OpenFOAM/josephn-2.3.0/run/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: no convergence criteria found. Calculations will run for 10 steps.

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model laminar
No finite volume options present

No MRF models present

Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porosity
Using pressure implicit porosity

Starting time loop

Time = 1

GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0331908, No Iterations 5
time step continuity errors : sum local = 4.52244, global = 0.448809, cumulative = 0.448809
ExecutionTime = 0.21 s  ClockTime = 0 s
When I run my project using pimpleFoam, however, I don't see any message about creating porous zones.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : pimpleFoam
Date   : Mar 05 2015
Time   : 21:00:54
Host   : "josephn-NY639AA-ABA-p6213w"
PID    : 6995
Case   : /home/josephn/OpenFOAM/josephn-2.3.0/run/tutorials/incompressible/pimpleFoam/pimpleTutorial
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
No finite volume options present


PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 0 max: 0
deltaT = 1.11111e-09
Time = 1.11111e-09

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 1.83397e-07, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 9.04806e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00943383, No Iterations 1
time step continuity errors : sum local = 1.59183e-09, global = -1.55676e-09, cumulative = -1.55676e-09
GAMG:  Solving for p, Initial residual = 0.23809, Final residual = 8.59885e-07, No Iterations 26
time step continuity errors : sum local = 2.71317e-14, global = 8.34192e-15, cumulative = -1.55675e-09
ExecutionTime = 4.87 s  ClockTime = 5 s
Looking over the fvSolutions and fvSchemes files, I cannot see any way to inform the solver to look for porous zones. Again the cell zones are being picked up when I run blockMesh, but I don't think there is any recognition by the solver. What am I missing?

Last edited by josephn; March 6, 2015 at 00:14. Reason: formatting
josephn is offline   Reply With Quote

Old   March 6, 2015, 02:47
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

If you reread my previous message, it contains "you can use explicitPorositySource to set porous zones", while your execution log shows:

Code:
No finite volume options present
That means you have ignored my suggestion on the way to add porous drag to cellZones and yet complain about porosity absence. You can learn how to use fvOptions and explicitPorositySource in tutorial and source code (or using search on this Forum).
alexeym is offline   Reply With Quote

Old   March 7, 2015, 01:28
Default Working now
  #5
New Member
 
Joseph Nichols
Join Date: Dec 2014
Posts: 5
Rep Power: 12
josephn is on a distinguished road
Thank you!

That was just the hint that I needed. I created the fvOptions file in the system folder and added the contents of the porosity properties file. There were a few more formatting related hiccups, but it looks like everything works now.

Thanks for taking the time to help.

Joe
Caio Martins and Z.M.Bao like this.
josephn is offline   Reply With Quote

Reply

Tags
cellzones, icofoam, porosity


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
A solver for two-phase flow with a porous media enoch OpenFOAM Programming & Development 6 October 10, 2022 10:11
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 08:54
chtMultiRegionSimpleFoam samiam1000 OpenFOAM Running, Solving & CFD 39 March 31, 2016 09:43
Wall between porous zones roupcik Main CFD Forum 1 April 15, 2013 08:05
Finally starting to explore OpenFOAM, questions on icoFoam solver... JasonG OpenFOAM Running, Solving & CFD 20 July 11, 2012 21:08


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