************************************************************************ ************************************************************************ ************************************************************************ SUBROUTINE ASDRHS(V,D, DDDV) C ^^^ ^^^^ C in out C calculates the Right Hand Side of the differential equation C for the Angular Size Distance C Input are the dependent variables V and D. C C Output are the right-hand sides. C Code written by Phillip Helbig, Hamburg Observatory, Sep 1995. ************************************************************************ ************************************************************************ C declarations ************************************************************************ C input variables from the calling routine (parameter list) C V = 1 + Z and is the basic independent variable, C D(1) is the distance and D(2) its derivative. DOUBLE PRECISION V, D(2) ************************************************************************ C output variables to the calling routine (parameter list) C these are the result of this SUBROUTINE DOUBLE PRECISION DDDV(2) ************************************************************************ C output variables from called routines (parameter list) C G = SQRT(QQ(V)) C IF (VARETA) ETA = ETAZ(V-1.0) C customised ETA, Q(v)**2 DOUBLE PRECISION ETAZ, QQ EXTERNAL ETAZ, QQ ************************************************************************ C variables in common blocks C cosmological variables (see INICOS) DOUBLE PRECISION LAMBDA, OMEGA, ETA, K COMMON /COSMOL/ LAMBDA, OMEGA, ETA, K C communication between here and INICOS (q. v.) INTEGER IERROR, WMTYPE DOUBLE PRECISION ZMAX LOGICAL NOTYET, DEBUG, VARETA, MAXZ, BOUNCE COMMON /ANGINI/ ZMAX, IERROR, WMTYPE, $ NOTYET, VARETA, DEBUG, MAXZ, BOUNCE C save until the next call SAVE /COSMOL/, /ANGINI/ ************************************************************************ C internally used quantities C variables C just to keep things neat DOUBLE PRECISION Q, G, GS ************************************************************************ ************************************************************************ C calculations Q = QQ(V) G = SQRT(Q) C and G's derivative GS = (3.0D0*OMEGA*V**2 - 2.0D0*K*V)/(2.0D0*G) C calculate the derivatives DDDV needed by the calling routine C D(1) and D(2) are D and D', so D' = D' (definition) DDDV(1) = D(2) C and D'' is calculated C if required replace ETA with the value given by ETAZ IF (VARETA) ETA = ETAZ(V-1.0D0) DDDV(2) = -((3.0D0*OMEGA*ETA*V*D(1))/(2.0D0*Q)) - $ (2.0D0/V + GS/G)*D(2) ************************************************************************ ************************************************************************ END