CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   MRFSimpleFoam with cyclicGgi in parallel (http://www.cfd-online.com/Forums/openfoam-bugs/63387-mrfsimplefoam-cyclicggi-parallel.html)

hannes April 7, 2009 03:48

MRFSimpleFoam with cyclicGgi in parallel
 
Hello to everyone,

I encounter a problem when I try to use the the cyclicGgi in MRFSimpleFoam in a parallel run (using the latest OF-1.5-dev from SVN).
As I have found out, the new GGI-Implementation requires the two cyclic patches to be in two different zones whereas the MRF solver requires them to be in the rotor zone. So, I have defined the two cyclic face zones in the constant/MRFZones dict to be rotating as well (symmm and symmp are the cyclic patch face zones, the corresponding cellZones are empty):

3
(
rotor
{
patches (PROP);
origin origin [0 1 0 0 0 0 0] (0 0 0);
axis axis [0 0 0 0 0 0 0] (0 0 1);
omega omega [0 0 -1 0 0 0 0] 58.6431;
}
symmm
{
patches ();
origin origin [0 1 0 0 0 0 0] (0 0 0);
axis axis [0 0 0 0 0 0 0] (0 0 1);
omega omega [0 0 -1 0 0 0 0] 58.6431;
}
symmp
{
patches ();
origin origin [0 1 0 0 0 0 0] (0 0 0);
axis axis [0 0 0 0 0 0 0] (0 0 1);
omega omega [0 0 -1 0 0 0 0] 58.6431;
}
)

This seems to work in serial, but when I try to run the case in parallel, the following error occurs:

Starting time loop
Time = 1
smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0591515, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0426731, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0704887, No Iterations 2
[1]
[1]
[1] given label greater than the number of geometric faces
#0 Foam::error::printStack(Foam::Ostream&) in "/home/kroegeh/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/kroegeh/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::polyBoundaryMesh::whichPatch(int) const in "/home/kroegeh/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so"
#3 Foam::MRFZone::relativeFlux(Foam::GeometricField<d ouble, Foam::fvsPatchField, Foam::surfaceMesh>&) const in "/home/kroegeh/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 Foam::MRFZones::relativeFlux(Foam::GeometricField< double, Foam::fvsPatchField, Foam::surfaceMesh>&) const in "/home/kroegeh/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 main in "/home/kroegeh/OpenFOAM/kroegeh-1.5-dev/applications/bin/linux64GccDPOpt/MRFSimpleFoam"
#6 __libc_start_main in "/lib/libc.so.6"
#7 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/kroegeh/OpenFOAM/kroegeh-1.5-dev/applications/bin/linux64GccDPOpt/MRFSimpleFoam"

It seems that the MRFZones-Code tries to access some faces that are not present. Is there a nice and elegant way to fix that?

Best regards, Hannes

hannes April 9, 2009 04:55

For those who are interested: I have fixed it by inserting the marked statement below in MRFZones.C (in function "relativeFlux"):

forAll(faces, i)
{
label facei = faces;
if (facei < mesh_.nInternalFaces())
{
phi[facei] -= (Omega ^ (Cf[facei] - origin)) & Sf[facei];
}
[i] else if (facei < mesh_.nFaces())
{
label patchi = mesh_.boundaryMesh().whichPatch(facei);
label patchFacei = mesh_.boundaryMesh()[patchi].whichFace(facei);
phi.boundaryField()[patchi][patchFacei] -=
(Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
& Sf.boundaryField()[patchi][patchFacei];
}
}

bastil April 14, 2009 03:51

Hannes,

take into account using the MRF from 1.5.x combined with ggi from 1.5-dev. The latest MRF can use cellZones without Facezones so you can form a cellzone for your mrf and a faceZone for the ggi.

Regards.

raavis April 30, 2009 06:49

Hanes

I am trying to setup a MRF simulaton with ggi. Will it be possible for you to send me your system dictionaries, constant/dictionaries, boundary file and 0/files?

Thanks

hjasak May 1, 2009 04:02

Fixed - thank you for the bug fix. Apologies - there may be a few more problems like this because the mesh is now a bit more complex.

Hrv

timo_IHS April 29, 2010 08:52

Hello everybody,

I also want to run MRFSimpleFoam with cyclicGgi (latest OF-1.5-dev version).
Running this job in parallel doesn't work, a single run works.
Is there a mistake in my setup or is it a generell problem to run MRF with cyclicGgi in parallel?

Thanks in advance
Timo

bastil April 29, 2010 11:21

Parallel run should work. Without knowing you setup I would suspect it is more likely to have an error in this than a problem with Paralleisation. How doues your setup look like? How did you decompose your case?

Regards.

timo_IHS April 29, 2010 12:50

The steps of my setup are:

I. the "makeMesh" file for the setup
####for MRF:
cellSet ###choose all cells of rotor
setsToZones -noFlipMap
cp system/faceSetDict_rotorFaces system/faceSetDict
faceSet ###choose all faces of set rotor
cp system/faceSetDict_delInlet system/faceSetDict
faceSet ###delete faces of patch inlet
cp system/faceSetDict_delOutlet system/faceSetDict
faceSet ###delete faces of patch outlet
####for cyclicGgi:
cp system/faceSetDict_per1 system/faceSetDict
faceSet ###create face-zone per1_zone
cp system/faceSetDict_per2 system/faceSetDict
faceSet ###create face-zone per2_zone
setsToZones -noFlipMap


II: my constant/MRFzones:
1
(
rotor
{
patches (hub per1 per2 shroud blade);
origin origin [0 1 0 0 0 0 0] (0 0 0);
axis axis [0 0 0 0 0 0 0] (0 0 1);
omega omega [0 0 -1 0 0 0 0] 100.81;
}
)


III: my system/decomposeParDict:
numberOfSubdomains 2;

method metis;

globalFaceZones ( per1_zone per2_zone );
metisCoeffs
{
processorWeights
(
1 1
);
}
...


Btw: I checked one setup possibility, I want to tell (single run):
if I delete the periodic faces of my set rotor (I), the results at the ggi are nonsens (velocity and pressure profile)

If you need some more info, let me know!


All times are GMT -4. The time now is 23:43.