Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Reduce HLLC - Geometrical source flux for cylindrical coordinates #864

Copy link
Copy link
Open
@mohdsaid497566

Description

@mohdsaid497566
Issue body actions

The last portion of each model in HLLC looks identical, except for 6-Equation Model. Therefore, I attempted to make a subroutine to be called out. It always became annoying to debug as the Axisymmetric tests partially failed, and I could not trace out the bug exactly. Plus, it can be combined with the geometry flux calcs in HLL.

s_compute_cylindrical_geometry_source_flux()
!$acc routine seq
! This subroutine computes the cylindrical geometry source fluxes
#:if (NORM_DIR == 2)
    if (cyl_coord) then
        if (model_eqns == 3) then
            !Substituting the advective flux into the inviscid geometrical source flux
            !$acc loop seq
            do i = 1, E_idx
                flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = flux_rs${XYZ}$_vf(j, k, l, i)
            end do
            !$acc loop seq
            do i = intxb, intxe
                flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = flux_rs${XYZ}$_vf(j, k, l, i)
            end do
            ! Recalculating the radial momentum geometric source flux
            flux_gsrc_rs${XYZ}$_vf(j, k, l, momxb - 1 + dir_idx(1)) = &
                flux_gsrc_rs${XYZ}$_vf(j, k, l, momxb - 1 + dir_idx(1)) - p_Star
        else
            ! Substituting the advective flux into the inviscid geometrical source flux
            !$acc loop seq
            do i = 1, E_idx
                flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = flux_rs${XYZ}$_vf(j, k, l, i)
            end do
            ! Recalculating the radial momentum geometric source flux
            flux_gsrc_rs${XYZ}$_vf(j, k, l, contxe + dir_idx(1)) = &
                xi_M*(rho_L*(vel_L(dir_idx(1))* &
                                vel_L(dir_idx(1)) + &
                                s_M*(xi_L*(dir_flg(dir_idx(1))*s_S + &
                                        (1._wp - dir_flg(dir_idx(1)))* &
                                        vel_L(dir_idx(1))) - vel_L(dir_idx(1))))) &
                + xi_P*(rho_R*(vel_R(dir_idx(1))* &
                                vel_R(dir_idx(1)) + &
                                s_P*(xi_R*(dir_flg(dir_idx(1))*s_S + &
                                            (1._wp - dir_flg(dir_idx(1)))* &
                                            vel_R(dir_idx(1))) - vel_R(dir_idx(1)))))
        end if
        ! Geometrical source of the void fraction(s) is zero
        !$acc loop seq
        do i = advxb, advxe
            flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = 0._wp
        end do
    end if
#:endif
#:if (NORM_DIR == 3)
    if (grid_geometry == 3) then
        !$acc loop seq
        do i = 1, sys_size
            flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = 0._wp
        end do
        if (model_eqns == 3) then
            flux_gsrc_rs${XYZ}$_vf(j, k, l, momxb - 1 + dir_idx(1)) = &
                flux_gsrc_rs${XYZ}$_vf(j, k, l, momxb - 1 + dir_idx(1)) - p_Star
        else
            flux_gsrc_rs${XYZ}$_vf(j, k, l, momxb + 1) = &
                -xi_M*(rho_L*(vel_L(dir_idx(1))* &
                                vel_L(dir_idx(1)) + &
                                s_M*(xi_L*(dir_flg(dir_idx(1))*s_S + &
                                            (1._wp - dir_flg(dir_idx(1)))* &
                                            vel_L(dir_idx(1))) - vel_L(dir_idx(1))))) &
                - xi_P*(rho_R*(vel_R(dir_idx(1))* &
                                vel_R(dir_idx(1)) + &
                                s_P*(xi_R*(dir_flg(dir_idx(1))*s_S + &
                                            (1._wp - dir_flg(dir_idx(1)))* &
                                            vel_R(dir_idx(1))) - vel_R(dir_idx(1)))))
        end if
        flux_gsrc_rs${XYZ}$_vf(j, k, l, momxe) = flux_rs${XYZ}$_vf(j, k, l, momxb + 1)
    end if
#:endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.