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/)
-   -   about slip condition (https://www.cfd-online.com/Forums/openfoam-solving/167204-about-slip-condition.html)

Gautham91 February 25, 2016 08:37

about slip condition
 
hey guys, could someone help me with writing a slip wall condition? should i write slip condition in all the p,U,k,epsilon files?

Also i am trying to have a outlet velocity flowrate and pressure inlet? but somehow the form solver is giving me a floating point error essentially somehow the solver keeps divding something by 0. i cant get to know what is the problem.

thanks guys

Saideep February 25, 2016 09:23

Hi,

It would be more useful if you can explain the solver you are using. When you have a floating point error there are several ways to debug.

1. write Info << "output" << endl; /*see where the run stops*/
2. using gdb etc.
3. and easiest start from scratch and test a solver test case and progress from thereon.

Hope this helps,
Saideep

Gautham91 February 25, 2016 09:32

Well,
i will explain my problem, essentially i am trying to simulate a flow inside a tank with a slip boundary condition at the bottom wall. I am using simpleFoam k epsilon model. and the run stops after 0.6. I started my work from the motorbike solver essentially because it has a slip condition too. let me know if you want more information.

thanks,
Gautham


btw this is the error i get

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5 Foam::RASModels::kEpsilon<Foam::IncompressibleTurb ulenceModel<Foam::transportModel> >::correct() at ??:?
#6 ? at ??:?
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 ? at ??:?
Floating point exception (core dumped)

Gautham91 February 25, 2016 09:46

and i am including my U

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform (0 0 0);

boundaryField
{
    wall
    {
        type            fixedValue;
        value          $internalField;
    }

    inlet
    {
        type            flowRateInletVelocity;
        volumetricFlowRate  constant 0.044;
    }
    outlet
    {
        type            inletOutlet;
        value          $internalField;
        inletValue      uniform (0 0 0);
    }
    bottom_wall
    {
    type        slip;
    }

}

p
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0;

boundaryField
{

    wall
    {
        type            zeroGradient;
    }

    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value          $internalField;
    }
    bottom_wall
    {
    type        slip;
    }

}

epsilon

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//type            turbulentMixingLengthDissipationRateInlet;
//mixingLength    0.005;

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

internalField  uniform 0.125;

boundaryField
{
    wall
    {
        type            epsilonWallFunction;
        value          $internalField;
    }

    inlet
    {
        type            turbulentMixingLengthDissipationRateInlet;
        mixingLength    0.006;
        value          $internalField;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      $internalField;
        value          $internalField;
    }

    bottom_wall
    {
        type            slip;
    }

}

k

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    location    "0";
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.04;

boundaryField
{

    wall
    {
        type            kqRWallFunction;
        value          uniform 0.04;
    }

    inlet
    {
        type            turbulentIntensityKineticEnergyInlet;
        intensity      0.05;
        value          uniform 1;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value          $internalField;
    }
    bottom_wall
    {
        type            slip;
    }


}



All times are GMT -4. The time now is 06:37.