divers.f90

### TABLE OF CONTENTS

- 1. PHY/vitson

## PHY/vitson [ Modules ]

[ Top ] [ Modules ]

NOM

     vitson(w,cson)

DESCRIPTION

     Calcul de la vitesse du son associee a l etat w

     Calculation of the speed of sound associated with state w

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
      type(state),intent(in)            :: w  !! Variables primitives / Primitive variables
      real(kind=kind(0.d0)),intent(out) :: cson !! vitesse du son / speed of sound
    !=========================== DEBUT DU CODE EXECUTABLE ==================

      SELECT CASE (imodel_phy)

          CASE(2) ! bifluide isotherme
              cson=c_phy

          CASE(1)  ! Saint Venant
              IF (w%vprim%v(1) < 0.d0)call print_err('vitson',' Negative water level')
              cson=dsqrt(gpes_phy*max(w%vprim%v(1),hzero_phy))

          CASE DEFAULT
              call print_err('vitson',' Physical model not defined')
      END SELECT
    !===========================   FIN DE LA ROUTINE    ====================
    END SUBROUTINE vitson