gcc_interface.F90 Source File


This file depends on

sourcefile~~gcc_interface.f90~~EfferentGraph sourcefile~gcc_interface.f90 gcc_interface.F90 sourcefile~input.f90 input.F90 sourcefile~gcc_interface.f90->sourcefile~input.f90 sourcefile~input_interface.f90 input_interface.F90 sourcefile~input.f90->sourcefile~input_interface.f90 sourcefile~core.f90 core.F90 sourcefile~input_interface.f90->sourcefile~core.f90 sourcefile~project_settings.f90 project_settings.F90 sourcefile~input_interface.f90->sourcefile~project_settings.f90 sourcefile~allocate.f90 allocate.F90 sourcefile~core.f90->sourcefile~allocate.f90 sourcefile~check_range.f90 check_range.F90 sourcefile~core.f90->sourcefile~check_range.f90 sourcefile~deallocate.f90 deallocate.F90 sourcefile~core.f90->sourcefile~deallocate.f90 sourcefile~error.f90 error.F90 sourcefile~core.f90->sourcefile~error.f90 sourcefile~fortran_utils.f90 fortran_utils.F90 sourcefile~core.f90->sourcefile~fortran_utils.f90 sourcefile~string_utils.f90 string_utils.F90 sourcefile~core.f90->sourcefile~string_utils.f90 sourcefile~types.f90 types.F90 sourcefile~core.f90->sourcefile~types.f90 sourcefile~unique.f90 unique.F90 sourcefile~core.f90->sourcefile~unique.f90 sourcefile~vtk.f90 vtk.F90 sourcefile~core.f90->sourcefile~vtk.f90 sourcefile~vtk_constants.f90 vtk_constants.F90 sourcefile~core.f90->sourcefile~vtk_constants.f90 sourcefile~project_settings.f90->sourcefile~core.f90 sourcefile~allocate.f90->sourcefile~error.f90 sourcefile~deallocate.f90->sourcefile~error.f90 sourcefile~memory_stats_wrapper.f90 memory_stats_wrapper.F90 sourcefile~fortran_utils.f90->sourcefile~memory_stats_wrapper.f90 sourcefile~signal_flag_wrapper.f90 signal_flag_wrapper.F90 sourcefile~fortran_utils.f90->sourcefile~signal_flag_wrapper.f90 sourcefile~system_info_wrapper.f90 system_info_wrapper.F90 sourcefile~fortran_utils.f90->sourcefile~system_info_wrapper.f90 sourcefile~string_utils.f90->sourcefile~allocate.f90 sourcefile~array.f90 array.F90 sourcefile~types.f90->sourcefile~array.f90 sourcefile~gauss.f90 gauss.F90 sourcefile~types.f90->sourcefile~gauss.f90 sourcefile~pointer.f90 pointer.F90 sourcefile~types.f90->sourcefile~pointer.f90 sourcefile~variable.f90 variable.F90 sourcefile~types.f90->sourcefile~variable.f90 sourcefile~vector.f90 vector.F90 sourcefile~types.f90->sourcefile~vector.f90 sourcefile~unique.f90->sourcefile~allocate.f90 sourcefile~vtk.f90->sourcefile~allocate.f90 sourcefile~vtk.f90->sourcefile~deallocate.f90 sourcefile~vtk.f90->sourcefile~unique.f90 sourcefile~vtk.f90->sourcefile~vtk_constants.f90 sourcefile~vtk.f90->sourcefile~array.f90 sourcefile~vtk_wrapper.f90 vtk_wrapper.F90 sourcefile~vtk.f90->sourcefile~vtk_wrapper.f90 sourcefile~vtu_wrapper.f90 vtu_wrapper.F90 sourcefile~vtk.f90->sourcefile~vtu_wrapper.f90 sourcefile~array.f90->sourcefile~allocate.f90 sourcefile~array.f90->sourcefile~deallocate.f90 sourcefile~c_utils.f90 c_utils.F90 sourcefile~memory_stats_wrapper.f90->sourcefile~c_utils.f90 sourcefile~signal_flag.f90 signal_flag.F90 sourcefile~signal_flag_wrapper.f90->sourcefile~signal_flag.f90 sourcefile~system_info_wrapper.f90->sourcefile~c_utils.f90 sourcefile~variable.f90->sourcefile~allocate.f90 sourcefile~c_utils.f90->sourcefile~signal_flag.f90 sourcefile~memory_stats.f90 memory_stats.F90 sourcefile~c_utils.f90->sourcefile~memory_stats.f90 sourcefile~system_info.f90 system_info.F90 sourcefile~c_utils.f90->sourcefile~system_info.f90

Files dependent on this one

sourcefile~~gcc_interface.f90~~AfferentGraph sourcefile~gcc_interface.f90 gcc_interface.F90 sourcefile~calculate.f90 calculate.F90 sourcefile~calculate.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_base.f90 gcc_base.F90 sourcefile~gcc_base.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_non_segregation_m.f90 gcc_non_segregation_m.F90 sourcefile~gcc_non_segregation_m.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_non_segregation_pa.f90 gcc_non_segregation_pa.F90 sourcefile~gcc_non_segregation_pa.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_segregation_m.f90 gcc_segregation_m.F90 sourcefile~gcc_segregation_m.f90->sourcefile~gcc_interface.f90 sourcefile~gcc_segregation_pa.f90 gcc_segregation_pa.F90 sourcefile~gcc_segregation_pa.f90->sourcefile~gcc_interface.f90 sourcefile~materials_manager.f90 materials_manager.F90 sourcefile~materials_manager.f90->sourcefile~calculate.f90 sourcefile~properties_manager.f90 properties_manager.F90 sourcefile~properties_manager.f90->sourcefile~calculate.f90 sourcefile~properties_manager.f90->sourcefile~materials_manager.f90 sourcefile~properties.f90 properties.F90 sourcefile~properties.f90->sourcefile~materials_manager.f90 sourcefile~properties.f90->sourcefile~properties_manager.f90 sourcefile~ftdss.f90 ftdss.F90 sourcefile~ftdss.f90->sourcefile~properties.f90 sourcefile~thermal_interface.f90 thermal_interface.F90 sourcefile~ftdss.f90->sourcefile~thermal_interface.f90 sourcefile~output.f90 output.F90 sourcefile~ftdss.f90->sourcefile~output.f90 sourcefile~output_interface.f90 output_interface.F90 sourcefile~output_interface.f90->sourcefile~properties.f90 sourcefile~thermal_interface.f90->sourcefile~properties.f90 sourcefile~output.f90->sourcefile~output_interface.f90 sourcefile~output_base.f90 output_base.F90 sourcefile~output_base.f90->sourcefile~output_interface.f90 sourcefile~output_observation.f90 output_observation.F90 sourcefile~output_observation.f90->sourcefile~output_interface.f90 sourcefile~output_overall_base.f90 output_overall_base.F90 sourcefile~output_overall_base.f90->sourcefile~output_interface.f90 sourcefile~output_overall_vtk.f90 output_overall_vtk.F90 sourcefile~output_overall_vtk.f90->sourcefile~output_interface.f90 sourcefile~output_overall_vtu.f90 output_overall_vtu.F90 sourcefile~output_overall_vtu.f90->sourcefile~output_interface.f90 sourcefile~output_system_logger.f90 output_system_logger.F90 sourcefile~output_system_logger.f90->sourcefile~output_interface.f90 sourcefile~thermal.f90 thermal.F90 sourcefile~thermal.f90->sourcefile~thermal_interface.f90 sourcefile~thermal_3phase.f90 thermal_3phase.F90 sourcefile~thermal_3phase.f90->sourcefile~thermal_interface.f90

Source Code

module calculate_gcc
    use, intrinsic :: iso_fortran_env, only: int32, real64
    use :: module_input, only:type_input
    implicit none
    private

    public :: holder_gccs
    public :: abst_gcc
    public :: type_gcc_non_segregation_m
    public :: type_gcc_non_segregation_pa
    public :: type_gcc_segregation_m
    public :: type_gcc_segregation_pa

    type :: holder_gccs
        class(abst_gcc), allocatable :: p
    contains
        procedure, pass(self) :: initialize => initialize_holder_gccs
    end type holder_gccs

    type, abstract :: abst_gcc
        real(real64) :: Tf !! Freezing point
        real(real64) :: Lf !! Latent heat of fusion
        real(real64), private :: TtoK = 273.15d0 !! Conversion from Celsius to Kelvin
        real(real64), private :: g = 9.80665d0 !! Gravitational acceleration
    contains
        procedure(abst_gcc_calc), pass(self), deferred :: calc
        procedure(abst_gcc_calc_derivative), pass(self), deferred :: deriv
        procedure(abst_gcc_calc_derivative), pass(self), deferred :: deriv2
    end type abst_gcc

    type, extends(abst_gcc) :: type_gcc_non_segregation_m
    contains
        procedure, pass(self) :: calc => calc_GCC_NonSeg_m
        procedure, pass(self) :: deriv => calc_GCC_NonSeg_m_derivative
        procedure, pass(self) :: deriv2 => calc_GCC_NonSeg_m_derivative_2nd
    end type type_gcc_non_segregation_m

    type, extends(abst_gcc) :: type_gcc_non_segregation_pa
    contains
        procedure, pass(self) :: calc => calc_GCC_NonSeg_Pa
        procedure, pass(self) :: deriv => calc_GCC_NonSeg_Pa_derivative
        procedure, pass(self) :: deriv2 => calc_GCC_NonSeg_Pa_derivative_2nd
    end type type_gcc_non_segregation_pa

    type, extends(abst_gcc) :: type_gcc_segregation_m
    contains
        procedure, pass(self) :: calc => calc_GCC_Seg_m
        procedure, pass(self) :: deriv => calc_GCC_Seg_m_derivative
        procedure, pass(self) :: deriv2 => calc_GCC_Seg_m_derivative_2nd
    end type type_gcc_segregation_m

    type, extends(abst_gcc) :: type_gcc_segregation_pa
    contains
        procedure, pass(self) :: calc => calc_GCC_Seg_Pa
        procedure, pass(self) :: deriv => calc_GCC_Seg_Pa_derivative
        procedure, pass(self) :: deriv2 => calc_GCC_Seg_Pa_derivative_2nd
    end type type_gcc_segregation_pa

    abstract interface
        function abst_gcc_calc(self, T, Pw, rhoW, rhoI) result(Suction)
            import :: abst_gcc, real64
            implicit none
            class(abst_gcc), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction

        end function abst_gcc_calc

        function abst_gcc_calc_derivative(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            import :: abst_gcc, real64
            implicit none
            class(abst_gcc), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function abst_gcc_calc_derivative
    end interface

    interface
        module subroutine initialize_holder_gccs(self, input, i_material)
            implicit none
            class(holder_gccs), intent(inout) :: self
            type(type_input), intent(in) :: input
            integer(int32), intent(in) :: i_material

        end subroutine initialize_holder_gccs
    end interface

    interface
        module function type_GCC_NonSeg_m_Construct(Tf, Lf) result(property)
            implicit none
            real(real64), intent(in) :: Tf
            real(real64), intent(in) :: Lf
            class(abst_gcc), allocatable :: property

        end function type_GCC_NonSeg_m_Construct

        module function calc_GCC_NonSeg_m(self, T, Pw, rhoW, rhoI) result(Suction)
            implicit none
            class(type_gcc_non_segregation_m), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction

        end function calc_GCC_NonSeg_m

        module function calc_GCC_NonSeg_m_derivative(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_non_segregation_m), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_NonSeg_m_derivative

        module function calc_GCC_NonSeg_m_derivative_2nd(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_non_segregation_m), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_NonSeg_m_derivative_2nd

    end interface

    interface
        module function type_GCC_NonSeg_Pa_Construct(Tf, Lf) result(property)
            implicit none
            real(real64), intent(in) :: Tf
            real(real64), intent(in) :: Lf
            class(abst_gcc), allocatable :: property

        end function type_GCC_NonSeg_Pa_Construct

        module function calc_GCC_NonSeg_Pa(self, T, Pw, rhoW, rhoI) result(Suction)
            implicit none
            class(type_gcc_non_segregation_pa), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction

        end function calc_GCC_NonSeg_Pa

        module function calc_GCC_NonSeg_Pa_derivative(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_non_segregation_pa), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_NonSeg_Pa_derivative

        module function calc_GCC_NonSeg_Pa_derivative_2nd(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_non_segregation_pa), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_NonSeg_Pa_derivative_2nd

    end interface

    interface
        module function type_GCC_Seg_m_Construct(Tf, Lf) result(property)
            implicit none
            real(real64), intent(in) :: Tf
            real(real64), intent(in) :: Lf
            class(abst_gcc), allocatable :: property

        end function type_GCC_Seg_m_Construct

        module function calc_GCC_Seg_m(self, T, Pw, rhoW, rhoI) result(Suction)
            implicit none
            class(type_gcc_segregation_m), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction

        end function calc_GCC_Seg_m

        module function calc_GCC_Seg_m_derivative(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_segregation_m), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_Seg_m_derivative

        module function calc_GCC_Seg_m_derivative_2nd(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_segregation_m), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_Seg_m_derivative_2nd

    end interface

    interface
        module function type_GCC_Seg_Pa_Construct(Tf, Lf) result(property)
            implicit none
            real(real64), intent(in) :: Tf
            real(real64), intent(in) :: Lf
            class(abst_gcc), allocatable :: property

        end function type_GCC_Seg_Pa_Construct

        module function calc_GCC_Seg_Pa(self, T, Pw, rhoW, rhoI) result(Suction)
            implicit none
            class(type_gcc_segregation_pa), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction

        end function calc_GCC_Seg_Pa

        module function calc_GCC_Seg_Pa_derivative(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_segregation_pa), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_Seg_Pa_derivative

        module function calc_GCC_Seg_Pa_derivative_2nd(self, T, Pw, rhoW, rhoI) result(Suction_derivative)
            implicit none
            class(type_gcc_segregation_pa), intent(in) :: self
            real(real64), intent(in) :: T
            real(real64), intent(in), optional :: Pw
            real(real64), intent(in), optional :: rhoW
            real(real64), intent(in), optional :: rhoI
            real(real64) :: Suction_derivative

        end function calc_GCC_Seg_Pa_derivative_2nd

    end interface

    interface type_gcc_non_segregation_m
        module procedure type_GCC_NonSeg_m_Construct
    end interface

    interface type_gcc_non_segregation_pa
        module procedure type_GCC_NonSeg_Pa_Construct
    end interface

    interface type_gcc_segregation_m
        module procedure type_GCC_Seg_m_Construct
    end interface

    interface type_gcc_segregation_pa
        module procedure type_GCC_Seg_Pa_Construct
    end interface

end module calculate_gcc