# Wind and current areas¶

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

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)

Solved to 3.585934708197588e-05.


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)


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()

Solved to 0.0009075346531615125.

True

show(s, zoom_fit=True)

report(s['wind-area'])

Properties of wind-area (WindArea)
PropertyValueUnitRemarksExplained
namewind-areastrName of the node , must be unique
namewind-areastrName of the node , must be unique
parentpointDetermines the parent of the node if any.
force(0.635,
0.000,
0.000 )
kN,
kN,
kN
global axisThe x,y and z components of the force
fx0.635kNglobal axisThe global x-component of the force
fy0.000kNglobal axisThe global y-component of the force
fz0.000kNglobal axisThe global z-component of the force
Ae8.396m2Effective area . This is the projection of the total to the actual wind/current direction. Read only.
Cd1.200-Cd coefficient
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
areakindAreaKind.PLANEDefines how to interpret the area.

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.093degTrim 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 *

0.8395534969904384


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

s['Bar'].ux[2]

-0.8395523697670766


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.8395523697670766


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.6347015915439099


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.635kNglobal 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.635kNParent axisThe x-component of the connection-force vector
connection_force_y0.000kNParent axisThe y-component of the connection-force vector
connection_force_z-0.981kNParent 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