setprob.f90.html CLAWPACK  
 Source file:   setprob.f90
 Directory:   /Users/rjl/clawpack_src/clawpack_master/amrclaw/examples/acoustics_1d_homogeneous
 Converted:   Mon Feb 19 2024 at 17:56:55   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

 
subroutine setprob

    implicit none
    character*25 :: fname
    integer :: iunit
    real(kind=8) :: rho,bulk,cc,zz,beta

    common /cparam/ rho,bulk,cc,zz   
    common /cqinit/ beta
 
    ! Set the material parameters for the acoustic equations
    ! Passed to the Riemann solver rp1.f in a common block
 
    iunit = 7
    fname = 'setprob.data'
    ! open the unit with new routine from Clawpack 4.4 to skip over
    ! comment lines starting with #:
    call opendatafile(iunit, fname)


    ! density:
    read(7,*) rho

    ! bulk modulus:
    read(7,*) bulk

    ! sound speed:
    cc = dsqrt(bulk/rho)

    ! impedance:
    zz = cc*rho

    ! beta for initial conditions:
    read(7,*) beta

end subroutine setprob