CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Drag calculation for porous zone (https://www.cfd-online.com/Forums/openfoam-post-processing/208541-drag-calculation-porous-zone.html)

MrAndersDk October 19, 2018 03:53

Drag calculation for porous zone
 
1 Attachment(s)
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.

Attachment 66169

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;
}


AnnaF October 26, 2018 05:06

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

mechy February 8, 2019 13:27

Quote:

Originally Posted by MrAndersDk (Post 710580)
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

MrAndersDk February 11, 2019 04:10

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 February 11, 2019 05:17

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.

mechy February 12, 2019 11:53

Hello
Dear MrAndersDk

thanks for your kindness

MrAndersDk February 13, 2019 06:56

1 Attachment(s)
here you go

Attachment 68325

mechy February 13, 2019 10:05

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

MrAndersDk February 13, 2019 11:21

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 February 14, 2019 02:54

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.

mechy February 14, 2019 16:15

Hello
Dear MrAndersDk

thanks again for your kindness

Best Regards

AnnaF February 28, 2019 08:37

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 February 28, 2019 08:41

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

MrAndersDk February 28, 2019 08:47

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

AnnaF February 28, 2019 08:55

Alright, sounds reasonable. Thank you!

:) Anna

Giannis_Kaz January 8, 2024 10:52

Quote:

Originally Posted by MrAndersDk (Post 724729)
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


All times are GMT -4. The time now is 01:17.