5#include <petscdmswarm.h>
11#include <petscdmcomposite.h>
12#include <petscsystypes.h>
59 double distance_reference,
double distance_boundary,
62 double normal_x,
double normal_y,
double normal_z);
92 double distance_reference,
double distance_boundary,
95 double normal_x,
double normal_y,
double normal_z);
116double E_coeff(
double friction_velocity,
double roughness_height,
double kinematic_viscosity);
139 double friction_velocity,
double roughness_height);
155double f_hydset(
double kinematic_viscosity,
double known_velocity,
156 double wall_distance,
double friction_velocity_guess,
157 double roughness_height);
171double df_hydset(
double kinematic_viscosity,
double known_velocity,
172 double wall_distance,
double friction_velocity_guess,
173 double roughness_height);
197 double wall_distance,
double initial_guess,
198 double roughness_height);
219double nu_t(
double yplus);
243double integrate_1(
double kinematic_viscosity,
double wall_distance,
244 double friction_velocity,
int integration_mode);
264double taw(
double kinematic_viscosity,
double friction_velocity,
265 double wall_distance,
double velocity,
double pressure_gradient_tangent);
280double u_Cabot(
double kinematic_viscosity,
double wall_distance,
281 double friction_velocity,
double pressure_gradient_tangent,
282 double wall_shear_stress);
298double f_Cabot(
double kinematic_viscosity,
double velocity,
double wall_distance,
299 double friction_velocity_guess,
double pressure_gradient_tangent,
300 double pressure_gradient_normal);
305double df_Cabot(
double kinematic_viscosity,
double velocity,
double wall_distance,
306 double friction_velocity_guess,
double pressure_gradient_tangent,
307 double pressure_gradient_normal);
325void find_utau_Cabot(
double kinematic_viscosity,
double velocity,
double wall_distance,
326 double initial_guess,
double pressure_gradient_tangent,
327 double pressure_gradient_normal,
double *friction_velocity,
328 double *wall_shear_velocity,
double *wall_shear_normal);
352double u_Werner(
double kinematic_viscosity,
double wall_distance,
353 double friction_velocity);
368double f_Werner(
double kinematic_viscosity,
double velocity,
369 double wall_distance,
double friction_velocity);
374double df_Werner(
double kinematic_viscosity,
double velocity,
375 double wall_distance,
double friction_velocity);
387 double wall_distance,
double initial_guess);
403double u_loglaw(
double wall_distance,
double friction_velocity,
double roughness_length);
415double find_utau_loglaw(
double velocity,
double wall_distance,
double roughness_length);
439 Cmpnts *velocity_boundary, PetscReal *friction_velocity,
440 double normal_x,
double normal_y,
double normal_z);
464 double distance_reference,
double distance_boundary,
466 Cmpnts *velocity_boundary, PetscReal *friction_velocity,
467 double normal_x,
double normal_y,
double normal_z);
495 double distance_reference,
double distance_boundary,
497 Cmpnts *velocity_boundary, PetscReal *friction_velocity,
498 double normal_x,
double normal_y,
double normal_z,
499 double pressure_gradient_x,
double pressure_gradient_y,
500 double pressure_gradient_z,
int iteration_count);
Header file for Particle Motion and migration related functions.
Header file for Particle Swarm management functions.
Public interface for grid, solver, and metric setup routines.
Public interface for data input/output routines.
Logging utilities and macros for PETSc-based applications.
Main header file for a complex fluid dynamics solver.
A 3D point or vector with PetscScalar components.
User-defined context containing data specific to a single computational grid level.
Header file for particle location functions using the walking search algorithm.
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.
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.
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.
double find_utau_loglaw(double velocity, double wall_distance, double roughness_length)
Solves for friction velocity using simple log-law (explicit formula)
double u_Werner(double kinematic_viscosity, double wall_distance, double friction_velocity)
Computes velocity using Werner-Wengle wall function.
double u_hydset_roughness(double kinematic_viscosity, double wall_distance, double friction_velocity, double roughness_height)
Computes velocity from log-law for rough walls.
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.
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 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 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 df_Werner(double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity)
Numerical derivative for Werner-Wengle iteration.
double f_Werner(double kinematic_viscosity, double velocity, double wall_distance, double friction_velocity)
Residual function for Werner-Wengle iteration.
double u_loglaw(double wall_distance, double friction_velocity, double roughness_length)
Computes velocity using simple log-law (smooth wall with roughness offset)
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.
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 integrate_1(double kinematic_viscosity, double wall_distance, double friction_velocity, int integration_mode)
Integrates eddy viscosity profile from wall to distance y.
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 E_coeff(double friction_velocity, double roughness_height, double kinematic_viscosity)
Computes roughness-modified log-law coefficient E.
double nu_t(double yplus)
Computes turbulent eddy viscosity ratio (ν_t / ν)
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_Werner(double kinematic_viscosity, double velocity, double wall_distance, double initial_guess)
Solves for friction velocity using Werner-Wengle wall function.
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.