outflow_flow_rate_correction Function

public function outflow_flow_rate_correction(self, u, out_vel, y_weights) result(flow_rate_diff)

The flow_rate_diff for the X_FACE stamp of field_set_face_from_field that makes the flow rate out equal the flow rate in exactly, as the pressure projection sees them. The x staggered derivative sums to (u(nx) - u(1))/dx over the cells, so only the two face planes enter, each weighted over y by y_weights: the case passes the weights of the y interpolation (1/2 on a non-periodic boundary plane, 1 elsewhere), with 0 on any plane it overwrites with the same value on both faces after the stamp. The stamp is linear in u, u(nx) <- (1 - c)u(nx) + cu(nx - 1) + flow_rate_diff, so the sums of the planes before it give the outlet flow rate after it. Call it with u as it is about to be stamped, once bc_start_u_x holds this substep's inlet plane. Assumes x is not decomposed, as compute_outflow_params does.

Type Bound

base_case_t

Arguments

Type IntentOptional Attributes Name
class(base_case_t) :: self
class(field_t), intent(in) :: u
real(kind=dp), intent(in) :: out_vel
real(kind=dp), intent(in) :: y_weights(:)

Return Value real(kind=dp)


Calls

proc~~outflow_flow_rate_correction~~CallsGraph proc~outflow_flow_rate_correction m_base_case::base_case_t%outflow_flow_rate_correction mpi_allreduce mpi_allreduce proc~outflow_flow_rate_correction->mpi_allreduce proc~get_dims m_mesh::mesh_t%get_dims proc~outflow_flow_rate_correction->proc~get_dims proc~x_slice_weighted_sum_base m_base_backend::base_backend_t%x_slice_weighted_sum_base proc~outflow_flow_rate_correction->proc~x_slice_weighted_sum_base proc~get_dims_dataloc m_mesh::get_dims_dataloc proc~get_dims->proc~get_dims_dataloc proc~abort_run m_logger::abort_run proc~x_slice_weighted_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

Called by

proc~~outflow_flow_rate_correction~~CalledByGraph proc~outflow_flow_rate_correction m_base_case::base_case_t%outflow_flow_rate_correction proc~apply_bc_abl m_case_abl::case_abl_t%apply_BC_abl proc~apply_bc_abl->proc~outflow_flow_rate_correction