CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

How to output porous force in OF221

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 13, 2014, 20:57
Default How to output porous force in OF221
  #1
New Member
 
Chen Yu
Join Date: Sep 2013
Posts: 18
Rep Power: 3
chery1986 is on a distinguished road
I am using porousInterFoam and porousWaveFoam in OF221, and want to output the drag force inside the porous media but cannot figure out the method. I define the porous media in blockMeshDict with a block
hex (1 2 6 5 13 14 18 17) porosity (73 93 1) simpleGrading (1 1 1)
and in porosityZone file define the property of it
Code:
1
(
    porosity
    {
        coordinateSystem
        {
            e1  (1 0 0);
            e2  (0 0 1);
        }

        resistanceFormulation vanGent1995;

        porosity 0.49;
        KC KC [0 0 0 0 0 0 0] 128;
        gammaAddedMass 0.34;
        
        d50 d50 [0 1 0 0 0 0 0] 0.0159;
        alpha alpha [0 0 0 0 0 0 0] 500;
        beta beta [0 0 0 0 0 0 0] 2.0;
    }
)
I found that if I use libforces.so,
Code:
    porousforces
    {
        type forces;
        functionObjectLibs ("libforces.so");
        outputControl timeStep;
        outputInterval     1;

        // Patches to sample
        patches (lowerWall);
        // Name of fields
        pName p;
        Uname U;
        // Density
        rhoName rho;
//        nuName    nuInf;
        rhoInf  1000;
//        nuInf 1e-06;
        // Dump to file
        log true;
        // Centre of rotation
        CofR (0 0 0);
    }
Then it will output the the force history with the first line # Time forces(pressure, viscous, porous) moment(pressure, viscous, porous), but the porous force is always (0, 0, 0).

Anyone know how to output the porous force in the porous media zone.

Last edited by wyldckat; September 13, 2014 at 17:10. Reason: Added [CODE][/CODE]
chery1986 is offline   Reply With Quote

Old   June 19, 2014, 03:01
Default Did you ever find a solution?
  #2
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 5
RygeltheXVI is on a distinguished road
I too am looking to work out porousity drag in openfoam and was wondering if you ever found a solution?

It doesn't make sense that a porous region is a cellzone to work out the forces on a patch (unless the zone is 1 cell wide), but even then you can't have the face bounding your porous region be patches else the flow wont go though them...
RygeltheXVI is offline   Reply With Quote

Old   August 28, 2014, 13:59
Default
  #3
New Member
 
Join Date: Jun 2012
Location: Bologna, Italy
Posts: 2
Rep Power: 0
styleo86 is on a distinguished road
Do you have found any solution to the problem?

I have the same request but I don't find a workaround.
styleo86 is offline   Reply With Quote

Old   September 13, 2014, 17:19
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,514
Blog Entries: 33
Rep Power: 74
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
Greetings to all!

I had this thread on my to-do list for a while now and finally managed to look into this.

I have to admit I was going to say at first that this wasn't possible, but after some searching and looking into the source code, here's what I've found:
  1. Although the feature of calculating the porous part of the forces was already available in version 2.2.1, it was only announced as a feature in 2.3.0: http://www.openfoam.org/version2.3.0...processing.php
    Quote:
    forces and forceCoeffs include porosity contribution, and updated writing of bin data to single file(s);
  2. If you look at this file: https://github.com/OpenFOAM/OpenFOAM.../forces.C#L681 - in line 681, you'll find that the missing optional option is named "porosity".
Therefore, since I don't have a test case myself, I can only state that the following line is missing in the function object you use in "controlDict":
Code:
porosity true;
Using chery1986's example:
Code:
    porousforces
    {
        type forces;
        functionObjectLibs ("libforces.so");
        outputControl timeStep;
        outputInterval     1;

        // Patches to sample
        patches (lowerWall);
        // Name of fields
        pName p;
        Uname U;
        // Density
        rhoName rho;
//        nuName    nuInf;
        rhoInf  1000;
//        nuInf 1e-06;
        // Dump to file
        log true;
        // Centre of rotation
        CofR (0 0 0);
        // Include porosity effects
        porosity   true;
    }
Best regards,
Bruno
wyldckat is online now   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Am i right? porous jump drag force Shim FLUENT 2 August 25, 2014 10:33
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 8 July 3, 2014 11:54
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34
outputTime in Swak function immortality OpenFOAM Post-Processing 6 May 20, 2013 07:43
porous medium and reactions Valeria FLUENT 1 July 10, 2009 04:58


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