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

Problem - simulation crashes by changing flow velocity

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2015, 11:20
Default Problem - simulation crashes by changing flow velocity
  #1
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
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
Harak is offline   Reply With Quote

Old   February 2, 2015, 11:33
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

What is a value of your initial time step?
alexeym is offline   Reply With Quote

Old   February 2, 2015, 12:20
Default
  #3
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
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;
Harak is offline   Reply With Quote

Old   February 2, 2015, 12:23
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

OK. Now find minimum cell size of your mesh, take your initial time step and calculate Co.
alexeym is offline   Reply With Quote

Old   February 2, 2015, 12:32
Default
  #5
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
Hi again,

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



In this case it is 0.00636324.
Harak is offline   Reply With Quote

Old   February 2, 2015, 12:45
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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?
alexeym is offline   Reply With Quote

Old   February 2, 2015, 16:02
Default
  #7
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
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;
    }
}
Harak is offline   Reply With Quote

Old   February 3, 2015, 03:43
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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.
alexeym is offline   Reply With Quote

Old   February 3, 2015, 05:44
Default
  #9
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

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

regards,
olivier
olivierG is offline   Reply With Quote

Old   February 3, 2015, 06:38
Default
  #10
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
So, with 4 m/s and timeStep for writeControl and 1 for writeInterval I get the following velocity distribution:
t=1e-5


t=2e-5


t=3e-5


After here, it crashes again.

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

@olivierG
What kind of BC would you suggest?
Harak is offline   Reply With Quote

Old   February 3, 2015, 07:02
Default
  #11
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

Just try pressureInletOutletVelocity.

regards,
olivier
olivierG is offline   Reply With Quote

Old   February 3, 2015, 07:17
Default
  #12
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
Just like this?

0/U

Code:
   
outlet
    {
        type           pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
Harak is offline   Reply With Quote

Old   February 4, 2015, 07:35
Default
  #13
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
Quote:
Originally Posted by alexeym View Post
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
Harak is offline   Reply With Quote

Old   February 4, 2015, 07:55
Default
  #14
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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.
alexeym is offline   Reply With Quote

Old   February 4, 2015, 08:51
Default
  #15
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
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
Attached Files
File Type: gz zweiBalken.tar.gz (4.1 KB, 2 views)
Harak is offline   Reply With Quote

Old   February 12, 2015, 07:27
Default
  #16
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
Quote:
Originally Posted by alexeym View Post
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!
Harak is offline   Reply With Quote

Old   February 12, 2015, 07:58
Default
  #17
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Yes, but without success yet.

NDA is NDA. And as "there is no NDA" you can post the case on the forum.
Harak and Andrew_Sm like this.
alexeym is offline   Reply With Quote

Old   February 12, 2015, 08:10
Default
  #18
New Member
 
Andrew Smith
Join Date: Jan 2015
Location: North Dakota
Posts: 24
Rep Power: 11
Andrew_Sm is on a distinguished road
I did not know about the NDA

Thanx man
Andrew_Sm is offline   Reply With Quote

Old   February 12, 2015, 10:10
Default
  #19
Member
 
Join Date: Dec 2014
Posts: 50
Rep Power: 11
Harak is on a distinguished road
Quote:
Originally Posted by alexeym View Post
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

I'll let you know
Harak is offline   Reply With Quote

Old   February 13, 2015, 00:26
Default
  #20
New Member
 
Andrew Smith
Join Date: Jan 2015
Location: North Dakota
Posts: 24
Rep Power: 11
Andrew_Sm is on a distinguished road
Really, is it system limitation?

Advice: Your mesh can be handled with present system configuration

Andrew_Sm is offline   Reply With Quote

Reply

Tags
courant number, icofsifoam


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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 07:40
Domain format problem on airfoil flow simulation andrenonaka CFX 14 December 7, 2015 01:42
Solidworks Flow Simulation, Problem with Point Goals TomSteventon FloEFD, FloWorks & FloTHERM 2 February 8, 2012 12:02
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 03:13
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


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