Skip to content

Commit 38edec0

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/Ver.2.0_alpha' into Ver.2.0_alpha
2 parents 50ad2bf + 2f71c31 commit 38edec0

File tree

86 files changed

+2982
-766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2982
-766
lines changed

doc/CALYPSO.pdf

1.02 KB
Binary file not shown.

doc/tex_src/controls_CALYPSO.tex

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -453,20 +453,33 @@ \subsection{\tt phys\_values\_ctl}
453453
\begin{tabular}{|c|c|}
454454
\hline
455455
{\tt [Name]} & expression \\ \hline
456-
\tt sym\_buoyancy\_flux & $ - \bvec{u}_{sym} \cdot \alpha_{T} T_{sym} \bvec{g} $ \\
457-
\tt asym\_buoyancy\_flux & $ - \bvec{u}_{asym} \cdot \alpha_{T} T_{asym} \bvec{g} $ \\ \hline
458-
% \tt sym\_composite\_buoyancy & $ -\alpha_{C} \cdot C_{sym} \bvec{g} $ \\
459-
% \tt asym\_composite\_buoyancy & $ -\alpha_{C} \cdot C_{asym} \bvec{g} $ \\ \hline
456+
\tt sym\_thermal\_buoyancy\_flux & $ - \bvec{u}_{sym} \cdot \alpha_{T} T_{sym} \bvec{g} $ \\
457+
\tt asym\_thermal\_buoyancy\_flux & $ - \bvec{u}_{asym} \cdot \alpha_{T} T_{asym} \bvec{g} $ \\
458+
\tt sym\_composit\_buoyancy\_flux & $ - \bvec{u}_{sym} \cdot \alpha_{C} C_{sym} \bvec{g} $ \\
459+
\tt asym\_composit\_buoyancy\_flux & $ - \bvec{u}_{asym} \cdot \alpha_{C} C_{asym} \bvec{g} $ \\
460+
\tt sym\_buoyancy\_flux & $ - \bvec{u}_{sym} \cdot \left(\alpha_{T} T_{sym} + \alpha_{C} C_{sym} \right)\bvec{g} $ \\
461+
\tt asym\_buoyancy\_flux & $ - \bvec{u}_{asym} \cdot \left(\alpha_{T} T_{asym} + \alpha_{C} C_{asym} \right)\bvec{g} $ \\
462+
\hline \hline
460463
%
461464
\tt -ua\_d\_ws\_x\_us & $ -\bvec{u}_{asym} \cdot \left( \bvec{\omega}_{sym} \times \bvec{u}_{sym} \right)$ \\
462-
\tt -ua\_d\_wa\_x\_ua & $ -\bvec{u}_{asym} \cdot \left( \bvec{\omega}_{asym} \times \bvec{u}_{asym} \right)$ \\
465+
\tt -ua\_d\_wa\_x\_ua & $ -\bvec{u}_{asym} \cdot \left( \bvec{\omega}_{asym} \times \bvec{u}_{asym} \right) = 0$ \\
463466
\tt -us\_d\_ws\_x\_ua & $ -\bvec{u}_{sym} \cdot \left( \bvec{\omega}_{sym} \times \bvec{u}_{asym} \right)$ \\
464-
\tt -us\_d\_wa\_x\_us & $ -\bvec{u}_{sym} \cdot \left( \bvec{\omega}_{asym} \times \bvec{u}_{sym} \right)$ \\ \hline
467+
\tt -us\_d\_wa\_x\_us & $ -\bvec{u}_{sym} \cdot \left( \bvec{\omega}_{asym} \times \bvec{u}_{sym} \right) = 0$ \\ \hline
465468
%
466469
\tt ua\_d\_js\_x\_bs & $ \bvec{u}_{asym} \cdot \left(\bvec{J}_{sym} \times \bvec{B}_{sym} \right) $ \\
467470
\tt ua\_d\_ja\_x\_ba & $ \bvec{u}_{asym} \cdot \left(\bvec{J}_{asym} \times \bvec{B}_{asym} \right) $ \\
468471
\tt us\_d\_js\_x\_ba & $ \bvec{u}_{sym} \cdot \left(\bvec{J}_{sym} \times \bvec{B}_{asym} \right) $ \\
469-
\tt us\_d\_ja\_x\_bs & $ \bvec{u}_{sym} \cdot \left(\bvec{J}_{asym} \times \bvec{B}_{sym} \right) $ \\ \hline
472+
\tt us\_d\_ja\_x\_bs & $ \bvec{u}_{sym} \cdot \left(\bvec{J}_{asym} \times \bvec{B}_{sym} \right) $ \\ \hline \hline
473+
%
474+
\tt ua\_d\_ws\_x\_us & $ \bvec{u}_{asym} \cdot \left( \bvec{\omega}_{sym} \times \bvec{u}_{sym} \right)$ \\
475+
\tt ua\_d\_wa\_x\_ua & $ \bvec{u}_{asym} \cdot \left( \bvec{\omega}_{asym} \times \bvec{u}_{asym} \right) = 0$ \\
476+
\tt us\_d\_ws\_x\_ua & $ \bvec{u}_{sym} \cdot \left( \bvec{\omega}_{sym} \times \bvec{u}_{asym} \right)$ \\
477+
\tt us\_d\_wa\_x\_us & $ \bvec{u}_{sym} \cdot \left( \bvec{\omega}_{asym} \times \bvec{u}_{sym} \right) = 0$ \\ \hline
478+
%
479+
\tt -ua\_d\_js\_x\_bs & $ -\bvec{u}_{asym} \cdot \left(\bvec{J}_{sym} \times \bvec{B}_{sym} \right) $ \\
480+
\tt -ua\_d\_ja\_x\_ba & $ -\bvec{u}_{asym} \cdot \left(\bvec{J}_{asym} \times \bvec{B}_{asym} \right) $ \\
481+
\tt -us\_d\_js\_x\_ba & $ -\bvec{u}_{sym} \cdot \left(\bvec{J}_{sym} \times \bvec{B}_{asym} \right) $ \\
482+
\tt -us\_d\_ja\_x\_bs & $ -\bvec{u}_{sym} \cdot \left(\bvec{J}_{asym} \times \bvec{B}_{sym} \right) $ \\ \hline
470483
%
471484
% \tt usym\_x\_Bsym & $ \bvec{u}_{sym} \times \bvec{B}_{sym} $ \\
472485
% \tt uasym\_x\_Basym & $ \bvec{u}_{asym} \times \bvec{B}_{asym} $ \\

src/Fortran_libraries/MHD_src/sph_MHD/add_base_force_4_sph_trns.f90

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ subroutine add_linear_force_bwd_trns_snap &
262262
call add_field_name_4_sph_trns_snap(d_rj, &
263263
& ipol_frc%i_comp_buo, iphys_frc%i_comp_buo, &
264264
& b_trns_frc%i_comp_buo, trns)
265+
call add_field_name_4_sph_trns_snap(d_rj, &
266+
& ipol_frc%i_buoyancy, iphys_frc%i_buoyancy, &
267+
& b_trns_frc%i_buoyancy, trns)
265268
!
266269
call add_field_name_4_sph_trns_snap(d_rj, &
267270
& ipol_frc%i_press_grad, iphys_frc%i_press_grad, &
@@ -336,12 +339,16 @@ subroutine add_rot_force_4_sph_trns_snap(d_rj, &
336339
call add_field_name_4_sph_trns_snap(d_rj, &
337340
& ipol_rot_frc%i_lorentz, iphys_rot_frc%i_lorentz, &
338341
& b_trns_rot_frc%i_lorentz, trns)
342+
!
339343
call add_field_name_4_sph_trns_snap(d_rj, &
340344
& ipol_rot_frc%i_thrm_buo, iphys_rot_frc%i_thrm_buo, &
341345
& b_trns_rot_frc%i_thrm_buo, trns)
342346
call add_field_name_4_sph_trns_snap(d_rj, &
343347
& ipol_rot_frc%i_comp_buo, iphys_rot_frc%i_comp_buo, &
344348
& b_trns_rot_frc%i_comp_buo, trns)
349+
call add_field_name_4_sph_trns_snap(d_rj, &
350+
& ipol_rot_frc%i_buoyancy, iphys_rot_frc%i_buoyancy, &
351+
& b_trns_rot_frc%i_buoyancy, trns)
345352
!
346353
end subroutine add_rot_force_4_sph_trns_snap
347354
!
@@ -363,6 +370,16 @@ subroutine add_div_force_4_sph_trns_snap(d_rj, &
363370
call add_field_name_4_sph_trns_snap(d_rj, &
364371
& ipol_div_frc%i_Coriolis, iphys_div_frc%i_Coriolis, &
365372
& b_trns_div_frc%i_Coriolis, trns)
373+
!
374+
call add_field_name_4_sph_trns_snap(d_rj, &
375+
& ipol_div_frc%i_thrm_buo, iphys_div_frc%i_thrm_buo, &
376+
& b_trns_div_frc%i_thrm_buo, trns)
377+
call add_field_name_4_sph_trns_snap(d_rj, &
378+
& ipol_div_frc%i_comp_buo, iphys_div_frc%i_comp_buo, &
379+
& b_trns_div_frc%i_comp_buo, trns)
380+
call add_field_name_4_sph_trns_snap(d_rj, &
381+
& ipol_div_frc%i_buoyancy, iphys_div_frc%i_buoyancy, &
382+
& b_trns_div_frc%i_buoyancy, trns)
366383
!
367384
end subroutine add_div_force_4_sph_trns_snap
368385
!

src/Fortran_libraries/MHD_src/sph_MHD/add_energy_flux_4_sph_trns.f90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,26 @@ subroutine add_ene_flux_4_sph_trns_snap &
4949
& ipol_efx%i_m_advect_work, iphys_efx%i_m_advect_work, &
5050
& f_trns_efx%i_m_advect_work, trns)
5151
call add_field_name_4_sph_trns_snap(d_rj, &
52+
& ipol_efx%i_nega_m_advect_wk, iphys_efx%i_nega_m_advect_wk, &
53+
& f_trns_efx%i_nega_m_advect_wk, trns)
54+
call add_field_name_4_sph_trns_snap(d_rj, &
5255
& ipol_efx%i_me_gen, iphys_efx%i_me_gen, &
5356
& f_trns_efx%i_me_gen, trns)
5457
call add_field_name_4_sph_trns_snap(d_rj, &
5558
& ipol_efx%i_ujb, iphys_efx%i_ujb, f_trns_efx%i_ujb, trns)
5659
call add_field_name_4_sph_trns_snap(d_rj, &
5760
& ipol_efx%i_nega_ujb, iphys_efx%i_nega_ujb, &
5861
& f_trns_efx%i_nega_ujb, trns)
62+
!
5963
call add_field_name_4_sph_trns_snap(d_rj, &
6064
& ipol_efx%i_t_buo_gen, iphys_efx%i_t_buo_gen, &
6165
& f_trns_efx%i_t_buo_gen, trns)
6266
call add_field_name_4_sph_trns_snap(d_rj, &
6367
& ipol_efx%i_c_buo_gen, iphys_efx%i_c_buo_gen, &
6468
& f_trns_efx%i_c_buo_gen, trns)
69+
call add_field_name_4_sph_trns_snap(d_rj, &
70+
& ipol_efx%i_buoyancy_flux, iphys_efx%i_buoyancy_flux, &
71+
& f_trns_efx%i_buoyancy_flux, trns)
6572
!
6673
end subroutine add_ene_flux_4_sph_trns_snap
6774
!
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
!> @file cal_buoyancy_flux_rtp.f90
2+
!! module cal_buoyancy_flux_rtp
3+
!!
4+
!! @author H. Matsui
5+
!! @date Programmed in Oct., 2009
6+
!! @n Modified in Apr., 2013
7+
!
8+
!> @brief Evaluate energy fluxes for MHD dynamo in physical space
9+
!!
10+
!!@verbatim
11+
!! subroutine s_cal_buoyancy_flux_rtp &
12+
!! & (sph_rtp, fl_prop, ref_param_T, ref_param_C, &
13+
!! & bs_trns_base, bs_trns_scalar, fs_trns_eflux, &
14+
!! & trns_b_snap, trns_b_scl, trns_f_eflux)
15+
!! type(sph_rtp_grid), intent(in) :: sph_rtp
16+
!! type(fluid_property), intent(in) :: fl_prop
17+
!! type(reference_scalar_param), intent(in) :: ref_param_T
18+
!! type(reference_scalar_param), intent(in) :: ref_param_C
19+
!! type(base_field_address), intent(in) :: bs_trns_base
20+
!! type(base_field_address), intent(in) :: bs_trns_scalar
21+
!! type(energy_flux_address), intent(in) :: fs_trns_eflux
22+
!! type(spherical_transform_data), intent(in) :: trns_b_snap
23+
!! type(spherical_transform_data), intent(in) :: trns_b_scl
24+
!! type(spherical_transform_data), intent(inout) :: trns_f_eflux
25+
!!@endverbatim
26+
!
27+
module cal_buoyancy_flux_rtp
28+
!
29+
use m_precision
30+
use m_constants
31+
use m_machine_parameter
32+
!
33+
use t_phys_address
34+
use t_spheric_rtp_data
35+
use t_physical_property
36+
use t_reference_scalar_param
37+
use t_addresses_sph_transform
38+
use t_schmidt_poly_on_rtm
39+
!
40+
implicit none
41+
!
42+
private :: sel_buoyancy_flux_rtp, sel_pole_sph_buoyancy_flux
43+
!
44+
! -----------------------------------------------------------------------
45+
!
46+
contains
47+
!
48+
! -----------------------------------------------------------------------
49+
!
50+
subroutine s_cal_buoyancy_flux_rtp &
51+
& (sph_rtp, fl_prop, ref_param_T, ref_param_C, &
52+
& bs_trns_base, bs_trns_scalar, fs_trns_eflux, &
53+
& trns_b_snap, trns_b_scl, trns_f_eflux)
54+
!
55+
use cal_self_buoyancies_sph
56+
!
57+
type(sph_rtp_grid), intent(in) :: sph_rtp
58+
type(fluid_property), intent(in) :: fl_prop
59+
type(reference_scalar_param), intent(in) :: ref_param_T
60+
type(reference_scalar_param), intent(in) :: ref_param_C
61+
type(base_field_address), intent(in) :: bs_trns_base
62+
type(base_field_address), intent(in) :: bs_trns_scalar
63+
type(energy_flux_address), intent(in) :: fs_trns_eflux
64+
type(spherical_transform_data), intent(in) :: trns_b_snap
65+
type(spherical_transform_data), intent(in) :: trns_b_scl
66+
!
67+
type(spherical_transform_data), intent(inout) :: trns_f_eflux
68+
!
69+
integer(kind = kint) :: ibuo_temp, ibuo_comp
70+
!
71+
!
72+
call sel_field_address_for_buoyancies &
73+
& (bs_trns_scalar, ref_param_T, ref_param_C, &
74+
& ibuo_temp, ibuo_comp)
75+
!
76+
if(fs_trns_eflux%i_t_buo_gen .gt. 0) then
77+
call sel_buoyancy_flux_rtp(fl_prop%i_grav, sph_rtp, &
78+
& fl_prop%coef_buo, trns_b_scl%fld_rtp(1,ibuo_temp), &
79+
& trns_b_snap%fld_rtp(1,bs_trns_base%i_velo), &
80+
& trns_f_eflux%fld_rtp(1,fs_trns_eflux%i_t_buo_gen))
81+
call sel_pole_sph_buoyancy_flux &
82+
& (fl_prop%i_grav, sph_rtp%nnod_pole, sph_rtp%nidx_rtp(1), &
83+
& sph_rtp%radius_1d_rtp_r, fl_prop%coef_buo, &
84+
& trns_b_scl%fld_pole(1,ibuo_temp), &
85+
& trns_b_snap%fld_pole(1,bs_trns_base%i_velo), &
86+
& trns_f_eflux%fld_pole(1,fs_trns_eflux%i_t_buo_gen))
87+
end if
88+
!
89+
if(fs_trns_eflux%i_c_buo_gen .gt. 0) then
90+
call sel_buoyancy_flux_rtp(fl_prop%i_grav, sph_rtp, &
91+
& fl_prop%coef_comp_buo, trns_b_scl%fld_rtp(1,ibuo_comp), &
92+
& trns_b_snap%fld_rtp(1,bs_trns_base%i_velo), &
93+
& trns_f_eflux%fld_rtp(1,fs_trns_eflux%i_c_buo_gen))
94+
call sel_pole_sph_buoyancy_flux &
95+
& (fl_prop%i_grav, sph_rtp%nnod_pole, sph_rtp%nidx_rtp(1), &
96+
& sph_rtp%radius_1d_rtp_r, fl_prop%coef_comp_buo, &
97+
& trns_b_scl%fld_pole(1,ibuo_comp), &
98+
& trns_b_snap%fld_pole(1,bs_trns_base%i_velo), &
99+
& trns_f_eflux%fld_pole(1,fs_trns_eflux%i_c_buo_gen))
100+
end if
101+
!
102+
call cal_total_buoyancy_scalar &
103+
& (fs_trns_eflux%i_t_buo_gen, fs_trns_eflux%i_c_buo_gen, &
104+
& fs_trns_eflux%i_buoyancy_flux, sph_rtp%nnod_rtp, &
105+
& trns_f_eflux%ncomp, trns_f_eflux%fld_rtp)
106+
call cal_total_buoyancy_scalar &
107+
& (fs_trns_eflux%i_t_buo_gen, fs_trns_eflux%i_c_buo_gen, &
108+
& fs_trns_eflux%i_buoyancy_flux, sph_rtp%nnod_pole, &
109+
& trns_f_eflux%ncomp, trns_f_eflux%fld_pole)
110+
!
111+
end subroutine s_cal_buoyancy_flux_rtp
112+
!
113+
!-----------------------------------------------------------------------
114+
! -----------------------------------------------------------------------
115+
!
116+
subroutine sel_buoyancy_flux_rtp(i_grav, sph_rtp, coef, &
117+
& scalar, vr, prod)
118+
!
119+
use cal_sph_buoyancy_flux
120+
use cal_products_smp
121+
!
122+
type(sph_rtp_grid), intent(in) :: sph_rtp
123+
integer(kind = kint), intent(in) :: i_grav
124+
real(kind=kreal), intent(in) :: coef
125+
real(kind=kreal), intent(in) :: scalar(sph_rtp%nnod_rtp)
126+
real(kind=kreal), intent(in) :: vr(sph_rtp%nnod_rtp)
127+
!
128+
real(kind=kreal), intent(inout) :: prod(sph_rtp%nnod_rtp)
129+
!
130+
!
131+
if(i_grav .eq. iflag_radial_g) then
132+
call cal_scalar_product_w_coef(sph_rtp%nnod_rtp, coef, &
133+
& scalar, vr, prod)
134+
else
135+
if(sph_rtp%istep_rtp(1) .eq. 1) then
136+
call sph_self_buoyancy_flux_rin &
137+
& (sph_rtp%nnod_rtp, sph_rtp%nidx_rtp, &
138+
& sph_rtp%radius_1d_rtp_r, coef, scalar, vr, prod)
139+
else
140+
call sph_self_buoyancy_flux_pin &
141+
& (sph_rtp%nnod_rtp, sph_rtp%nidx_rtp, &
142+
& sph_rtp%radius_1d_rtp_r, coef, scalar, vr, prod)
143+
end if
144+
end if
145+
!
146+
end subroutine sel_buoyancy_flux_rtp
147+
!
148+
!-----------------------------------------------------------------------
149+
!-----------------------------------------------------------------------
150+
!
151+
subroutine sel_pole_sph_buoyancy_flux &
152+
& (i_grav, nnod_pole, nidx_rtp_r, radius, coef, &
153+
& t_pole, v_pole, d_pole)
154+
!
155+
use cal_sph_buoyancy_flux
156+
!
157+
integer(kind = kint), intent(in) :: i_grav
158+
integer(kind = kint), intent(in) :: nnod_pole
159+
integer(kind = kint), intent(in) :: nidx_rtp_r
160+
real(kind=kreal), intent(in) :: radius(nidx_rtp_r)
161+
!
162+
real(kind = kreal), intent(in) :: coef
163+
real(kind = kreal), intent(in) :: t_pole(nnod_pole)
164+
real(kind = kreal), intent(in) :: v_pole(nnod_pole,3)
165+
!
166+
real(kind = kreal), intent(inout) :: d_pole(nnod_pole)
167+
!
168+
!
169+
if(i_grav .eq. iflag_radial_g) then
170+
call pole_sph_const_buoyancy_flux(nnod_pole, nidx_rtp_r, coef, &
171+
& t_pole, v_pole, d_pole)
172+
else
173+
call pole_sph_self_buoyancy_flux(nnod_pole, nidx_rtp_r, radius, &
174+
& coef, t_pole, v_pole, d_pole)
175+
end if
176+
!
177+
end subroutine sel_pole_sph_buoyancy_flux
178+
!
179+
! -----------------------------------------------------------------------
180+
!
181+
end module cal_buoyancy_flux_rtp

0 commit comments

Comments
 (0)