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

topoChangerFvMesh doesn't work in parallel

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2014, 05:35
Default topoChangerFvMesh doesn't work in parallel
  #1
New Member
 
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 16
LESlie is on a distinguished road
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:
label patchID = boundaryMesh().findPatchID("NEEDLE");

Info << "patchID = " << patchID << endl;

const polyPatch& cPatch = boundaryMesh()[patchID];
then put the faces of this polyPatch as extrusion faces for the mesh modifier, and also mark the points on these faces for the motion, so that only these points will be moved.

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!
Attached Images
File Type: jpg 1.jpg (97.5 KB, 55 views)
File Type: jpg 2.jpg (97.2 KB, 46 views)
File Type: jpg 3.jpg (97.6 KB, 43 views)
__________________
Cheers,
Leslie LU

LESlie is offline   Reply With Quote

Old   January 21, 2014, 05:48
Default
  #2
New Member
 
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 16
LESlie is on a distinguished road
Quote:
Originally Posted by LESlie View Post
Hi Foamers,

The code is working in serial mode (attached pictures), however failed in parallel.

I am running on 2.2.x.

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?
Attached Images
File Type: jpg simple1.jpg (37.8 KB, 38 views)
File Type: jpg simple2.jpg (37.4 KB, 32 views)
File Type: jpg simple3.jpg (36.8 KB, 33 views)
__________________
Cheers,
Leslie LU

LESlie is offline   Reply With Quote

Old   January 21, 2014, 10:42
Default
  #3
New Member
 
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 16
LESlie is on a distinguished road
Quote:
Originally Posted by LESlie View Post
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.
It's me again.

The 2nd simple case works in parallel only when it is 2D. When I run it in 3D, parallelization failed also.
__________________
Cheers,
Leslie LU

LESlie is offline   Reply With Quote

Old   January 22, 2014, 08:04
Default
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
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
hjasak is offline   Reply With Quote

Old   February 10, 2014, 10:42
Default
  #5
New Member
 
NaiXian Leslie Lu
Join Date: Jun 2009
Location: France
Posts: 26
Rep Power: 16
LESlie is on a distinguished road
Quote:
Originally Posted by hjasak View Post
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
Thanks for the reply.

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

LESlie is offline   Reply With Quote

Old   February 10, 2014, 12:11
Default
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Fixed and about to push:

BUGFIX/cellLayering

Apologies,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 26, 2020, 09:15
Default Negative volume cells with movingBodyTopoFvMesh
  #7
New Member
 
bercan siyahhan
Join Date: Oct 2009
Posts: 3
Rep Power: 16
bsiyahhan is on a distinguished road
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?
bsiyahhan is offline   Reply With Quote

Old   April 19, 2021, 00:51
Default
  #8
Member
 
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 79
Rep Power: 6
2538sukham is on a distinguished road
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.
2538sukham is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
error while running in parallel using openmpi on local mc 6 processors suryawanshi_nitin OpenFOAM 10 February 22, 2017 21:33
Parallel processing problem newbie29 OpenFOAM Running, Solving & CFD 1 June 22, 2012 04:23
CFX parallel multi-node jobs fail w/ SLURM on Ubuntu 10.04 danieru CFX 0 February 17, 2012 06:20
Cases with small length scale work fine on a single processor but fail in parallel adona058 OpenFOAM Bugs 5 April 17, 2009 04:41
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 00:32.