# Accessing velocity at inverse position

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

 June 30, 2017, 08:13 Accessing velocity at inverse position #1 New Member   Join Date: Jun 2017 Posts: 3 Rep Power: 7 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 Thank you very much in advance! Regards fusionfire

 June 30, 2017, 23:41 #2 Senior Member   Join Date: Sep 2015 Location: Singapore Posts: 102 Rep Power: 8 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, 03:11 #3 New Member   Join Date: Jun 2017 Posts: 3 Rep Power: 7 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, 03:24 #4 Senior Member   Join Date: Sep 2015 Location: Singapore Posts: 102 Rep Power: 8 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, 03:28 #5 Senior Member   Join Date: Sep 2015 Location: Singapore Posts: 102 Rep Power: 8 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