logProfileFit: Fit a log velocity profile.

Description Usage Arguments Details Value See Also Examples

View source: R/turb.R

Description

Calculates the log fit of a velocity profile using logFit.

Usage

1
logProfileFit(z, u, k = 0.4)

Arguments

z

Vector containing the heights of the boundary layer.

u

Vector containing the velocities of the boundary layer.

k

Von Karman constant.

Details

This function calculates the the parameters of a velocity profile according to the law of the wall:

u/u* = 1/k * ln(z/z0)

This function returnd u* (us) and z0 given k (usually 0.4 or 0.41).

Value

Vector c(z0,us)

See Also

logFit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
z <- seq(5, 300, by=5)
k <- 0.4
z0 <- 2
us <- 0.5
u <- 1/k * log(z/z0) + rnorm(10, sd=0.2)

fit <- logProfileFit(z, u)
plot(u, z, xlab='Height (mm)', ylab='Velocity (m/s)', ty='b')
lines(fit['us']/k * log(z/fit['z0']), z)
print(fit)

tunelipt/wutils documentation built on Nov. 5, 2019, 11:01 a.m.