CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Creating porous baffle (https://www.cfd-online.com/Forums/openfoam-meshing/251340-creating-porous-baffle.html)

Florian Mlehliw August 10, 2023 08:28

Creating correct patchField entries for porous baffle
 
Dear all!

I'm slowly getting to know a little more of OpenFOAM, but there is just SO much^^

I'm still trying to understand how to best simulate a dam break at a lake, a bit similar to this question (https://www.cfd-online.com/Forums/op...technique.html). There, I got the idea of creating the dam as a baffle which then gets more and more porous until it is completely "gone" (I hope something like that's possible). Or can I create a baffle which does dome kind of solidMotion into the ground?

I want to show you what I've done so far and I would then like for someone to tell me if I'm on the right track at all.

The OpenFoam user guide says that a searchablePlate can be used to create a baffle. I've created the plate using snappyHexMeshDict:
Code:

geometry
{
    [...]
    dam
    {
        type            searchablePlate;
        origin          (4000 3463 4582);
        span            (300 0 90);
    }
}

refinementSurfaces
    {
        dam
        {
            level (6 6);
            patchInfo
            {
            type searchablePlate;
            }
        }
      }

and it looks promising: https://ibb.co/VHGbrNt
https://ibb.co/VHGbrNt https://drive.google.com/file/d/1o13...usp=drive_link
To create a faceZone, I then used topoSetDict like this:
Code:

actions
(
    {
        name    dam;
        type      faceZoneSet;
        action    new;
        origin    (4000 3463 4582);
        span      (300 0 90);

        source    searchableSurfaceToFaceZone;
        surfaceType    searchablePlate;
        surfaceName    dam;
    }
);

In an older Youtube tutorial, the createBafflesDict looked like this:
Code:

baffles
{
    dam
    {
        type    faceZone;
        zoneName    dam;
        flip    false;
        patches
        {
            master
            {
                name    dam;
                type    wall;
            }
            slave { ${..master} }
        }
    }
 }

But when I run createBaffles, it gives me an error because I didn't include patchField entries for dam in the files in 0 (like U, alpha.water etc.). What would be the correct way to include my dam baffle there?

Can any of this lead to me simulating a dam breach?^^

Thank you all!

Florian Mlehliw August 10, 2023 11:35

I've looked a lot at activeBaffleVelocity, because that seems to be a good way to "move" my dam baffle.
According to the OpenFOAM guide, I should define a velocity boundary condition for my baffle. It could look something like this:
Code:

dam
    {
        type            activeBaffleVelocity;
        p              p;
        cyclicPatch    cyclic1;
        orientation    1;
        openFraction    1;
        openingTime    10.0;
        maxOpenFractionDelta 0.1;
    }

I have a few (very beginner) questions:
In what Dict does this belong? The other boundary conditions are in all the files in the 0 directory, would that be the right place?
Under cyclicPatch, I should put the name of the cyclic patch - would that be "dam" in this case, so it recognizes my baffle?


All times are GMT -4. The time now is 03:41.