CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Poisson eq w setReference works serial diverges in parallel (http://www.cfd-online.com/Forums/openfoam-solving/59370-poisson-eq-w-setreference-works-serial-diverges-parallel.html)

tehache October 22, 2007 09:18

Hi everybody, I am having p
 
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 October 22, 2007 09:18

sorry.. forgot to mention: usi
 
sorry.. forgot to mention: using OpenFOAM 1.4

hjasak October 22, 2007 09:43

Hmm, I have fixed this bug on
 
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

mchurchf April 30, 2010 10:53

Using setReference on Parallel Run
 
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

jdiorio April 6, 2012 15:10

2 Attachment(s)
Quote:

Originally Posted by tehache (Post 192196)
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

jdiorio August 29, 2012 09:41

BTW I think I found a reason for the issue. Please see the link to the other thread I posted above.


All times are GMT -4. The time now is 16:56.