CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with GroovyBC with two time limits

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Stefanie.S.W.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2019, 06:48
Default Problem with GroovyBC with two time limits
  #1
Member
 
Stefanie Wolf
Join Date: Nov 2018
Location: Aachen
Posts: 32
Rep Power: 8
Stefanie.S.W. is on a distinguished road
Hello everyone,



I am using two groovy inlets and a constant inlet. One inlet is leading to an error message and I can not make out why.
This are my Inlets:

  1. Inlet Water: constant velocity
  2. Inlet Oil: starts with V_oil at t=0. The velocity decreases, at t=805sek V_oil =0.
  3. Inlet Water+LM (Surfactant): Mixture of 3%LM and 97%Water. It starts at t=805sek and stops at t=1409sek. During this time the velocity is constant.
The fist two inlets work fine. The third inlet works until 1408.999 sek. It leads to the following error:
[1] #0 Foam::error:rintStack(Foam::Ostream&) at ??:?
[1] #1 Foam::sigFpe::sigHandler(int) at ??:?
[1] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&)

This is the timestep at which the error "Floating point exception" occurs:



Courant Number mean: 0.111955 max: 0.890235
deltaT = 0.001
Time = 1409

MULES: Solving for alpha.water
water volume fraction, min, max = 0.0145146 -2.49133e-23 1
MULES: Solving for alpha.oil
oil volume fraction, min, max = 0.00164353 -1.24074e-69 1
MULES: Solving for alpha.lm
lm volume fraction, min, max = 0 0 0.03
MULES: Solving for alpha.air
air volume fraction, min, max = 0.983842 0 1
Phase-sum volume fraction, min, max = 1 0.999485 1
MULES: Solving for alpha.water
water volume fraction, min, max = 0.0145148 -3.68429e-23 1
MULES: Solving for alpha.oil
oil volume fraction, min, max = 0.00164353 -2.22909e-67 1
MULES: Solving for alpha.lm
lm volume fraction, min, max = 0 0 0.03
MULES: Solving for alpha.air
air volume fraction, min, max = 0.983842 0 1
Phase-sum volume fraction, min, max = 1 0.997947 1.00593
MULES: Solving for alpha.water
water volume fraction, min, max = 0.0145148 -3.41819e-23 1
MULES: Solving for alpha.oil
oil volume fraction, min, max = 0.00164353 -2.71414e-67 1
MULES: Solving for alpha.lm
lm volume fraction, min, max = 0 0 0
MULES: Solving for alpha.air
air volume fraction, min, max = 0.983842 0 1
Phase-sum volume fraction, min, max = 1 0 1.00586

Following are the files from the 0-Directory


Alpha.water
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;


boundaryField
{
wall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_rain
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
phi phi.water;
}
inlet_oil
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_lml
{
type groovyBC;
valueExpression "time()>805 && time()<1409 ? 0.97 : 0";
value uniform 0;
phi phi.water;
}

defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //
Alpha.lm
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;


boundaryField
{
wall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_rain
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_oil
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_lml
{
type groovyBC;
valueExpression "time()>805 && time()<1409 ? 0.03: 0";
value uniform 0;
phi phi.lm;
}

defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //
U.water
Quote:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
wall
{
type noSlip;
}
atmosphere
{
type pressureInletOutletVelocity;
value $internalField;
phi phi.water;
}
outlet
{
type pressureInletOutletVelocity;
value $internalField;
phi phi.water;
}
inlet_rain
{
type fixedValue;
value uniform (0 -0.010455 0);
phi phi.water;
}
inlet_oil
{
type fixedValue;
value uniform (0 0 0);
}
inlet_lml
{
type groovyBC;
valueExpression "time()>805 && time()<1409 ? vector(0,-(0.039735),0) : vector(0,0,0)";
value uniform (0 0 0);
phi phi.water;
}
}


// ************************************************** *********************** //
U.lm
Quote:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.lm;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
wall
{
type noSlip;
}
atmosphere
{
type pressureInletOutletVelocity;
value $internalField;
phi phi.lm;
}
outlet
{
type pressureInletOutletVelocity;
value $internalField;
phi phi.lm;
}
inlet_rain
{
type fixedValue;
value uniform (0 0 0);
}
inlet_oil
{
type fixedValue;
value uniform (0 0 0);
}
inlet_lml
{
type fixedValue;
value $internalField;
phi phi.lm;
}
}


// ************************************************** *********************** //
Alpha.oil
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;


boundaryField
{
wall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_rain
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_oil
{
type groovyBC;
valueExpression "time()<805 ? 1 : 0";
value uniform 0;
phi phi.oil;
}
inlet_lml
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}

defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //
U.oil
Quote:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
wall
{
type noSlip;
}
atmosphere
{
type pressureInletOutletVelocity;
value $internalField;
phi phi.oil;
}
outlet
{
type pressureInletOutletVelocity;
value $internalField;
phi phi.oil;
}
inlet_rain
{
type fixedValue;
value uniform (0 0 0);
}
inlet_oil
{
type groovyBC;
valueExpression "time()<805 ? vector( 0, -(((805-time())/805)*0.38757764), 0) : vector(0,0,0)";
value uniform (0 0 0);
phi phi.oil;
}
inlet_lml
{
type fixedValue;
value uniform (0 0 0);
}
}


// ************************************************** *********************** //
Alpha.air
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;


boundaryField
{
wall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
phi phi.air;
inletValue uniform 1;
value uniform 1;
}
outlet
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
inlet_rain
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
inlet_oil
{
type groovyBC;
valueExpression "time()<805 ? 0 : 1";
value uniform 0;
}
inlet_lml
{
type groovyBC;
valueExpression "time()<805 ? 1 : 0";
value uniform 0;
}

defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //
U.air
Quote:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0);

boundaryField
{
wall
{
type noSlip;
}
atmosphere
{
type pressureInletOutletVelocity;
phi phi.air;
value $internalField;
}
outlet
{
type pressureInletOutletVelocity;
phi phi.air;
value $internalField;
}
inlet_rain
{
type fixedValue;
value uniform (0 0 0);
}
inlet_oil
{
type fixedValue;
value uniform (0 0 0);
}
inlet_lml
{
type fixedValue;
value uniform (0 0 0);
}
}


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

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

internalField uniform 1e5;

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

inlet_rain
{
type calculated;
value $internalField;
}

inlet_oil
{
type calculated;
value $internalField;
}
inlet_lml
{
type calculated;
value $internalField;
}

outlet
{
type calculated;
value $internalField;
}

atmosphere
{
type calculated;
value $internalField;
}

defaultFaces
{
type empty;
}
}

// ************************************************** *********************** //
p.rgh
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 1e5;

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

inlet_rain
{
type fixedFluxPressure;
value $internalField;
}
inlet_lml
{
type fixedFluxPressure;
value $internalField;
}

inlet_oil
{
type fixedFluxPressure;
value $internalField;
}

outlet
{
type prghPressure;
p $internalField;
value $internalField;
}

atmosphere
{
type prghPressure;
p $internalField;
value $internalField;
}

defaultFaces
{
type empty;
}
}

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

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

internalField uniform 0;

boundaryField
{
wall
{
type nutkWallFunction;
value uniform 0;
}
atmosphere
{
type calculated;
value uniform 0;
}
inlet_oil
{
type calculated;
value uniform 0;
}
inlet_rain
{
type calculated;
value uniform 0;
}
inlet_lml
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
defaultFaces
{
type empty;
}
}


// ************************************************** *********************** //

Does anyone see why the GroovyBC time()<1409 leads to an error?

Thank you for your time and help!
Stefanie.S.W. is offline   Reply With Quote

Old   May 2, 2019, 08:28
Default
  #2
Member
 
Stefanie Wolf
Join Date: Nov 2018
Location: Aachen
Posts: 32
Rep Power: 8
Stefanie.S.W. is on a distinguished road
Hello,



I changed my bc for U.lm to:
inlet_lml
{
type fixedValue;
value $boundaryField; //$internalField;
phi phi.lm;
}



But this did not fix the Inlet.

At sek 1409 I get an error again:

Code:
$ mpirun -np 2 multiphaseEulerFoam -parallel >>log.Solve6
[1] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[1] #1  Foam::sigFpe::sigHandler(int) at ??:?
[1] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
[1] #4  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam"
[1] #5  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseEulerFoam"
[1] #6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"

Do you have any other idea what I have done wrong?



Thank you for your help!
Stefanie
Stefanie.S.W. is offline   Reply With Quote

Old   May 2, 2019, 10:04
Default
  #3
Member
 
Stefanie Wolf
Join Date: Nov 2018
Location: Aachen
Posts: 32
Rep Power: 8
Stefanie.S.W. is on a distinguished road
I found my mistake:

No phase was defined at Inlet_lml after t=1409!
I had to change the bc for alpha.air and now it works.
To test the new case I looked at a smaller time span of 20sek.
(rain: constant inflow, oil: from 0-10 sek, mixture of LM and water: from 10-15 sek).



This is the corrected case:

alpha.air
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0; 


boundaryField
{
    wall
    {
     type zeroGradient;
    }
    atmosphere
    {
        type            inletOutlet;
        phi             phi.air;
        inletValue      uniform 1;
        value           uniform 1;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 1;
        value           uniform 1;
    }
    inlet_rain
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_oil
    {
        type            groovyBC;
        valueExpression "time()<10 ? 0 : 1";
        value           uniform 0;
    }
    inlet_lml
    {
        type            groovyBC;
        valueExpression "time()>10 && time()<15 ? 0 : 1";
        value           uniform 0;
    }

    defaultFaces
    {
        type            empty;
    }
}

alpha.lm
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0; 


boundaryField
{
    wall
    {
        type            zeroGradient;
    }
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_rain
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_oil
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_lml
    {
        type            groovyBC;
        valueExpression "time()>10 && time()<15 ? 0.03: 0";
        value           uniform 0;
        phi             phi.lm;
    }

    defaultFaces
    {
        type            empty;
    }
}

alpha.oil
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0; 


boundaryField
{
    wall
    {
        type            zeroGradient;
    }
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_rain
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_oil
    {
        type            groovyBC;
        valueExpression "time()<10 ? 1 : 0";
        value           uniform 0;
        phi             phi.oil;
    }
    inlet_lml
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }

    defaultFaces
    {
        type            empty;
    }
}

alpha.water
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0; 


boundaryField
{
    wall
    {
        type            zeroGradient;
    }
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_rain
    {
        type            inletOutlet;
        inletValue      uniform 1;
        value           uniform 1;
        phi             phi.water;
    }
    inlet_oil
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    inlet_lml
    {
        type            groovyBC;
        valueExpression "time()>10 && time()<15 ? 0.97 : 0";
        value           uniform 0;
        phi             phi.water;
    }

    defaultFaces
    {
        type            empty;
    }
}

U.lm
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    wall
    {
        type            noSlip;
    }
    atmosphere
    {
        type               pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.lm;
    }
    outlet
   {
        type               pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.lm;
    }
    inlet_rain
     {
        type            fixedValue;
        value           uniform (0 0 0);
     }
    inlet_oil
     {
        type            fixedValue;
        value           uniform (0 0 0);
     }
    inlet_lml
     {
        type            fixedValue;
        value           $internalField;
        phi             phi.lm;
     }
}

U.oil
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    wall
    {
        type            noSlip;
    }
    atmosphere
    {
        type               pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.oil;
    }
    outlet
   {
        type               pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.oil;
    }
    inlet_rain
     {
        type            fixedValue;
        value           uniform (0 0 0);
     }
    inlet_oil
     {
        type            groovyBC;
        valueExpression "time()<10 ? vector( 0, -(((10-time())/10)*0.38757764), 0) : vector(0,0,0)";
        value           uniform (0 0 0);
        phi             phi.oil;
     }
    inlet_lml
     {
        type            fixedValue;
        value           uniform (0 0 0);
     }
}

U.water
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{  
    wall
    {
        type            noSlip;
    }
    atmosphere
    {
        type               pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.water;
    }
    outlet
    {
        type               pressureInletOutletVelocity;
        value              $internalField;
        phi                phi.water;
    }
    inlet_rain
    {
        type                fixedValue; 
        value               uniform (0 -0.010455 0);
        phi                 phi.water;
    }
    inlet_oil
    {
        type                fixedValue; 
        value               uniform (0 0 0);
    }
    inlet_lml
    {
        type              groovyBC;
        valueExpression   "time()>10 && time()<15 ? vector(0,-(0.039735),0) : vector(0,0,0)";
        value             uniform (0 0 0);
        phi               phi.water;       
    }
}
Stefanie.S.W. is offline   Reply With Quote

Reply

Tags
groovybc, multiphase boundary


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up Lid driven Cavity Benchmark with 1M cells for multiple cores puneet336 OpenFOAM Running, Solving & CFD 11 April 7, 2019 01:58
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
a problem with convergence in buoyantSimpleFoam skuznet OpenFOAM Running, Solving & CFD 6 November 15, 2017 13:12
pressure in incompressible solvers e.g. simpleFoam chrizzl OpenFOAM Running, Solving & CFD 13 March 28, 2017 06:49
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


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