# Problem - simulation crashes by changing flow velocity

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 2, 2015, 10:20 Problem - simulation crashes by changing flow velocity #1 Member   Join Date: Dec 2014 Posts: 50 Rep Power: 11 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

 February 2, 2015, 10:33 #2 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,938 Rep Power: 38 Hi, What is a value of your initial time step?

 February 2, 2015, 11:20 #3 Member   Join Date: Dec 2014 Posts: 50 Rep Power: 11 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;```

 February 2, 2015, 11:23 #4 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,938 Rep Power: 38 Hi, OK. Now find minimum cell size of your mesh, take your initial time step and calculate Co.

 February 2, 2015, 11:32 #5 Member   Join Date: Dec 2014 Posts: 50 Rep Power: 11 Hi again, Do you mean I have to look for my smallest cell size of my mesh? In this case it is 0.00636324.

 February 2, 2015, 11:45 #6 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,938 Rep Power: 38 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?

 February 2, 2015, 15:02 #7 Member   Join Date: Dec 2014 Posts: 50 Rep Power: 11 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; } }```

 February 3, 2015, 02:43 #8 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,938 Rep Power: 38 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.

 February 3, 2015, 04:44 #9 Senior Member   Olivier Join Date: Jun 2009 Location: France, grenoble Posts: 272 Rep Power: 18 hello, You use totalPressure for p at outlet, so you should use pressure(InletOutlet, ...)Velocity BC familly for U at outlet too. regards, olivier

 February 3, 2015, 05:38 #10 Member   Join Date: Dec 2014 Posts: 50 Rep Power: 11 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?

 February 3, 2015, 06:02 #11 Senior Member   Olivier Join Date: Jun 2009 Location: France, grenoble Posts: 272 Rep Power: 18 hello, Just try pressureInletOutletVelocity. regards, olivier

 February 3, 2015, 06:17 #12 Member   Join Date: Dec 2014 Posts: 50 Rep Power: 11 Just like this? 0/U Code: ``` outlet { type pressureInletOutletVelocity; value uniform (0 0 0); }```

February 4, 2015, 06:35
#13
Member

Join Date: Dec 2014
Posts: 50
Rep Power: 11
Quote:
 Originally Posted by 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.
Dear Alexey,

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

Thanks.
Harak

 February 4, 2015, 06:55 #14 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,938 Rep Power: 38 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.

February 4, 2015, 07:51
#15
Member

Join Date: Dec 2014
Posts: 50
Rep Power: 11
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!
Attached Files
 zweiBalken.tar.gz (4.1 KB, 2 views)

February 12, 2015, 06:27
#16
Member

Join Date: Dec 2014
Posts: 50
Rep Power: 11
Quote:
 Originally Posted by 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.
Hey Alexey,

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

Thanks!

 February 12, 2015, 06:58 #17 Senior Member   Alexey Matveichev Join Date: Aug 2011 Location: Nancy, France Posts: 1,938 Rep Power: 38 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.

 February 12, 2015, 07:10 #18 New Member   Andrew Smith Join Date: Jan 2015 Location: North Dakota Posts: 24 Rep Power: 11 I did not know about the NDA Thanx man

February 12, 2015, 09:10
#19
Member

Join Date: Dec 2014
Posts: 50
Rep Power: 11
Quote:
 Originally Posted by alexeym 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

 February 12, 2015, 23:26 #20 New Member   Andrew Smith Join Date: Jan 2015 Location: North Dakota Posts: 24 Rep Power: 11 Really, is it system limitation? Advice: Your mesh can be handled with present system configuration

 Tags courant number, icofsifoam