Wind and current areas#

This example illustrates how to add a wind area and how the wind-force is calculated.

Start with a simple hinged bar.

from DAVE import *
from DAVE.jupyter import *

s = Scene()
s.new_frame('hinge',fixed = (True,True,True, True, False, True))
s.new_rigidbody('Bar', parent='hinge', cog = (10,0,0), mass = 0.1)
s.solve_statics()

show(s)
DAVEcore version = 2.0 from C:\python\miniconda3\envs\book\Lib\site-packages\DAVEcore.cp311-win_amd64.pyd
Blender found at: C:\Users\beneden\AppData\Local\Microsoft\WindowsApps\\blender-launcher.exe
../_images/c645415d31e07754511ab8a00ca93365f9960bf0954264ab47586ab081403209.png

Now add a point to the bar, and then add a wind-area to that point.

The wind-area is defined using an area (A) [m2] and a drag coefficient (Cd) [-].

In this case the area is defined as a plane. In that case the orientation of the plane needs to be defined by defining its normal.

The normal is defined in the axis system of the frame that the area is attached to.

# add a point at the same location as the cog
s.new_point('point', parent='Bar', position = (10,0,0))

# and add a wind-area to that point
s.new_windarea('wind-area',
               parent='point',
               A = 10,
               Cd = 1.2,
               areakind=AreaKind.PLANE,
               direction = (0,0,1)
               )

show(s)
../_images/058ebee730fb9272b8d2e17d38e89088a64f90e8a6c38d2acc640b532fa92f91.png

For the wind area to have effect, we need to have some wind.

Wind is defined at Scene level:

s.wind_velocity = 10 # m/s
s.wind_direction = 0 # deg --> going in direction of global x-axis.

s.solve_statics()
True
show(s, zoom_fit=True)
../_images/24c60788cb593e80e10aa59cf6b2445798f9a79df342fc5a0a8e153272d14128.png
report(s['wind-area'])
Properties of wind-area (WindArea)
PropertyValueUnitRemarksExplained
A10.000[m2]Total area . See also Ae
Ae8.395[m2]Effective area . This is the projection of the total to the actual wind/current direction. Read only.
Cd1.200[-]Cd coefficient
areakindAreaKind.PLANEDefines how to interpret the area.
direction(0.000,
0.000,
1.000 )
Depends on 'areakind'. For 'plane' this is the direction of the normal of the plane, for 'cylindrical' this is
force(0.635,
0.000,
0.000 )
[kN,
kN,
kN]
global axisThe x,y and z components of the force
fx0.635[kN]global axisThe global x-component of the force
fy0.000[kN]global axisThe global y-component of the force
fz0.000[kN]global axisThe global z-component of the force
namewind-areaName of the node (str), must be unique
visibleTrue[bool]Determines if this node is visible in the viewport

The wind is always horizontal. As the bar rotates the wind area rotates with it (remember: the direction of the plane is defined in the local axis system). This lowers the effective wind area.

To get the angle of the bar (and the wind area) we can look at the trim of the bar or its local x-axis:

report(s['Bar'],['trim', 'ux'])
Properties of Bar (RigidBody)
PropertyValueUnitRemarksExplained
trim57.090[deg]Trim in degrees. Bow-down is positive
ux(0.543,
0.000,
-0.840 )
[m,
m,
m]
Global axisThe unit x axis

We can now check the effective wind area either from the angle:

from math import *
sin(radians(57.093))
0.8395534969904384

or from the z-component of the local x-axis:

s['Bar'].ux[2]
-0.8395224118438845

Both tell us that only about 84% of the area is faced in the direction of the wind. This means the effective wind area (Ae) is 84% of the total area (A). Lets check that:

s['wind-area'].Ae / s['wind-area'].A
0.8395224118438845

The wind-force is always in the direction of the wind. It is calculated from the standard formulation:

\(F = 0.5 * rho * A * Cd * V^2\)

w = s['wind-area']
F = 0.5 * s.rho_air * w.Ae * w.Cd * s.wind_velocity**2

print(F)
0.6346789433539768

And verify that it is equal to the reported wind-force of the wind-area:

report(w, ['*x*'])  # anything with 'x'
Properties of wind-area (WindArea)
PropertyValueUnitRemarksExplained
fx0.635[kN]global axisThe global x-component of the force

And while we’re at it, verify that this force is countered by the hinge:

report(s['hinge'], ['*connection_force*'])
Properties of hinge (Frame)
PropertyValueUnitRemarksExplained
connection_force(0.635,
0.000,
-0.981,
0.000,
0.000,
0.000 )
[kN,
kN,
kN,
kNm,
kNm,
kNm]
Parent axisThe forces and moments that this axis applies on its parent at the origin of this axis system.
connection_force_x0.635[kN]Parent axisThe x-component of the connection-force vector
connection_force_y0.000[kN]Parent axisThe y-component of the connection-force vector
connection_force_z-0.981[kN]Parent axisThe z-component of the connection-force vector

Currents#

Currents work exactly the same but then with:

  • s.new_currentarea(…)

  • s.rho_water

  • s.current_direction

  • s.current_velocity