calcLogProfile: Interactively fit of the law of the wall on measured velocity...

Description Usage Arguments Details Value See Also Examples

View source: R/turb.R

Description

Calculates the law of the wall that best fits to a velocity profile using logProfileFit.

Usage

1
2
calcLogProfile(z, u, k = 0.4, return.fun = FALSE, v = NULL, h = NULL,
  ...)

Arguments

z

Heights of velocity measurements.

u

Velocity measurements.

k

Von Karman constant.

return.fun

Return fit parameters or a function that calculates the velocity?

v

Any vertical lines that should be plotted.

h

Any horizontal lines that should be plotted.

...

Any parameters that shoud be passed along to chooseFitSection.

Details

A measured velocity profile is usually not entirely a log layer. Near the ground (or within the roughness elements) or near the top of the boundary layer the velocity profile deviates from the law of the wall and therefore the applicable portion of the velocity profile should be specified. This function is a wrapper around logProfileFit where the velocity profile is plotted on a log-linear axis so that the law of the wall section is easily found. The user then specifies the section where the law of the wall is applicable and uses this section to compute the profile characteristics.

Value

Fit parameters or function depending on argument return.fun.

See Also

logProfileFit logFitFun powerFitFun

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 <- calcLogProfile(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.