CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Drag calculation for porous zone

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 19, 2018, 03:53
Default Drag calculation for porous zone
  #1
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
Hello

I've tried to implement the following script, for a plate placed in a free flowing air. And calculated the drag coefficient on the square. This works really well. (The squareVolume reffers to the boundary around the square).

Now I would like to do the same, but where I have replaced the square with a porous region. Now I don't have the boundary to put into my script. I tried putting the volume of the porous region into the script but that does not work, and I get a value of zero.

I also tried creating a boundary around the porous region, however, then the boundary affects the simulation, and I could still not calculate the drag force.

Any idea how i could get the drag force on my porous region?

I've included a image of my simulation of the porous region. Clearly there should be a drag force on it.

Udklip.PNG

Code:
forces
{
    type                forces;
    functionObjectLibs  ("libforces.so");
    outputControl       timeStep;
    outputInterval      1;
     
    patches             ( "squareVolume" );
    p               p;
    U               U;
    rho             rhoInf;
    log                 true;
     
    CofR                (0.25 0 0);
     
    rhoInf              1;
}
 
 
forceCoeffs
{
    type                forceCoeffs;
    functionObjectLibs  ( "libforces.so" );
    outputControl       timeStep;
    outputInterval      1;
 
    patches             ( "squareVolume" );
    p               p;
    U              U;
    rho             rhoInf;
    log                 true;
     
    liftDir             (0 0 1);
    dragDir             (1 0 0);
    CofR                (0.25 0 0);
    pitchAxis           (0 1 0);
     
    magUInf             5.00;
    rhoInf              1;
    lRef                1;
    Aref                0.25;
}
MrAndersDk is offline   Reply With Quote

Old   October 26, 2018, 05:06
Default
  #2
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hi Anders,

I would be interested in something simlar... I have not tried it yet, but I was thinking about applying internal baffles (createBaffles with type "cyclic").

I guess I would have tried something like:
- createBaffles (type cyclic) out of faceSets/faceZones
- then I'd have 4 internal patches surrounding the porous are that are "empty"
- somehow link them together? to get one external surface...
- use this surface as input patch for the forces functionObject

However, that's just an idea... Please keep me updated about any progress

Best wishes,
Anna
AnnaF is offline   Reply With Quote

Old   February 8, 2019, 13:27
Default
  #3
Senior Member
 
Join Date: Jun 2011
Posts: 163
Rep Power: 14
mechy is on a distinguished road
Quote:
Originally Posted by MrAndersDk View Post
Hello

I've tried to implement the following script, for a plate placed in a free flowing air. And calculated the drag coefficient on the square. This works really well. (The squareVolume reffers to the boundary around the square).

Now I would like to do the same, but where I have replaced the square with a porous region. Now I don't have the boundary to put into my script. I tried putting the volume of the porous region into the script but that does not work, and I get a value of zero.

I also tried creating a boundary around the porous region, however, then the boundary affects the simulation, and I could still not calculate the drag force.

Any idea how i could get the drag force on my porous region?

I've included a image of my simulation of the porous region. Clearly there should be a drag force on it.

}[/CODE]
Hello
Dear MrAndersDk

I have the same problem
can you find a way for calculating this force ?

Best Regards
mechy is offline   Reply With Quote

Old   February 11, 2019, 04:10
Default
  #4
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
Hello

Been some time since I looked at it, but I think I solved it.

I will post my case files later when I'm at my work compete, maybe first tomorrow.
MrAndersDk is offline   Reply With Quote

Old   February 11, 2019, 05:17
Default
  #5
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
Hello

Been some time since I looked at it, but I think I solved it.

I will post my case files later when I'm at my work compete, maybe first tomorrow.
MrAndersDk is offline   Reply With Quote

Old   February 12, 2019, 11:53
Default
  #6
Senior Member
 
Join Date: Jun 2011
Posts: 163
Rep Power: 14
mechy is on a distinguished road
Hello
Dear MrAndersDk

thanks for your kindness
mechy is offline   Reply With Quote

Old   February 13, 2019, 06:56
Default
  #7
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
here you go

baseCase.zip
MrAndersDk is offline   Reply With Quote

Old   February 13, 2019, 10:05
Default
  #8
Senior Member
 
Join Date: Jun 2011
Posts: 163
Rep Power: 14
mechy is on a distinguished road
Hello
Dear MrAndersDk

thanks again for your kindness

can you explain this case and its setting
its polyMesh folder is empty.
moreover, how you solved the aforementioned problem ?

Best Regards
mechy is offline   Reply With Quote

Old   February 13, 2019, 11:21
Default
  #9
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
The polymesh folder was too big for uploading. I'm away on a business trip, but when I get back I will have a look at it.
MrAndersDk is offline   Reply With Quote

Old   February 14, 2019, 02:54
Default
  #10
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
Hello

Now I'm back.

Look in the forceCoeffs file in the system folder. The solution is to include the porosity true line, and then the patch i put in my volume that has porosity.

The forceCoeffs file is then included in the controlDict.
MrAndersDk is offline   Reply With Quote

Old   February 14, 2019, 16:15
Default
  #11
Senior Member
 
Join Date: Jun 2011
Posts: 163
Rep Power: 14
mechy is on a distinguished road
Hello
Dear MrAndersDk

thanks again for your kindness

Best Regards
mechy is offline   Reply With Quote

Old   February 28, 2019, 08:37
Default
  #12
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Hey MrAndersDk

Thanks for sharing your case files.

I was just wondering, if the force and forceCoeffs calculation really worked as your attached .dat files in the postProcessing folder show only zeros?

And I have encountered problems with the forces functionObject utility for my current case, which is a 2D water wave interaction problem with a thin porous sheet (using interFoam/olaFlow). The forces utility gave me weird results, so I have used the pressureDifferencePatch utility instead, which gives reasonable results.

I would have thought it would give the same results, but it didn't and I still can't find the reason. Also the forces utility somehow cannot access my total(p) field, it only works for the p field for me...

Anna
AnnaF is offline   Reply With Quote

Old   February 28, 2019, 08:41
Default
  #13
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Oh sorry, I have opened the wrong files... So it was working!


And you are confident that the forces/forceCoeffs utility gives the right solution?

Best wishes
Anna
AnnaF is offline   Reply With Quote

Old   February 28, 2019, 08:47
Default
  #14
Member
 
Anders Dyhr Nørløv
Join Date: Aug 2018
Posts: 32
Rep Power: 7
MrAndersDk is on a distinguished road
I have not verified the results. All I can say is that for my purpose the results makes sense. And others has made independent simulations in other programs and agree with my results.

But it is not well tested
MrAndersDk is offline   Reply With Quote

Old   February 28, 2019, 08:55
Default
  #15
Member
 
Anna Feichtner
Join Date: Dec 2016
Location: Cornwall (UK)
Posts: 36
Rep Power: 9
AnnaF is on a distinguished road
Alright, sounds reasonable. Thank you!

Anna
AnnaF is offline   Reply With Quote

Old   January 8, 2024, 10:52
Default
  #16
New Member
 
Kazakis Ioannis
Join Date: Sep 2016
Location: Thessaloniki, Greece
Posts: 24
Rep Power: 9
Giannis_Kaz is on a distinguished road
Quote:
Originally Posted by MrAndersDk View Post
Hello

Now I'm back.

Look in the forceCoeffs file in the system folder. The solution is to include the porosity true line, and then the patch i put in my volume that has porosity.

The forceCoeffs file is then included in the controlDict.



Dear sir


How you connect porous media with patch?? patch also nedds boundary conditions!


Kind Regards
Yiannis
Giannis_Kaz 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
Calculation of lift and drag coefficients on airfoil CoolHersheys OpenFOAM Post-Processing 5 September 27, 2021 06:04
Drag and lift calculation in Arbitrary Mesh Interface simulation anon_q OpenFOAM 7 April 22, 2018 13:24
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07
Error to re-open fluent case file J.Gimbun FLUENT 0 April 27, 2006 08:42


All times are GMT -4. The time now is 21:32.