apply_BC_wind_turbine Subroutine

public subroutine apply_BC_wind_turbine(self, u, v, w)

Pre-correction (called per substep after the integrator step): enforce the inflow Dirichlet and convective outflow BCs, then apply an exact uniform mass correction to the outlet, following Incompact3d's pre_correc.

Steps: 1. cx = uxmaxgdt/dx from the post-integration field. 2. Convective outflow at x=nx and Dirichlet inflow at x=1 for u,v,w (no correction yet): u(nx) = u(nx) - cx(u(nx) - u(nx-1)). 3. Measure the inlet mean (from the prescribed Dirichlet plane) and the outlet mean AFTER the convective update, then shift the outlet plane of u uniformly so mean(u_outlet) = mean(u_inlet) exactly (Incompact3d: bxxn = bxxn - ut + ut1). Applied to u only.

Type Bound

case_wind_turbine_t

Arguments

Type IntentOptional Attributes Name
class(case_wind_turbine_t) :: self
class(field_t), intent(inout) :: u
class(field_t), intent(inout) :: v
class(field_t), intent(inout) :: w

Calls

proc~~apply_bc_wind_turbine~~CallsGraph proc~apply_bc_wind_turbine m_case_wind_turbine::case_wind_turbine_t%apply_BC_wind_turbine mpi_allreduce mpi_allreduce proc~apply_bc_wind_turbine->mpi_allreduce proc~compute_outflow_params~2 m_case_wind_turbine::case_wind_turbine_t%compute_outflow_params proc~apply_bc_wind_turbine->proc~compute_outflow_params~2 proc~field_add_const_x_face_base m_base_backend::base_backend_t%field_add_const_x_face_base proc~apply_bc_wind_turbine->proc~field_add_const_x_face_base proc~field_set_face_from_field_base m_base_backend::base_backend_t%field_set_face_from_field_base proc~apply_bc_wind_turbine->proc~field_set_face_from_field_base proc~get_dims m_mesh::mesh_t%get_dims proc~apply_bc_wind_turbine->proc~get_dims proc~get_global_dims m_mesh::mesh_t%get_global_dims proc~apply_bc_wind_turbine->proc~get_global_dims proc~slice_max_sum_base m_base_backend::base_backend_t%slice_max_sum_base proc~apply_bc_wind_turbine->proc~slice_max_sum_base proc~compute_outflow_params~2->mpi_allreduce proc~compute_outflow_params~2->proc~get_dims proc~compute_outflow_params~2->proc~slice_max_sum_base proc~abort_run m_logger::abort_run proc~field_add_const_x_face_base->proc~abort_run proc~field_set_face_from_field_base->proc~abort_run proc~get_dims_dataloc m_mesh::get_dims_dataloc proc~get_dims->proc~get_dims_dataloc proc~get_global_dims->proc~get_dims_dataloc proc~slice_max_sum_base->proc~abort_run interface~str m_logger::str proc~abort_run->interface~str mpi_abort mpi_abort proc~abort_run->mpi_abort mpi_barrier mpi_barrier proc~abort_run->mpi_barrier mpi_comm_rank mpi_comm_rank proc~abort_run->mpi_comm_rank mpi_comm_size mpi_comm_size proc~abort_run->mpi_comm_size mpi_finalized mpi_finalized proc~abort_run->mpi_finalized mpi_initialized mpi_initialized proc~abort_run->mpi_initialized