|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
#include <petscpf.h>#include <petscdmswarm.h>#include <stdlib.h>#include <time.h>#include <math.h>#include <petsctime.h>#include <petscsys.h>#include <petscdmcomposite.h>#include <petscsystypes.h>#include "variables.h"#include "ParticleSwarm.h"#include "walkingsearch.h"#include "grid.h"#include "logging.h"#include "io.h"#include "interpolation.h"#include "ParticleMotion.h"#include "Boundaries.h"Go to the source code of this file.
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) |
| Applies no-slip wall boundary condition with linear interpolation. | |
| 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) |
| Applies free-slip wall boundary condition. | |
| double | E_coeff (double friction_velocity, double roughness_height, double kinematic_viscosity) |
| Computes roughness-modified log-law coefficient E. | |
| double | u_hydset_roughness (double kinematic_viscosity, double wall_distance, double friction_velocity, double roughness_height) |
| Computes velocity from log-law for rough walls. | |
| double | f_hydset (double kinematic_viscosity, double known_velocity, double wall_distance, double friction_velocity_guess, double roughness_height) |
| Residual function for friction velocity equation (log-law with roughness) | |
| double | df_hydset (double kinematic_viscosity, double known_velocity, double wall_distance, double friction_velocity_guess, double roughness_height) |
| Numerical derivative of residual function. | |
| double | find_utau_hydset (double kinematic_viscosity, double known_velocity, double wall_distance, double initial_guess, double roughness_height) |
| Solves for friction velocity using Newton-Raphson iteration. | |
| double | nu_t (double yplus) |
| Computes turbulent eddy viscosity ratio (ν_t / ν) | |
| double | integrate_1 (double kinematic_viscosity, double wall_distance, double friction_velocity, int integration_mode) |
| Integrates eddy viscosity profile from wall to distance y. | |
| double | taw (double kinematic_viscosity, double friction_velocity, double wall_distance, double velocity, double pressure_gradient_tangent) |
| Computes wall shear stress with pressure gradient effects. | |
| double | u_Cabot (double kinematic_viscosity, double wall_distance, double friction_velocity, double pressure_gradient_tangent, double wall_shear_stress) |
| Computes velocity using Cabot wall function. | |
| double | f_Cabot (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity_guess, double pressure_gradient_tangent, double pressure_gradient_normal) |
| Residual function for Cabot wall function. | |
| double | df_Cabot (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity_guess, double pressure_gradient_tangent, double pressure_gradient_normal) |
| Numerical derivative for Cabot wall function. | |
| 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) |
| Solves for friction velocity using Cabot wall function. | |
| double | u_Werner (double kinematic_viscosity, double wall_distance, double friction_velocity) |
| Computes velocity using Werner-Wengle wall function. | |
| double | f_Werner (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity) |
| Residual function for Werner-Wengle iteration. | |
| double | df_Werner (double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity) |
| Numerical derivative for Werner-Wengle iteration. | |
| double | find_utau_Werner (double kinematic_viscosity, double velocity, double wall_distance, double initial_guess) |
| Solves for friction velocity using Werner-Wengle wall function. | |
| double | u_loglaw (double wall_distance, double friction_velocity, double roughness_length) |
| Computes velocity using simple log-law (smooth wall with roughness offset) | |
| double | find_utau_loglaw (double velocity, double wall_distance, double roughness_length) |
| Solves for friction velocity using simple log-law (explicit formula) | |
| 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) |
| Applies standard wall function with Werner-Wengle model. | |
| 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) |
| Applies log-law wall function with roughness correction. | |
| 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) |
| Applies Cabot non-equilibrium wall function with pressure gradients. | |
| 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 | ||
| ) |
Applies no-slip wall boundary condition with linear interpolation.
This function enforces a no-slip boundary condition (zero velocity at the wall) by linearly interpolating between the wall velocity (typically zero) and the velocity at a reference point in the flow.
MATHEMATICAL FORMULATION: For a point at distance sb from the wall, with a reference velocity Uc at distance sc from the wall: U_boundary = U_wall + (U_reference - U_wall) * (sb / sc)
PHYSICAL INTERPRETATION: This provides a first-order approximation assuming linear velocity variation in the near-wall region, which is valid in the viscous sublayer.
| [in] | user | Simulation context (unused but required for interface) |
| [in] | distance_reference | Wall-normal distance to reference point (sc) |
| [in] | distance_boundary | Wall-normal distance to boundary point (sb) |
| [in] | velocity_wall | Velocity at the wall (Ua), typically zero |
| [in] | velocity_reference | Velocity at reference point (Uc) |
| [out] | velocity_boundary | Computed velocity at boundary point (Ub) |
| [in] | normal_x | X-component of wall normal vector |
| [in] | normal_y | Y-component of wall normal vector |
| [in] | normal_z | Z-component of wall normal vector |
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 | ||
| ) |
Applies free-slip wall boundary condition.
Free-slip conditions allow tangential flow but enforce zero normal velocity. This is appropriate for inviscid walls or symmetry planes where there is no shear stress but flow cannot penetrate the boundary.
DECOMPOSITION: Velocity is decomposed into normal and tangential components: U = U_n * n + U_t where U_n = U · n (normal component) U_t = U - U_n * n (tangential component)
BOUNDARY CONDITIONS:
| [in] | user | Simulation context |
| [in] | distance_reference | Wall-normal distance to reference point |
| [in] | distance_boundary | Wall-normal distance to boundary point |
| [in] | velocity_wall | Velocity at the wall |
| [in] | velocity_reference | Velocity at reference point |
| [out] | velocity_boundary | Computed velocity at boundary point |
| [in] | normal_x | X-component of wall normal vector |
| [in] | normal_y | Y-component of wall normal vector |
| [in] | normal_z | Z-component of wall normal vector |
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 | ||
| ) |
Computes roughness-modified log-law coefficient E.
The coefficient E accounts for wall roughness effects on the log-law: u+ = (1/κ) ln(E * y+)
ROUGHNESS REGIMES:
| [in] | friction_velocity | Friction velocity u_τ |
| [in] | roughness_height | Equivalent sand grain roughness height ks |
| [in] | kinematic_viscosity | Kinematic viscosity ν |
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 | ||
| ) |
Computes velocity from log-law for rough walls.
Calculates the tangential velocity at a given wall distance using the roughness-modified log-law of the wall.
APPLICABLE REGIMES:
| [in] | kinematic_viscosity | Kinematic viscosity ν |
| [in] | wall_distance | Distance from wall y |
| [in] | friction_velocity | Friction velocity u_τ |
| [in] | roughness_height | Equivalent sand grain roughness ks |
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 | ||
| ) |
Residual function for friction velocity equation (log-law with roughness)
This function computes the residual for Newton-Raphson iteration: f(u_τ) = u_predicted(u_τ) - u_known where u_predicted comes from the log-law or linear law depending on y+.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | known_velocity | Known velocity at distance y |
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity_guess | Current guess for u_τ |
| [in] | roughness_height | Wall roughness height |
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 | ||
| ) |
Numerical derivative of residual function.
Computes df/du_τ using finite differences for Newton-Raphson iteration.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | known_velocity | Known velocity |
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity_guess | Current guess for u_τ |
| [in] | roughness_height | Wall roughness |
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 | ||
| ) |
Solves for friction velocity using Newton-Raphson iteration.
Given a known velocity at a known distance from the wall, this function iteratively solves for the friction velocity u_τ that satisfies the roughness-modified log-law or linear law.
ALGORITHM: Newton-Raphson: u_τ^(n+1) = u_τ^n - f(u_τ^n) / f'(u_τ^n) Convergence criterion: |u_τ^(n+1) - u_τ^n| < 1e-7
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | known_velocity | Velocity at reference point |
| [in] | wall_distance | Distance from wall to reference point |
| [in] | initial_guess | Initial guess for u_τ |
| [in] | roughness_height | Wall roughness height |
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 | ) |
Computes turbulent eddy viscosity ratio (ν_t / ν)
Uses the mixing length model with van Driest damping: ν_t / ν = κ * y+ * [1 - exp(-y+ / A+)]² where A+ ≈ 19 is the damping coefficient.
PHYSICAL INTERPRETATION:
| [in] | yplus | Normalized wall distance y+ = y * u_τ / ν |
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 | ||
| ) |
Integrates eddy viscosity profile from wall to distance y.
Computes integrals needed for non-equilibrium wall functions: If mode=0: ∫[0 to y] dy / (ν + ν_t) If mode=1: ∫[0 to y] y dy / (ν + ν_t)
These integrals appear in the solution of the momentum equation with pressure gradients in the near-wall region.
NUMERICAL METHOD:
| [in] | kinematic_viscosity | Kinematic viscosity ν |
| [in] | wall_distance | Distance from wall y |
| [in] | friction_velocity | Friction velocity u_τ |
| [in] | integration_mode | 0 for F integral, 1 for Fy integral |
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 | ||
| ) |
Computes wall shear stress with pressure gradient effects.
Solves the integrated momentum equation in the near-wall region: τ_w = (u - dp/dx * F_y) / F_1 where F_1 and F_y are integrals of the effective viscosity profile.
This accounts for non-equilibrium effects due to streamwise pressure gradients.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | friction_velocity | Friction velocity u_τ |
| [in] | wall_distance | Distance from wall |
| [in] | velocity | Velocity at wall_distance |
| [in] | pressure_gradient_tangent | Tangential pressure gradient dp/ds |
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 | ||
| ) |
Computes velocity using Cabot wall function.
Reconstructs velocity from wall shear stress and pressure gradient: u = τ_w * F1 + (dp/dx) * Fy
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity | Friction velocity |
| [in] | pressure_gradient_tangent | Tangential pressure gradient |
| [in] | wall_shear_stress | Wall shear stress |
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 | ||
| ) |
Residual function for Cabot wall function.
Computes: f(u_τ) = u_τ - sqrt(|τ_w(u_τ)|) This enforces consistency between u_τ and τ_w.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | velocity | Velocity |
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity_guess | Guess for u_τ |
| [in] | pressure_gradient_tangent | Tangential pressure gradient |
| [in] | pressure_gradient_normal | Normal pressure gradient (currently unused) |
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 | ||
| ) |
Numerical derivative for Cabot wall function.
| kinematic_viscosity | Parameter kinematic_viscosity passed to df_Cabot(). |
| velocity | Parameter velocity passed to df_Cabot(). |
| wall_distance | Parameter wall_distance passed to df_Cabot(). |
| friction_velocity_guess | Parameter friction_velocity_guess passed to df_Cabot(). |
| pressure_gradient_tangent | Parameter pressure_gradient_tangent passed to df_Cabot(). |
| pressure_gradient_normal | Parameter pressure_gradient_normal passed to df_Cabot(). |
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 | ||
| ) |
Solves for friction velocity using Cabot wall function.
This non-equilibrium wall function accounts for pressure gradient effects, making it more accurate in separated or strongly accelerating/decelerating flows.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | velocity | Velocity at reference point |
| [in] | wall_distance | Distance from wall |
| [in] | initial_guess | Initial guess for u_τ |
| [in] | pressure_gradient_tangent | Tangential pressure gradient |
| [in] | pressure_gradient_normal | Normal pressure gradient |
| [out] | friction_velocity | Converged friction velocity |
| [out] | wall_shear_velocity | Wall shear stress for velocity |
| [out] | wall_shear_normal | Wall shear stress for normal pressure gradient |
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 | ||
| ) |
Computes velocity using Werner-Wengle wall function.
Algebraic wall function that provides explicit relation: u+ = y+ for y+ < 11.81 (viscous sublayer) u+ = A * (y+)^B for y+ ≥ 11.81 (power law) where A = 8.3, B = 1/7 are empirical constants.
ADVANTAGES:
LIMITATIONS:
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity | Friction velocity |
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 | ||
| ) |
Residual function for Werner-Wengle iteration.
Computes residual: f(u_τ) = u_τ² - g(u, y, ν) where g is derived from the velocity profile inversion.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | velocity | Known velocity |
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity | Guess for friction velocity |
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 | ||
| ) |
Numerical derivative for Werner-Wengle iteration.
| kinematic_viscosity | Parameter kinematic_viscosity passed to df_Werner(). |
| velocity | Parameter velocity passed to df_Werner(). |
| wall_distance | Parameter wall_distance passed to df_Werner(). |
| friction_velocity | Parameter friction_velocity passed to df_Werner(). |
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 | ||
| ) |
Solves for friction velocity using Werner-Wengle wall function.
| [in] | kinematic_viscosity | Kinematic viscosity |
| [in] | velocity | Velocity at reference point |
| [in] | wall_distance | Distance from wall |
| [in] | initial_guess | Initial guess for u_τ |
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 | ||
| ) |
Computes velocity using simple log-law (smooth wall with roughness offset)
Simple logarithmic profile: u = (u_τ / κ) * ln((y + y0) / y0) where y0 is a roughness length scale.
| [in] | wall_distance | Distance from wall |
| [in] | friction_velocity | Friction velocity |
| [in] | roughness_length | Roughness length scale y0 |
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 | ||
| ) |
Solves for friction velocity using simple log-law (explicit formula)
Explicit inversion: u_τ = κ * u / ln((y + y0) / y0)
| [in] | velocity | Known velocity |
| [in] | wall_distance | Distance from wall |
| [in] | roughness_length | Roughness length scale |
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 | ||
| ) |
Applies standard wall function with Werner-Wengle model.
This is a high-level interface that:
| [in] | user | Simulation context |
| [in] | distance_reference | Distance to reference point |
| [in] | distance_boundary | Distance to boundary point |
| [in] | velocity_wall | Wall velocity |
| [in] | velocity_reference | Reference velocity |
| [out] | velocity_boundary | Output boundary velocity |
| [out] | friction_velocity | Output friction velocity |
| [in] | normal_x | X-component of wall normal |
| [in] | normal_y | Y-component of wall normal |
| [in] | normal_z | Z-component of wall normal |
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 | ||
| ) |
Applies log-law wall function with roughness correction.
This is the recommended wall function interface for most applications. It uses the roughness-corrected log-law which is accurate for both smooth and rough walls.
| [in] | user | Simulation context |
| [in] | roughness_height | Wall roughness height ks |
| [in] | distance_reference | Distance to reference point |
| [in] | distance_boundary | Distance to boundary point |
| [in] | velocity_wall | Wall velocity (typically zero) |
| [in] | velocity_reference | Reference velocity |
| [out] | velocity_boundary | Output boundary velocity |
| [out] | friction_velocity | Output friction velocity u_τ |
| [in] | normal_x | X-component of wall normal |
| [in] | normal_y | Y-component of wall normal |
| [in] | normal_z | Z-component of wall normal |
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 | ||
| ) |
Applies Cabot non-equilibrium wall function with pressure gradients.
This wall function accounts for pressure gradient effects and is most accurate in separated or strongly accelerating/decelerating flows.
| [in] | user | Simulation context |
| [in] | roughness_height | Wall roughness (currently unused in this version) |
| [in] | distance_reference | Distance to reference point |
| [in] | distance_boundary | Distance to boundary point |
| [in] | velocity_wall | Wall velocity |
| [in] | velocity_reference | Reference velocity |
| [out] | velocity_boundary | Output boundary velocity |
| [out] | friction_velocity | Output friction velocity |
| [in] | normal_x | X-component of wall normal |
| [in] | normal_y | Y-component of wall normal |
| [in] | normal_z | Z-component of wall normal |
| [in] | pressure_gradient_x | X-component of pressure gradient |
| [in] | pressure_gradient_y | Y-component of pressure gradient |
| [in] | pressure_gradient_z | Z-component of pressure gradient |
| [in] | iteration_count | Current iteration count |
Applies Cabot non-equilibrium wall function with pressure gradients.
Local to this translation unit.
Definition at line 766 of file wallfunction.c.