TABLE OF CONTENTS
PHY/USER/cond_fct_cond [ Modules ]
NOM
fct_cond(vi,vp,fctnum,x,y,z,vn)
DESCRIPTION
Fonction utilisateur permettant de definir
des conditions initiales ou des conditions aux limites
User function for defining
initial conditions or boundary conditions
ENTREES / INPUT
vi : variables primitives de la cellule appelant / primitive variables of the calling cell
x,y,z : coordonees du point ou est calcule la fonction / coordinates of the point where the function is calculated
fctnum : numero de la fonction / function number
vn : vecteur normal a la face / vector normal to the face
SOURCE
! Ce logiciel est regi par la licence [CeCILL-B] ! This software is governed by the [CeCILL-B] license !=========================== DEBUT DES DECLARATIONS ==================== !.1----- Implicit, Use use phy_typ IMPLICIT NONE !.2----- Declaration integer, intent(in) :: fctnum !! Numero de la fonction / Function number real(kind=kind(0.d0)),intent(in) :: x,y,z !! coordonnees du point ou definir la condition / coordinates of the point at which to define the condition type(vect_nvar), intent(in) :: vi !!variables primitives de la cellule appelant / primitive variables of the calling cell type(vect_3),intent(in) :: vn !!vecteur normal a la face / vector normal to the face type(vect_nvar), intent(out) :: vp !!variables primitives calculées par la fonction / primitive variables calculated by the function !=========================== DEBUT DU CODE EXECUTABLE ================== vp%v(1)=0.d0*x*y*z*vn%v(1)*vn%v(2)*vn%v(3) SELECT CASE (fctnum) !_______________________________________________________________________ !_______________________________________________________________________ ! surverse Euler bifluide "JeuckNov2023" : condition aux limites amont CASE(3) IF(z.gt.3.832311d0) THEN vp%v(1)=1.d0 ! rho vp%v(2)=0.d0 ! u (flux entrant) vp%v(3)=0.d0 ! v vp%v(4)=-vi%v(4) ! w vp%v(5)=1.e5 ! p (p_hysttq) ELSE IF (z.le.3.832311d0) THEN vp%v(1)=1000.d0 ! rho vp%v(2)=1.805538d0 ! u (flux entrant) vp%v(3)=0.d0 ! v vp%v(4)=0.d0 ! w vp%v(5)=1.e5 + 1000.d0*9.81*(3.832311d0-z)! p (p_hysttq) END IF !_______________________________________________________________________ CASE DEFAULT call print_err('fct_cond', 'User function not defined') END SELECT !=========================== FIN DE LA ROUTINE ==================== END SUBROUTINE fct_cond