!------------------------------------------------------------------------------- ! Code_Saturne version 4.3.0 ! -------------------------- ! This file is part of Code_Saturne, a general-purpose CFD tool. ! ! Copyright (C) 1998-2016 EDF S.A. ! ! This program is free software; you can redistribute it and/or modify it under ! the terms of the GNU General Public License as published by the Free Software ! Foundation; either version 2 of the License, or (at your option) any later ! version. ! ! This program is distributed in the hope that it will be useful, but WITHOUT ! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ! details. ! ! You should have received a copy of the GNU General Public License along with ! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin ! Street, Fifth Floor, Boston, MA 02110-1301, USA. !------------------------------------------------------------------------------- !=============================================================================== ! Purpose: ! ------- !> \file cs_user_extra_operations-force_temperature.f90 !> !> \brief This function is called at the end of each time step, and has a very !> general purpose !> (i.e. anything that does not have another dedicated user subroutine) !> !> See \subpage cs_user_extra_operations_examples and !> \subpage cs_user_extra_operations-nusselt_calculation for examples. !> !> This is an example of cs_user_extra_operations.f90 which !> performs forced temperature !------------------------------------------------------------------------------- !------------------------------------------------------------------------------- ! Arguments !______________________________________________________________________________. ! mode name role ! !______________________________________________________________________________! !> \param[in] nvar total number of variables !> \param[in] nscal total number of scalars !> \param[in] dt time step (per cell) !_______________________________________________________________________________ subroutine cs_f_user_extra_operations & ( ) !=============================================================================== !=============================================================================== ! Module files !=============================================================================== use paramx use dimens use pointe use numvar use optcal use cstphy use cstnum use entsor use lagran use parall use period use ppppar use ppthch use ppincl use mesh use field use field_operator use turbomachinery use alstru !=============================================================================== implicit none ! Local variables ! Arguments ! Local variables !< [loc_var_dec] integer ifac integer ilelt, nlelt integer impout double precision rrr, rrr_test integer, allocatable, dimension(:) :: lstelt double precision, dimension(:), pointer :: bpro_yplus double precision, dimension(:), pointer :: cpro_yplus_tube double precision, dimension(:), pointer :: bpro_force_x double precision fx_1 97 format(2g17.9) !< [loc_var_dec] !=============================================================================== !=============================================================================== !allocate(bpro_yplus(nfabor)) allocate(lstelt(nfabor)) !allocate (bpro_force_x(nfabor)) ! Force on wall faces for y<(0.02) fx_1 = 0.d0 call getfbr('STRUCT_WALL and y<0.02', nlelt, lstelt) do ilelt = 1, nlelt ifac = lstelt(ilelt) fx_1=fx_1+forstr(1,ifac) enddo impout = impusr(100) if (irangp.le.0) then open(impout,file='force_1_x.dat',position="append") write(impout,97) ttcabs, fx_1 close(impout) endif !impout = impusr(100) !deallocate(bpro_yplus) deallocate(lstelt) !deallocate(bpro_force_x) return end subroutine cs_f_user_extra_operations