|
[Sponsors] |
Creating relative fluid-velocityfield in pimpleDyMFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 19, 2013, 05:22 |
Creating relative fluid-velocityfield in pimpleDyMFoam
|
#1 | |||
New Member
David J.
Join Date: Jun 2013
Location: Magdeburg
Posts: 2
Rep Power: 0 |
Dear Foamers,
first of all I'd like to say that this is a really nice forum. It already helped me in several situations before my registration, but now my problems got too specific, so it was time to create my first thread. :) In my bachelor thesis I have to solve a case with an angular accelerated cooling circuit. In order to do so I have to work with the solvers pimpleDyMFoam / interDyMFoam (OpenFOAM version 2.2.0) for dynamic mesh simulation. So at first I started with a generic 2D-case of a water circuit which is moved with a constant angular velocity. Unfortunately, when I took a look at the velocity field of the solution I noticed that the velocity field was absolute. Now I would like to visualise the pipe-relative movement of the fluid. My idea is to generate field data of the mesh velocity and subtract it from the absolute U-field so that just the relative movement remains. So I would like to create a custom solver which: A - reads the cellCentres of each timestep-folder B - moves the cellCentres by vector addition (because the center of gravity is not located in the origin) C - transforms the cellCentre vectors into a velocity field with an angular rotation tensor like "RotationTensor*cellCentres=Meshvelocity" D - subtracts the meshveolcity field from the original U-field and creates new URelative-field files in every time step folder I am new both to OpenFOAM and C++ code and therefore encounter many problems creating a custom solver/utility that realises my idea described above. My costumization is strongly based on page 18-21 from this tutorial http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/programmingTutorial.pdf and this site http://www.foamcfd.org/Nabla/guides/...sGuidese4.html Problem 1: I implemented code from the writeCellCentres utility in the createFields.H code, but the custom solver just writes the 0-mesh cellCentres in all the time-step folders. Here is the code piece: Quote:
Secondly, I would like to ask how to implement a vector/tensor operation in the solver code (step B,C) in general? Maybe someone knows some literature/tutorials which give an introduction to this? Heres the code I tried (which is obviously wrong because of compilation errors): - Excerpt from file "uRelEqn.H": Quote:
Quote:
And sorry if my questions are dumb, but as I said I am very new to this... Kind regards, David |
||||
Tags |
cellcentres, custom solver, pimpledymfoam, relative velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluid Structure Interaction | Apollo | Main CFD Forum | 5 | July 4, 2011 16:15 |
Creating fluid zone within Fluent | Suresh | Main CFD Forum | 1 | November 25, 2002 07:36 |
Intl Conf Computational Methods in Fluid Power | Jacek Stecki | Main CFD Forum | 0 | November 10, 2002 05:49 |
My Revised "Time Vs Energy" Article For Review | Abhi | Main CFD Forum | 2 | July 9, 2002 09:08 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 09:11 |