CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   how to get relative velocities in a rotating frame of reference? (https://www.cfd-online.com/Forums/openfoam-post-processing/86972-how-get-relative-velocities-rotating-frame-reference.html)

alkochevsky April 7, 2011 12:24

how to get relative velocities in a rotating frame of reference?
 
Hi dear OpenFOAMers,
I am simulating the fluid flow in some centrifugal pump consisting of the rotor and the stator, using the OSIG TurboMachinery libraries with OpenFOAM-1.5-dev. In the results I am getting all the velocities (at least, by default) are in the absolute frame of reference. My questions are:
1. How to get the field of relative velocities, i.e., velocities in the rotating frame of reference? My idea is to extend the utility foamCalc to enable this transformation. But maybe some solution is already available?
2. How to get the circumferential and radial components of the velocity? Is some solution in OpenFOAM already available?

Best regards,
Alexey Kochevsky

renyun0511 May 16, 2011 21:35

use "Urel" function after wmake the following code.


Attachment 7740

ChristianE46 August 9, 2011 06:21

Hi!
I've compiled it with wmake successfull. But if I want to use it I get:

--> FOAM FATAL ERROR:
cannot find MRF faceZone ROTOR

From function Foam::MRFZone::MRFZone(const fvMesh& , const dictionary&)
in file MRFZone.C at line 71.

FOAM exiting

What is my mistake?
Regards, Chris

renyun0511 August 9, 2011 09:27

hi,Chris,
the error you encountered means that your model hasn't rotor part, and the Urel function i uploaded is for the rotating machinery, you can also see it from the Urel file.

ChristianE46 August 9, 2011 11:06

Well, I got a 2D turbomachine, with a rotating impeller and a diffusor. maybe the problem is, that I gave the rotor the name "Impeller" and not "ROTOR"?
I use OF 1.6 ext.

alkochevsky September 30, 2011 12:40

Hi Renyun,
sorry for long silence, I have made some pause in my OpenFOAM activities.
Thank you very much for your function, I have compiled it successfully.
However, trying to apply it to my case, I get a similar error message as Christian.

To Christian: as far as I understand, the faceZone name is taken from the constant\MRFZones file. It should be the same in the polyMesh\faceZones file, should be consistent with the data in the polyMesh\boundary file and with the corresponding file name in the polyMesh\sets directory. You may put the correct name everywhere manually.

In my case, however, the interface consists of 2 independent patches that are separately specified also in the boundary file: one patch is disk-shaped and the other is cylinder-shaped (an impeller is inserted in a casing with a large gap between them). Thus, both patches cannot have the same name (like "rotor"). The same difficulty may be expected if simulating the flow in several stages of a multi-stage pump: each faceZone of the next impeller will have different name. How would you suggest to apply Urel function in this situation?

Regards,
Alexey Kochevskyy

linnemann December 16, 2011 07:59

3 Attachment(s)
For the newer version of MRFZones which does not use faceZones and the "patches" keyword any more.

This is just quickly thrown together from the above code and I take no credit at all, but it still works with 1.6 and likely also above 1.6.

Ivanet May 8, 2012 03:34

Hi Niels,
does your tool also work for GGI ( mixerGgiFvMesh) or only for MRF-cases?
Thanks in advance
Ivan

Islam ElQatary May 9, 2012 07:35

Urel
 
Quote:

Originally Posted by linnemann (Post 336080)
For the newer version of MRFZones which does not use faceZones and the "patches" keyword any more.

This is just quickly thrown together from the above code and I take no credit at all, but it still works with 1.6 and likely also above 1.6.

hi
i tried to compiled the Urel code but when i used the Urel command i got segmentation fault error i use openfoam 1.6ext i don't why that error especially that may memory is ok
Thanks

Attesz May 29, 2012 10:19

OF21x
 
Dear linnemann,

is this code working with 2.1.x? I'm still getting the "patches keyword missing" problem...

Quote:

Originally Posted by linnemann (Post 336080)
For the newer version of MRFZones which does not use faceZones and the "patches" keyword any more.

This is just quickly thrown together from the above code and I take no credit at all, but it still works with 1.6 and likely also above 1.6.


Attesz May 29, 2012 11:35

Sorry, I've already found this:

http://www.cfd-online.com/Forums/ope...implefoam.html

And it works. Thank you for sharing it!


Quote:

Originally Posted by Attesz (Post 363589)
Dear linnemann,

is this code working with 2.1.x? I'm still getting the "patches keyword missing" problem...


zordiack April 1, 2014 04:47

Any chance to get this working for 2.3.x? It didnt' compile

Urel.C:85:17: error: 'class Foam::IOMRFZoneList' has no member named 'relativeVelocity'

linnemann April 1, 2014 14:22

Hi

just replace
Code:

relativeVelocity
with
Code:

makeRelative
in that file.

They changed it from 2.2 to 2.3

akidess April 11, 2016 09:58

I adapted the code to compile with OF-3.0.x:

https://bitbucket.org/akidess/urel

MIZOR May 31, 2017 06:05

1 Attachment(s)
Hi,

i attached Urel to compile with OF v16.06.


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