CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > SU2

Computation Drag Force for 2D Geometry

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

LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2022, 13:11
Default Computation Drag Force for 2D Geometry
New Member
Barış Bıakı
Join Date: Dec 2021
Location: Turkey
Posts: 7
Rep Power: 3
BarisBicakci is on a distinguished road
Hello everyone,
I've done a simulation for 2D supersonic air intake. I have history output file which includes Cd and Cl values from this simulation and I also have surface_flow.vtu which includes Cp values for my intake geometry. I need to calculate drag force on my intake geometry. There is some example for computation of drag force via Paraview. However all these examples performed for 3D case. Is there anyone have suggestion for me about my case. I couldn't figured out how I can do it. Thank you.
BarisBicakci is offline   Reply With Quote

Old   February 12, 2022, 09:39
Senior Member
Join Date: Dec 2011
Location: Netherlands
Posts: 375
Rep Power: 16
bigfootedrockmidget is on a distinguished road

If you have the Cd and Cl from SU2, just make it dimensional to compute the lift and the drag. You can also output Cd and Cl for each of the markers that you have in your domain.

If you have a 2D case and you would like to compute lift and drag in paraview from pressure, you need compute the 2D normals first using a programmable filter. Make sure that the input is the 2D edge that you would like to compute the normals on. If you have a multiblock mesh, you use an Extract Block to get the edge that you want. To make it easier for the programmable source, convert the edge into unstructured data by using a Merge Blocks. The programmable source looks like this, after the source you will have the surface normals available to compute the lift and the drag

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))
   normx[i] = p2[1] - p1[1]
   normy[i] = -(p2[0] - p1[0])

 norm = algs.make_vector(normx, normy, normz)
 output.CellData.append(norm, "normals")
bigfootedrockmidget is offline   Reply With Quote


drag, drag analysis, paravie, su2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Drag force and drag coefficient abose06 ANSYS 1 December 11, 2020 00:55
Drag Force on a droplet Mwbadawy Fluent Multiphase 1 July 23, 2020 16:22
Bad submarine drag force with SimpleFoam Scarpafico OpenFOAM Running, Solving & CFD 3 October 3, 2015 11:19
Force can not converge colopolo CFX 13 October 4, 2011 23:03
Force vectors for drag during sweeping motion aamer FLUENT 0 April 18, 2011 09:17

All times are GMT -4. The time now is 18:39.