Hook Solid explicit dynamics
This commit is contained in:
@@ -88,6 +88,23 @@ module sph_database
|
||||
real(rk) :: gas_dt_accel = 0.0_rk
|
||||
real(rk) :: gas_dtcrit = 0.0_rk
|
||||
|
||||
integer :: solid_particle_count = 0
|
||||
integer :: solid_failed_count = 0
|
||||
real(rk) :: solid_mass = 0.0_rk
|
||||
real(rk) :: solid_momentum(SPH_NDIM) = 0.0_rk
|
||||
real(rk) :: solid_kinetic_energy = 0.0_rk
|
||||
real(rk) :: solid_internal_energy_total = 0.0_rk
|
||||
real(rk) :: solid_max_von_mises = 0.0_rk
|
||||
real(rk) :: solid_min_plastic_strain = 0.0_rk
|
||||
real(rk) :: solid_max_plastic_strain = 0.0_rk
|
||||
real(rk) :: solid_min_damage = 0.0_rk
|
||||
real(rk) :: solid_max_damage = 0.0_rk
|
||||
real(rk) :: solid_min_softening = 0.0_rk
|
||||
real(rk) :: solid_max_softening = 0.0_rk
|
||||
real(rk) :: solid_dt_cfl = 0.0_rk
|
||||
real(rk) :: solid_dt_accel = 0.0_rk
|
||||
real(rk) :: solid_dtcrit = 0.0_rk
|
||||
|
||||
integer :: material_count = 0
|
||||
character(len=SPH_NAME_LEN) :: material_name(SPH_MAX_MATERIALS)
|
||||
character(len=SPH_NAME_LEN) :: material_type(SPH_MAX_MATERIALS)
|
||||
@@ -196,6 +213,7 @@ contains
|
||||
end do
|
||||
call sph_db_clear_water_diagnostics()
|
||||
call sph_db_clear_gas_diagnostics()
|
||||
call sph_db_clear_solid_diagnostics()
|
||||
end subroutine sph_db_initialize_defaults
|
||||
|
||||
subroutine sph_db_free()
|
||||
@@ -230,6 +248,7 @@ contains
|
||||
call sph_db_clear_metadata()
|
||||
call sph_db_clear_water_diagnostics()
|
||||
call sph_db_clear_gas_diagnostics()
|
||||
call sph_db_clear_solid_diagnostics()
|
||||
end subroutine sph_db_free
|
||||
|
||||
subroutine sph_db_clear_metadata()
|
||||
@@ -298,6 +317,25 @@ contains
|
||||
gas_dtcrit = 0.0_rk
|
||||
end subroutine sph_db_clear_gas_diagnostics
|
||||
|
||||
subroutine sph_db_clear_solid_diagnostics()
|
||||
solid_particle_count = 0
|
||||
solid_failed_count = 0
|
||||
solid_mass = 0.0_rk
|
||||
solid_momentum = 0.0_rk
|
||||
solid_kinetic_energy = 0.0_rk
|
||||
solid_internal_energy_total = 0.0_rk
|
||||
solid_max_von_mises = 0.0_rk
|
||||
solid_min_plastic_strain = 0.0_rk
|
||||
solid_max_plastic_strain = 0.0_rk
|
||||
solid_min_damage = 0.0_rk
|
||||
solid_max_damage = 0.0_rk
|
||||
solid_min_softening = 0.0_rk
|
||||
solid_max_softening = 0.0_rk
|
||||
solid_dt_cfl = 0.0_rk
|
||||
solid_dt_accel = 0.0_rk
|
||||
solid_dtcrit = 0.0_rk
|
||||
end subroutine sph_db_clear_solid_diagnostics
|
||||
|
||||
subroutine sph_db_allocate_neighbor_storage(max_links, num_cells, ierr)
|
||||
integer, intent(in) :: max_links
|
||||
integer, intent(in) :: num_cells
|
||||
|
||||
@@ -23,6 +23,7 @@ module sph_input_reader
|
||||
sph_solid_set_johnson_cook, sph_solid_set_failure, &
|
||||
sph_solid_set_control, sph_solid_build_state, &
|
||||
sph_solid_count_unbound_materials
|
||||
use sph_solid_dynamics, only: sph_solid_set_body_force
|
||||
use sph_neighbor, only: sph_neighbor_rebuild
|
||||
use sph_inp_defs, only: SPH_INPUT_LINE_LEN, SPH_INPUT_FIELD_LEN, &
|
||||
SPH_INPUT_MAX_FIELDS, SPH_KEY_NODE, SPH_KEY_ELEMENT, SPH_KEY_NSET, &
|
||||
@@ -529,6 +530,8 @@ contains
|
||||
call sph_water_set_body_force(force, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_gas_set_body_force(force, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_solid_set_body_force(force, ierr)
|
||||
end subroutine sph_input_parse_body_force
|
||||
|
||||
subroutine sph_input_parse_solid_control(line, ierr)
|
||||
|
||||
@@ -78,6 +78,7 @@ contains
|
||||
solid_bulk_modulus = 0.0_rk
|
||||
solid_wave_speed = 0.0_rk
|
||||
solid_temperature_rise_factor = 0.0_rk
|
||||
solid_body_force = 0.0_rk
|
||||
end subroutine sph_solid_clear_material_table
|
||||
|
||||
subroutine sph_solid_note_material(name, material_type_in)
|
||||
@@ -321,8 +322,10 @@ contains
|
||||
solid_plastic_strain(npart), solid_plastic_strain_rate(npart), &
|
||||
solid_temperature(npart), solid_damage(npart), solid_softening(npart), &
|
||||
solid_internal_energy(npart), &
|
||||
solid_reference_volume(npart), &
|
||||
solid_deformation_gradient(SPH_NDIM,SPH_NDIM,npart), &
|
||||
solid_correction_matrix(SPH_NDIM,SPH_NDIM,npart), &
|
||||
solid_acc_internal(SPH_NDIM,npart), &
|
||||
solid_failure_status(npart), stat=stat)
|
||||
if (stat /= 0) then
|
||||
call sph_solid_deallocate_state()
|
||||
@@ -342,8 +345,10 @@ contains
|
||||
if (allocated(solid_damage)) deallocate(solid_damage)
|
||||
if (allocated(solid_softening)) deallocate(solid_softening)
|
||||
if (allocated(solid_internal_energy)) deallocate(solid_internal_energy)
|
||||
if (allocated(solid_reference_volume)) deallocate(solid_reference_volume)
|
||||
if (allocated(solid_deformation_gradient)) deallocate(solid_deformation_gradient)
|
||||
if (allocated(solid_correction_matrix)) deallocate(solid_correction_matrix)
|
||||
if (allocated(solid_acc_internal)) deallocate(solid_acc_internal)
|
||||
if (allocated(solid_failure_status)) deallocate(solid_failure_status)
|
||||
end subroutine sph_solid_deallocate_state
|
||||
|
||||
@@ -356,8 +361,10 @@ contains
|
||||
if (allocated(solid_damage)) solid_damage = 0.0_rk
|
||||
if (allocated(solid_softening)) solid_softening = 0.0_rk
|
||||
if (allocated(solid_internal_energy)) solid_internal_energy = 0.0_rk
|
||||
if (allocated(solid_reference_volume)) solid_reference_volume = 0.0_rk
|
||||
if (allocated(solid_deformation_gradient)) solid_deformation_gradient = 0.0_rk
|
||||
if (allocated(solid_correction_matrix)) solid_correction_matrix = 0.0_rk
|
||||
if (allocated(solid_acc_internal)) solid_acc_internal = 0.0_rk
|
||||
if (allocated(solid_failure_status)) solid_failure_status = SPH_STATUS_ACTIVE
|
||||
end subroutine sph_solid_clear_particle_state
|
||||
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
module sph_solid_dynamics
|
||||
use sph_precision, only: rk, SPH_NDIM
|
||||
use sph_error, only: SPH_SUCCESS, SPH_ERROR_ARGUMENT, SPH_ERROR_INPUT, sph_error_set
|
||||
use sph_database, only: npart, particle_phase, particle_status, material_id, &
|
||||
x, v, a, mass, rho, volume, h, solid_particle_count, solid_failed_count, &
|
||||
solid_mass, solid_momentum, solid_kinetic_energy, &
|
||||
solid_internal_energy_total, solid_max_von_mises, &
|
||||
solid_min_plastic_strain, solid_max_plastic_strain, solid_min_damage, &
|
||||
solid_max_damage, solid_min_softening, solid_max_softening, &
|
||||
solid_dt_cfl, solid_dt_accel, solid_dtcrit, SPH_PHASE_SOLID, &
|
||||
SPH_PHASE_SOLID_FAILED, SPH_STATUS_ACTIVE, SPH_STATUS_FAILED, &
|
||||
sph_db_clear_solid_diagnostics
|
||||
use sph_solid_state
|
||||
use sph_solid, only: solid_material_count, solid_material_ids, &
|
||||
sph_solid_update_particle_material
|
||||
use sph_solid_material, only: sph_solid_von_mises
|
||||
implicit none
|
||||
|
||||
contains
|
||||
|
||||
subroutine sph_solid_set_body_force(force, ierr)
|
||||
real(rk), intent(in) :: force(SPH_NDIM)
|
||||
integer, intent(out) :: ierr
|
||||
|
||||
solid_body_force = force
|
||||
ierr = SPH_SUCCESS
|
||||
end subroutine sph_solid_set_body_force
|
||||
|
||||
subroutine sph_solid_get_counts(active_count, failed_count)
|
||||
integer, intent(out) :: active_count
|
||||
integer, intent(out) :: failed_count
|
||||
integer :: i
|
||||
|
||||
active_count = 0
|
||||
failed_count = 0
|
||||
do i = 1, npart
|
||||
if (sph_solid_is_active(i)) active_count = active_count + 1
|
||||
if (sph_solid_is_failed(i)) failed_count = failed_count + 1
|
||||
end do
|
||||
end subroutine sph_solid_get_counts
|
||||
|
||||
subroutine sph_solid_build_reference_state(ierr)
|
||||
integer, intent(out) :: ierr
|
||||
integer :: i
|
||||
integer :: j
|
||||
|
||||
ierr = SPH_SUCCESS
|
||||
if (.not. allocated(solid_correction_matrix)) return
|
||||
do i = 1, npart
|
||||
if (.not. sph_solid_is_active(i)) cycle
|
||||
if (h(i) <= 0.0_rk) then
|
||||
call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid reference state requires positive h')
|
||||
ierr = SPH_ERROR_ARGUMENT
|
||||
return
|
||||
end if
|
||||
solid_reference_volume(i) = volume(i)
|
||||
if (solid_reference_volume(i) <= 0.0_rk .and. rho(i) > 0.0_rk) then
|
||||
solid_reference_volume(i) = mass(i) / rho(i)
|
||||
end if
|
||||
solid_correction_matrix(:,:,i) = 0.0_rk
|
||||
solid_deformation_gradient(:,:,i) = 0.0_rk
|
||||
do j = 1, SPH_NDIM
|
||||
solid_correction_matrix(j,j,i) = 1.0_rk
|
||||
solid_deformation_gradient(j,j,i) = 1.0_rk
|
||||
end do
|
||||
end do
|
||||
end subroutine sph_solid_build_reference_state
|
||||
|
||||
subroutine sph_solid_compute_particle_strain_increment(index, dt, strain_inc, ierr)
|
||||
integer, intent(in) :: index
|
||||
real(rk), intent(in) :: dt
|
||||
real(rk), intent(out) :: strain_inc(6)
|
||||
integer, intent(out) :: ierr
|
||||
|
||||
strain_inc = 0.0_rk
|
||||
ierr = SPH_SUCCESS
|
||||
if (index < 1 .or. index > npart) then
|
||||
call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid strain particle index is out of range')
|
||||
ierr = SPH_ERROR_ARGUMENT
|
||||
return
|
||||
end if
|
||||
if (dt <= 0.0_rk) then
|
||||
call sph_error_set(SPH_ERROR_ARGUMENT, 'Solid strain update requires positive dt')
|
||||
ierr = SPH_ERROR_ARGUMENT
|
||||
end if
|
||||
end subroutine sph_solid_compute_particle_strain_increment
|
||||
|
||||
subroutine sph_solid_compute_internal_acceleration(ierr)
|
||||
integer, intent(out) :: ierr
|
||||
|
||||
ierr = SPH_SUCCESS
|
||||
if (.not. allocated(solid_acc_internal)) return
|
||||
solid_acc_internal = 0.0_rk
|
||||
end subroutine sph_solid_compute_internal_acceleration
|
||||
|
||||
subroutine sph_solid_compute_acceleration(ierr)
|
||||
integer, intent(out) :: ierr
|
||||
integer :: i
|
||||
|
||||
call sph_solid_compute_internal_acceleration(ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
if (.not. allocated(solid_acc_internal)) return
|
||||
do i = 1, npart
|
||||
if (sph_solid_is_active(i)) a(:,i) = solid_acc_internal(:,i) + solid_body_force
|
||||
end do
|
||||
ierr = SPH_SUCCESS
|
||||
end subroutine sph_solid_compute_acceleration
|
||||
|
||||
subroutine sph_solid_advance_material(dt, ierr)
|
||||
real(rk), intent(in) :: dt
|
||||
integer, intent(out) :: ierr
|
||||
integer :: i
|
||||
real(rk) :: strain_inc(6)
|
||||
|
||||
ierr = SPH_SUCCESS
|
||||
if (.not. allocated(solid_stress)) return
|
||||
do i = 1, npart
|
||||
if (.not. sph_solid_is_active(i)) cycle
|
||||
call sph_solid_compute_particle_strain_increment(i, dt, strain_inc, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_solid_update_particle_material(i, strain_inc, dt, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
end do
|
||||
end subroutine sph_solid_advance_material
|
||||
|
||||
subroutine sph_solid_update_diagnostics(ierr)
|
||||
integer, intent(out) :: ierr
|
||||
integer :: i
|
||||
logical :: first_active
|
||||
real(rk) :: speed2
|
||||
real(rk) :: vm_value
|
||||
|
||||
ierr = SPH_SUCCESS
|
||||
call sph_db_clear_solid_diagnostics()
|
||||
if (.not. allocated(solid_stress)) return
|
||||
first_active = .true.
|
||||
do i = 1, npart
|
||||
if (sph_solid_is_failed(i)) solid_failed_count = solid_failed_count + 1
|
||||
if (.not. sph_solid_is_active(i)) cycle
|
||||
solid_particle_count = solid_particle_count + 1
|
||||
solid_mass = solid_mass + mass(i)
|
||||
solid_momentum = solid_momentum + mass(i) * v(:,i)
|
||||
speed2 = sum(v(:,i) * v(:,i))
|
||||
solid_kinetic_energy = solid_kinetic_energy + 0.5_rk * mass(i) * speed2
|
||||
solid_internal_energy_total = solid_internal_energy_total + &
|
||||
mass(i) * solid_internal_energy(i)
|
||||
vm_value = sph_solid_von_mises(solid_stress(:,i))
|
||||
if (first_active) then
|
||||
solid_max_von_mises = vm_value
|
||||
solid_min_plastic_strain = solid_plastic_strain(i)
|
||||
solid_max_plastic_strain = solid_plastic_strain(i)
|
||||
solid_min_damage = solid_damage(i)
|
||||
solid_max_damage = solid_damage(i)
|
||||
solid_min_softening = solid_softening(i)
|
||||
solid_max_softening = solid_softening(i)
|
||||
first_active = .false.
|
||||
else
|
||||
if (vm_value > solid_max_von_mises) solid_max_von_mises = vm_value
|
||||
call sph_solid_update_range(solid_plastic_strain(i), &
|
||||
solid_min_plastic_strain, solid_max_plastic_strain)
|
||||
call sph_solid_update_range(solid_damage(i), solid_min_damage, solid_max_damage)
|
||||
call sph_solid_update_range(solid_softening(i), solid_min_softening, &
|
||||
solid_max_softening)
|
||||
end if
|
||||
end do
|
||||
end subroutine sph_solid_update_diagnostics
|
||||
|
||||
subroutine sph_solid_estimate_dt_limits(dt_cfl, dt_accel, dt_limit, ierr)
|
||||
real(rk), intent(out) :: dt_cfl
|
||||
real(rk), intent(out) :: dt_accel
|
||||
real(rk), intent(out) :: dt_limit
|
||||
integer, intent(out) :: ierr
|
||||
integer :: i
|
||||
integer :: solid_index
|
||||
real(rk) :: speed
|
||||
real(rk) :: accel_norm
|
||||
real(rk) :: local_dt
|
||||
|
||||
ierr = SPH_SUCCESS
|
||||
dt_cfl = huge(1.0_rk)
|
||||
dt_accel = huge(1.0_rk)
|
||||
dt_limit = 0.0_rk
|
||||
if (.not. allocated(solid_stress)) then
|
||||
call sph_solid_store_dt(0.0_rk, 0.0_rk, 0.0_rk)
|
||||
return
|
||||
end if
|
||||
do i = 1, npart
|
||||
if (.not. sph_solid_is_active(i)) cycle
|
||||
solid_index = sph_solid_table_index(material_id(i))
|
||||
if (solid_index <= 0) cycle
|
||||
if (h(i) <= 0.0_rk .or. solid_wave_speed(solid_index) <= 0.0_rk) then
|
||||
call sph_error_set(SPH_ERROR_ARGUMENT, 'invalid Solid state for dt estimate')
|
||||
ierr = SPH_ERROR_ARGUMENT
|
||||
return
|
||||
end if
|
||||
speed = sqrt(sum(v(:,i) * v(:,i)))
|
||||
local_dt = h(i) / (solid_wave_speed(solid_index) + speed)
|
||||
if (local_dt < dt_cfl) dt_cfl = local_dt
|
||||
accel_norm = sqrt(sum(a(:,i) * a(:,i)))
|
||||
if (accel_norm > 0.0_rk) then
|
||||
local_dt = sqrt(h(i) / accel_norm)
|
||||
if (local_dt < dt_accel) dt_accel = local_dt
|
||||
end if
|
||||
end do
|
||||
if (dt_cfl == huge(1.0_rk)) dt_cfl = 0.0_rk
|
||||
if (dt_accel == huge(1.0_rk)) dt_accel = dt_cfl
|
||||
dt_limit = dt_cfl
|
||||
if (dt_accel > 0.0_rk .and. dt_accel < dt_limit) dt_limit = dt_accel
|
||||
call sph_solid_store_dt(dt_cfl, dt_accel, dt_limit)
|
||||
end subroutine sph_solid_estimate_dt_limits
|
||||
|
||||
subroutine sph_solid_store_dt(dt_cfl, dt_accel, dt_limit)
|
||||
real(rk), intent(in) :: dt_cfl
|
||||
real(rk), intent(in) :: dt_accel
|
||||
real(rk), intent(in) :: dt_limit
|
||||
|
||||
solid_dt_cfl = dt_cfl
|
||||
solid_dt_accel = dt_accel
|
||||
solid_dtcrit = dt_limit
|
||||
end subroutine sph_solid_store_dt
|
||||
|
||||
subroutine sph_solid_update_range(value, min_value, max_value)
|
||||
real(rk), intent(in) :: value
|
||||
real(rk), intent(inout) :: min_value
|
||||
real(rk), intent(inout) :: max_value
|
||||
|
||||
if (value < min_value) min_value = value
|
||||
if (value > max_value) max_value = value
|
||||
end subroutine sph_solid_update_range
|
||||
|
||||
logical function sph_solid_is_active(index)
|
||||
integer, intent(in) :: index
|
||||
|
||||
sph_solid_is_active = .false.
|
||||
if (index < 1 .or. index > npart) return
|
||||
if (particle_phase(index) /= SPH_PHASE_SOLID) return
|
||||
if (particle_status(index) /= SPH_STATUS_ACTIVE) return
|
||||
sph_solid_is_active = .true.
|
||||
end function sph_solid_is_active
|
||||
|
||||
logical function sph_solid_is_failed(index)
|
||||
integer, intent(in) :: index
|
||||
|
||||
sph_solid_is_failed = .false.
|
||||
if (index < 1 .or. index > npart) return
|
||||
if (particle_phase(index) == SPH_PHASE_SOLID_FAILED) sph_solid_is_failed = .true.
|
||||
if (particle_status(index) == SPH_STATUS_FAILED) sph_solid_is_failed = .true.
|
||||
end function sph_solid_is_failed
|
||||
|
||||
integer function sph_solid_table_index(mat_index)
|
||||
integer, intent(in) :: mat_index
|
||||
integer :: i
|
||||
|
||||
sph_solid_table_index = 0
|
||||
do i = 1, solid_material_count
|
||||
if (solid_material_ids(i) == mat_index) then
|
||||
sph_solid_table_index = i
|
||||
return
|
||||
end if
|
||||
end do
|
||||
end function sph_solid_table_index
|
||||
|
||||
end module sph_solid_dynamics
|
||||
@@ -8,6 +8,7 @@ module sph_solid_state
|
||||
real(rk) :: solid_bulk_modulus(SPH_MAX_MATERIALS) = 0.0_rk
|
||||
real(rk) :: solid_wave_speed(SPH_MAX_MATERIALS) = 0.0_rk
|
||||
real(rk) :: solid_temperature_rise_factor(SPH_MAX_MATERIALS) = 0.0_rk
|
||||
real(rk) :: solid_body_force(SPH_NDIM) = 0.0_rk
|
||||
|
||||
real(rk), allocatable :: solid_stress(:,:)
|
||||
real(rk), allocatable :: solid_strain(:,:)
|
||||
@@ -17,8 +18,10 @@ module sph_solid_state
|
||||
real(rk), allocatable :: solid_damage(:)
|
||||
real(rk), allocatable :: solid_softening(:)
|
||||
real(rk), allocatable :: solid_internal_energy(:)
|
||||
real(rk), allocatable :: solid_reference_volume(:)
|
||||
real(rk), allocatable :: solid_deformation_gradient(:,:,:)
|
||||
real(rk), allocatable :: solid_correction_matrix(:,:,:)
|
||||
real(rk), allocatable :: solid_acc_internal(:,:)
|
||||
integer, allocatable :: solid_failure_status(:)
|
||||
|
||||
end module sph_solid_state
|
||||
|
||||
@@ -12,6 +12,9 @@ module sph_solver_explicit
|
||||
sph_gas_compute_acceleration, sph_gas_update_diagnostics, &
|
||||
sph_gas_estimate_dt_limits, sph_gas_apply_sources_explicit
|
||||
use sph_explosive, only: sph_explosive_advance, sph_explosive_estimate_dt_limit
|
||||
use sph_solid_dynamics, only: sph_solid_compute_acceleration, &
|
||||
sph_solid_advance_material, sph_solid_update_diagnostics, &
|
||||
sph_solid_estimate_dt_limits
|
||||
use sph_output_csv, only: sph_output_write_step
|
||||
implicit none
|
||||
|
||||
@@ -57,6 +60,8 @@ contains
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_gas_compute_acceleration(ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_solid_compute_acceleration(ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
do i = 1, npart
|
||||
vhalf(:,i) = v(:,i) + 0.5_rk * dt * a(:,i)
|
||||
x(:,i) = x(:,i) + dt * vhalf(:,i)
|
||||
@@ -67,10 +72,14 @@ contains
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_gas_apply_sources_explicit(dt, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_solid_advance_material(dt, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_water_update_diagnostics(ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_gas_update_diagnostics(ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
call sph_solid_update_diagnostics(ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
end if
|
||||
|
||||
current_time = current_time + dt
|
||||
@@ -111,6 +120,9 @@ contains
|
||||
real(rk) :: gas_accel
|
||||
real(rk) :: gas_limit
|
||||
real(rk) :: explosive_limit
|
||||
real(rk) :: solid_cfl
|
||||
real(rk) :: solid_accel
|
||||
real(rk) :: solid_limit
|
||||
real(rk) :: water_limit
|
||||
|
||||
if (safety_factor <= 0.0_rk) then
|
||||
@@ -134,6 +146,11 @@ contains
|
||||
if (explosive_limit > 0.0_rk) then
|
||||
if (dtcrit <= 0.0_rk .or. explosive_limit < dtcrit) dtcrit = explosive_limit
|
||||
end if
|
||||
call sph_solid_estimate_dt_limits(solid_cfl, solid_accel, solid_limit, ierr)
|
||||
if (ierr /= SPH_SUCCESS) return
|
||||
if (solid_limit > 0.0_rk) then
|
||||
if (dtcrit <= 0.0_rk .or. solid_limit < dtcrit) dtcrit = solid_limit
|
||||
end if
|
||||
dtcrit = dtcrit * safety_factor
|
||||
end subroutine sph_solver_phase_dt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user