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

Transforming Fields in OpenFOAM postprocessing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2021, 08:04
Question Transforming Fields in OpenFOAM postprocessing
  #1
New Member
 
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 6
NotDrJeff is on a distinguished road
Hello,

I am using a regular hexahedral mesh for solving an atmospheric boundary layer flow. In order to achieve a "quasi-equilibrium" statistically steady state, I am using cyclic boundary conditions on the sides of my domain. However, to avoid the unrealistic "looping" of large coherent structures I am imposing a flow velocity at an angle to the domain (rather than normal to the boundaries) to help break up some of these structures.

Here is my issue. OpenFOAM calculates the velocity components parallel to the mesh. But for analysis, I am interested in the stream-wise and cross-stream velocity fields.

How can I generate these new velocity components? Is there a utility I can use? Do I need to write a functionObject? Something else?

I would like to do this for other vector fields as well.

Thank you!
NotDrJeff is offline   Reply With Quote

Old   September 1, 2021, 10:11
Default
  #2
New Member
 
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 6
NotDrJeff is on a distinguished road
Sorry, I should've done a bit more googling before posting here.

After posting, I found another thread that is similar. But I will leave this thread here in case someone else finds it helpful.

I think the solution to my problem was to add the following to my controlDict.

Code:
  transform
  {
   type    fieldCoordinateSystemTransform;
   libs    (fieldFunctionObjects);

   fields
   (
    qmean
    Rmean
    U
    Uprime
   );

   coordinateSystem
   {
    origin    (0 0 0);

    coordinateRotation
    {
     type    axisAngle;
     axis    (0 0 1);
     angle   30;
    }
   }
  }
If It doesn't work I'll post another reply.
NotDrJeff is offline   Reply With Quote

Reply

Tags
transformation, vector field


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
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 6, 2018 00:48
write fields in openfoam database in boundary patch medmast OpenFOAM Programming & Development 7 February 14, 2017 16:53
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days joegi.geo OpenFOAM Announcements from Other Sources 0 October 1, 2016 20:20
a reconstructPar issue immortality OpenFOAM Post-Processing 8 June 16, 2013 12:25


All times are GMT -4. The time now is 17:51.