1!------------------------------------------------------------------------------- 2 3! This file is part of Code_Saturne, a general-purpose CFD tool. 4! 5! Copyright (C) 1998-2021 EDF S.A. 6! 7! This program is free software; you can redistribute it and/or modify it under 8! the terms of the GNU General Public License as published by the Free Software 9! Foundation; either version 2 of the License, or (at your option) any later 10! version. 11! 12! This program is distributed in the hope that it will be useful, but WITHOUT 13! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 15! details. 16! 17! You should have received a copy of the GNU General Public License along with 18! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 19! Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 21!------------------------------------------------------------------------------- 22 23subroutine lwcgfu & 24!================ 25 26 ( gfunc , f , fm , yfp2m , fp2m ) 27 28!=============================================================================== 29! FONCTION : 30! ---------- 31 32! CALCUL DES VALEURS DE LA FONCTION G 33! SUIVANT LES PARAMETRES F, FM, FP2M. YP2M 34 35! LE RESULTAT EST : 36! --------------- 37! CALCUL DE LA VALEUR DE G AU POINT F 38 39 40!------------------------------------------------------------------------------- 41! Arguments 42!__________________.____._____.________________________________________________. 43! name !type!mode ! role ! 44!__________________!____!_____!________________________________________________! 45! ! ! ! ! 46! gfunc ! r ! --> ! valeur de g au point f ! 47! f ! r ! <-- ! valeur de la fraction de melange ! 48! fm ! r ! <-- ! moyenne de la fraction de melange ! 49! fp2m ! r ! <-- ! variance de la fraction de melange ! 50! yp2m ! r ! <-- ! variance de la fraction massique ! 51!__________________!____!_____!________________________________________________! 52 53! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU) 54! L (LOGIQUE) .. ET TYPES COMPOSES (EX : TR TABLEAU REEL) 55! MODE : <-- donnee, --> resultat, <-> Donnee modifiee 56! --- tableau de travail 57!=============================================================================== 58 59implicit none 60 61!=============================================================================== 62 63! Arguments 64 65double precision gfunc , f, fm, yfp2m, fp2m 66 67 68! Local variables 69 70double precision epsi 71 72 73!=============================================================================== 74 75!=============================================================================== 76! 1. CALCULS PRELIMINAIRES 77!=============================================================================== 78 79! --> Initialisation 80 81gfunc = 0.d0 82epsi = 1.d-09 83 84!=============================================================================== 85! 2. CALCUL DES VALEURS DE LA FONCTION G 86!=============================================================================== 87 88if (fp2m .le. epsi) then 89 gfunc = 1.d0 90else 91 gfunc = (f-fm) * sqrt( 1.d0 + yfp2m/fp2m ) 92endif 93 94!---- 95! FIN 96!---- 97 98end subroutine 99