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

Poisson eq w setReference works serial diverges in parallel

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By hjasak
  • 1 Post By mchurchf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2007, 10:18
Default Hi everybody, I am having p
  #1
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17
tehache is on a distinguished road
Hi everybody,

I am having problems with a simple Poisson equation.
I am calculating the influence of static magnetic fields on a conducting fluid, and am solving for an electrical potential epot this equation:

laplace(epot)=div(U^B)

U=velocities, B= magnetic induction

Everything works fine in serial, but in parallel it slowly diverges. Well - the Poisson equation works - but the entire calculation involving Lorentz forces calculated later diverges. However, I traced it down until finding that in fact just that simple equation shown above yields different results.
I only have zeroGradient b.c's, so I use setReference (also testet alternatively setValues) to prevent the field from floating. In parallel, before everything diverges, I can actually see a spot in the calculated potential at the location of the reference cell, not in the serial result.
Also, if for testing purpose I apply a fixed boundary condition at some patch and omit that setReference call, results in serial and parallel are identical.
Any hints?

I am lost ... already tried all sorts of different solvers, discretization schemes, ...

Thank you!
tehache is offline   Reply With Quote

Old   October 22, 2007, 10:18
Default sorry.. forgot to mention: usi
  #2
Senior Member
 
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17
tehache is on a distinguished road
sorry.. forgot to mention: using OpenFOAM 1.4
tehache is offline   Reply With Quote

Old   October 22, 2007, 10:43
Default Hmm, I have fixed this bug on
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Hmm, I have fixed this bug on 29/Aug/2006 in OF-1.3 The new version looks OK. Can you try and print out field.needReference() on all CPUs (using Pout): you should get a "yes" on all. The other problem may be that your cell in which you set a reference is next to a processor boundary, which is a bit more difficult (it should still work). In any case, can you change the reference cell ID to something arbitrary (I guess you've got cell 0 at the moment) and see if it makes it better.

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

Old   April 30, 2010, 11:53
Default Using setReference on Parallel Run
  #4
Member
 
Matthew J. Churchfield
Join Date: Nov 2009
Location: Boulder, Colorado, USA
Posts: 49
Rep Power: 19
mchurchf is on a distinguished road
I am trying to use a PISO-based solver in parallel. I have gradient or cyclic pressure boundary conditions on all boundaries, therefore, I need to set the reference level of the solution. I have done so using setReference(pRefCell,pRefValue). My grid has 12000 cells, and I have divided it up over 3 processors. I want to set the pressure to zero in the 12000th cell. When I set pRefCell = 11999, and try to run in parallel, I get the message:

[0] Illegal master cellID 11999. Should be 0..4000

and the code stops. Is this because cell 11999 does not lie in the part of the mesh allocated to processor0? Is there a work around?

Also, if I set the reference level of the solution, the corresponding reference cell will lie in one of the processor zones. How is this reference communicated to the other processors that are not working on matrices that contain the reference cell? When in the matrix solve is processor boundary information swaped?

Thank you,

Matt
tonnykz likes this.
mchurchf is offline   Reply With Quote

Old   April 6, 2012, 16:10
Default
  #5
New Member
 
Join Date: Jan 2010
Posts: 23
Rep Power: 16
jdiorio is on a distinguished road
Quote:
Originally Posted by tehache View Post
Hi everybody,

I am having problems with a simple Poisson equation.
I am calculating the influence of static magnetic fields on a conducting fluid, and am solving for an electrical potential epot this equation:

laplace(epot)=div(U^B)

U=velocities, B= magnetic induction

Everything works fine in serial, but in parallel it slowly diverges. Well - the Poisson equation works - but the entire calculation involving Lorentz forces calculated later diverges. However, I traced it down until finding that in fact just that simple equation shown above yields different results.
I only have zeroGradient b.c's, so I use setReference (also testet alternatively setValues) to prevent the field from floating. In parallel, before everything diverges, I can actually see a spot in the calculated potential at the location of the reference cell, not in the serial result.
Also, if for testing purpose I apply a fixed boundary condition at some patch and omit that setReference call, results in serial and parallel are identical.
Any hints?

I am lost ... already tried all sorts of different solvers, discretization schemes, ...

Thank you!
I realize this is an old thread, but I'm having basically the same issue (in both OF-2.1.0 and OF-1.6-ext). Solving an equation for "pd" (piezometric pressure) using zeroGradient on all the boundaries (simple cube domain). Setting a reference cell for on "pd" and solving fine. Then solving a temperature equation. "T" is linearly stratified in the domain. With a constant value at top and bottom, everything runs fine, no anamoly, both in serial and in parallel. When specifying a "fixedGradient" at the top boundary, runs fine in serial, but in parallel, the temperature at the location of "pRefCell" is being driven up. Attached are two example images.

FWIW I've also posted about this on another thread: http://www.cfd-online.com/Forums/ope...ence-cell.html

If there's further information I can provide please let me know.

James
Attached Images
File Type: jpg T_serial.jpg (17.5 KB, 21 views)
File Type: jpg pRefCell_parallel.jpg (27.3 KB, 28 views)
jdiorio is offline   Reply With Quote

Old   August 29, 2012, 10:41
Default
  #6
New Member
 
Join Date: Jan 2010
Posts: 23
Rep Power: 16
jdiorio is on a distinguished road
BTW I think I found a reason for the issue. Please see the link to the other thread I posted above.
jdiorio is offline   Reply With Quote

Reply


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
More DPM incompletes in parallel than in serial Paul FLUENT 0 December 16, 2008 10:27
Serial vs parallel different results luca OpenFOAM Bugs 2 December 3, 2008 11:12
Problem with Parallel not with Serial iyer_arvind OpenFOAM Running, Solving & CFD 0 September 18, 2006 07:03
parallel Vs. serial co2 FLUENT 1 December 31, 2003 03:19
Solution Diverges while Parallel Processing Prateep Chatterjee FLUENT 0 June 30, 2002 23:08


All times are GMT -4. The time now is 14:09.