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

snappyHexMesh & porousInterFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2019, 07:01
Smile porousInterFoam solver fixed and tutorial case
  #1
New Member
 
Thomas N.
Join Date: Nov 2018
Posts: 11
Rep Power: 8
physicosm is on a distinguished road
Dear foamers,


recently, I had to run some multiphase porous simulations and I realized that there isn't any tutorial case regarding the porousInterFoam. Therefore, I've decided to create one, at least for foam-extend 4.0, in the case that somebody needs it in the future.


Before creating the case, I recompiled the solver so, it will be independent from interFoam. However, a minor change also should be made. In the UEqn.H, the volScalarField mu is defined such as
Code:
....

    // Calculate and cache mu for the porous media
    volScalarField mu(twoPhaseProperties.mu());
....
This is not a global definition and thus, it cannot be called later when the solver adds resistance in the UEqn due to porosity:
Code:
...

    pZones.addResistance(UEqn);
...
Thus, mu should be defined globally in the createFields.H as,
Code:
    // Need to store mu
    volScalarField mu
    (
        IOobject
        (
            "mu",
            runTime.timeName(),
            mesh,
            IOobject::READ_IF_PRESENT
        ),
        twoPhaseProperties.mu()
    );
I have attached the solver named porosityInterFoam and it runs in foam-extend 4.0.
porosityInterFoam.zip


Further, a case has been also attached and this describes the two-phase flow in a channel with a porous media.
porosityInterFoam-case.zip


Here are some results: results.zip



Enjoy freely!


Thomas N.

Last edited by physicosm; December 11, 2019 at 03:51.
physicosm 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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 07:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 03:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 03:55
Strange Results With snappyHexMesh calebamiles OpenFOAM Running, Solving & CFD 0 August 14, 2011 17:02
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 03:09


All times are GMT -4. The time now is 22:50.