Sets boundary condition of a given type, for a given variable on a given region.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bc_set), | intent(inout) | :: | this |
Boundary conditions utility |
||
| character(len=*), | intent(in) | :: | region |
Region name |
||
| integer, | intent(in) | :: | type |
BC type |
||
| character(len=*), | intent(in), | optional | :: | var |
Variable name |
impure subroutine bc_set_SetBC(this,region,type,var) !> Sets boundary condition of a given type, for a given ! variable on a given region. class(bc_set), intent(inout) :: this !! Boundary conditions utility character(len=*), intent(in) :: region !! Region name integer, intent(in) :: type !! BC type character(len=*), intent(in), & optional :: var !! Variable name ! Work variable type(extent_obj) :: extents integer :: ind_reg ! Get index of region and its extents ind_reg = this%GetRegionIndex(region) extents = this%GetExtents(region) select case (type) case (BC_WALL ) call this%region(ind_reg)%Add('V1', BC_DIRICHLET,extents) call this%region(ind_reg)%Add('V2', BC_DIRICHLET,extents) call this%region(ind_reg)%Add('V3', BC_DIRICHLET,extents) call this%region(ind_reg)%Add('P', BC_NEUMANN, extents) call this%region(ind_reg)%Add('dP', BC_NEUMANN, extents) case (BC_INFLOW ) call this%region(ind_reg)%Add('V1', BC_DIRICHLET,extents) call this%region(ind_reg)%Add('V2', BC_DIRICHLET,extents) call this%region(ind_reg)%Add('V3', BC_DIRICHLET,extents) call this%region(ind_reg)%Add('P', BC_NEUMANN, extents) call this%region(ind_reg)%Add('dP', BC_NEUMANN, extents) case (BC_OUTFLOW ) call this%region(ind_reg)%Add('V1', BC_NEUMANN, extents) call this%region(ind_reg)%Add('V2', BC_NEUMANN, extents) call this%region(ind_reg)%Add('V3', BC_NEUMANN, extents) call this%region(ind_reg)%Add('P', BC_NEUMANN, extents) call this%region(ind_reg)%Add('dP', BC_NEUMANN, extents) case (BC_DIRICHLET) if (.not.present(var)) & call this%parallel%Stop("Unable to apply Dirichlet BC without providing the variable name") call this%region(ind_reg)%Add(var,BC_DIRICHLET,extents) case (BC_NEUMANN ) if (.not.present(var)) & call this%parallel%Stop("Unable to apply Neumann BC without providing the variable name") call this%region(ind_reg)%Add(var,BC_NEUMANN,extents) case (BC_SYMMETRY ) if (.not.present(var)) & call this%parallel%Stop("Unable to apply Symmetry BC without providing the variable name") call this%region(ind_reg)%Add(var,BC_SYMMETRY,extents) ! TO-DO case default call this%parallel%Stop("Uknown BC type on region:"//region) end select return end subroutine bc_set_SetBC