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

potentialFoam & simpleFoam crashes after snappyhexmesh [parallel execution]

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By nicholas.jones
  • 1 Post By KateEisenhower
  • 1 Post By Kire
  • 1 Post By nicholas.jones

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2015, 14:55
Default potentialFoam & simpleFoam crashes after snappyhexmesh [parallel execution]
  #1
New Member
 
pilot
Join Date: Oct 2015
Posts: 5
Rep Power: 10
pilot320 is on a distinguished road
Hi everyone,

I am a beginner in this field! And I have a problem that I am facing for several days now without knowing what the cause is or might be, so I thought maybe you can help me figure it out.

The case:I am trying to do calculations on a car on a moving wall. I have copied most of the things from the motorBike tutorial. I have added a residual control to the contradict file and changed some settings on snappyhexmesh like (maxlocalcells 2 mil. maxglobalcells 4 mil. Tolerance 1.0 etc)
I also modified the ./Allrun script for 8 cores on simple (4 2 1) not hierarchical.


Now the problem: When I run it with ./Allrun it works fine and it does the job on 8 cores until snappyHexMesh finishes. After that potentialFoam crashes (I have put the log files below) and because of that simpleFoam crashes as well.

It is weird to me because if the problem would be snappyhexmesh or the STL it would fail at the start and not after snappyhexmesh (I might be wrong). Sometimes it does work though. I am doing a mesh sensitivity analysis for the car and want to figure out at which number of cells the forces are more stable. For example if the blockMesh comprises of 5000 cells it may work but when I increase it to 10000/20000 it crashes and I always get the same error.

In the log files I cannot find anything useful to look for! I have tried everything I have changed the number of cores to 4 to 2 etc. still no luck.

I read somewhere someone saying it may be the solvers or a BC but they are the same for the motorBike!

I hope someone can help me with this problem! (It is really annoying)

Kind regards
Attached Files
File Type: txt potentialFoam.txt (17.1 KB, 20 views)
File Type: txt simpleFoam.txt (15.8 KB, 9 views)
pilot320 is offline   Reply With Quote

Old   October 28, 2015, 04:16
Default
  #2
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hello pilot,

since the simulation crashes after snappyHexMesh, I suspect there is something wrong with your mesh or the changes you made in the input files. Can you make some pictures of your mesh and explain the changes you made in the input files? And please post your controlDict!

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   November 3, 2015, 07:00
Default
  #3
New Member
 
pilot
Join Date: Oct 2015
Posts: 5
Rep Power: 10
pilot320 is on a distinguished road
Hello KateEisenhower,

Sorry for answering you late! (had a busy week)

Attached you can find the files and a preview of the mesh.

The changes I made are;

Controldict -> making the time step 1000 so it hit the error somewhere before that value.

fvSolution -> added a residual control

fvSchemes -> nothing changed here

Snappyhexmesh -> maxLocalCells 2000000; maxGlobalCells 4000000; nSolveIter 300; tolerance 2.0;

As I said previously I want to do a sensitivity analysis, so with the increase of blockmesh cells the surface should be more finer.

Hope you/someone can help me out with this problem!

Thanks

Kind regards
Attached Images
File Type: jpg Screen Shot 2015-11-03 at 12.51.06.jpg (98.2 KB, 42 views)
Attached Files
File Type: txt controlDict.txt (1.3 KB, 10 views)
File Type: txt snappyHexMeshDict.txt (10.0 KB, 10 views)
File Type: txt fvSchemes.txt (1.4 KB, 6 views)
File Type: txt fvSolution.txt (2.1 KB, 14 views)
pilot320 is offline   Reply With Quote

Old   November 3, 2015, 08:52
Default
  #4
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hi pilot,

no problem.

Quote:
For example if the blockMesh comprises of 5000 cells it may work but when I increase it to 10000/20000 it crashes and I always get the same error.
Can you post the checkMesh results for the working 5000, not-working 10000 and not working 20000 cells mesh? What do you mean with "it may work"? Can you reproduce your results?

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   November 4, 2015, 05:50
Default
  #5
New Member
 
pilot
Join Date: Oct 2015
Posts: 5
Rep Power: 10
pilot320 is on a distinguished road
Hello KateEisenhower,

Thank you for the quick reply.

I re-run the cases all over again and for 5000 & 20000 cells it did not work, for 10000 it did work. (Attached you can find the checkmesh results)

Kind regards
Attached Files
File Type: txt checkMesh5000.txt (4.3 KB, 14 views)
File Type: txt checkMesh10000.txt (3.6 KB, 12 views)
File Type: txt checkMesh20000.txt (4.1 KB, 5 views)
pilot320 is offline   Reply With Quote

Old   November 4, 2015, 09:02
Default
  #6
New Member
 
Join Date: Jul 2015
Posts: 23
Rep Power: 10
nicholas.jones is on a distinguished road
Use splitMeshRegions -largestOnly

Your unstable cases have multiple regions with only 1 cell. Take the largest region (will be written to your first timestep), and try again.
KateEisenhower likes this.
nicholas.jones is offline   Reply With Quote

Old   November 5, 2015, 04:53
Default
  #7
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hi Pilot,

I think Nicholas is right. Look at this lines in your output for the 5000 case:
Code:
   *Number of regions: 9
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "constant/cellToRegion"
  <<Writing region 0 with 97583 cells to cellSet region0
  <<Writing region 1 with 1 cells to cellSet region1
  <<Writing region 2 with 1 cells to cellSet region2
  <<Writing region 3 with 1 cells to cellSet region3
  <<Writing region 4 with 1 cells to cellSet region4
  <<Writing region 5 with 1 cells to cellSet region5
  <<Writing region 6 with 1 cells to cellSet region6
  <<Writing region 7 with 1 cells to cellSet region7
  <<Writing region 8 with 1 cells to cellSet region8
You could try what Nicholas suggested, but keep in mind that you are missing 8 cells then.
Also you could try to view the mentioned cells in ParaView and optimize your mesh on that basis. I would also search the forum for this "multiple regions" error.

Come back here if you can't figure it out by yourself. I don't have much experience with snappyHexMesh but I'll try to help.

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   November 8, 2015, 12:32
Default
  #8
New Member
 
pilot
Join Date: Oct 2015
Posts: 5
Rep Power: 10
pilot320 is on a distinguished road
hi Kate & Nicholas,

I have tried what Nicholas mentioned earlier. What I get is a new "0" folder with therein the largest region. I copy them in Constant/Polymesh and re-run snappyhexmesh and it crashes.

Maybe I am doing something wrong. As I am new in this field, can you (Nicholas) perhaps explain what that command exactly do and how we use it?

Thanks in advance!

Kind regards
pilot320 is offline   Reply With Quote

Old   November 9, 2015, 05:11
Default
  #9
New Member
 
Join Date: Jun 2014
Posts: 9
Rep Power: 11
Kire is on a distinguished road
Hi pilot320

It is probably helpful if you can provide a screen shot of the mesh, showing only grids on the rolling road and the chassis surface.

But....I dont think your current snappyHex setting returns a mesh fine enough.

How do I know it?

The change in area/edge size on the car is lots. If a 4-level refinement was fine enough to capture the sharp edges simply on the chassis, that means the base mesh size ( from blockMesh ) would be way too fine for a car shown in the picture you provided. Remember the base mesh is 0-level, and 1-level of refinement halves the 0-level. It is also not hard to spot those coarse cells on the wheels and pillars.

If I were you, I would set 0-level the same size as the wheelbase, and apply successive refinements level by level. I would also fine it handy to increase area and feature edge refinements at the same time by the same amount. To make a rough guess, it might take at least 9 levels of refinements before the cells can capture those sharp edges on the chassis.

Finally, you will probably find it very useful to break down the only STL file into many STL's in order to apply different levels of refinements. I would expect 6 to 7 figures of total elements across the whole computation domain ( as opposed to quarter of a million that you have now ) if you were to use a high-Re turbulence model, for an automotive model like yours
pilot320 likes this.
Kire is offline   Reply With Quote

Old   November 9, 2015, 08:15
Default
  #10
New Member
 
Join Date: Jul 2015
Posts: 23
Rep Power: 10
nicholas.jones is on a distinguished road
As for the split mesh regions, execute the command in the same location as your previous checkMesh.

You will be moving the result of your snappyHexMesh to the solver folder, and using the command to remove the extra regions. The largest region will be moved to your first timestep. Run the solver on the new polyMesh.
pilot320 likes this.
nicholas.jones is offline   Reply With Quote

Old   November 12, 2015, 16:56
Default
  #11
New Member
 
pilot
Join Date: Oct 2015
Posts: 5
Rep Power: 10
pilot320 is on a distinguished road
It finally worked using the splitmeshregion command! Thank you @Kate & @Nicholas!
pilot320 is offline   Reply With Quote

Reply

Tags
crash, error, potentialfoam, simplefoam


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
How to run potentialFoam and simpleFoam together . vmsandip2011 OpenFOAM Running, Solving & CFD 11 April 2, 2021 10:56
potentialFoam giving strange error when initialising simpleFoam maero21 OpenFOAM Running, Solving & CFD 3 October 15, 2013 16:19
[snappyHexMesh] Cyclic BC with snappyHexMesh crashes in multiple processors jgil9 OpenFOAM Meshing & Mesh Conversion 10 September 7, 2013 14:53
SnappyHexMesh OF-1.6-ext crashes on a parallel run norman1981 OpenFOAM Bugs 5 December 7, 2011 12:48
BC for simpleFoam from potentialFoam results Geon-Hong OpenFOAM Running, Solving & CFD 0 April 5, 2011 22:23


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