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

Two MRFs OpenFOAM 11

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2024, 08:21
Default Two MRFs OpenFOAM 11
  #1
New Member
 
Join Date: Oct 2020
Posts: 4
Rep Power: 6
Slaninář is on a distinguished road
Hello,
I'm trying to simulate two MRFs in OpenFOAM 11. MRFProperties is:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  11
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      MRFProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


MRF1
{
    cellZone    Rotor;
    active      yes;

    // Fixed patches (by default they 'move' with the MRF zone)
    nonRotatingPatches (Rotor_in Rotor_out );

    origin    (0 0 0);
    axis      (0 0 1);
    // omega     -151.843644923507;
    rpm       -1450;
}


MRF2
{
    cellZone    Mrot;
    active      yes;

    // Fixed patches (by default they 'move' with the MRF zone)
    nonRotatingPatches (Mrot_out Mrot_in );

    origin    (0 0 0);
    axis      (0 0 1);
    rpm       -1450;
}




// ************************************************************************* //
However, for incompressibleFluid solver, this error occurs:
Code:
/*---------------------------------------------------------------------------*\ 
  =========                 | 
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox 
   \\    /   O peration     | Website:  https://openfoam.org 
    \\  /    A nd           | Version:  11 
     \\/     M anipulation  | 
\*---------------------------------------------------------------------------*/ 
Build  : 11 
Exec   : foamRun 
Date   : Apr 27 2024 
Time   : 13:06:18 
Host   : "slaninar-extreme4" 
PID    : 105828 
I/O    : uncollated 
Case   : /media/slaninar/0f1eafad-3b93-4c73-9544-109935e24a87/Programy/OpenFOAM/slaninar-10/run_org/PumpOFI/OpenFOAM_1 
nProcs : 1 
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). 
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10) 
allowSystemOperations : Allowing user-supplied system call operations 

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
Create time 

Create mesh for time = 0 

patchToPatch: Calculating couplings between 2660 source faces and 10952 target faces 
    Source min/average/max coverage = 0.860403/0.99973/1 
    Target min/average/max coverage = 0.90105/0.999733/1 
    Source average openness/error/depth/angle = 1.34718e-16/2.43049e-15/3.25552e-16/0 
    Source max openness/error/depth/angle = 7.97206e-16/2.43812e-14/2.90293e-15/0 
    51018 couplings calculated in 0.296447s 
patchToPatch: Calculating couplings between 10796 source faces and 20636 target faces 
    Source min/average/max coverage = 0.623984/0.999557/1 
    Target min/average/max coverage = 0.225696/0.999953/1 
    Source average openness/error/depth/angle = 1.21878e-16/0.000701521/0.000723702/0.126176 
    Source max openness/error/depth/angle = 6.64406e-16/0.38887/0.158765/24.1916 
    126220 couplings calculated in 0.654447s 
patchToPatch: Calculating couplings between 33155 source faces and 21924 target faces 
    Source min/average/max coverage = 0.5/0.999924/1 
    Target min/average/max coverage = 0.726963/0.999915/1 
    Source average openness/error/depth/angle = 1.35812e-16/0.00186038/0.0220941/0.75074 
    Source max openness/error/depth/angle = 1.83427e-15/0.385519/0.480225/32.9898 
    214126 couplings calculated in 1.56214s 
fvMeshStitcher: Connecting 
    Cell min/avg/max openness = 0/4.93197e-17/3.68435e-16 
Selecting solver incompressibleFluid 
Selecting viscosity model constant 
Selecting turbulence model type RAS 
Selecting RAS turbulence model realizableKE 
RAS 
{ 
    model           realizableKE; 
    turbulence      on; 
    printCoeffs     on; 
    A0              4; 
    C2              1.9; 
    sigmak          1; 
    sigmaEps        1.2; 
} 

Creating MRF zone list from MRFProperties 
    creating MRF zone: MRF1 
    - selecting cells using cellZone Rotor 
    - selected 2354137 cell(s) with volume 0.00201508 
    creating MRF zone: MRF2 
    - selecting cells using cellZone Mrot 
    - selected 79156 cell(s) with volume 0.0001888 

SIMPLE: Convergence criteria found 
        p: tolerance 1e-06 
        U: tolerance 1e-06 
        "(k|omega)": tolerance 1e-06 


SIMPLE: Operating solver in steady-state mode with 1 outer corrector 
SIMPLE: Operating solver in SIMPLE mode 



Starting time loop 

Constructing face momentum Uf 


--> FOAM FATAL ERROR:  
MRFZoneName not specified 

    From function const Foam::MRFZone& Foam::MRFPatchField::MRFzone(const Foam::objectRegistry&) const 
    in file cfdTools/general/MRF/derivedFvPatchFields/MRFPatchField/MRFPatchField.C at line 78. 

FOAM exiting


If only one MRF zone is in MRFProperties everything works.
I found this thread but it is old and it doesn't solve my problem.
Does anybody know how to solve it?
Slaninář is offline   Reply With Quote

Old   May 3, 2024, 07:17
Default
  #2
New Member
 
Marc
Join Date: May 2024
Posts: 4
Rep Power: 2
Marcelinus is on a distinguished road
Hi there,



I got the same error a couple days ago and this was my fix:


In the velocity boundary file you need to specify the name of the MRF zone if there are multiple. Like this:
Code:
MRFRegion1
            {
                    type                 MRFnoSlip;
                    MRFZoneName    zone1;
            }

          MRFRegion2
            {
                    type                  MRFnoSlip;
                    MRFZoneName     zone2;
             }




You can get the name of the zone from the MRFProperties file. Hope this helps.

Code:
zone1
         {

                   cellZone    cell_1;
                   active       yes;

                   //nonRotatingPatches ();

                   origin    (-5.480-0.3003.000);
                   axis      (-0.346410.2000);

                   //omega     12.566370;
                   rpm            365;
          }

          zone2
          {
                   cellZone        cell_2;
                   active           yes;

                   //nonRotatingPatches ();

                   origin      (4.7752550.7071074.085786);
                   axis        (0.367423-0.2121320.424264);

                   //omega     12.566370;
                   rpm            69;
          }



Marcelinus is offline   Reply With Quote

Old   May 6, 2024, 13:33
Default
  #3
New Member
 
Join Date: Oct 2020
Posts: 4
Rep Power: 6
Slaninář is on a distinguished road
It works. Now incompressible solver calculates two MRFs and results look believable. Thank you very much!
Slaninář is offline   Reply With Quote

Old   September 5, 2024, 06:33
Default
  #4
New Member
 
Join Date: May 2024
Posts: 3
Rep Power: 2
luise_ is on a distinguished road
Unfortunately, this did not work. Are there any other ideas for solving the problem?
luise_ is offline   Reply With Quote

Old   September 5, 2024, 06:51
Default
  #5
New Member
 
Marc
Join Date: May 2024
Posts: 4
Rep Power: 2
Marcelinus is on a distinguished road
Hello Luise,

what exactly did not work for you? What is the error message?

Kind regards

Marcelinus
Marcelinus is offline   Reply With Quote

Old   September 6, 2024, 09:29
Default
  #6
New Member
 
Join Date: May 2024
Posts: 3
Rep Power: 2
luise_ is on a distinguished road
Hello Marcelinus,

thanks for the fast reply!

I receive the same error message as Slaninář.

Pstream initialised with:
floatTransfer : false
nProcsSimpleSum : 0
commsType : nonBlocking
polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting solver incompressibleFluid
Selecting viscosity model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
bounding k, min: 0 max: 0 average: 0
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
alphaK1 0.85;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.856;
gamma1 0.555556;
gamma2 0.44;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
b1 1;
c1 10;
F3 false;
}

Creating MRF zone list from MRFProperties
creating MRF zone: MRF_CW
- selecting cells using cellZone cellMRF_CWzone
- selected 2228629 cell(s) with volume 0.00503231
creating MRF zone: MRF_CCW
- selecting cells using cellZone cellMRF_CCWzone
- selected 2229399 cell(s) with volume 0.00503207
creating MRF zone: MRF_CW_f
- selecting cells using cellZone cellMRF_CW_fzone
- selected 2227378 cell(s) with volume 0.00503237
creating MRF zone: MRF_CCW_b
- selecting cells using cellZone cellMRF_CCW_bzone
- selected 2227898 cell(s) with volume 0.00503223

SIMPLE: No convergence criteria found


SIMPLE: Operating solver in steady-state mode with 1 outer corrector
SIMPLE: Operating solver in SIMPLE mode



Starting time loop

forces forcesCoeffs:
Not including porosity effects
forceCoeffs forcesCoeffs:
Not including porosity effects
forces forces:
Not including porosity effects
forceCoeffs forcesCoeffs write:
Cm = 0
Cd = 0
Cl = 0
Cl(f) = 0
Cl(r) = 0

forces forces write:
sum of forces:
pressure : (0 0 0)
viscous : (0 0 0)
porous : (0 0 0)
sum of moments:
pressure : (0 0 0)
viscous : (0 0 0)
porous : (0 0 0)

Constructing face momentum Uf
[0] --> FOAM FATAL ERROR:
[0] MRFZoneName not specified
[0]
[0] From function const Foam::MRFZone& Foam::MRFPatchField::MRFzone(const Foam:bjectRegistry&) const
[0] in file cfdTools/general/MRF/derivedFvPatchFields/MRFPatchField/MRFPatchField.C at line 78.
[0]
FOAM parallel run exiting

I tried what you suggested here:
Code:
MRF_CW
{

    cellZone    cellMRF_CWzone;
    active      yes;
    
    nonRotatingPatches ("drone.*");

    origin   (-0.176876 -0.176876 0.0639516);
    axis      (0 0 1);

    rpm       -6000;
}

MRF_CCW
{

    cellZone    cellMRF_CCWzone;
    active      yes;
    
        nonRotatingPatches ("drone.*");

    origin   (0.176876 -0.176876 0.0639516);
    axis      (0 0 1);

    rpm       6000;
}


MRF_CW_f
{

    cellZone    cellMRF_CW_fzone;
    active      yes;
    nonRotatingPatches ( "drone.*");
   // nonRotatingPatches (inlet "propeller_CCW.*" "propeller_CCW_b.*" "propeller_CW.*" outlet "drone.*");

    origin   (0.176876 0.176876 0.0639516);
    axis      (0 0 1);

    rpm       -6000;
}

MRF_CCW_b
{

    cellZone    cellMRF_CCW_bzone;
    active      yes;
    
        nonRotatingPatches ("drone.*");

    origin   (-0.176876 0.176876 0.0639516);
    axis      (0 0 1);

    rpm       6000;
}
and
Code:
 
MRFRegion1
    {
             type                 MRFnoSlip;
             MRFZoneName   MRF_CW;
    }

     MRFRegion2
     {
      type                  MRFnoSlip;
      MRFZoneName     MRF_CCW;
      }
             
	MRFRegion3
        {
              type                  MRFnoSlip;
              MRFZoneName     MRF_CW_f;
        }
       MRFRegion4
       {
              type                 MRFnoSlip;
              MRFZoneName    MRF_CCW_b;
       }
Maybe I am just missing something. I am happy about any help.
luise_ is offline   Reply With Quote

Old   September 6, 2024, 14:06
Default
  #7
New Member
 
Join Date: Oct 2020
Posts: 4
Rep Power: 6
Slaninář is on a distinguished road
Hi,
I don't see any problem in your previous post, luise_. I may have missed something. However is it possible to provide full U file? Are you using OpenFOAM V11 and incompressible solver? I have no experience with OF V12 yet.
Slaninář is offline   Reply With Quote

Old   September 9, 2024, 03:14
Default
  #8
New Member
 
Join Date: May 2024
Posts: 3
Rep Power: 2
luise_ is on a distinguished road
Hello,

yes I am using OF11 and incompressible Solver. Here is my full U file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  11
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"
    
         "propeller_CW.*"
    {
        type            MRFnoSlip;
    }
           "propeller_CCW.*"
    {
        type            MRFnoSlip;
    }
    "propeller_CW_f.*"
    {
        type            MRFnoSlip;
    }
    
        "propeller_CCW_b.*"
    {
        type            MRFnoSlip;
    }
            "drone.*"
    {
        type           noSlip;
    }   

    inlet
    {
        type                freestreamVelocity;
        freestreamValue0    (0 0 0);
        freestreamValue     $internalField;
    }
    
    outlet
    {
        type                freestreamVelocity;
        freestreamValue0    (0 0 0);
        freestreamValue     $internalField;
    }
   
    MRFRegion1
    {
             type                 MRFnoSlip;
             MRFZoneName   MRF_CW;
    }

     MRFRegion2
     {
      type                  MRFnoSlip;
      MRFZoneName     MRF_CCW;
      }
             
	MRFRegion3
        {
              type                  MRFnoSlip;
              MRFZoneName     MRF_CW_f;
        }
       MRFRegion4
       {
              type                 MRFnoSlip;
              MRFZoneName    MRF_CCW_b;
       }
             
           
}

// ************************************************************************* //
luise_ is offline   Reply With Quote

Old   September 9, 2024, 13:27
Default
  #9
New Member
 
Join Date: Oct 2020
Posts: 4
Rep Power: 6
Slaninář is on a distinguished road
I think I know where the problem is. There are MRFnoSlip boundaries in the U file located in different MRF zones. Is that so? However, for these boundaries, MRFZoneName isn't defined. I think the U file should look like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  11
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"
    
    "propeller_CW.*"
    {
        type            MRFnoSlip;
        MRFZoneName   MRF_CW;
    }
    "propeller_CCW.*"
    {
        type            MRFnoSlip;
        MRFZoneName     MRF_CCW;
    }
    "propeller_CW_f.*"
    {
        type            MRFnoSlip;
        MRFZoneName     MRF_CW_f;
    }
    
    "propeller_CCW_b.*"
    {
        type            MRFnoSlip;
        MRFZoneName    MRF_CCW_b;
    }
    "drone.*"
    {
        type           noSlip;
    }   

    inlet
    {
        type                freestreamVelocity;
        freestreamValue0    (0 0 0);
        freestreamValue     $internalField;
    }
    
    outlet
    {
        type                freestreamVelocity;
        freestreamValue0    (0 0 0);
        freestreamValue     $internalField;
    }
}

// ************************************************************************* //
I removed the MRFRegionsX boundary because I think there's been a misunderstanding. Of course, if MRFRegionsX are rotating walls in MRF zones then it is necessary to define these as well.
Slaninář is offline   Reply With Quote

Reply

Tags
mrf, openfoam 11


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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
Solvers in OpenFOAM for LES + heat transfer arun1994 Main CFD Forum 1 November 26, 2021 08:57
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 08:18
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


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