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

rotorDiskSource in parallel

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By vLhomme

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 14, 2019, 07:41
Default rotorDiskSource in parallel
  #1
New Member
 
Jernej
Join Date: Sep 2011
Posts: 9
Rep Power: 15
Jernej Pirnar is on a distinguished road
Hi all,

I am interested in incorporating the effect of a propeller using rotorDiskSource class. I am using OpenFOAM-5.x. I have found a work (report and input files) by Capitao Patrao [Capitao Patrao, A.: Description and validation of the rotorDiskSource class for propeller performance estimation. In Proceedings of CFD with OpenSource Software, 2017, Edited by Nilsson. H., http://dx.doi.org/10.17196/OS_CFD#YEAR_2017] from the Chalmers University of Technology. The work gives a fix to the error in how the local forces are calculated and implements more general blade tip correction. I have successfully modified the original OF code. The corrected rotorDiskSource works without any problems when the solver (simpleFoam) is run in serial. However, the difficulties begin in parallel where the output is strange. Below I paste several outputs of rotorDisk.

Serial case:
rotorDisk output:
min/max(AOA) = 1.6620832, 4.5369071
min/max(eps) = 25.235116, 59.281187
Rotor thrust = 671.50036
Rotor torque = 188.8365
Rotor power = 71041.172
Rotor propeller efficiency = 0.80412826
Effective drag = -576.07232
Effective lift = 671.50036

Parallel case (2 partitions):
rotorDisk output:
min/max(AOA) = 1.6619861, 4.5367581
min/max(eps) = 25.235298, 59.278707
Rotor thrust = 664.33664
Rotor torque = 186.83229
Rotor power = 70287.182
Rotor propeller efficiency = 0.80408372
Effective drag = -576.0604
Effective lift = 671.48486

Parallel case (3 partitions):
rotorDisk output:
min/max(AOA) = 1.6621062, 4.5363851
min/max(eps) = 5.729578e+16, -5.729578e+16
Rotor thrust = 0
Rotor torque = 0
Rotor power = 0
Rotor propeller efficiency = nan
Effective drag = -576.04504
Effective lift = 671.45967

Parallel case (6 partitions):
rotorDisk output:
min/max(AOA) = 1.6617572, 4.5364101
min/max(eps) = 25.235737, 45.521711
Rotor thrust = 186.92322
Rotor torque = 52.674087
Rotor power = 19816.238
Rotor propeller efficiency = 0.80247451
Effective drag = -576.03327
Effective lift = 671.44934


Does anybody have some experience in fixing the issue and can give a piece of advice?

Thank you.

Jernej
Jernej Pirnar is offline   Reply With Quote

Old   January 14, 2019, 08:09
Default
  #2
Member
 
Jeff
Join Date: May 2016
Posts: 44
Rep Power: 10
jf_vt is on a distinguished road
I had experiments with case running in serial and posing problem in parallel when using ggi coupling interface.

In my case it was traced back to a bug in openmpi implementation

I have no idea if your problem is of the same kind though

Can you post the case?

JF
jf_vt is offline   Reply With Quote

Old   January 15, 2019, 13:42
Default
  #3
New Member
 
Jernej
Join Date: Sep 2011
Posts: 9
Rep Power: 15
Jernej Pirnar is on a distinguished road
Hi Jeff,

I am using the original case (prop_incomp_refCase) as described in Proceedings of CFD with OpenSource Software, 2017 (Edited by Nilsson H. http://dx.doi.org/10.17196/OS_CFD#YEAR_2017). Following the link the case files can be downloaded.

Angle of attack, effective lift and drag are invariant to the number of partitions (as expected). What bothers me is that eps, rotor thrust, torque, power, and propeller efficiency are not .

Regards,
Jernej
Jernej Pirnar is offline   Reply With Quote

Old   January 18, 2019, 19:32
Default
  #4
Member
 
Luis Eduardo
Join Date: Jan 2011
Posts: 85
Rep Power: 15
lebc is on a distinguished road
How does your flow field look like?

If you generate a slice in one of the rotor planes for all the cases you are running, do they look the same?

It may be just a matter of taking the information from all the processors for the calculation of the variables (usually the sumop() - or something like this - part of the code)

Try the slices, check if the physics make sense.

Best Regards,
Luis
lebc is offline   Reply With Quote

Old   February 2, 2019, 11:36
Default
  #5
New Member
 
Aleksei
Join Date: Oct 2016
Posts: 4
Rep Power: 10
alexey_sw is on a distinguished road
Hi!
I have a very similar experience using rotorDisk. Like you, I successfully modified the original OF code using Capitao Report. Anyway with corrections or without rotorDisk dont work adequately. Besides problems with parallel run, there are also some oscillation when run simpleFoam in serial. Oscillation in rotor forces generate oscillation in field U which leads to resonance (it`s my explanation ).

You can see how it look like in slice through the rotor (colored by force magnitude).
https://www.youtube.com/watch?v=D7cN2Dcwixw
https://www.youtube.com/watch?v=zQzQw7gU5XE
It was observed in case similar to tutorials simpleFoam/rotorDisk, was slightly changed mesh only.

I managed to get rid of oscillations by decreasing the relaxation factor U to 0.45. Maybe its not good method? Have anyone thoughts about the reason of this strange phenomena?
alexey_sw is offline   Reply With Quote

Old   August 30, 2019, 13:07
Lightbulb A proposed fix
  #6
New Member
 
Join Date: May 2019
Posts: 5
Rep Power: 7
vLhomme is on a distinguished road
Hi !

I think I solved the issue !

With OF1812 and using the same files and following the same report.

I tried several decompositions of the case using SIMPLE method, in decomposeParDict I have for example :
Code:
numberOfSubdomains 3;

method          simple;

simpleCoeffs
{
    n               (1 3 1);
    delta           0.001;
}
I give below the output of my attempts with the 'n' parameter for the simple decomposition :

n (1 1 1) (undecomposed, reference)
Code:
rotorDisk output:
min/max(AOA)   = 1.6603615, 4.5343289
min/max(eps) = 25.238325, 59.282909
Rotor thrust = 671.04952
Rotor torque = 188.71667
Rotor power = 70986.411
Rotor propeller efficiency = 0.80420828
Effective drag = -575.71016
Effective lift = 671.04952
n (1 2 1)
Code:
rotorDisk output:
min/max(AOA)   = 1.660361, 4.5343286
 min/max(eps) = 25.238325, 59.282909
 Rotor thrust = 335.52474
 Rotor torque = 94.358332
 Rotor power = 35493.204
 Rotor propeller efficiency = 0.80420828
 Effective drag = -575.71012
 Effective lift = 671.0494
n (2 1 2)
Code:
rotorDisk output:
    min/max(AOA)   = 1.6603613, 4.5343287
 min/max(eps) = 25.238325, 59.282909
 Rotor thrust = 167.76238
 Rotor torque = 47.179168
 Rotor power = 17746.603
 Rotor propeller efficiency = 0.80420828
    Effective drag = -575.71014
    Effective lift = 671.0495
n(3 1 1)
Code:
rotorDisk output:
    min/max(AOA)   = 1.6603616, 4.534329
 min/max(eps) = 25.238325, 59.282909
 Rotor thrust = 274.3083
 Rotor torque = 77.168146
 Rotor power = 29027.057
 Rotor propeller efficiency = 0.80394276
    Effective drag = -575.71017
    Effective lift = 671.04953
From the cases above I would deduct that the forces are computed for only one of the processor domain (cause we obtain fractions of the values we get for the reference case) for example in the case (2 1 2), we divided the rotorDisk into quarter disk and we got the thrust, power and torque equal to the quarter of reference values.

n (1 3 1)
Code:
  min/max(AOA)   = 4.0015841, 7.9121525
 min/max(eps) = 5.729578e+16, -5.729578e+16
 Rotor thrust = 0
 Rotor torque = 0
 Rotor power = 0
 Rotor propeller efficiency =
and gave an error message
Code:
[v501:32819] *** Process received signal ***
[v501:32819] Signal: Floating point exception (8)
[v501:32819] Signal code:  (-6)
[v501:32819] Failing at address: 0x3ef00008033
[v501:32819] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f32e132d4b0]
[v501:32819] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f32e132d428]
[v501:32819] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x7f32e132d4b0]
[v501:32819] [ 3] /home/cfd/OpenFOAM/cfd-v1812/platforms/linux64GccDPInt32Opt/lib/libfvOptions.so(_ZNK4Foam2fv15rotorDiskSource9calculateINS_17geometricOneFieldEEEvRKT_RKNS_5FieldINS_6VectorIdEEEERKNS7_IdEERSA_bb+0xd5a)[0x7f32e3a3120a]
[v501:32819] [ 4] /home/cfd/OpenFOAM/cfd-v1812/platforms/linux64GccDPInt32Opt/lib/libfvOptions.so(_ZN4Foam2fv15rotorDiskSource6addSupERNS_8fvMatrixINS_6VectorIdEEEEi+0x396)[0x7f32e3a2d476]
[v501:32819] [ 5] simpleFoam[0x444659]
[v501:32819] [ 6] simpleFoam[0x420603]
[v501:32819] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f32e1318830]
[v501:32819] [ 8] simpleFoam[0x423f29]
[v501:32819] *** End of error message ***
From this case I think I can deduce that the values outputed here are taken from a node's domain that does not contain the rotating zone, values computed by the lines added in the report are not added from one processor to the other ...


Yes !! It's seems to be it ! I propose this modification in the file RotorDiskSourceTemplates.C (search for '//NEW MODIFICATION') :
Code:
//scalar etaProp = thrustEff*refVelEta_/powerEff; //NEW LINE //NEW MODIFICATION comment this as it can result in a division by 0
    if (output)
    {
        reduce(AOAmin, minOp<scalar>());
        reduce(AOAmax, maxOp<scalar>());
        reduce(dragEff, sumOp<scalar>());
        reduce(liftEff, sumOp<scalar>());
        reduce(epsMin, minOp<scalar>());//vlhomme 02/09/2019 MODIFICATION 
        reduce(epsMax, maxOp<scalar>());//vlhomme 02/09/2019 MODIFICATION 
        reduce(thrustEff, sumOp<scalar>());//vlhomme 29/08/2019 MODIFICATION 
        reduce(torqueEff, sumOp<scalar>());//vlhomme 29/08/2019 MODIFICATION 
        reduce(powerEff, sumOp<scalar>()); //vlhomme 29/08/2019 MODIFICATION 
        scalar etaProp = thrustEff*refVelEta_/powerEff; //vlhomme 29/08/2019 MODIFICATION  : I add this line cause here there is no risk of division by 0 
        Info<< type() << " output:" << nl
            << "    min/max(AOA)   = " << radToDeg(AOAmin) << ", "
            << radToDeg(AOAmax) << nl
            << " min/max(eps) = " << radToDeg(epsMin) << ", " //NEW LINE
            << radToDeg(epsMax) << nl //NEW LINE
            << " Rotor thrust = " << thrustEff << nl //NEW LINE
            << " Rotor torque = " << torqueEff << nl //NEW LINE
            << " Rotor power = " << powerEff << nl //NEW LINE
            << " Rotor propeller efficiency = " << etaProp << nl //NEW LINE
            << "    Effective drag = " << dragEff << nl
            << "    Effective lift = " << liftEff << endl;
    }
}
I now do have the same output with the decomposition I tried before, and even using scotch with 20 CPUs I still got reference results .
alexey_sw and sşmarcfd like this.

Last edited by vLhomme; September 2, 2019 at 07:10.
vLhomme is offline   Reply With Quote

Old   January 18, 2021, 16:58
Default Question
  #7
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
Dear Friends
I want to use rotorDisk example in my case which is a lagrangian solver(I have already added fvOptions and I can add external momentum sources). according to the code;

https://github.com/OpenFOAM/OpenFOAM...stem/fvOptions

which I copied here;

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

disk
{
    type            rotorDisk;

    selectionMode   cellZone;
    cellZone        rotatingZone;

    fields          (U);    // Names of fields on which to apply source
    nBlades         3;      // Number of blades
    tipEffect       0.96;   // Normalised radius above which lift = 0

    inletFlowType   local;  // Inlet flow type specification
    inletVelocity   (0 1 0);

    geometryMode    specified;

    origin          (0 0 0);
    axis            (0 1 0);

    refDirection    (0 0 1);  // Reference direction
                              // - used as reference for psi angle
    rpm             1000;
    // pointAbove    (0 0 0.25);

    trimModel       fixedTrim;  // fixed || targetForce

    rhoRef          1000;
    rhoInf          1;

    fixedTrimCoeffs
    {
         theta0         0;
         theta1c        0;
         theta1s        0;
    }

    flapCoeffs
    {
        beta0           0;  // Coning angle [deg]
        beta1c          0;  // Lateral flapping coeff (cos coeff)
        beta2s          0;  // Longitudinal flapping coeff (sin coeff)
    }

    blade
    {
        data
        (
            (profile1 (0.1 -6 0.02))
            (profile1 (0.25 -6 0.02))
        );
    }

    profiles
    {
        profile1
        {
            type lookup;
            data
            (
                (-90 0.21 1.45)
                (-18 0.21 1.45)
                (-16 0.165 1.3)
                (-14 0.125 1.1)
                (-12 0.092 0.95)
                (-10 0.07 0.8)
                (-8 0.05 0.64)
                (-6 0.04 0.5)
                (-4 0.028 0.32)
                (-2 0.022 0.18)
                (0 0.02 0)
                (2 0.022 0.18)
                (4 0.028 0.32)
                (6 0.04 0.5)
                (8 0.05 0.64)
                (10 0.07 0.8)
                (12 0.092 0.95)
                (14 0.125 1.1)
                (16 0.165 1.3)
                (18 0.21 1.45)
                (90 0.21 1.45)
            );
        }
    }
}

// ************************************************************************* //

I can add effect of blades in my simulation, but I can't and I can not see any effect. can anyone help me?


Thanks,
Farzad

Using rotorDisk(or any other blade simulator) for mixing purpose by applying fvOption
farzadmech is offline   Reply With Quote

Old   May 30, 2022, 12:31
Default fvOptions rotorDisk wmake issue OFv2112
  #8
Member
 
Join Date: Apr 2021
Posts: 41
Rep Power: 5
AlxB is on a distinguished road
Many thanks vLhomme for the fix you proposed.

Have you managed to make this working with OFv2112 as well ?

From my side, following the same files and report, it seems there is now something wrong when compiling.
AlxB is offline   Reply With Quote

Reply

Tags
openfoam 5.x, propeller, rotordisksource


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 running openfoam in parallel fede32 OpenFOAM Programming & Development 5 October 4, 2018 17:38
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 12:58
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 19:45
simpleFoam in parallel issue plucas OpenFOAM Running, Solving & CFD 3 July 17, 2013 12:30
parallel Grief: BoundaryFields ok in single CPU but NOT in Parallel JR22 OpenFOAM Running, Solving & CFD 2 April 19, 2013 17:49


All times are GMT -4. The time now is 05:53.