CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Variable Omega in MRFZones

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By edalmau

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2013, 07:33
Default Variable Omega in MRFZones
  #1
New Member
 
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13
edalmau is on a distinguished road
Hi to all Foamers,
First thank to all of you cause you've been very helpful in mi introduction to OpenFoam. I've read a lot of posts to fix my errors but now I can't see how to fix this one. So I hope you can tell me what I'm doing wrong.

I'm trying to simulate a tank with a fluid rotating with variable angular velocity (omega). I read that someone tried to do that but I cannot find the post and the reference given by a user was to do the same as if you want to make gravity variable. So what I tried to do was making conditions in the MRFZones file.

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      MRFZones;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

3
(
    tank
    {
        // Fixed patches (by default they 'move' with the MRF zone)
        nonRotatingPatches ();

        origin    origin [0 1 0 0 0 0 0]  (0.5 0.5 0);
        axis      axis   [0 0 0 0 0 0 0]  (0 0 1);
        if (runTime.value()<=0.75){
        omega     omega  [0 0 -1 0 0 0 0] -3.14159;
        }
        else {
        omega     omega  [0 0 -1 0 0 0 0] 0.0;
        }
    }
 aire2
    {
        // Fixed patches (by default they 'move' with the MRF zone)
        nonRotatingPatches ();

        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] 0.0;
    }
 aire1
    {
        // Fixed patches (by default they 'move' with the MRF zone)
        nonRotatingPatches ();

        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] 0.0;
    }
)

// ************************************************************************* //
As you can see there are 3 zones, and I want to try to change omega by adding and if condition depending on runTime.

I do all processes (blockMesh, topoSet, setsToZones, setFields,...) but when I try to solve (MRFInterFoam) an error ocurred pointing the MRFZones file.

Code:
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar

Reading g
Calculating field g.h



--> FOAM FATAL IO ERROR: 
wrong token type - expected word, found on line 52 the punctuation token ')'

file: /home/eric/OpenFOAM/eric-2.1.1/run/tutorials/multiphase/MRFInterFoam/Buidat1s2DOV/constant/MRFZones at line 52.

    From function operator>>(Istream&, word&)
    in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting
It seems to be a missing ) or something like that but I really don't see any error in my code.

Anyone can help me?

Thanks
Eric
mm.abdollahzadeh likes this.
edalmau is offline   Reply With Quote

Old   March 20, 2013, 10:35
Default
  #2
New Member
 
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13
edalmau is on a distinguished road
After talking to my project tutor I realized that the conditions must not be in the dictionary. So I've fixed the problem.
edalmau is offline   Reply With Quote

Old   October 2, 2013, 12:11
Default
  #3
New Member
 
Pablo Alejandro
Join Date: Jul 2013
Location: Nuevo León, México
Posts: 3
Rep Power: 12
pablodelag is on a distinguished road
Hi Eric,

I am working with a similar simulation; it is a tank filled with water and an impeller on the bottom. I specified the MRFzones in fvOptions and everything seems okay. However, now I am trying to run it again with other dimensions (the impeller is no longer located at 0,0,0 ) and I don't know if my mistake is where I define the origin of rotation.

Do you know if that origin is the centre of the entire mesh, or is it the centre of the rotating object?

Thanks in advance.
pablodelag is offline   Reply With Quote

Old   October 9, 2013, 07:13
Default
  #4
New Member
 
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13
edalmau is on a distinguished road
Hey,
I did another thing to get the omega specified in the MRF dictionary in my solver. The origin defined in MRFZone dictionary is the origin of the rotation of your Reference Frame as far as I know.

If you need the omega in your solver I can tell you how to call it.
edalmau is offline   Reply With Quote

Old   December 13, 2013, 04:11
Default
  #5
Member
 
Join Date: Aug 2013
Posts: 50
Rep Power: 12
nash is on a distinguished road
Quote:
Originally Posted by edalmau View Post
Hey,
I did another thing to get the omega specified in the MRF dictionary in my solver. The origin defined in MRFZone dictionary is the origin of the rotation of your Reference Frame as far as I know.

If you need the omega in your solver I can tell you how to call it.
can you tell me how?
i set my mrf zone as given:

Code:
MRF1
{
    type            MRFSource;
    active          true;
    selectionMode   cellZone;
    cellZone        fluid-mrf;

    MRFSourceCoeffs
    {
    nonRotatingPatches (rotor);

        origin      (0 0 0);
        axis        (0 0 1);
        omega  constant  806.3421144; /RPM 7700 
    }
}
i set the pressure outlet higher as inlet (from the performance curve data) but the effect of the fan is nothing. the fluid flow from outlet to inlet.

can someone help me?
nash is offline   Reply With Quote

Old   February 1, 2016, 16:06
Default
  #6
New Member
 
Join Date: Jan 2016
Posts: 19
Rep Power: 10
mheinz is on a distinguished road
Hi.

As was the original problem of this post, I want to define a time depending omega for a MRFZone. Considering the boundary condition "rotatingWallVelocity" this can simply be done by defining a table with linear interpolation at intermediate time increments.

What are the options for the definition of a MRFZone?
Quote:
After talking to my project tutor I realized that the conditions must not be in the dictionary. So I've fixed the problem.
I think one way would be to modify the MRFZone.C and update the value of omega on every time increment.
Code:
Foam::MRFZone::MRFZone(const fvMesh& mesh, Istream& is)
:
    mesh_(mesh),
    name_(is),
    dict_(is),
    cellZoneID_(mesh_.cellZones().findZoneID(name_)),
    excludedPatchNames_
    (
        dict_.lookupOrDefault("nonRotatingPatches", wordList(0))
    ),
    origin_(dict_.lookup("origin")),
    axis_(dict_.lookup("axis")),
    omega_(dict_.lookup("omega")),
    Omega_("Omega", omega_*axis_)
{
But I would first like to ask for suggestions which might avoid manipulating the basic solver.

I'm thankful for any help.

Michael
mheinz is offline   Reply With Quote

Reply

Tags
mrfinterfoam, mrfzones, omega, variable


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
OpenFoam-1.6-ext Allwmake compilation error - one last barrier Pat84 OpenFOAM Installation 15 July 25, 2012 21:49
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 04:35
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 04:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09


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