Skip to content

Commit

Permalink
Add controls for radial variations
Browse files Browse the repository at this point in the history
  • Loading branch information
hiromatsui committed Nov 25, 2024
1 parent bea1d60 commit 143fc3c
Show file tree
Hide file tree
Showing 208 changed files with 7,317 additions and 2,429 deletions.
16 changes: 11 additions & 5 deletions src/Fortran_libraries/MHD_src/IO/Makefile.depends
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_sph_MHD_fields_2_ctl.o: $(MHD_IO_DIR)/add_sph_MHD_fields_2_ctl.f90 m_precisi
$(F90) -c $(F90OPTFLAGS) $<
bcast_control_sph_MHD.o: $(MHD_IO_DIR)/bcast_control_sph_MHD.f90 m_precision.o calypso_mpi.o m_machine_parameter.o t_ctl_data_MHD.o t_ctl_data_sph_MHD_w_psf.o calypso_mpi_int.o calypso_mpi_char.o transfer_to_long_integers.o bcast_4_platform_ctl.o bcast_4_field_ctl.o bcast_4_sph_monitor_ctl.o bcast_4_sphere_ctl.o bcast_ctl_MHD_model.o bcast_monitor_data_ctl.o t_ctl_data_SPH_MHD_control.o bcast_4_time_step_ctl.o bcast_ctl_data_mhd_time_rst.o t_ctl_data_crust_filter.o bcast_control_arrays.o
$(F90) -c $(F90OPTFLAGS) $<
bcast_ctl_MHD_model.o: $(MHD_IO_DIR)/bcast_ctl_MHD_model.f90 m_precision.o m_machine_parameter.o calypso_mpi.o t_ctl_data_MHD_model.o calypso_mpi_char.o calypso_mpi_int.o bcast_4_field_ctl.o bcast_ctl_data_mhd_evo.o bcast_ctl_data_mhd_forces.o transfer_to_long_integers.o t_ctl_data_dimless_numbers.o bcast_control_arrays.o t_ctl_data_mhd_normalize.o t_ctl_data_termal_norm.o t_ctl_data_momentum_norm.o t_ctl_data_induct_norm.o
bcast_ctl_MHD_model.o: $(MHD_IO_DIR)/bcast_ctl_MHD_model.f90 m_precision.o m_machine_parameter.o calypso_mpi.o t_ctl_data_MHD_model.o calypso_mpi_char.o calypso_mpi_int.o bcast_4_field_ctl.o bcast_ctl_data_mhd_evo.o bcast_ctl_data_mhd_forces.o transfer_to_long_integers.o t_ctl_data_dimless_numbers.o bcast_control_arrays.o t_ctl_data_mhd_normalize.o t_ctl_data_termal_norm.o t_ctl_data_momentum_norm.o t_ctl_data_induct_norm.o t_ctl_data_valuable_density.o t_ctl_data_valuable_diffuse.o
$(F90) -c $(F90OPTFLAGS) $<
bcast_ctl_data_mhd_evo.o: $(MHD_IO_DIR)/bcast_ctl_data_mhd_evo.f90 m_precision.o m_machine_parameter.o calypso_mpi.o t_ctl_data_mhd_evolution.o calypso_mpi_int.o calypso_mpi_char.o transfer_to_long_integers.o bcast_control_arrays.o t_ctl_data_mhd_evo_area.o t_ctl_data_node_boundary.o t_ctl_data_surf_boundary.o
$(F90) -c $(F90OPTFLAGS) $<
Expand All @@ -18,7 +18,7 @@ bcast_monitor_data_ctl.o: $(MHD_IO_DIR)/bcast_monitor_data_ctl.f90 m_precision.o
$(F90) -c $(F90OPTFLAGS) $<
check_read_bc_file.o: $(MHD_IO_DIR)/check_read_bc_file.f90 m_precision.o t_bc_data_list.o t_control_parameter.o calypso_mpi.o t_physical_property.o
$(F90) -c $(F90OPTFLAGS) $<
ctl_data_MHD_model_IO.o: $(MHD_IO_DIR)/ctl_data_MHD_model_IO.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_ctl_data_4_fields.o t_ctl_data_mhd_evolution.o t_ctl_data_mhd_evo_area.o t_ctl_data_node_boundary.o t_ctl_data_surf_boundary.o t_ctl_data_mhd_normalize.o t_ctl_data_mhd_forces.o t_ctl_data_coriolis_force.o t_ctl_data_gravity.o t_ctl_data_mhd_magne.o t_ctl_data_magnetic_scale.o t_ctl_data_temp_model.o t_ctl_data_dimless_numbers.o t_ctl_data_MHD_model.o skip_comment_f.o write_control_elements.o ctl_data_node_boundary_IO.o ctl_data_surf_boundary_IO.o ctl_data_temp_model_IO.o ctl_data_comp_model_IO.o
ctl_data_MHD_model_IO.o: $(MHD_IO_DIR)/ctl_data_MHD_model_IO.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_ctl_data_4_fields.o t_ctl_data_mhd_evolution.o t_ctl_data_mhd_evo_area.o t_ctl_data_node_boundary.o t_ctl_data_surf_boundary.o t_ctl_data_mhd_normalize.o t_ctl_data_mhd_forces.o t_ctl_data_coriolis_force.o t_ctl_data_gravity.o t_ctl_data_mhd_magne.o t_ctl_data_magnetic_scale.o t_ctl_data_temp_model.o t_ctl_data_dimless_numbers.o t_ctl_data_MHD_model.o t_ctl_data_valuable_diffuse.o t_ctl_data_valuable_density.o skip_comment_f.o write_control_elements.o ctl_data_node_boundary_IO.o ctl_data_surf_boundary_IO.o ctl_data_temp_model_IO.o ctl_data_comp_model_IO.o
$(F90) -c $(F90OPTFLAGS) $<
ctl_data_comp_model_IO.o: $(MHD_IO_DIR)/ctl_data_comp_model_IO.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_control_array_character.o t_control_array_real.o t_ctl_data_temp_model.o skip_comment_f.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
Expand All @@ -30,7 +30,7 @@ ctl_data_surf_boundary_IO.o: $(MHD_IO_DIR)/ctl_data_surf_boundary_IO.f90 m_preci
$(F90) -c $(F90OPTFLAGS) $<
ctl_data_temp_model_IO.o: $(MHD_IO_DIR)/ctl_data_temp_model_IO.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_control_array_character.o t_control_array_real.o t_ctl_data_temp_model.o skip_comment_f.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
init_sph_MHD_elapsed_label.o: $(MHD_IO_DIR)/init_sph_MHD_elapsed_label.F90 m_precision.o m_work_time.o m_elapsed_labels_SEND_RECV.o m_elapsed_labels_SPH_TRNS.o m_elapsed_labels_4_MHD.o m_elapsed_labels_4_VIZ.o m_elapsed_labels_gen_SPH.o calypso_mpi.o t_spheric_parameter.o calypso_mpi_int.o transfer_to_long_integers.o set_parallel_file_name.o
init_sph_MHD_elapsed_label.o: $(MHD_IO_DIR)/init_sph_MHD_elapsed_label.F90 m_precision.o m_work_time.o m_elapsed_labels_SEND_RECV.o m_elapsed_labels_SPH_TRNS.o m_elapsed_labels_4_MHD.o m_elapsed_labels_gen_SPH.o calypso_mpi.o t_spheric_parameter.o calypso_mpi_int.o transfer_to_long_integers.o set_parallel_file_name.o
$(F90) -c $(F90OPTFLAGS) $(F90CPPFLAGS) $<
m_boundary_condition_IDs.o: $(MHD_IO_DIR)/m_boundary_condition_IDs.f90 m_precision.o
$(F90) -c $(F90OPTFLAGS) $<
Expand All @@ -46,7 +46,7 @@ set_control_4_MHD_coefs.o: $(MHD_IO_DIR)/set_control_4_MHD_coefs.f90 m_precision
$(F90) -c $(F90OPTFLAGS) $<
set_control_4_composition.o: $(MHD_IO_DIR)/set_control_4_composition.f90 m_precision.o calypso_mpi.o m_machine_parameter.o m_sph_node_group_types.o t_physical_property.o t_control_array_chara2real.o t_bc_data_list.o m_fem_node_group_types.o set_surface_group_types.o
$(F90) -c $(F90OPTFLAGS) $<
set_control_4_force.o: $(MHD_IO_DIR)/set_control_4_force.f90 m_precision.o m_constants.o m_error_IDs.o m_machine_parameter.o m_force_control_labels.o t_control_parameter.o t_ctl_data_mhd_forces.o t_ctl_data_mhd_magne.o t_ctl_data_gravity.o t_ctl_data_coriolis_force.o skip_comment_f.o t_physical_property.o calypso_mpi.o
set_control_4_force.o: $(MHD_IO_DIR)/set_control_4_force.f90 m_precision.o m_constants.o m_error_IDs.o m_machine_parameter.o m_force_control_labels.o t_control_parameter.o t_ctl_data_MHD_model.o skip_comment_f.o t_physical_property.o t_ctl_data_mhd_forces.o calypso_mpi.o t_ctl_data_gravity.o t_ctl_data_coriolis_force.o t_ctl_data_mhd_magne.o
$(F90) -c $(F90OPTFLAGS) $<
set_control_4_magne.o: $(MHD_IO_DIR)/set_control_4_magne.f90 m_precision.o m_machine_parameter.o m_sph_node_group_types.o calypso_mpi.o t_physical_property.o t_control_array_chara2real.o t_bc_data_list.o m_fem_node_group_types.o set_surface_group_types.o
$(F90) -c $(F90OPTFLAGS) $<
Expand All @@ -70,7 +70,7 @@ t_control_data_dynamo_sects.o: $(MHD_IO_DIR)/t_control_data_dynamo_sects.f90 m_p
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_data_MHD.o: $(MHD_IO_DIR)/t_ctl_data_MHD.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_ctl_data_4_platforms.o t_ctl_data_MHD_model.o t_ctl_data_SPH_MHD_control.o t_ctl_data_4_sph_monitor.o t_ctl_data_node_monitor.o t_ctl_data_gen_sph_shell.o delete_data_files.o ctl_data_platforms_IO.o ctl_data_sph_monitor_IO.o ctl_data_MHD_model_IO.o ctl_file_gen_sph_shell_IO.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_data_MHD_model.o: $(MHD_IO_DIR)/t_ctl_data_MHD_model.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_ctl_data_4_fields.o t_ctl_data_mhd_evolution.o t_ctl_data_mhd_evo_area.o t_ctl_data_node_boundary.o t_ctl_data_surf_boundary.o t_ctl_data_mhd_normalize.o t_ctl_data_mhd_forces.o t_ctl_data_coriolis_force.o t_ctl_data_gravity.o t_ctl_data_mhd_magne.o t_ctl_data_magnetic_scale.o t_ctl_data_temp_model.o t_ctl_data_dimless_numbers.o skip_comment_f.o
t_ctl_data_MHD_model.o: $(MHD_IO_DIR)/t_ctl_data_MHD_model.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_ctl_data_4_fields.o t_ctl_data_mhd_evolution.o t_ctl_data_mhd_evo_area.o t_ctl_data_node_boundary.o t_ctl_data_surf_boundary.o t_ctl_data_mhd_normalize.o t_ctl_data_mhd_forces.o t_ctl_data_coriolis_force.o t_ctl_data_gravity.o t_ctl_data_mhd_magne.o t_ctl_data_magnetic_scale.o t_ctl_data_temp_model.o t_ctl_data_dimless_numbers.o t_ctl_data_valuable_diffuse.o t_ctl_data_valuable_density.o skip_comment_f.o
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_data_SPH_MHD_control.o: $(MHD_IO_DIR)/t_ctl_data_SPH_MHD_control.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_ctl_data_4_time_steps.o t_ctl_data_mhd_evo_scheme.o t_ctl_data_mhd_restart.o skip_comment_f.o ctl_data_4_time_steps_IO.o ctl_data_mhd_evo_scheme_IO.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
Expand Down Expand Up @@ -114,6 +114,12 @@ t_ctl_data_temp_model.o: $(MHD_IO_DIR)/t_ctl_data_temp_model.f90 m_precision.o m
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_data_termal_norm.o: $(MHD_IO_DIR)/t_ctl_data_termal_norm.f90 m_precision.o m_machine_parameter.o t_control_array_charareal.o t_read_control_elements.o skip_comment_f.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_data_valuable_density.o: $(MHD_IO_DIR)/t_ctl_data_valuable_density.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_control_array_character.o t_control_array_real.o t_control_array_real2.o skip_comment_f.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_data_valuable_diffuse.o: $(MHD_IO_DIR)/t_ctl_data_valuable_diffuse.f90 m_precision.o m_machine_parameter.o t_read_control_elements.o t_control_array_character.o t_control_array_real2.o skip_comment_f.o write_control_elements.o
$(F90) -c $(F90OPTFLAGS) $<
t_ctl_param_val_diffusion.o: $(MHD_IO_DIR)/t_ctl_param_val_diffusion.f90 m_precision.o m_constants.o t_ctl_data_valuable_diffuse.o skip_comment_f.o
$(F90) -c $(F90OPTFLAGS) $<
t_node_monitor_IO.o: $(MHD_IO_DIR)/t_node_monitor_IO.f90 m_precision.o t_time_data.o t_mesh_data.o t_phys_data.o t_IO_step_parameter.o t_ctl_data_node_monitor.o calypso_mpi.o m_machine_parameter.o set_parallel_file_name.o
$(F90) -c $(F90OPTFLAGS) $<
t_sph_boundary_input_data.o: $(MHD_IO_DIR)/t_sph_boundary_input_data.f90 m_precision.o t_spheric_rj_data.o t_each_sph_boundary_IO_data.o calypso_mpi_int.o calypso_mpi.o m_machine_parameter.o skip_comment_f.o
Expand Down
6 changes: 3 additions & 3 deletions src/Fortran_libraries/MHD_src/IO/add_nodal_fields_4_MHD.f90
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,13 @@ subroutine add_ctl_4_forces &
call add_phys_name_ctl(perturbation_composition, field_ctl)
end if
!
if(fl_prop%iflag_4_coriolis) &
if(fl_prop%flag_coriolis) &
& call add_phys_name_ctl(Coriolis_force, field_ctl)
!
if(fl_prop%iflag_FEM_gravity .eq. id_FORCE_at_node) then
if(fl_prop%iflag_4_gravity) &
if(fl_prop%flag_thermal_buoyancy) &
& call add_phys_name_ctl(buoyancy, field_ctl)
if(fl_prop%iflag_4_composit_buo) &
if(fl_prop%flag_comp_buoyancy) &
& call add_phys_name_ctl(composite_buoyancy, field_ctl)
end if
!
Expand Down
10 changes: 5 additions & 5 deletions src/Fortran_libraries/MHD_src/IO/add_sph_MHD_fields_2_ctl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ subroutine add_field_name_4_sph_mhd &
end if
! magnetic field flag
if(cd_prop%iflag_Bevo_scheme .gt. id_no_evolution &
& .or. fl_prop%iflag_4_lorentz) then
& .or. fl_prop%flag_lorentz) then
call add_phys_name_ctl(magnetic_field, field_ctl)
call add_phys_name_ctl(current_density, field_ctl)
end if
Expand Down Expand Up @@ -90,25 +90,25 @@ subroutine add_field_name_4_sph_mhd &
call add_phys_name_ctl(div_inertia, field_ctl)
!
! Coriolis flag
if(fl_prop%iflag_4_coriolis) then
if(fl_prop%flag_coriolis) then
call add_phys_name_ctl(Coriolis_force, field_ctl)
call add_phys_name_ctl(rot_Coriolis_force, field_ctl)
call add_phys_name_ctl(div_Coriolis_force, field_ctl)
end if
! Lorentz flag
if(fl_prop%iflag_4_lorentz) then
if(fl_prop%flag_lorentz) then
call add_phys_name_ctl(Lorentz_force, field_ctl)
call add_phys_name_ctl(rot_Lorentz_force, field_ctl)
call add_phys_name_ctl(div_Lorentz_force, field_ctl)
end if
! thermal buoyancy flag
if(fl_prop%iflag_4_gravity) then
if(fl_prop%flag_thermal_buoyancy) then
call add_phys_name_ctl(buoyancy, field_ctl)
call add_phys_name_ctl(rot_buoyancy, field_ctl)
call add_phys_name_ctl(div_buoyancy, field_ctl)
end if
! compositional buoyancy flag
if(fl_prop%iflag_4_composit_buo) then
if(fl_prop%flag_comp_buoyancy) then
call add_phys_name_ctl(composite_buoyancy, field_ctl)
call add_phys_name_ctl(div_composite_buoyancy, field_ctl)
call add_phys_name_ctl(rot_composite_buoyancy, field_ctl)
Expand Down
61 changes: 61 additions & 0 deletions src/Fortran_libraries/MHD_src/IO/bcast_ctl_MHD_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module bcast_ctl_MHD_model
private :: bcast_dimless_ctl, bcast_coef_term_ctl
private :: bcast_thermal_ctl, bcast_momentum_ctl
private :: bcast_induction_ctl
private :: bcast_val_density_ctl, bcast_val_diffuse_ctl
!
! ----------------------------------------------------------------------
!
Expand Down Expand Up @@ -72,8 +73,16 @@ subroutine bcast_ctl_data_mhd_model(model_ctl)
call bcast_coriolis_ctl(model_ctl%cor_ctl)
call bcast_magneto_ctl(model_ctl%mcv_ctl)
call bcast_magnetic_scale_ctl(model_ctl%bscale_ctl)
!
call bcast_ref_scalar_ctl(model_ctl%reft_ctl)
call bcast_ref_scalar_ctl(model_ctl%refc_ctl)
!
call bcast_val_density_ctl(model_ctl%polytrope_c)
!
call bcast_val_diffuse_ctl(model_ctl%val_viscous_c)
call bcast_val_diffuse_ctl(model_ctl%val_mag_diffuse_c)
call bcast_val_diffuse_ctl(model_ctl%val_thermal_diffuse_c)
call bcast_val_diffuse_ctl(model_ctl%val_comp_diffuse_c)
!
call calypso_mpi_bcast_character &
& (model_ctl%block_name, cast_long(kchara), 0)
Expand Down Expand Up @@ -201,5 +210,57 @@ subroutine bcast_induction_ctl(induct_ctl)
end subroutine bcast_induction_ctl
!
! --------------------------------------------------------------------
! --------------------------------------------------------------------
!
subroutine bcast_val_density_ctl(polytrope_c)
!
use t_ctl_data_valuable_density
use transfer_to_long_integers
use calypso_mpi_char
use calypso_mpi_int
use bcast_control_arrays
!
type(val_density_ctl), intent(inout) :: polytrope_c
!
call bcast_ctl_type_c1(polytrope_c%r_variation_ctl)
call bcast_ctl_type_c1(polytrope_c%variation_file_name)
!
call bcast_ctl_type_r2(polytrope_c%bottom_density_ctl)
call bcast_ctl_type_r2(polytrope_c%top_density_ctl)
call bcast_ctl_type_r1(polytrope_c%polytrope_index_ctl)
!
call bcast_ctl_array_r2(polytrope_c%density_list_ctl)
!
call calypso_mpi_bcast_character &
& (polytrope_c%block_name, cast_long(kchara), 0)
call calypso_mpi_bcast_one_int(polytrope_c%i_val_density, 0)
!
end subroutine bcast_val_density_ctl
!
! --------------------------------------------------------------------
! --------------------------------------------------------------------
!
subroutine bcast_val_diffuse_ctl(vdiffuse_ctl)
!
use t_ctl_data_valuable_diffuse
use transfer_to_long_integers
use calypso_mpi_char
use calypso_mpi_int
use bcast_control_arrays
!
type(val_diffuse_ctl), intent(inout) :: vdiffuse_ctl
!
call bcast_ctl_type_c1(vdiffuse_ctl%r_variation_ctl)
call bcast_ctl_type_c1(vdiffuse_ctl%variation_file_name)
!
call bcast_ctl_array_r2(vdiffuse_ctl%diffusivity_list_ctl)
!
call calypso_mpi_bcast_character &
& (vdiffuse_ctl%block_name, cast_long(kchara), 0)
call calypso_mpi_bcast_one_int(vdiffuse_ctl%i_val_diffuse, 0)
!
end subroutine bcast_val_diffuse_ctl
!
! --------------------------------------------------------------------
!
end module bcast_ctl_MHD_model
Loading

0 comments on commit 143fc3c

Please sign in to comment.