Go Back   Physics Help Forum > High School and Pre-University Physics Help > Thermodynamics and Fluid Mechanics

Thermodynamics and Fluid Mechanics Thermodynamics and Fluid Mechanics Physics Help Forum

LinkBack Thread Tools Display Modes
Old Aug 7th 2019, 11:49 AM   #1
Junior Member
Join Date: Aug 2019
Posts: 1
Python script to find drag force on a 2D object given differential pressure vectors

I am in need of a python program to calculate the drag force on a 2D object, given differential pressure acting on the object-- this will have to be calculated either manually or (hopefully) by the code. I have the exact location of each pressure vector via a .dat file, and would like to know the drag on the object by most probably integrating the pressure over area ( I think solving the Naiver-Stokes equations or other formulas wouldn't be useful for this problem). The original fluid modeler /mesher program that I will need to import the data from, outputs data which can be visualized using a program like ParaView. The program works by creating time steps, of which there are 23, before a stead state is reached. Please let me know any information you all have as to how I should solve this problem /help me by writing the code.
I have very little programming experience, so I will need to figure out a lot of things 'on the job'.
jeremyrosh is offline   Reply With Quote
Old Aug 8th 2019, 10:52 AM   #2
Senior Member
Woody's Avatar
Join Date: Jun 2016
Location: England
Posts: 1,069
The basic algorithm for finding a force from a pressure is simply:
the pressure multiplied by the area the pressure is acting over.

You have a number of pressures acting over a shape.
For each of the pressures you have to decide what portion of the shape that particular pressure applies to, and thus what area it is acting over.

This gives you a list of pressures and their associated areas,
from which you can readily calculate the force applied by each pressure.

However, the Force is generated Normal to the local surface
(Normal is a term used to indicate directly up and down relative to the surface)
In other words at 90 degrees to the (average) surface of the area over which the pressure is acting.

You want the drag.
Thus you have to resolve the Forces acting over each area to derive just that portion that is acting in the windward direction .

Then finally just add all the windward forces together to get the drag.

Last edited by Woody; Aug 8th 2019 at 10:55 AM.
Woody is offline   Reply With Quote

  Physics Help Forum > High School and Pre-University Physics Help > Thermodynamics and Fluid Mechanics

calculate, differential, differential pressure, drag, find, force, object, pressure, python, script, vectors

Thread Tools
Display Modes

Similar Physics Forum Discussions
Thread Thread Starter Forum Replies Last Post
Weight of object = Force of buoyancy: can I use this when density of object is greatr jlyu002 Thermodynamics and Fluid Mechanics 2 Aug 13th 2014 06:44 AM
Drag Force & Drag Coefficient tracker890 Thermodynamics and Fluid Mechanics 4 Mar 10th 2013 09:25 AM
Drag force symstar Kinematics and Dynamics 3 Oct 4th 2008 03:41 AM
Drag force werehk Kinematics and Dynamics 3 Jul 27th 2008 09:50 AM
Drag force Baggyeyes Kinematics and Dynamics 4 Apr 27th 2008 02:28 PM

Facebook Twitter Google+ RSS Feed