Skip to content

Commit

Permalink
Merge pull request #214 from iggroup/swmm_roughness_translation_corre…
Browse files Browse the repository at this point in the history
…ction

Swmm roughness translation correction
  • Loading branch information
ponceta authored Nov 7, 2023
2 parents 3dfcecd + d4bc5ba commit 164095e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions swmm_views/04_vw_swmm_conduits.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SELECT
WHEN re.coefficient_of_friction IS NOT NULL THEN (1 / re.coefficient_of_friction::double precision)
WHEN re.coefficient_of_friction IS NULL AND re.wall_roughness IS NOT NULL THEN
CASE
WHEN re.clear_height IS NOT NULL THEN (1 / (4 * SQRT(9.81) * POWER((32 / re.clear_height::double precision / 1000),(1 / 6::double precision))*LOG(((3.71 * re.clear_height::double precision / 1000) / (re.wall_roughness / 1000)))))::numeric(7,4)
WHEN re.clear_height IS NOT NULL THEN 1./((4. * SQRT(9.81) * POWER((32. / (re.clear_height::double precision / 1000.)),(1. / 6.::double precision)))*LOG(((3.71 * (re.clear_height::double precision / 1000.)) / (re.wall_roughness / 1000.))))::numeric(7,4)
WHEN re.clear_height IS NULL AND re.swmm_default_coefficient_of_friction IS NOT NULL THEN (1 / re.swmm_default_coefficient_of_friction::double precision)
ELSE 0.01
END
Expand All @@ -37,10 +37,10 @@ SELECT
concat_ws(';',
ws.identifier,
CASE
WHEN re.coefficient_of_friction IS NOT NULL THEN '1 / K_Strickler is used as roughness'
WHEN re.coefficient_of_friction IS NOT NULL THEN '1 / K_Strickler, 1/re.coefficient_of_friction is used as roughness'
WHEN re.coefficient_of_friction IS NULL AND re.wall_roughness IS NOT NULL THEN
CASE
WHEN re.clear_height IS NOT NULL THEN 'The approximation of 1 / K_Strickler is computed using K_Colebrook to determined the roughness as roughness'
WHEN re.clear_height IS NOT NULL THEN 'The approximation of 1 / K_Strickler is computed from re.wall_roughness using an approximation formula.'
WHEN re.clear_height IS NULL AND re.swmm_default_coefficient_of_friction IS NOT NULL THEN 'The default value stored in reach.swmm_default_coefficient_of_friction is used'
ELSE 'Default value 0.01 is used as roughness'
END
Expand Down

0 comments on commit 164095e

Please sign in to comment.