c======================================================================= subroutine massflowrateCO2(P,T,Sat,Radius,Matm,Ic) c c Determination of the mass transfer rate for CO2 condensation & c sublimation c c newton-raphson method c CLASSICAL (no SF etc.) c c inputs: Pressure (P), Temperature (T), saturation ratio (Sat), c particle radius (Radius), molecular mass of the atm (Matm) c output: MASS FLUX Ic c c Authors: C. Listowski (2014) then J. Audouard (2016-2017) c======================================================================= USE comcstfi_h implicit none include "microphys.h" c arguments: INPUT c ---------- REAL T,Matm REAL*8 SAT real P DOUBLE PRECISION Radius c arguments: OUTPUT c ---------- DOUBLE PRECISION Ic c Local Variables c ---------- DOUBLE PRECISION Tcm DOUBLE PRECISION T_inf, T_sup, T_dT DOUBLE PRECISION C0,C1,C2 DOUBLE PRECISION kmix,Lsub,cond DOUBLE PRECISION rtsafe DOUBLE PRECISION left, fval, dfval c function for newton-raphson iterative method c -------------------------- EXTERNAL classical Tcm = 110!dble(T) ! initialize pourquoi 0 et pas t(i) T_inf = 0d0 T_sup = 800d0 T_dT = 0.001 ! precision - mettre petit et limiter nb iteration? 666 CONTINUE call coefffunc(P,T,Sat,Radius,Matm,kmix,Lsub,C0,C1,C2) if (isnan(C0) .eqv. .true.) C0=0d0 c FIND SURFACE TEMPERATURE (Tc) : iteration sur t cond = 4.*pi*Radius*kmix Tcm = rtsafe(classical,T_inf,T_sup,T_dT,Radius,C0,C1,C2) if (Tcm.LE.0d0 .or. isnan(Tcm)) then ! unsignificant cases where S<<