calcPowerProfile: Interactively fit a power law on measured velocity profile.

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

Usage

1
2
calcPowerProfile(z, u, zref = 1, return.fun = FALSE, v = NULL, h = NULL,
  ...)

Arguments

z

Heights of velocity measurements.

u

Velocity measurements.

zref

Reference height.

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 power law. Near the ground (or within the roughness elements) or near the top of the boundary layer the velocity profile deviates from the power law and therefore the applicable portion of the velocity profile should be specified. This function is a wrapper around powerProfileFit where the velocity profile is plotted on a log-log graph so that the power law section is easily identifiable. 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
z <- seq(10, 400, by=10)
zref <- 300
u <- 10*(z/zref)^0.2 + rnorm(10, sd=0.2)
fit <- calcPowerProfile(z,u,zref=300)
plot(u, z, xlab='Velocity (m/s)', ylab='Height (mm)')
lines(fit['u']*(z/zref)^fit['p'], z)
print(fit)

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