|
[Sponsors] |
February 13, 2014, 20:57 |
How to output porous force in OF221
|
#1 |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
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; } ) 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); } 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] |
|
June 19, 2014, 03:01 |
Did you ever find a solution?
|
#2 |
New Member
Join Date: Mar 2011
Posts: 16
Rep Power: 15 |
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... |
|
August 28, 2014, 13:59 |
|
#3 |
New Member
Join Date: Jun 2012
Location: Bologna, Italy
Posts: 3
Rep Power: 14 |
Do you have found any solution to the problem?
I have the same request but I don't find a workaround. |
|
September 13, 2014, 17:19 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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:
Code:
porosity true; 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; } Bruno
__________________
|
||
September 28, 2016, 04:25 |
|
#5 |
New Member
Join Date: May 2013
Posts: 11
Rep Power: 13 |
I would like to revive this thread since I have not yet found an answer to the main question in the forum.
I attach a simple case to work with. The domain is a simple box with a porous zone in it and the flow solution seems reasonable. The outputted forces though seems enormously high. This may not be a surprise considering that i specified a cellZone (named framework) instead of a patch in the forces dictionary (see below). Can I tell the functionObject that framework is a porous cellZone and not a patch? Or is there something else that is wrong? Code:
forces_1 {type forces; functionObjectLibs ("libforces.so"); porosity true; patches (framework ); //not a patch!! rhoName rhoInf; rhoInf 1.2; CofR (0 0 0); outputControl timeStep; outputInterval 1;} |
|
September 28, 2016, 04:59 |
|
#6 |
New Member
Join Date: May 2013
Posts: 11
Rep Power: 13 |
I seem to have found the reason for the extremely high forces, simply i forgot to scale the mesh before running...
Also, I noticed an error message when running the solver that complained about framework not being a patch. So I tested to remove all entries from the patch list in the dictionary (see below) and the error message disappeared. the porous forces are outputted anyway. I presume this means that the functionObject will print out forces exherted on all porous zones in the domain. Code:
forces_1 {type forces; functionObjectLibs ("libforces.so"); porosity true; patches ( ); rhoName rhoInf; rhoInf 1.2; CofR (0 0 0); outputControl timeStep; outputInterval 1;} |
|
September 28, 2016, 08:56 |
|
#7 |
New Member
Join Date: May 2013
Posts: 11
Rep Power: 13 |
next question is then: if there are several porous zones in the domain, is there a way to output the forces on a single porous zone rather than the sum of the forces on all zones? any suggestions are appreciated!
|
|
September 28, 2016, 17:39 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick question: Which OpenFOAM version are you using?
__________________
|
|
September 29, 2016, 02:33 |
|
#9 |
New Member
Join Date: May 2013
Posts: 11
Rep Power: 13 |
||
September 29, 2016, 18:41 |
|
#10 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Quote:
Quote:
edit: Sorry, forgot to mention that the piece of code you're looking for is here: https://github.com/OpenFOAM/OpenFOAM.../forces.C#L923 - starts in line 923, "fPTot" and "Md" is what you're looking for. Last edited by wyldckat; September 29, 2016 at 18:43. Reason: see "edit:" |
|||
September 30, 2016, 04:17 |
|
#11 |
New Member
Join Date: May 2013
Posts: 11
Rep Power: 13 |
Thanks for the suggestion and the links. I doubt that I will be able to modify the code but I will give it a try later on. If i can get it to work i will post the result.
|
|
November 30, 2016, 06:40 |
|
#12 | |
Member
Anirudh Kulkarni
Join Date: May 2016
Posts: 62
Rep Power: 10 |
Quote:
|
||
February 8, 2019, 14:13 |
|
#13 |
Senior Member
Join Date: Jun 2011
Posts: 163
Rep Power: 15 |
Hi All
I have the following question about porosity part of forces How OF calculated the forces applied on the porous zones ? what formula is used for calculating the forces thanks for any help |
|
February 8, 2019, 18:26 |
|
#14 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
@mechy: Quick answer... Given my old answer:
Quote:
__________________
|
|||
February 9, 2019, 04:35 |
|
#15 |
Senior Member
Join Date: Jun 2011
Posts: 163
Rep Power: 15 |
Dear Bruno
thanks so much for your reply. I have found that the force is calculated by integrating of Darcy-Forchimmer term over the porous volumes. I need to calculate the force on the porous-fluid interface by integrating the pressure and viscous stress on the interface. however, the force library only gives the patches as its input. and this library can not give the interface for calculating the force. I will be so thankful if you can help me to calculate the force on the fluid-porous interface Best Regards |
|
March 14, 2024, 13:44 |
|
#16 | |
New Member
Marion Sant
Join Date: Dec 2023
Posts: 23
Rep Power: 2 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] outputTime in Swak function | immortality | OpenFOAM Community Contributions | 20 | October 6, 2022 13:08 |
ActuatorDiskExplicitForce in OF2.1. Help | be_inspired | OpenFOAM Programming & Development | 10 | September 14, 2018 12:12 |
Am i right? porous jump drag force | Shim | FLUENT | 2 | August 25, 2014 10:33 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |
porous medium and reactions | Valeria | FLUENT | 1 | July 10, 2009 04:58 |