# Rotational averaging in a circular container/mesh

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 3, 2009, 03:51 Rotational averaging in a circular container/mesh #1 New Member   Stefan Roth Join Date: Jun 2009 Posts: 1 Rep Power: 0 Hello everyone, I have a little problem doing some calculations on geometric Fields. Since I'm very new to OpenFOAM I'm sure there's some very easy solution I'm just failing to figure out. We have a circular mesh and simulate with LES the rotation and turbulence of a fluid inside. The walls are set to a certain rotation speed, heating temperature and so on... What I try to accomplish is an averaging procedure, that circulary averages the temperatures (T) and fluid speeds (U) .. or any other geometric field we might need in the future. Best described as making slices every one degree and then average over the slices to get mean temperature and velocity distribution in a rotational sense in the fluid. The idea I investigated last, was to create a copy of the mesh, rotate this and use the meshToMesh class to interpolate the rotated fields back on the original mesh. Reading the second mesh simply from disk would work, but is unwanted as I would have t make a save/read operation of the mesh with each timestep. creating a mesh in this way: Foam::fvMesh rotatedMesh ( IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::NO_READ, Foam::IOobject::NO_WRITE ), mesh.points(), mesh.faces(), mesh.cells(), true ); and then using meshToMesh fails because he requires the patches to be set correctly rotatingField = transform( Ten, rotatingField ); rotatedMesh.movePoints( rotatingField ); meshToMesh meshToMeshInterp( rotatedMesh, mesh ); meshToMeshInterp.interpolateInternalField ( (*(AAscalarFields.begin())).internalField(), originalField, meshToMesh::INTERPOLATE ); Right now I'm working in reading the boundary from the disk but my question is: can't this be done in a much simpler way? Thanks in advance!

 July 6, 2009, 05:25 #2 Senior Member   Henrik Rusche Join Date: Mar 2009 Location: Braunschweig, Niedersachsen, Germany Posts: 275 Rep Power: 9 Dear Shany, I have not looked into your approach in detail. So I won't comment whether it will work or is a good idea. However, I would go about this by calculating cylindrical coordinates Code: `volScalarField Phi = atan2(mesh.C().y(), mesh.C().x());` Here, I assume that the mesh is aligned with the z-coordinate. Now you can walk through the Phi and collect your statistics as needed. If this is too expensive, you may create addressing for each sector. Henrik

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post goodegg Main CFD Forum 12 January 22, 2013 12:47 iko FLUENT 3 July 3, 2008 05:55 kevin FLUENT 7 June 8, 2006 01:19 src FLUENT 1 August 6, 2004 07:13

All times are GMT -4. The time now is 12:38.