Prepares ResPart_set for use with solvers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ResPart_set), | intent(inout) | :: | this |
Collection of Resolved Particles |
||
| type(timer_obj), | intent(in), | target | :: | timer |
Timer utility |
|
| type(parser_obj), | intent(in), | target | :: | parser |
Parser for input file |
|
| type(op_obj), | intent(in), | target | :: | operators |
Operators object |
|
| type(bc_set), | intent(in), | target | :: | bcs |
Boundary conditions object |
|
| type(monitor_set), | intent(in), | target | :: | monitors |
Monitors to print to stdout and files |
|
| logical, | intent(in), | optional | :: | update_time |
Update time and iteration based on read file |
impure subroutine ResPart_set_Prepare(this,timer,parser,operators,bcs,monitors,update_time) !> Prepares ResPart_set for use with solvers. implicit none class(ResPart_set), intent(inout) :: this !! Collection of Resolved Particles type(timer_obj), intent(in), & target :: timer !! Timer utility type(parser_obj), intent(in), & target :: parser !! Parser for input file type(op_obj), intent(in), & target :: operators !! Operators object type(bc_set), intent(in), & target :: bcs !! Boundary conditions object type(monitor_set), intent(in), & target :: monitors !! Monitors to print to stdout and files logical, intent(in), & optional :: update_time !! Update time and iteration based on read file ! Work variables integer :: chunk_size !! Custom read chunk size real(wp), parameter :: zero(3) = [0.0_wp, 0.0_wp, 0.0_wp] !! Zero vector real(wp) :: dl !! Half filter width integer :: kernel_interp !! Interpolation kernel integer :: kernel_extrap !! Extrapolation kernel character(len=str64):: filename !! String to store filenames real(wp) :: time integer :: iter ! Associate pointers this%timer => timer this%parser => parser this%op => operators this%bcs => bcs this%monitors => monitors ! Associate pointers in IB this%ib%timer => timer this%ib%parser => parser this%ib%op => operators this%ib%bcs => bcs this%ib%monitors => monitors call this%parser%Get('RP read file', filename ) call this%SetReadFileName(filename) call this%parser%Get('RP write file', filename ) call this%SetWriteFileName(filename) call this%parser%Get('RP overwrite', this%overwrite, default= .true. ) ! Adjust IB read chunk sizes if provided by user if (this%parser%IsDefined('IB read chunk size')) then call this%parser%Get('IB read chunk size', chunk_size) call this%ib%SetReadChunkSize(chunk_size) end if ! Filtering parameters dl = (2.0_wp - 1.0e3_wp*epsilon(1.0_wp))*minval(this%block%dx) call this%parser%Get('RP filter half width', this%l_filter, default = dl ) call this%parser%Get('RP interp kernel', kernel_interp, default = 1 ) call this%parser%Get('RP extrap kernel', kernel_extrap, default = 1 ) call this% SetFilterKernel(kernel_interp,kernel_extrap) call this%ib%SetFilterKernel(kernel_interp,kernel_extrap) call this% SetFilterSize(this%l_filter) ! Other physical parameters call this%parser%Get("Gravity", this%gravity, default = zero ) call this%parser%Get("Fluid density", this%rhof, default = 0.0_wp ) call this%parser%Get("Bodyforce CPG", this%CPG, default = zero ) ! Read resolved particle data call this%Read(iter,time) if (present(update_time)) then if (update_time) then this%timer%iter = iter this%timer%time = time end if end if return end subroutine ResPart_set_Prepare