|
[Sponsors] |
March 19, 2013, 08:33 |
Variable Omega in MRFZones
|
#1 |
New Member
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13 |
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; } ) // ************************************************************************* // 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 Anyone can help me? Thanks Eric |
|
March 20, 2013, 11:35 |
|
#2 |
New Member
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13 |
After talking to my project tutor I realized that the conditions must not be in the dictionary. So I've fixed the problem.
|
|
October 2, 2013, 13:11 |
|
#3 |
New Member
Pablo Alejandro
Join Date: Jul 2013
Location: Nuevo León, México
Posts: 3
Rep Power: 13 |
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. |
|
October 9, 2013, 08:13 |
|
#4 |
New Member
Eric Dalmau
Join Date: Mar 2013
Location: Catalonia
Posts: 20
Rep Power: 13 |
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. |
|
December 13, 2013, 05:11 |
|
#5 | |
Member
Join Date: Aug 2013
Posts: 50
Rep Power: 13 |
Quote:
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 } } can someone help me? |
||
February 1, 2016, 17:06 |
|
#6 | |
New Member
Join Date: Jan 2016
Posts: 19
Rep Power: 10 |
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:
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_) { I'm thankful for any help. Michael |
||
Tags |
mrfinterfoam, mrfzones, omega, variable |
|
|
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 22:49 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 05:35 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 05:27 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |