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/)
-   -   Transient boundary conditions (https://www.cfd-online.com/Forums/openfoam-solving/147797-transient-boundary-conditions.html)

Svensen January 29, 2015 10:26

Transient boundary conditions
 
5 Attachment(s)
I try to repeat the native experiment using OpenFOAM 2.3.0. Solver pimpleFoam is used. The domain has a complex form with one inlet and one outlet. For boundary conditions it was setted values of velocity at inlet and pressure at outlet. The flow is laminar, fluid is newtonian.
According to experimental data the velocity at inlet and pressure at outlet are trancient.
In the simple case, when I fixed the values for them (using fixedValue), I've got a good results (files "statics_*.png).
But when I tried to make the trancient boundary conditions, at the inlet there are oscillations for pressure, which doesn't correlate with experimental data (files "trancient_*.png").
I think that error is in the boundary condition for P at the inlet. It seems to me that "zeroGradient" have to be replaced by something else, but I don't know what type fo BC I need to use for this BC at inlet. Could someone help me ??


BC for velocity:
Code:

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

internalField  uniform (0 0 0);

boundaryField
{
    inlet
    {
    type            uniformFixedValue;
        uniformValue    tableFile;
        tableFileCoeffs
        {
            fileName    "$FOAM_CASE/bc/inlet_velocity.bc"
            outOfBounds  repeat;
        }
    }

    outlet
    {
        type        zeroGradient;
    }

    vessel
    {
        type    fixedValue;
        value    uniform (0 0 0);
    }
}

BC for pressure:
Code:

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

internalField  uniform 9.421284545;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            uniformFixedValue;
        uniformValue    tableFile;
        tableFileCoeffs
        {
            fileName    "$FOAM_CASE/bc/outlet_pressure.bc"
            outOfBounds  repeat;
        }
    }

    vessel
    {
        type            zeroGradient;
    }
}

file controlDict:
Code:

application    pimpleFoam;
startFrom      startTime;
startTime      0;
stopAt          endTime;
endTime        2;
deltaT          0.001;
writeControl    adjustableRunTime;
writeInterval  0.1;
purgeWrite      0;
writeFormat    binary;
writePrecision  6;
writeCompression uncompressed;
timeFormat      general;
timePrecision  6;
runTimeModifiable true;

adjustTimeStep  yes;
maxCo          1;
maxAlphaCo    1;
maxDeltaT    0.1;

file fvSolution:
Code:

solvers
{
    p
    {
        solver          GAMG;
        tolerance      1e-06;
        relTol          0.01;
        smoother        GaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels    1;
    }

    pFinal
    {
        solver          GAMG;
        tolerance      1e-06;
        relTol          0;
        smoother        GaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels    1;
    }

    "(U|k|epsilon)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-05;
        relTol          0.1;
    }

    "(U|k|epsilon)Final"
    {
        $U;
        tolerance      1e-05;
        relTol          0;
    }
}

PIMPLE
{
    nOuterCorrectors 2;
    nCorrectors    4;
    nNonOrthogonalCorrectors 5;
    pRefCell        0;
    pRefValue      0;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        "U.*"          1;
        "k.*"          1;
        "epsilon.*"    1;
    }
}



All times are GMT -4. The time now is 14:00.