c Copyright (C) 2008-2014 Vincent Eymet c c KDISTRIBUTION is free software; you can redistribute it and/or modify c it under the terms of the GNU General Public License as published by c the Free Software Foundation; either version 3, or (at your option) c any later version. c KDISTRIBUTION is distributed in the hope that it will be useful, c but WITHOUT ANY WARRANTY; without even the implied warranty of c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the c GNU General Public License for more details. c You should have received a copy of the GNU General Public License c along with KDISTRIBUTION; if not, see c subroutine calc_rho(mfile,tfile,i,rho) implicit none include 'max.inc' c c Purpose: to compute the volumic mass (rho) of the gaseous mixture c on Venus, at interface index 'i' c integer strlen integer m,i double precision alt(1:Nmax) double precision pres(1:Nmax) double precision temp(1:Nmax) double precision Tsol double precision Tesp double precision Rgp,rho,Mass character*(Nchar_mx) mfile,tfile c label character*(Nchar_mx) label label='subroutine calc_rho' call read_model(m,alt,pres,temp,Tsol,Tesp) Rgp=1.0D+0*22.4D-3/(1.0D+0*273.15D+0) ! atm.m³/(mol.K) Mass=0.965D+0*44.0D+0+0.035D+0*28.0D+0 ! g/mol rho=Mass*1.0D-3*pres(i)/(Rgp*temp(i)) ! kg/m³ c Debug c write(*,*) 'rho=',rho c write(*,*) 'Mass=',Mass c write(*,*) 'pres(',i,')=',pres(i) c write(*,*) 'Rgp=',Rgp c write(*,*) 'temp(',i,')=',temp(i) c Debug return end