Prepares fields used by the CDIFS solver. Restart fields (V1,V2,V3,P) are read from file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(cdifs_obj), | intent(inout) | :: | this |
CDIFS solver |
subroutine cdifs_obj_PrepareSolverFields(this) !> Prepares fields used by the CDIFS solver. ! Restart fields (V1,V2,V3,P) are read from file. implicit none class(cdifs_obj), intent(inout) :: this !! CDIFS solver ! Work variables character(len=str64) :: Rfilename character(len=str64) :: Wfilename logical :: overwrite call this%parser%Get('Fields read file', Rfilename) call this%parser%Get('Fields write file', Wfilename) call this%parser%Get('Fields overwrite ', overwrite, default=.true.) ! Initialize fields container call this%fields%Initialize(this%block,this%parallel) ! Set IO parameters call this%fields%SetReadFileName(Rfilename) call this%fields%SetWriteFileName(Wfilename) call this%fields%SetOverwrite(overwrite) ! Add each field to main container. ! This will allocate the underlying arrays ! and facilitate IO. ! -- Core fields (required for restarts) call this%fields%Add('V1', 1, this%V(1) ) call this%fields%Add('V2', 2, this%V(2) ) call this%fields%Add('V3', 3, this%V(3) ) call this%fields%Add('P', 0, this%P ) ! -- Additional fileds required by solver call this%fields%Add('V1old', 1, this%Vold(1)) call this%fields%Add('V2old', 2, this%Vold(2)) call this%fields%Add('V3old', 3, this%Vold(3)) call this%fields%Add('dP', 0, this%dP ) call this%fields%Add('resV1', 1, this%resV(1)) call this%fields%Add('resV2', 2, this%resV(2)) call this%fields%Add('resV3', 3, this%resV(3)) call this%fields%Add('srcV1', 1, this%srcV(1)) call this%fields%Add('srcV2', 2, this%srcV(2)) call this%fields%Add('srcV3', 3, this%srcV(3)) call this%fields%Add('rhs', 0, this%rhs ) call this%fields%Add('div', 0, this%divu ) call this%fields%Add('maskV1', 1, this%maskV(1)) call this%fields%Add('maskV2', 2, this%maskV(2)) call this%fields%Add('maskV3', 3, this%maskV(3)) call this%fields%Add('V1m', 0, this%Vm(1) ) call this%fields%Add('V2m', 0, this%Vm(2) ) call this%fields%Add('V3m', 0, this%Vm(3) ) if (this%use_RP .or. this%use_IB) then call this%fields%Add('ibS', 0, this%ibS ) call this%fields%Add('ibVF', 0, this%ibVF ) call this%fields%Add('ibF1', 0, this%ibF(1)) call this%fields%Add('ibF2', 0, this%ibF(2)) call this%fields%Add('ibF3', 0, this%ibF(3)) call this%fields%Add('ibN1', 1, this%ibN(1)) call this%fields%Add('ibN2', 2, this%ibN(2)) call this%fields%Add('ibN3', 3, this%ibN(3)) end if ! Read initial conditions from disk call this%fields%Read(this%timer%iter,this%timer%time,[character(len=str8) :: 'V1','V2','V3','P']) return end subroutine cdifs_obj_PrepareSolverFields