|
[Sponsors] |
January 21, 2014, 06:35 |
topoChangerFvMesh doesn't work in parallel
|
#1 | |
New Member
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 17 |
Hi Foamers,
I am working on needle transient motion of injectors and I have implemented my own class with layer removal based on movingTopoFvMesh. The injector mesh is converted from a fluent mesh. What I did is to find the patch, say NEEDLE with Quote:
The code is working in serial mode (attached pictures), however failed in parallel. Serial log file Create mesh for time = 0.0002 Selecting dynamicFvMesh needleTopoFvMesh Initial time:0.0002 Initial curMotionVel_0 0 1) Time = 0.0002 Adding zones and modifiers to the mesh patchID = 1 cPatch = type wall; nFaces 20732; startFace 3529376; number of face in zone1 20732 Adding mesh zones. Adding 1 mesh modifiers patchID = 1 number of points marked 20986 .... reading data.... time:0.0002000017749 curMotionVel_0 0 1) No topology change Executing mesh motion Execution time for mesh.update() = 1.67 s ..... flow calculation ..... Total Volume change = -3.598473946e-15 ExecutionTime = 31.52 s Parallel log file Selecting dynamicFvMesh needleTopoFvMesh [0] Initial time:0.0002 Initial curMotionVel_0 0 1) Time = 0.0002 Adding zones and modifiers to the mesh [1] Initial time:0.0002 Initial curMotionVel_0 0 1) [2] Initial time:0.0002 Initial curMotionVel_0 0 1) [3] Initial time:0.0002 Initial curMotionVel_0 0 1) patchID = 1 cPatch = type wall; nFaces 0; startFace 879157; number of face in zone1 0 Adding mesh zones. Adding 1 mesh modifiers patchID = 1 number of points marked 0 .... reading data.... time:0.0002000017749 curMotionVel_0 0 1) No topology change Executing mesh motion Execution time for mesh.update() = 1.67 s ..... flow calculation ..... Total Volume change = 0 ExecutionTime = 14.72 s Apparently when running in parallel (4 procs), polyPatch& cPatch = boundaryMesh()[patchID] failed to create the polyPatch. I am running on 2.2.x. I would really appreciate some help on this! Have a nice day!
__________________
Cheers, Leslie LU |
||
January 21, 2014, 06:48 |
|
#2 | |
New Member
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 17 |
Quote:
However I did a test with a simple mesh created by blockMesh (attached pictures). In that case the code IS WORKING in PARALLEL! I am using scotch decomposition method. I checked that in this simple test case, the moving patch is distributed evenly on 4 processors. In case/constant/polyMesh/boundary NEEDLE { type wall; nFaces 80; startFace 4770; And the parallel log file: Create mesh for time = 0 Selecting dynamicFvMesh needleTopoFvMesh [1] Initial time:0 Initial curMotionVel_0 0.1 0) [2] Initial time:0 Initial curMotionVel_0 0.1 0) [3] Initial time:0 Initial curMotionVel_0 0.1 0) [0] Initial time:0 Initial curMotionVel_0 0.1 0) Time = 0 Adding zones and modifiers to the mesh patchID = 1 cPatch = type wall; nFaces 20; startFace 1170; number of face in zone1 20 Adding mesh zones. Adding 1 mesh modifiers patchID = 1 number of points marked 42 What is the mysterious reason behind all of this?
__________________
Cheers, Leslie LU |
||
January 21, 2014, 11:42 |
|
#3 | |
New Member
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 17 |
Quote:
The 2nd simple case works in parallel only when it is 2D. When I run it in 3D, parallelization failed also.
__________________
Cheers, Leslie LU |
||
January 22, 2014, 09:04 |
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
You need foam-extend-3.0 Parallel topo changes are one of the new things I have done for this release. Please beware: if you have written your own dynamic fvMesh class, you may need to update it to handle parallelisation as well.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
February 10, 2014, 11:42 |
|
#5 | |
New Member
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 17 |
Quote:
However the movingConeTopo tutorial crashes, log file indicates: Volume: new = 1.768551e-09 old = 1.768573998e-09 change = 2.299798524e-14 Courant Number mean: 196.2985037 max: 1992315.801 velocity magnitude: 1077.436077 deltaT = 1.277645154e-09 Time = 0.4066660041 --> FOAM FATAL ERROR: negative cell volume. Error in mesh motion before topological change. From function bool layerAdditionRemoval::changeTopology() const in file polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.C at line 295. FOAM aborting Aborted (core dumped)
__________________
Cheers, Leslie LU |
||
February 10, 2014, 13:11 |
|
#6 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Fixed and about to push:
BUGFIX/cellLayering Apologies, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
May 26, 2020, 10:15 |
Negative volume cells with movingBodyTopoFvMesh
|
#7 |
New Member
bercan siyahhan
Join Date: Oct 2009
Posts: 3
Rep Power: 17 |
Hello All
I am recently experimenting with mesh motion in foam-extend-4.1. Using a 2D mesh I was able to implement some mesh motion successfully but when I tried to move to 3D I get an error due to negative cell volumes. --> FOAM FATAL ERROR: negative cell volume. Error in mesh motion before topological change. From function bool layerAdditionRemoval::changeTopology() const in file polyMeshModifiers/layerAdditionRemoval/layerAdditionRemoval.C at line 306. FOAM aborting Aborted (core dumped) The case is quite simple a cube within a channel and what I observe is that the error occurs first time when a layer is to be added. Instead of adding the layer inside the enlarged one it is added next to it, as it has negative volumes. Am I missing something real simple here, perhaps using a wrong convention in mesh or zone definitions? |
|
April 19, 2021, 01:51 |
|
#8 |
Member
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 85
Rep Power: 6 |
I am quite new to OpenFoam but i think the negative volume arises when the layer movement is faster than the removal resulting in negative cell volume. try lowering the timer step or maybe the layering is not working.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error while running in parallel using openmpi on local mc 6 processors | suryawanshi_nitin | OpenFOAM | 10 | February 22, 2017 22:33 |
Parallel processing problem | newbie29 | OpenFOAM Running, Solving & CFD | 1 | June 22, 2012 05:23 |
CFX parallel multi-node jobs fail w/ SLURM on Ubuntu 10.04 | danieru | CFX | 0 | February 17, 2012 07:20 |
Cases with small length scale work fine on a single processor but fail in parallel | adona058 | OpenFOAM Bugs | 5 | April 17, 2009 05:41 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |