|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Wall function implementations for near-wall turbulence modeling. More...
Go to the source code of this file.
Macros | |
| #define | KAPPA 0.41 |
| von Karman constant (universal turbulence constant) | |
| #define | LOGLAW_B 5.5 |
| Log-law intercept constant B for smooth walls. | |
| #define | VISCOUS_SUBLAYER_YPLUS 11.81 |
| Viscous sublayer thickness y+ threshold. | |
| #define | ROUGHNESS_TRANSITION_YPLUS 2.25 |
| Smooth-to-rough transition y+ threshold. | |
| #define | FULLY_ROUGH_YPLUS 90.0 |
| Fully rough regime y+ threshold. | |
| #define | DAMPING_COEFFICIENT 19.0 |
| Eddy viscosity damping coefficient (van Driest damping) | |
Functions | |
| void | noslip (UserCtx *user, double distance_reference, double distance_boundary, Cmpnts velocity_wall, Cmpnts velocity_reference, Cmpnts *velocity_boundary, double normal_x, double normal_y, double normal_z) |
Internal helper implementation: noslip(). | |
| void | freeslip (UserCtx *user, double distance_reference, double distance_boundary, Cmpnts velocity_wall, Cmpnts velocity_reference, Cmpnts *velocity_boundary, double normal_x, double normal_y, double normal_z) |
Internal helper implementation: freeslip(). | |
| double | E_coeff (double friction_velocity, double roughness_height, double kinematic_viscosity) |
Internal helper implementation: E_coeff(). | |
| double | u_hydset_roughness (double kinematic_viscosity, double wall_distance, double friction_velocity, double roughness_height) |
Internal helper implementation: u_hydset_roughness(). | |
| double | f_hydset (double kinematic_viscosity, double known_velocity, double wall_distance, double friction_velocity_guess, double roughness_height) |
Internal helper implementation: f_hydset(). | |
| double | df_hydset (double kinematic_viscosity, double known_velocity, double wall_distance, double friction_velocity_guess, double roughness_height) |
| Implementation of df_hydset(). | |
| double | find_utau_hydset (double kinematic_viscosity, double known_velocity, double wall_distance, double initial_guess, double roughness_height) |
| Implementation of find_utau_hydset(). | |
| double | nu_t (double yplus) |
Internal helper implementation: nu_t(). | |
| double | integrate_1 (double kinematic_viscosity, double wall_distance, double friction_velocity, int integration_mode) |
| Implementation of integrate_1(). | |
| double | taw (double kinematic_viscosity, double friction_velocity, double wall_distance, double velocity, double pressure_gradient_tangent) |
| Implementation of taw(). | |
| double | u_Cabot (double kinematic_viscosity, double wall_distance, double friction_velocity, double pressure_gradient_tangent, double wall_shear_stress) |
| Implementation of u_Cabot(). | |
| double | f_Cabot (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity_guess, double pressure_gradient_tangent, double pressure_gradient_normal) |
Internal helper implementation: f_Cabot(). | |
| double | df_Cabot (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity_guess, double pressure_gradient_tangent, double pressure_gradient_normal) |
| Implementation of df_Cabot(). | |
| void | find_utau_Cabot (double kinematic_viscosity, double velocity, double wall_distance, double initial_guess, double pressure_gradient_tangent, double pressure_gradient_normal, double *friction_velocity, double *wall_shear_velocity, double *wall_shear_normal) |
| Implementation of find_utau_Cabot(). | |
| double | u_Werner (double kinematic_viscosity, double wall_distance, double friction_velocity) |
Internal helper implementation: u_Werner(). | |
| double | f_Werner (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity) |
Internal helper implementation: f_Werner(). | |
| double | df_Werner (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity) |
| Implementation of df_Werner(). | |
| double | find_utau_Werner (double kinematic_viscosity, double velocity, double wall_distance, double initial_guess) |
| Implementation of find_utau_Werner(). | |
| double | u_loglaw (double wall_distance, double friction_velocity, double roughness_length) |
| Implementation of u_loglaw(). | |
| double | find_utau_loglaw (double velocity, double wall_distance, double roughness_length) |
Internal helper implementation: find_utau_loglaw(). | |
| void | wall_function (UserCtx *user, double distance_reference, double distance_boundary, Cmpnts velocity_wall, Cmpnts velocity_reference, Cmpnts *velocity_boundary, PetscReal *friction_velocity, double normal_x, double normal_y, double normal_z) |
| Implementation of wall_function(). | |
| void | wall_function_loglaw (UserCtx *user, double roughness_height, double distance_reference, double distance_boundary, Cmpnts velocity_wall, Cmpnts velocity_reference, Cmpnts *velocity_boundary, PetscReal *friction_velocity, double normal_x, double normal_y, double normal_z) |
Internal helper implementation: wall_function_loglaw(). | |
| void | wall_function_Cabot (UserCtx *user, double roughness_height, double distance_reference, double distance_boundary, Cmpnts velocity_wall, Cmpnts velocity_reference, Cmpnts *velocity_boundary, PetscReal *friction_velocity, double normal_x, double normal_y, double normal_z, double pressure_gradient_x, double pressure_gradient_y, double pressure_gradient_z, int iteration_count) |
Internal helper implementation: wall_function_Cabot(). | |
Wall function implementations for near-wall turbulence modeling.
This file contains various wall function models that bridge the gap between the wall and the first computational grid point. Wall functions allow simulations to avoid resolving the viscous sublayer, reducing computational cost while maintaining reasonable accuracy for turbulent wall-bounded flows.
PHYSICAL BACKGROUND: The near-wall region in turbulent flows is characterized by three layers:
IMPLEMENTED MODELS:
Definition in file wallfunction.c.
| #define KAPPA 0.41 |
von Karman constant (universal turbulence constant)
Definition at line 43 of file wallfunction.c.
| #define LOGLAW_B 5.5 |
Log-law intercept constant B for smooth walls.
Definition at line 46 of file wallfunction.c.
| #define VISCOUS_SUBLAYER_YPLUS 11.81 |
Viscous sublayer thickness y+ threshold.
Definition at line 49 of file wallfunction.c.
| #define ROUGHNESS_TRANSITION_YPLUS 2.25 |
Smooth-to-rough transition y+ threshold.
Definition at line 52 of file wallfunction.c.
| #define FULLY_ROUGH_YPLUS 90.0 |
Fully rough regime y+ threshold.
Definition at line 55 of file wallfunction.c.
| #define DAMPING_COEFFICIENT 19.0 |
Eddy viscosity damping coefficient (van Driest damping)
Definition at line 58 of file wallfunction.c.
| void noslip | ( | UserCtx * | user, |
| double | distance_reference, | ||
| double | distance_boundary, | ||
| Cmpnts | velocity_wall, | ||
| Cmpnts | velocity_reference, | ||
| Cmpnts * | velocity_boundary, | ||
| double | normal_x, | ||
| double | normal_y, | ||
| double | normal_z | ||
| ) |
Internal helper implementation: noslip().
Applies no-slip wall boundary condition with linear interpolation.
Local to this translation unit.
Definition at line 68 of file wallfunction.c.
| void freeslip | ( | UserCtx * | user, |
| double | distance_reference, | ||
| double | distance_boundary, | ||
| Cmpnts | velocity_wall, | ||
| Cmpnts | velocity_reference, | ||
| Cmpnts * | velocity_boundary, | ||
| double | normal_x, | ||
| double | normal_y, | ||
| double | normal_z | ||
| ) |
Internal helper implementation: freeslip().
Applies free-slip wall boundary condition.
Local to this translation unit.
Definition at line 101 of file wallfunction.c.
| double E_coeff | ( | double | friction_velocity, |
| double | roughness_height, | ||
| double | kinematic_viscosity | ||
| ) |
Internal helper implementation: E_coeff().
Computes roughness-modified log-law coefficient E.
Local to this translation unit.
Definition at line 140 of file wallfunction.c.
| double u_hydset_roughness | ( | double | kinematic_viscosity, |
| double | wall_distance, | ||
| double | friction_velocity, | ||
| double | roughness_height | ||
| ) |
Internal helper implementation: u_hydset_roughness().
Computes velocity from log-law for rough walls.
Local to this translation unit.
Definition at line 172 of file wallfunction.c.
| double f_hydset | ( | double | kinematic_viscosity, |
| double | known_velocity, | ||
| double | wall_distance, | ||
| double | friction_velocity_guess, | ||
| double | roughness_height | ||
| ) |
Internal helper implementation: f_hydset().
Residual function for friction velocity equation (log-law with roughness)
Local to this translation unit.
Definition at line 209 of file wallfunction.c.
| double df_hydset | ( | double | kinematic_viscosity, |
| double | known_velocity, | ||
| double | wall_distance, | ||
| double | friction_velocity_guess, | ||
| double | roughness_height | ||
| ) |
Implementation of df_hydset().
Numerical derivative of residual function.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 235 of file wallfunction.c.
| double find_utau_hydset | ( | double | kinematic_viscosity, |
| double | known_velocity, | ||
| double | wall_distance, | ||
| double | initial_guess, | ||
| double | roughness_height | ||
| ) |
Implementation of find_utau_hydset().
Solves for friction velocity using Newton-Raphson iteration.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 256 of file wallfunction.c.
| double nu_t | ( | double | yplus | ) |
Internal helper implementation: nu_t().
Computes turbulent eddy viscosity ratio (ν_t / ν)
Local to this translation unit.
Definition at line 303 of file wallfunction.c.
| double integrate_1 | ( | double | kinematic_viscosity, |
| double | wall_distance, | ||
| double | friction_velocity, | ||
| int | integration_mode | ||
| ) |
Implementation of integrate_1().
Integrates eddy viscosity profile from wall to distance y.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 318 of file wallfunction.c.
| double taw | ( | double | kinematic_viscosity, |
| double | friction_velocity, | ||
| double | wall_distance, | ||
| double | velocity, | ||
| double | pressure_gradient_tangent | ||
| ) |
Implementation of taw().
Computes wall shear stress with pressure gradient effects.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 369 of file wallfunction.c.
| double u_Cabot | ( | double | kinematic_viscosity, |
| double | wall_distance, | ||
| double | friction_velocity, | ||
| double | pressure_gradient_tangent, | ||
| double | wall_shear_stress | ||
| ) |
Implementation of u_Cabot().
Computes velocity using Cabot wall function.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 386 of file wallfunction.c.
| double f_Cabot | ( | double | kinematic_viscosity, |
| double | velocity, | ||
| double | wall_distance, | ||
| double | friction_velocity_guess, | ||
| double | pressure_gradient_tangent, | ||
| double | pressure_gradient_normal | ||
| ) |
Internal helper implementation: f_Cabot().
Residual function for Cabot wall function.
Local to this translation unit.
Definition at line 400 of file wallfunction.c.
| double df_Cabot | ( | double | kinematic_viscosity, |
| double | velocity, | ||
| double | wall_distance, | ||
| double | friction_velocity_guess, | ||
| double | pressure_gradient_tangent, | ||
| double | pressure_gradient_normal | ||
| ) |
Implementation of df_Cabot().
Numerical derivative for Cabot wall function.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 417 of file wallfunction.c.
| void find_utau_Cabot | ( | double | kinematic_viscosity, |
| double | velocity, | ||
| double | wall_distance, | ||
| double | initial_guess, | ||
| double | pressure_gradient_tangent, | ||
| double | pressure_gradient_normal, | ||
| double * | friction_velocity, | ||
| double * | wall_shear_velocity, | ||
| double * | wall_shear_normal | ||
| ) |
Implementation of find_utau_Cabot().
Solves for friction velocity using Cabot wall function.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 440 of file wallfunction.c.
| double u_Werner | ( | double | kinematic_viscosity, |
| double | wall_distance, | ||
| double | friction_velocity | ||
| ) |
Internal helper implementation: u_Werner().
Computes velocity using Werner-Wengle wall function.
Local to this translation unit.
Definition at line 489 of file wallfunction.c.
| double f_Werner | ( | double | kinematic_viscosity, |
| double | velocity, | ||
| double | wall_distance, | ||
| double | friction_velocity | ||
| ) |
Internal helper implementation: f_Werner().
Residual function for Werner-Wengle iteration.
Local to this translation unit.
Definition at line 516 of file wallfunction.c.
| double df_Werner | ( | double | kinematic_viscosity, |
| double | velocity, | ||
| double | wall_distance, | ||
| double | friction_velocity | ||
| ) |
Implementation of df_Werner().
Numerical derivative for Werner-Wengle iteration.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 560 of file wallfunction.c.
| double find_utau_Werner | ( | double | kinematic_viscosity, |
| double | velocity, | ||
| double | wall_distance, | ||
| double | initial_guess | ||
| ) |
Implementation of find_utau_Werner().
Solves for friction velocity using Werner-Wengle wall function.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 580 of file wallfunction.c.
| double u_loglaw | ( | double | wall_distance, |
| double | friction_velocity, | ||
| double | roughness_length | ||
| ) |
Implementation of u_loglaw().
Computes velocity using simple log-law (smooth wall with roughness offset)
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 620 of file wallfunction.c.
| double find_utau_loglaw | ( | double | velocity, |
| double | wall_distance, | ||
| double | roughness_length | ||
| ) |
Internal helper implementation: find_utau_loglaw().
Solves for friction velocity using simple log-law (explicit formula)
Local to this translation unit.
Definition at line 629 of file wallfunction.c.
| void wall_function | ( | UserCtx * | user, |
| double | distance_reference, | ||
| double | distance_boundary, | ||
| Cmpnts | velocity_wall, | ||
| Cmpnts | velocity_reference, | ||
| Cmpnts * | velocity_boundary, | ||
| PetscReal * | friction_velocity, | ||
| double | normal_x, | ||
| double | normal_y, | ||
| double | normal_z | ||
| ) |
Implementation of wall_function().
Applies standard wall function with Werner-Wengle model.
Full API contract (arguments, ownership, side effects) is documented with the header declaration in include/wallfunction.h.
Definition at line 648 of file wallfunction.c.
| void wall_function_loglaw | ( | UserCtx * | user, |
| double | roughness_height, | ||
| double | distance_reference, | ||
| double | distance_boundary, | ||
| Cmpnts | velocity_wall, | ||
| Cmpnts | velocity_reference, | ||
| Cmpnts * | velocity_boundary, | ||
| PetscReal * | friction_velocity, | ||
| double | normal_x, | ||
| double | normal_y, | ||
| double | normal_z | ||
| ) |
Internal helper implementation: wall_function_loglaw().
Applies log-law wall function with roughness correction.
Local to this translation unit.
Definition at line 704 of file wallfunction.c.
| void wall_function_Cabot | ( | UserCtx * | user, |
| double | roughness_height, | ||
| double | distance_reference, | ||
| double | distance_boundary, | ||
| Cmpnts | velocity_wall, | ||
| Cmpnts | velocity_reference, | ||
| Cmpnts * | velocity_boundary, | ||
| PetscReal * | friction_velocity, | ||
| double | normal_x, | ||
| double | normal_y, | ||
| double | normal_z, | ||
| double | pressure_gradient_x, | ||
| double | pressure_gradient_y, | ||
| double | pressure_gradient_z, | ||
| int | iteration_count | ||
| ) |
Internal helper implementation: wall_function_Cabot().
Applies Cabot non-equilibrium wall function with pressure gradients.
Local to this translation unit.
Definition at line 766 of file wallfunction.c.