CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   interFoam, high velocity's and decreasing timestep's (https://www.cfd-online.com/Forums/openfoam-solving/238072-interfoam-high-velocitys-decreasing-timesteps.html)

Kahnbein.Kai August 22, 2021 02:17

interFoam, high velocity's and decreasing timestep's
 
4 Attachment(s)
Hello,
i have a problem with my multiphase laminar simulation (Water, Air).

The simulations runs smooth, until water comes near the outlet (after 5-6 seconds), then the velocity's at the outlet rises up to 70-100 m/s and the timestep decreases to 10^-52.

I made a sketch (BouCon.jpeg) with the geometry and the assigned boundary location's, i also added a "will" flow path (flow.jpeg) of the waterphase.

The boundarys are:
green = atmo
blue = inlet
red = outlet
all others = walls

Here is my CheckMesh log:
Code:

Checking geometry...
    Overall domain bounding box (-11.513987 -10.740459 -0.35694548) (-6.65 -3.48344 0.8650929)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.5408662e-16 -1.7868697e-16 6.6448108e-16) OK.
    Max cell openness = 4.8142625e-16 OK.
    Max aspect ratio = 14.938371 OK.
    Minimum face area = 1.1015533e-07. Maximum face area = 0.00224492.  Face area magnitudes OK.
    Min volume = 1.4505393e-07. Max volume = 3.3031486e-05.  Total volume = 3.600383.  Cell volumes OK.
    Mesh non-orthogonality Max: 69.389349 average: 7.9464662
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.0778305 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

I testet my boundary conditions at the waterChannel template, there they will work flawlessly ... :(

Here are my U, p_rgh and alpha.water files:
U:
Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    CAD_patch32 // atmo
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
   
    CAD_patch39 // inlet
    {
        type            fixedValue;
        value          uniform (0 0 0.2);
    }
   
    CAD_patch0 // outlet
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
   
      wall
    {
        type            noSlip;
    }
}
}

p_rgh:
Code:

dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
  CAD_patch32 // atmo
    {
        type            totalPressure;
        p0              uniform 0;
    }

    CAD_patch39 // inlet
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
   
    CAD_patch0 // outlet
    {
        type            fixedValue;
        value          uniform 0;
    }

      wall
    {
        type            fixedFluxPressure;
        value        uniform 0;
    }
}

alpha.water:
Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;


boundaryField
{

    CAD_patch32 // atmo
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }
   
    CAD_patch39 // inlet
    {
        type            fixedValue;
        value          uniform 1;
    }
   
    CAD_patch0 // outlet
    {
        type            zeroGradient;
    }
   
    wall
    {
        type            zeroGradient;
    }
  }

I also added my fvScheme and fvSolutions files.

Have anyone a idea or a suggestions why my simulation is crashing ?

Best regards
Kai


edit: Sorry, my mixed the U and the alpha.water file up, now the correct files are displayed.

piu58 August 22, 2021 10:20

Such problems mostly arise form incorrect boundary conditions. I recommend starting wit the simplest possible geomatry (a 2D tube) but the full physics and get this to work. Then you may change to more complicated arrangements.

ybapat August 23, 2021 06:10

You can try to extend outlet if reverse flow is observed.

-Yogesh

Kahnbein.Kai August 24, 2021 12:44

Thank you for your advices.
I dont write this in my first post. I like to simulate a velocity inlet (Water) and a 0 pressure outlet (Water).

To test my boundary conditions i made a 2D and 3D case, also i tested it at the template case waterChannel.

At the waterChannel template case, i switch all the divSchemes to first order e. g. Gauss upwind or Gauss linear.

My boundary files look like this:
The alpha.water File:
Code:

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform 1;
    }

    walls
    {
        type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
        value          uniform 0;
    }

    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          uniform 0;
    }
 }

The p_rgh File:
Code:

dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;
    }
   
    outlet
    {
        type        fixedFluxPressure;
        value        uniform 0;
    }

    walls
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
   
    inlet
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }
}

The U File:
Code:

boundaryField
{
    inlet
    {
        type        fixedValue;
        value        uniform (0 0 0.2);
    }

    walls
    {
        type            noSlip;
    }

    atmosphere
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }

    outlet
    {
        type          pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
 }

It works flawlessly, the water comes in and goes out, no high velocity's at the atmo or outlet patch.



I applied these same boundary conditions at my 2D and 3D testcase the also work but there is no water outflow out of the geometry, so the waterlevel rises ?! :eek::confused:


How is that possible ?



Best regards
Kai

Kahnbein.Kai August 24, 2021 14:35

I tested a little bit further, im a bit confused about the boundary conditions...


The boundary condition in p_rgh, fixedFluxPressure or fixedValue for the outlet are critical.


At the waterChannel case, i set fixedFluxPressure at the outlet p_rgh file.
The case worked and i got outflow out of the geometry.
Even i make a setFieldsDict and start with alpha.phase 1 inside the geometry instead of 0 overall.


At my 2D case, if i set fixedFluxPressure at my outlet, i only get outflow when the geometry is only prefilled with alpha.phase 0.

If the outletpatch is half filled with alpha.phase 1 i get a crash.
If the outletpatch is complete "under" water i get no outflow.


At a prefill with alpha.phase 1, i need to change the boundary condition to fixedValue at the outlet, to get a outflow.


My 3D Testcase i get always a crash with fixedFluxPressure at the outlet.


Best regards Kai


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