Prepares data for run.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(grans_obj), | intent(inout) | :: | this |
GRANS solver |
module subroutine grans_obj_PrepareSolver(this) !> Prepares data for run. implicit none class(grans_obj), intent(inout) :: this !! GRANS solver ! Set solver parameters call this%parser%Get("Gravity", this%gravity, default = & [0.0_wp, 0.0_wp, 0.0_wp]) call this%parser%Get("Convergence", this%rel_error_max, default = 1.0e-6_wp) call this%parser%Get('Use IB', this%use_IB, default = .false. ) call this%parser%Get('Use ResPart', this%use_RP, default = .false. ) call this%parser%Get('Use PntPart', this%use_PP, default = .false. ) call this%parser%Get('Use collisions', this%use_col, default = .false. ) call this%parser%Get('Collision substeps', this%subit, default = 1 ) ! Initialize and prepare core components call grans_obj_PrepareSolverBlock(this) call grans_obj_PrepareSolverFields(this) call grans_obj_PrepareSolverBCS(this) call grans_obj_PrepareSolverOperators(this) ! Initialize and prepare optional components if (this%use_IB) then call this%IB%Initialize('IB',this%block,this%parallel) call this%IB%Prepare(this%timer,this%parser,this%op,this%bcs,this%monitors,update_time=.true.) end if if (this%use_RP) then call this%RP%Initialize('RP',this%block,this%parallel) call this%RP%Prepare(this%timer,this%parser,this%op,this%bcs,this%monitors,update_time=.true.) end if if (this%use_PP) then call this%PP%Initialize('PP',this%block,this%parallel) call this%PP%Prepare(this%timer,this%parser,this%op,this%monitors,update_time=.true.) end if !if (this%use_PP) call grans_obj_PrepareSolverPP(this) if (this%use_col) call grans_obj_PrepareSolverCollision(this) ! - Compute initial surface density function and solid volume fraction if ( this%use_RP .or. this%use_IB) then ! Update SDF this%ibS = 0.0_wp if (this%use_RP) call this%RP%UpdateSDF(this%ibS) if (this%use_IB) call this%IB%UpdateSDF(this%ibS) call this%bcs%UpdateBoundary(this%ibS) ! Update the solid volume fraction call this%ComputeSolidVF() end if ! I/O utilities call grans_obj_PrepareSolverMonitor(this) call grans_obj_PrepareSolverOutput(this) ! Monitor and output initial conditions call this%WriteOutputData() call this%Monitor() return end subroutine grans_obj_PrepareSolver