|
[Sponsors] |
June 30, 2017, 09:13 |
Accessing velocity at inverse position
|
#1 |
New Member
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
Hi guys,
I am trying to implement the following formula into my code: That is, I aim at calculating this "antisymmetric" velocity for every time step. How can I implement especially the part, i.e. the access to the velocity at the inverse position? Of course, is simply implemented as Code:
volVectorField U Regards fusionfire |
|
July 1, 2017, 00:41 |
|
#2 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Hi there,
What is your domain and mesh like? On the top of my head, I cannot think of a way to access velocity at the inverse location unless the mesh is a uniform structured Cartesian or cylindrical one. USV |
|
July 1, 2017, 04:11 |
|
#3 |
New Member
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
Hi,
the domain is an ellipsoid with its center at the origin, generated with a rather complicated snappyHexMesh file. The coordinate system is cartesian though. Regards |
|
July 1, 2017, 04:24 |
|
#4 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Hi,
If your mesh is symmetrical about the origin, then perhaps you could build a volScalarField whose internalField consists of the indices of the cells centered at the corresponding inverse locations. Then, you could simply loop over the internalField to get your . If you do it carefully, you only need to loop over half the internalField since the values should be symmetric. But you must first build the volScalarField somehow. Can you attach an image of your mesh? That could give others some ideas. USV |
|
July 1, 2017, 04:28 |
|
#5 |
Senior Member
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11 |
Actually, if you mesh only the first octant and then mirror mesh to get the full mesh, you would get a symmetrical mesh about the origin. Then, the cell index at the inverse location could probably be obtained by adding a constant number to the cell index in the first four octants where z (or x or y) is positive.
USV |
|
Tags |
coordinates, position, velocity, volvectorfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 10:08 |
Results of CFX Simulations | Sof_70_Usthb | CFX | 3 | July 9, 2011 07:15 |
Accessing Velocity Components | anfho | OpenFOAM Programming & Development | 1 | June 30, 2011 20:21 |
accessing another velocity field in bc | daviderzen | OpenFOAM | 0 | April 20, 2011 07:24 |
Plot velocity profile at different position | AirS | Main CFD Forum | 2 | December 3, 2010 07:03 |