programmer's documentation
Data setting for the 1D-wall thermal module (uspt1d.f90)

The uspt1d subroutine is used to set the 1D-wall thermal module parameters.

Arguments of uspt1d

! Arguments
integer nvar , nscal , nfpt1d
integer iappel
integer ifpt1d(nfpt1d), nppt1d(nfpt1d), iclt1d(nfpt1d)
integer izft1d(nfabor)
double precision dt(ncelet)
double precision eppt1d(nfpt1d) , rgpt1d(nfpt1d) , tppt1d(nfpt1d)
double precision tept1d(nfpt1d) , hept1d(nfpt1d) , fept1d(nfpt1d)
double precision xlmt1d(nfpt1d) , rcpt1d(nfpt1d) , dtpt1d(nfpt1d)

Local variables declaration

! Local variables
integer ifbt1d , ii , ifac
integer ilelt, nlelt
integer izone
integer, allocatable, dimension(:) :: lstelt

Allocation

! Allocate a temporary array for boundary faces selection
allocate(lstelt(nfabor))

Rereading of the restart file

!===============================================================================
! Rereading of the restart file:
!----------------------------------
! isuit1 = 0 --> No rereading
! (meshing and wall temperature reinitialization)
! isuit1 = 1 --> Rereading of the restart file for the 1-Dimension
! thermal module
! isuit1 = isuite --> Rereading only if the computational fluid dynamic is
! a continuation of the computation.
! The initialization of isuit1 is mandatory.
!===============================================================================
isuit1 = isuite
izone = 0
ifbt1d = 0

iappel = 1 or 2

if (iappel.eq.1.or.iappel.eq.2) then
!===============================================================================
! Faces determining with the 1-D thermal module:
!----------------------------------------------
!
! nfpt1d : Total number of faces with the 1-D thermal module
! ifpt1d(ii): Number of the (ii)th face with the 1-D thermal module
! Remarks:
!--------
! During the rereading of the restart file, nfpt1d and ifpt1d are
! compared with the other values from the restart file being the result of
! the start or restarting computation.
!
! A total similarity is required to continue with the previous computation.
! Regarding the test case on ifpt1d, it is necessary that the array be
! arranged in increasing order (ifpt1d(jj) > ifpt1d(ii) if jj > ii).
!
! If it is impossible, contact the developer team to deactivate this test.
!===============================================================================
call getfbr('3', nlelt, lstelt)
!==========
izone = izone + 1
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
izft1d(ifac) = izone
ifbt1d = ifbt1d + 1
if (iappel.eq.2) ifpt1d(ifbt1d) = ifac
enddo
endif
if (iappel.eq.1) then
nfpt1d = ifbt1d
endif

iappel = 2

!===============================================================================
! Parameters padding of the mesh and initialization:
!--------------------------------------------------
!
! (Only one pass during the beginning of the computation)
! nppt1d(ii): number of discretized points associated to the (ii)th face
! with the 1-D thermal module.
! eppt1d(ii): wall thickness associated to the (ii)th face
! with the 1-D thermal module.
! rgpt1d(ii): geometric progression ratio of the meshing refinement
! associated to the (ii)th face with the 1-D thermal module.
! (with : rgpt1d(ii) > 1 => small meshes on the fluid side)
! tppt1d(ii): wall temperature initialization associated to the (ii)th face
! with the 1-D thermal module.
! Remarks:
!--------
! During the rereading of the restart file for the 1-D thermal module,
! the tppt1d variable is not used.
!
! The nfpt1d, eppt1d and rgpt1d variables are compared to the previous
! values being the result of the restart file.
!
! An exact similarity is necessary to continue with the previous computation.
!===============================================================================
if (iappel.eq.2) then
do ii = 1, nfpt1d
ifac = ifpt1d(ii)
nppt1d(ii) = 8
eppt1d(ii) = 0.01144d0
rgpt1d(ii) = 1.d0
tppt1d(ii) = 25.d0 + tkelvi ! FIXME gerer les K et °C
enddo
endif

iappel = 3

!===============================================================================
! Padding of the wall exterior boundary conditions:
!-------------------------------------------------
!
! iclt1d(ii): boundary condition type
! ----------
! iclt1d(ii) = 1: dirichlet condition,
! with exchange coefficient
! iclt1d(ii) = 3: flux condition
!
! tept1d(ii): exterior temperature
! hept1d(ii): exterior exchange coefficient
! fept1d(ii): flux applied to the exterior (flux<0 = coming flux)
! xlmt1d(ii): lambda wall conductivity coefficient (W/m/C)
! rcpt1d(ii): wall coefficient rho*Cp (J/m3/C)
! dtpt1d(ii): time step resolution of the thermal equation to the
! (ii)th boundary face with the 1-D thermal module (s)
!===============================================================================
if (iappel.eq.3) then
do ii = 1, nfpt1d
iclt1d(ii) = 1
! Physical parameters
ifac = ifpt1d(ii)
if (cdgfbo(2,ifac).le.0.025d0) then
iclt1d(ii) = 3
fept1d(ii) = -1.d4
else
iclt1d(ii) = 3
fept1d(ii) = 1.d4
endif
xlmt1d(ii) = 31.5d0
rcpt1d(ii) = 3.5d6
dtpt1d(ii) = 0.3d0
enddo
endif

Deallocation

! Deallocate the temporary array
deallocate(lstelt)