FE-Project
Loading...
Searching...
No Matches
scale_atm_phy_rd_dgm_common Module Reference

module FElib / Atmosphere / Physics radiation More...

Functions/Subroutines

subroutine, public atm_phy_rd_dgm_calc_heating (rhoh, flux_rad, ddens, dens_hyd, cvtot, lcmesh, elem3d, elem2d, element3d_operation, temp_t)

Detailed Description

module FElib / Atmosphere / Physics radiation

Description
Common module for radiation process
Author
Yuta Kawai, Team SCALE

Function/Subroutine Documentation

◆ atm_phy_rd_dgm_calc_heating()

subroutine, public scale_atm_phy_rd_dgm_common::atm_phy_rd_dgm_calc_heating ( real(rp), dimension(elem3d%np,lcmesh%nea), intent(out) rhoh,
real(rp), dimension(elem3d%np,lcmesh%ne,2,2), intent(in) flux_rad,
real(rp), dimension(elem3d%np,lcmesh%nea), intent(in) ddens,
real(rp), dimension(elem3d%np,lcmesh%nea), intent(in) dens_hyd,
real(rp), dimension(elem3d%np,lcmesh%nea), intent(in) cvtot,
class(localmesh3d), intent(in) lcmesh,
class(elementbase3d), intent(in) elem3d,
class(elementbase2d), intent(in) elem2d,
class(elementoperationbase3d), intent(in) element3d_operation,
real(rp), dimension(elem3d%np,lcmesh%nea,2), intent(out), optional temp_t )

Definition at line 56 of file scale_atm_phy_rd_dgm_common.F90.

61 implicit none
62 class(LocalMesh3D), intent(in) :: lcmesh
63 class(ElementBase3D), intent(in) :: elem3D
64 class(ElementBase2D), intent(in) :: elem2D
65 real(RP), intent(out) :: RHOH(elem3D%Np,lcmesh%NeA)
66 real(RP), intent(in) :: flux_rad(elem3D%Np,lcmesh%Ne,2,2)
67 real(RP), intent(in) :: DDENS(elem3D%Np,lcmesh%NeA)
68 real(RP), intent(in) :: DENS_hyd(elem3D%Np,lcmesh%NeA)
69 real(RP), intent(in) :: CVtot(elem3D%Np,lcmesh%NeA)
70 class(ElementOperationBase3D), intent(in) :: element3D_operation
71 real(RP), intent(out), optional :: TEMP_t(elem3D%Np,lcmesh%NeA,2)
72
73 integer :: ke
74 real(RP) :: Fz_LW(elem3D%Np)
75 real(RP) :: Fz_SW(elem3D%Np)
76 real(RP) :: DENS(elem3D%Np)
77
78 logical :: cal_TEMP_t
79 !------------------------------------------------------------------------------
80
81 if (present(temp_t)) then
82 cal_temp_t = .true.
83 else
84 cal_temp_t = .false.
85 end if
86
87 !$omp parallel do private(Fz_LW, Fz_SW, DENS)
88 do ke=lcmesh%NeS, lcmesh%NeE
89 call element3d_operation%Dz( flux_rad(:,ke,i_lw,i_up) - flux_rad(:,ke,i_lw,i_dn), fz_lw )
90 call element3d_operation%Dz( flux_rad(:,ke,i_sw,i_up) - flux_rad(:,ke,i_sw,i_dn), fz_sw )
91
92 rhoh(:,ke) = - lcmesh%Escale(:,ke,3,3) * ( fz_lw(:) + fz_sw(:) )
93
94 if ( cal_temp_t ) then
95 dens(:) = dens_hyd(:,ke) + ddens(:,ke)
96 temp_t(:,ke,1) = - lcmesh%Escale(:,ke,3,3) * fz_lw(:) / ( dens(:) * cvtot(:,ke) )
97 temp_t(:,ke,2) = - lcmesh%Escale(:,ke,3,3) * fz_sw(:) / ( dens(:) * cvtot(:,ke) )
98 end if
99 end do
100
101 return