!--------1---------2---------3---------4---------5---------6---------7---------8 subroutine time_evolution !--------1---------2---------3---------4---------5---------6---------7---------8 use global_constants, only : rkind, itmax, dt, time0, time, year & & , GO_NEXT, W_ALTERATION, temperature_melting_rock, D_REACTION, Myr, Rocky_Core, Ordinary_Chondrite use material_parameters, only : iw, ir, ii, mn, melt, material_check & & , ir_old, iw_old, ice_reach_rock & & , mass_ratio_rock, mass_ratio_anhydrous_rock, frez_start & & , mass_ratio_ice, mass_ratio_water, mass_ratio_hydrous_rock, radius_water use global_parameters, only : irmax, temp, fw, temp_max use energy, only : energy_check, temp_old, lat_energy, set_energy use aqueous, only : aqueous_check, alteration_heat_bak, flux_alt use dehydration, only : dehydration_check, temperature_dehydration use heat_radiogenic, only : iAl, ftime use energy_dump, only : energy_w_dump, energy_r_dump use heat_parameters, only : latent_heat_vapor use diffusion, only : diffusion_check implicit none integer :: it, i, time_Myr time = time0 temp_old(0:irmax) = temp(0:irmax) do it = 1, itmax/2 temp_max(0:irmax) = max(temp_max(0:irmax),temp_old(0:irmax)) time = time0 + dt*real(it) call set_energy flux_alt = 0._rkind if(W_ALTERATION) call alteration_heat_bak(it) temp_old(0:irmax) = temp(0:irmax) time_Myr = (time/year+ftime(iAl))/Myr if(Rocky_core) then if(.NOT.ice_reach_rock) then if(iw == 0) then call fdm_explicit_init elseif(iw /= 0 .AND. ii-iw >= 2) then call fdm_explicit_water if(ir > 0) call flux_check call pressure_check elseif(iw /= 0 .AND. ii-iw <= 1) then call fdm_explicit_water_ice call flux_check call pressure_check endif do i = 0, irmax if(mn(i)/=4.AND.mn(i)/=2.AND.mn(i)/=1) call material_check(i) if((mn(i) >= 7 .AND. mn(i)<= 9) .OR. mn(i) == 3 .OR. mn(i) == 11) ii = i enddo if(W_ALTERATION) then call aqueous_check if(D_REACTION) call dehydration_check elseif(.NOT.W_ALTERATION) then mass_ratio_anhydrous_rock(0:irmax) = mass_ratio_rock(0:irmax) endif call radius_check elseif(ice_reach_rock) then call fdm_explicit_init call pressure_check if(D_REACTION) call dehydration_check do i = 0, ir if(mn(i)/=4) call material_check(i) enddo endif elseif(.NOT.Rocky_core) then call fdm_explicit_init call pressure_check_nocore do i = 0, irmax if(mn(i)/=4.AND.mn(i)/=2.AND.mn(i)/=1) call material_check(i) if((mn(i) >= 7 .AND. mn(i)<= 9) .OR. mn(i) == 3 .OR. mn(i) == 11) ii = i enddo if(W_ALTERATION) then call aqueous_check if(D_REACTION) call dehydration_check elseif(.NOT.W_ALTERATION) then mass_ratio_anhydrous_rock(0:irmax) = mass_ratio_rock(0:irmax) endif endif if(temp(0)>=temperature_melting_rock) then GO_NEXT=.TRUE. call log_error(0,'temp0>temp_melt_rock') endif if(GO_NEXT) exit if(mod(it,itmax/10000)==0) then call graph endif ir_old = ir iw_old = iw enddo return end subroutine time_evolution