ocmw.core.physics module

Functions for calculating physical quantities.

pressure2depth

Convert pressure measured in seawater to a depth in metres below surface.

g_wgs84

Calculate gravity based on latitude on the WGS84 spheroid.

circulation2D

Calculate the circulation around an element define by the nodes at locations ( x , y ).

kinetic_energy_density_2D

Calculate kinetic energy density at a mesh element centroid

potential_energy_density_2D

Calculate potential energy density at a mesh element centroid

frictionCoeff

Convert as C100 drag coefficient to a bed friction coefficient.

chezy

Calculate the Chezy friction coefficient from the C_100 drag coeficient.

manning

Calculate the Manning friction coefficient based on the C_100 drag coefficient and the water depth.

strickler

Calculate the Strickler friction coefficient based on the C_100 drag coefficient and the water depth.

nikuradse

Calculate the Nikuradse friction coefficient based on the C_100 drag coeffieient and the water depth.

Functions for calculating physical quantities.

ocmw.core.physics.pressure2depth(d0, lat, P)[source]

Convert pressure measured in seawater to a depth in metres below surface.

ocmw.core.physics.g_wgs84(lat)[source]

Calculate gravity based on latitude on the WGS84 spheroid.

Parameters:

lat (float) – Latitude in decimal degrees.

Returns:

g (float) – Gravitational acceleration at latitude in m/s^2.

ocmw.core.physics.circulation2D(x, y, vel_x, vel_y)[source]

Calculate the circulation around an element define by the nodes at locations ( x , y ).

Parameters:
  • x (list[ float ]) – x coordinates of element nodes [ m ].

  • y (list[ float ]) – y coordinate of element nodes [ m ].

  • vel_x (list[ float ]) – x component of velocity at element nodes [ m/s ].

  • vel_y (list[ float ]) – y component of velocity at element nodes [ m/s ].

Returns:

circ (float) – fluid circulation around element.

ocmw.core.physics.kinetic_energy_density_2D(mesh, depth, velx, vely, rho)[source]

Calculate kinetic energy density at a mesh element centroid

ocmw.core.physics.potential_energy_density_2D(mesh, elev, rho)[source]

Calculate potential energy density at a mesh element centroid

ocmw.core.physics.frictionCoeff(C100)[source]

Convert as C100 drag coefficient to a bed friction coefficient.

ocmw.core.physics.chezy(C100)[source]

Calculate the Chezy friction coefficient from the C_100 drag coeficient.

Parameters:

C100 (float) – C_100 drag coefficient (based on the velocity 100cm above bed).

Returns:

Cz (float) – Chezy friction coefficient.

ocmw.core.physics.manning(C100, h)[source]

Calculate the Manning friction coefficient based on the C_100 drag coefficient and the water depth.

Parameters:
  • C100 (float) – Drag coeffieient at 100cm above the beed.

  • h (float) – water depth [ m ].

Returns:

m (float) – Manning friction coefficient.

ocmw.core.physics.strickler(C100, h)[source]

Calculate the Strickler friction coefficient based on the C_100 drag coefficient and the water depth.

Parameters:
  • C100 (float) – Drag coeffieient at 100cm above the beed.

  • h (float) – water depth [ m ].

Returns:

S (float) – Strickler friction coefficient.

ocmw.core.physics.nikuradse(C100, h)[source]

Calculate the Nikuradse friction coefficient based on the C_100 drag coeffieient and the water depth.

Parameters:
  • C100 (float) – Drag coeffieient at 100cm above the beed.

  • h (float) – water depth [ m ].

Returns:

ks (float) – Nikuradse friction coefficient.