gradient of temperature:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | qdt | |||
| real(kind=dp), | intent(in) | :: | dtfactor | |||
| real(kind=dp), | intent(in) | :: | qtC | |||
| real(kind=dp), | intent(in) | :: | wCTprim(nw_phys,5) | |||
| real(kind=dp), | intent(in) | :: | qt | |||
| real(kind=dp), | intent(inout) | :: | wnew(nw_phys) | |||
| real(kind=dp), | intent(in) | :: | x(1:ndim) | |||
| real(kind=dp), | intent(in) | :: | dx(1:ndim) | |||
| integer, | intent(in) | :: | idir | |||
| logical, | intent(in) | :: | qsourcesplit |
subroutine addsource_nonlocal(qdt, dtfactor, qtC, wCTprim, qt, wnew, x, dx, idir, & qsourcesplit) use mod_global_parameters, only: dt, cmax_global, courantpar, third real(dp), intent(in) :: qdt, dtfactor, qtC, qt real(dp), intent(in) :: wCTprim(nw_phys,5) real(dp), intent(in) :: x(1:ndim), dx(1:ndim) real(dp), intent(inout) :: wnew(nw_phys) integer, intent(in) :: idir logical, intent(in) :: qsourcesplit ! .. local .. real(dp) :: tau, htc_qrsc, sigT real(dp) :: Te(1:5), gradT real(dp) :: mag5(1:5), divb, mag if (.not. qsourcesplit) then !--------------------------------- ! unsplit sources !--------------------------------- ! > p*divb mag5(1:5) = wCTprim(iw_b1-1+idir,1:5) divb = (8*mag5(4)-8*mag5(2)-mag5(5)+mag5(1))/12.0_dp/dx(idir) wnew(iw_mom(1)) = wnew(iw_mom(1)) + qdt*wCTprim(iw_e,3)*divb !> gradient of temperature: Te(1:5) = wCTprim(iw_e,1:5) / wCTprim(iw_rho,1:5) mag = wCTprim(iw_b1-1+idir,3) gradT = (8.d0*(Te(4)-Te(2))-Te(5)+Te(1))/(12.d0*dx(idir)) sigT = hypertc_kappa * sqrt(Te(3)**5) tau = max(4.d0*dt, sigT*Te(3)*courantpar**2*gamma_1/& (wCTprim(iw_e,3)*cmax_global**2)) htc_qrsc = sigT * mag * gradT wnew(iw_q) = wnew(iw_q) - qdt * (htc_qrsc + wCTprim(iw_q,3)*third) / tau else !--------------------------------- ! split sources !--------------------------------- ! Not yet implemented end if end subroutine addsource_nonlocal