View Issue Details

IDProjectCategoryView StatusLast Update
0000786OpenFOAMBugpublic2014-02-18 09:04
Reporteruser331Assigned Touser4 
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSuseOS Version12.2
Summary0000786: New fvMesh breaks attachDetach polyTopoChange
DescriptionAfter having figured out how to get the attachDetach polyTopoChanger to work in 2.1.x, I saw that 2.2.x seems to break it. Looking through the source code it seems the issue occurs in fvMesh that is the only piece of code in common that has changed. When attaching boundaries, the connectivity is all wrong. I've attached a sample case and a picture that explains it better.
Steps To Reproduce1. Extract TJunctionOpenFirstIncomp.tar.gz
2. Execute the Allrun
Additional InformationThis also prevents the case from being restarted if the mesh modifier has been executed. It seems like the case is loading the constant time mesh and executing the topochanger at the first time step, which fails spectacularly.
TagsNo tags attached.

Activities

user331

2013-03-15 18:00

 

user331

2013-03-15 18:00

 

twistPanel.png (28,099 bytes)   
twistPanel.png (28,099 bytes)   

henry

2013-03-21 17:35

manager   ~0002034

Does this case work with OpenFOAM-2.2.0?

user331

2013-03-21 17:56

  ~0002035

Last edited: 2013-03-21 18:02

It works for the boundary detach, when the faceZone is turned into boundary patches (I have the "valve" set to be initially open, then to close, then to open again). The failure occurs when the boundaries are attached and the mesh is reconnected.

I was trying the compressible case and the thermo model fails at detachment, which I thought was the fault of the thermo model but only running an incompressible version revealed what was going on with the mesh.

This case did work with 2.1.x

henry

2013-03-21 17:58

manager   ~0002036

Is there a difference in behaviour for this case between 2.2.0 and 2.2.x?

user331

2013-03-21 18:01

  ~0002037

The difference is in how the mesh is reconnected when boundaries are attached. I noticed that running renumberMesh doesn't put the faces in a faceZone in numerical order.

henry

2013-03-21 18:04

manager   ~0002038

Does it run in either 2.2.0 or 2.2.x if you do not use renumberMesh?

user331

2013-03-21 18:17

  ~0002039

Last edited: 2013-03-21 18:18

The same error occurs even when not using renumberMesh. I just realized my additional note is inaccurate: the simulation fails right after the boundaries are removed at 1s.

henry

2013-03-21 19:24

manager   ~0002040

I am not sure what renumberMesh has to do with the issue, should it be applied or not?

user331

2013-03-21 19:27

  ~0002041

It was to allow running the case in debug mode, as attachDetach complains if the faces in the faceZone are out of order.

henry

2013-03-21 19:56

manager   ~0002042

How does renumberMesh help you run in debug mode?

henry

2013-03-21 20:03

manager   ~0002043

The instructions to reproduce tho problem are very confusing, it is not at all clear if renumberMesh is needed or not. Could you provide the steps to reproduce the problem and the log files you get of the failure in 2.2.0 and 2.2.x?

user331

2013-03-21 20:12

  ~0002044

Just download the tarball, extract it and run the Allrun script. If you want you can comment out the call to renumberMesh. It makes no difference.

henry

2013-03-21 21:22

manager   ~0002045

Could you also supply the log files you get of the failure in 2.2.0 and 2.2.x?

user331

2013-03-21 22:39

 

log.incompressible.tar.gz (634,180 bytes)

user331

2013-03-21 22:41

  ~0002046

Just uploaded the log. It crashes because the mesh get screwed up so badly, so not sure if it will be much help. I would examine the polyMesh directory.

henry

2013-03-22 07:42

manager   ~0002047

I see the log for the run in 2.2.x but not the one in 2.2.0, could you upload that one as well?

user331

2013-03-22 18:01

  ~0002052

Last edited: 2013-03-22 18:04

Just uploaded a truncated log; in 2.2.0 the case never actually crashes, but the timestep keeps dropping down to past 1e-66.

You will need to use the downgraded incompressible turbulence (incompressibleTurb22.tar.gz) model included (just limits k and epsilon at topology change).

user331

2013-03-22 18:01

 

user331

2013-03-22 18:02

 

user331

2013-03-22 18:42

  ~0002053

Last edited: 2013-03-22 18:44

I've also uploaded an image from ParaFoam of the grid at 1.0 s (when the internal boundaries are removed). I have isolated the group of cells at the junction and expanded it so you can see the issue with how the mesh is reconnected.

Henry: I also realized I completely mis-read your comment about difference between 2.2.0 and 2.2.x (busy times in my office). There is no difference between the 2.2.0 and 2.2.x cases. Sorry about the confusion.

user331

2013-03-22 18:42

 

twist2.png (21,986 bytes)   
twist2.png (21,986 bytes)   

henry

2013-03-25 11:27

manager   ~0002056

> This case did work with 2.1.x

I have just tested this case in OpenFOAM-2.1.x and the attach fails in the same way an with 2.2.0 and 2.2.x. Could you please supply the version of the case and code which works with 2.1.x?

henry

2013-03-25 16:46

manager   ~0002066

We have resolved the mapping issues following the creation of new boundary faces from detachment so you no longer need the hacks in the turbulence and transport models to limit the unset values.

See commit 36ef5464ffc10713b78a9f0064dbab0a77f208d8

user331

2013-03-25 20:15

 

user331

2013-03-25 20:24

  ~0002069

Thanks for that fix. I've uploaded the 2.1.x case. One thing I noticed is that if I don't run renumber mesh, the case stops working. Investigating further, I see that the problem is that the faceZones are not in ascending order.

I copied over the 2.1.x faceZone file to the 2.2.x case and it was able to work. So the easiest (I think) fix would be to make sure topoSet and renumberMesh order point/face/cellZones. I will try the commit and see if I can get the 2.2.x case to work without turbulence/transport hacks.

user4

2013-03-26 08:48

  ~0002071

forgot to push: ordering of faceZones fix 45d31df6883e1a98f05084625641b20e698bb5ae.

user331

2013-03-26 17:43

  ~0002073

Last edited: 2013-03-26 18:16

Confirmed that faceZone and mapping fixes resolve the problems. I'm going to see if this also carries over the the compressible case and the mapping of new boundary faces in the thermo models.

The faceZones are in order after the topoSet call, but get disordered when renumberMesh is called. Its not critical for this to work, but it seems inconsistent.

EDIT: Fantastic work, I now no longer need to hack the thermophysical properties for compressible flow either.

Issue History

Date Modified Username Field Change
2013-03-15 18:00 user331 New Issue
2013-03-15 18:00 user331 File Added: TJunctionOpenFirstIncomp.tar.gz
2013-03-15 18:00 user331 File Added: twistPanel.png
2013-03-21 17:35 henry Note Added: 0002034
2013-03-21 17:56 user331 Note Added: 0002035
2013-03-21 17:58 henry Note Added: 0002036
2013-03-21 18:01 user331 Note Added: 0002037
2013-03-21 18:02 user331 Note Edited: 0002035
2013-03-21 18:04 henry Note Added: 0002038
2013-03-21 18:17 user331 Note Added: 0002039
2013-03-21 18:18 user331 Note Edited: 0002039
2013-03-21 19:24 henry Note Added: 0002040
2013-03-21 19:27 user331 Note Added: 0002041
2013-03-21 19:56 henry Note Added: 0002042
2013-03-21 20:03 henry Note Added: 0002043
2013-03-21 20:12 user331 Note Added: 0002044
2013-03-21 21:22 henry Note Added: 0002045
2013-03-21 22:39 user331 File Added: log.incompressible.tar.gz
2013-03-21 22:41 user331 Note Added: 0002046
2013-03-22 07:42 henry Note Added: 0002047
2013-03-22 18:01 user331 Note Added: 0002052
2013-03-22 18:01 user331 File Added: log.incompressible22.tar.gz
2013-03-22 18:02 user331 File Added: incompressibleTurb22.tar.gz
2013-03-22 18:04 user331 Note Edited: 0002052
2013-03-22 18:42 user331 Note Added: 0002053
2013-03-22 18:42 user331 File Added: twist2.png
2013-03-22 18:44 user331 Note Edited: 0002053
2013-03-25 11:27 henry Note Added: 0002056
2013-03-25 16:46 henry Note Added: 0002066
2013-03-25 20:15 user331 File Added: TJunctionOpenFirstIncomp21x.tar.gz
2013-03-25 20:24 user331 Note Added: 0002069
2013-03-26 08:48 user4 Note Added: 0002071
2013-03-26 17:43 user331 Note Added: 0002073
2013-03-26 18:16 user331 Note Edited: 0002073
2014-02-18 09:04 user2 Status new => resolved
2014-02-18 09:04 user2 Fixed in Version => 2.2.x
2014-02-18 09:04 user2 Resolution open => fixed
2014-02-18 09:04 user2 Assigned To => user4