|
[Sponsors] |
January 17, 2024, 12:10 |
Computing forces in grid points
|
#1 |
New Member
Join Date: Dec 2023
Posts: 3
Rep Power: 2 |
Hi everyone,
I've done some simulations with a 3D wing and I'm looking for a way for computing the forces in each point of the surface mesh. In the surface_flow there are Cp and Cf values but for obtaining the forces I need the normal vectors. How can I retrieve the Normals directly from SU2? |
|
January 17, 2024, 14:13 |
|
#2 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 504
Rep Power: 17 |
The normal forces are not being written to any file. But you can construct the normal forces in paraview if you save the results in paraview .vtm format (then it is easy to extract the surfaces that you need for the force calculation)
|
|
January 18, 2024, 18:22 |
|
#3 |
New Member
Join Date: Dec 2023
Posts: 3
Rep Power: 2 |
Hi, do you intend to use a programmable filter in Paraview? Is there a convenient way? Because I obtained the normals faces in the triangles of the mesh but I'm not sure how extracting the normals in the grid point where SU2 compute the Cp and Cf.
|
|
January 19, 2024, 02:59 |
|
#4 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 504
Rep Power: 17 |
Have a look at this statefile:
https://github.com/bigfooted/su2case...eseries_3.pvsm It was used to make the first movie, force distribution on a vortex shedding cylinder, that is shown here: https://github.com/bigfooted/su2cases/tree/master The input should be a vtm file, there is one here: https://github.com/bigfooted/su2case...inder_farfield In the statefile, the force normal to the surface is computed using pressure * normal The lift is then computed again by taking the normal in the vertical direction. The programmable filter is simply this: Code:
from vtk.numpy_interface import algorithms as algs import numpy as np input0 = inputs[0] numCells = input0.GetNumberOfCells() normx = np.empty(numCells, dtype=np.float64) normy = np.empty(numCells, dtype=np.float64) normz = np.zeros(numCells, dtype=np.float64) for i in range(numCells): cell = input0.GetCell(i) p1 = input0.GetPoint(cell.GetPointId(0)) p2 = input0.GetPoint(cell.GetPointId(1)) nx = p2[1] - p1[1] ny = -(p2[0] - p1[0]) normx[i] = -nx/sqrt(nx*nx+ny*ny) normy[i] = -ny/(sqrt(nx*nx+ny*ny)) norm = algs.make_vector(normx, normy, normz) output.CellData.append(norm, "normals") p, li { white-space: pre-wrap; } |
|
January 19, 2024, 13:48 |
|
#5 |
New Member
Join Date: Dec 2023
Posts: 3
Rep Power: 2 |
Thanks for helping me.
Is the programmable filter for a 3D case? I don't understand how could be the norm in the z direction always 0 |
|
January 19, 2024, 15:33 |
|
#6 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 504
Rep Power: 17 |
The cylinder case is 2D, you can just add the z-coordinate in a straightforward way...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence problem of OF | WUYing | OpenFOAM Running, Solving & CFD | 2 | September 20, 2021 10:09 |
solution result of any parameter at all grid points in ANSYS Fluent in data file? | Muhammad Shad | FLUENT | 2 | September 25, 2018 13:02 |
How can I get pressure distribution between two grid points | PolyU | FLUENT | 0 | February 28, 2014 01:27 |
[snappyHexMesh] determining displacement for added points | CFDnewbie147 | OpenFOAM Meshing & Mesh Conversion | 1 | October 22, 2013 09:53 |
[DesignModeler] DM's JScript: FPoint()'s GetPoint(i) function picks points backwards? | ANT | ANSYS Meshing & Geometry | 2 | July 23, 2012 15:25 |