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/)
-   -   Problem - simulation crashes by changing flow velocity (https://www.cfd-online.com/Forums/openfoam-solving/147971-problem-simulation-crashes-changing-flow-velocity.html)

Harak February 2, 2015 10:20

Problem - simulation crashes by changing flow velocity
 
Hi foamers,

I've modified the icoFsiFoam tutorial so that I have two beams one after the other. I want to investigate how the second one affects the flow field.

The original flow velocity at the inlet was 4 m/s but I have to change it to 1.5 m/s because the simulation crashes - too high Courant numbers.

What do I have to change to make the simulation possible to run with 4 m/s or even higher inlet velocities? I've already adjusted the time step dynamically with adjustableRunTime and set the maximal Courant number to be 0.5.

Thanks in advance!
Harak

alexeym February 2, 2015 10:33

Hi,

What is a value of your initial time step?

Harak February 2, 2015 11:20

Hi alexeym,

Thanks for the quick reply.

This is how my controlDict looks like:

Code:

application icoFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        15;

deltaT          0.0003;

writeControl    adjustableRunTime;

writeInterval  0.006;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression compressed;

timeFormat      general;

timePrecision  6;

runTimeModifiable yes;

adjustTimeStep    yes;

maxCo            0.5;

maxDeltaT      1;


alexeym February 2, 2015 11:23

Hi,

OK. Now find minimum cell size of your mesh, take your initial time step and calculate Co.

Harak February 2, 2015 11:32

Hi again,

Do you mean I have to look for my smallest cell size of my mesh?

http://s12.postimg.org/sap3c48u5/Mesh.png

In this case it is 0.00636324.

alexeym February 2, 2015 11:45

Well, I meant that you need to calculate Courant number using your inlet velocity, initial time step and minimum mesh cell size (in fact min(Vi/Ai)).

So questions:

1. What happens if you reduce deltaT (let's say 1e-5) instead of inlet velocity?

2. Though mesh seems to be fine, can you post checkMesh output?

3. Can you post actual error message?

4. Your initial and boundary conditions?

Harak February 2, 2015 15:02

I really appreciate your help!
What does min(Vi/Ai) mean? Is it the smallest cell size in x and y-direction?

1. I tried it with 1e-5 and with the original inlet velocity and it crashes.
https://dl.dropboxusercontent.com/u/...log.icoFsiFoam

2. This is checkMesh:
Code:

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          16982
    internal points:  0
    faces:            33090
    internal faces:  16110
    cells:            8200
    faces per cell:  6
    boundary patches: 6
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    8200
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch              Faces    Points  Surface topology                 
    consoleFluid        90      184      ok (non-closed singly connected) 
    topWall            210      422      ok (non-closed singly connected) 
    bottomWall          200      406      ok (non-closed singly connected) 
    outlet              40      82      ok (non-closed singly connected) 
    inlet              40      82      ok (non-closed singly connected) 
    defaultFaces        16400    16982    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (0 0 -0.1) (6 1 0.1)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-4.80596e-18 2.03681e-17 -5.57077e-16) OK.
    Max cell openness = 2.07536e-16 OK.
    Max aspect ratio = 10.3374 OK.
    Minimum face area = 8.80291e-05. Maximum face area = 0.0246864.  Face area magnitudes OK.
    Min volume = 1.76058e-05. Max volume = 0.00147382.  Total volume = 1.188.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.3789e-10 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End

3. The error message can be seen in 1. It's called "Floating point exception (core dumped)"

4. motionU
Code:

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

internalField  uniform (0 0 0);

boundaryField
{

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

topWall
{
    type slip;
}

bottomWall
{
    type slip;
}

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

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

frontAndBackPlanes
{
    type empty;
}

}

p
Code:

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

internalField  uniform 0;

boundaryField
{
    consoleFluid
    {
        type            zeroGradient;
    }
    topWall
    {
        type            zeroGradient;
    }
    bottomWall
    {
        type            zeroGradient;
    }
    outlet
    {
        type            totalPressure;
        p0              uniform 0;
        U              U;
        phi            phi;
        rho            none;
        psi            none;
        gamma          1;
        value          uniform 0;
    }
    inlet
    {
        type            zeroGradient;
    }
    frontAndBackPlanes
    {
        type            empty;
    }
}

And finally U
Code:

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

internalField  uniform (0 0 0);

boundaryField
{
    consoleFluid
    {
        type            movingWallVelocity;
        value          uniform (0 0 0);
    }
    topWall
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    bottomWall
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    inlet
    {
        type            fixedValue;
        value          uniform (4 0 0);
    }
    frontAndBackPlanes
    {
        type            empty;
    }
}


alexeym February 3, 2015 02:43

Hi,

1. Yes, it is minimum size of the mesh in x or y direction. Here's how OpenFOAM calculates Courant number:

Code:

CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
2. As you can make a few steps, can you change writeControl and writeInterval to

Code:

writeControl    timeStep;

writeInterval  1;

and post velocity distribution screenshot? To see location, where you get high velocity.

olivierG February 3, 2015 04:44

hello,

You use totalPressure for p at outlet, so you should use pressure(InletOutlet, ...)Velocity BC familly for U at outlet too.

regards,
olivier

Harak February 3, 2015 05:38

So, with 4 m/s and timeStep for writeControl and 1 for writeInterval I get the following velocity distribution:
t=1e-5
http://s3.postimg.org/pj67u8czn/velocity1.png

t=2e-5
http://s28.postimg.org/cd9yo2wrh/velocity2.png

t=3e-5
http://s13.postimg.org/ll77kdeqv/velocity3.png

After here, it crashes again.

And again logfile:
https://dl.dropboxusercontent.com/u/...tydistribution

@olivierG
What kind of BC would you suggest?

olivierG February 3, 2015 06:02

hello,

Just try pressureInletOutletVelocity.

regards,
olivier

Harak February 3, 2015 06:17

Just like this?

0/U

Code:

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


Harak February 4, 2015 06:35

Quote:

Originally Posted by alexeym (Post 530104)
Hi,

1. Yes, it is minimum size of the mesh in x or y direction. Here's how OpenFOAM calculates Courant number:

Code:

CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
2. As you can make a few steps, can you change writeControl and writeInterval to

Code:

writeControl    timeStep;

writeInterval  1;

and post velocity distribution screenshot? To see location, where you get high velocity.

Dear Alexey,

Have you had the opportunity to have a look at my case?
I'm stuck..

Really appreciate your help!

Thanks.
Harak

alexeym February 4, 2015 06:55

Hi,

Change of BC did not help?

Please attach archive of the case, it'll be simpler; guess there no NDA as you've posted mesh and screenshots.

Harak February 4, 2015 07:51

1 Attachment(s)
Unfortunately, it didn't.

In this configuration I can only run the simulation at 1.5 m/s.

And another question: Why does the simulation crash, too, when I change the E-Module in the mechanicalProperties in solid? For example from 2e+6 to 2e+3.

I would be stranded without your help!
Thanks in advance :)

Harak February 12, 2015 06:27

Quote:

Originally Posted by alexeym (Post 530350)
Hi,

Change of BC did not help?

Please attach archive of the case, it'll be simpler; guess there no NDA as you've posted mesh and screenshots.

Hey Alexey,

have you had time to look over it?
And, what do you mean with "..there no NDA.."?

Thanks!

alexeym February 12, 2015 06:58

Hi,

Yes, but without success yet.

NDA is NDA. And as "there is no NDA" you can post the case on the forum.

Andrew_Sm February 12, 2015 07:10

I did not know about the NDA

Thanx man :)

Harak February 12, 2015 09:10

Quote:

Originally Posted by alexeym (Post 531559)
Hi,

Yes, but without success yet.

NDA is NDA. And as "there is no NDA" you can post the case on the forum.

First of all, thanks for the explanation of NDA.

I talked to my supervisor regarding this problem and he assumed that it could be because of my limited computer ressources (I've got an old Notebook with 4GB RAM). As soon foam-extend is installed on the super-computers of my department, I'll try to run it over there.
Maybe it was just as easy as that :D

I'll let you know :)

Andrew_Sm February 12, 2015 23:26

Really, is it system limitation?

Advice: Your mesh can be handled with present system configuration

:)


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