Skip to content

Updates and corrections to surface tension #728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ MPI topology is automatically optimized to maximize the parallel efficiency for
| `pres` * | Real | Supported | Pressure. |
| `vel(i)` * | Real | Supported | Velocity in direction $i$. |
| `hcid` * | Integer | N/A | Hard coded patch id |
| `cf_val` * | Real | Supported | Surface tension color function value |
| `model%%filepath` | String | Not Supported | Path to an STL or OBJ file (not all OBJs are supported). |
| `model%%scale(i)` | Real | Not Supported | Model's (applied) scaling factor for component $i$. |
| `model%%rotate(i)` | Real | Not Supported | Model's (applied) angle of rotation about axis $i$. |
Expand Down Expand Up @@ -447,7 +448,7 @@ If this option is false, velocity gradient is computed using finite difference s
- `weno_avg` it activates the arithmetic average of the left and right, WENO-reconstructed, cell-boundary values.
This option requires `weno_Re_flux` to be true because cell boundary values are only utilized when employing the scalar divergence method in the computation of velocity gradients.

- `surface_tension` activates surface tension when set to ``'T'``. Requires `sigma` to be set.
- `surface_tension` activates surface tension when set to ``'T'``. Requires `sigma` to be set and `num_fluids`. The color function in each patch should be assigned such that `patch_icpp(i)%cf_val = 1` in patches where `patch_icpp(i)%alpha = 1 - eps` and `patch_icpp(i)%cf_val = 0` in patches where `patch_icpp(i)%alpha = eps`.

- `viscous` activates viscosity when set to ``'T'``. Requires `Re(1)` and `Re(2)` to be set.

Expand Down Expand Up @@ -574,7 +575,7 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon

- `%%dipole` changes the default monopole (one-sided) source to a dipole source. It is only available for planar waves.

- `%%loc(j)` specifies the location of the acoustic source in the $j$-th coordinate direction. For planer support, the location defines midpoint of the source plane. For transducer arrays, the location defines the center of the transducer or transducer array (not the focal point; for 3D it's the tip of the spherical cap, for 2D it's the tip of the arc).
- `%%loc(j)` specifies the location of the acoustic source in the $j$-th coordinate direction. For planer support, the location defines midpoint of the source plane. For transducer arrays, the location defines the center of the transducer or transducer array (not the focal point; for 3D it's the tip of the spherical cap, for 2D it's the tip of the arc).

- `%%pulse` specifies the acoustic wave form. `%%pulse = 1`, `2`, and `3` correspond to sinusoidal wave, Gaussian wave, and square wave, respectively.

Expand All @@ -598,13 +599,13 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon

- `%%aperture` specifies the aperture of the transducer. It is the diameter of the projection of the transducer arc onto the y-axis (2D) or spherical cap onto the y-z plane (3D). Set the aperture to double the focal length to simulate a transducer enclosing half of the circle/sphere. For the transducer array, it is the total aperture of the array.

- `%%num_elements` specifies the number of transducer elements in a transducer array.
- `%%num_elements` specifies the number of transducer elements in a transducer array.

- `%%element_on` specifies the element number of the transducer array that is on. The element number starts from 1, if all elements are on, set `%%element_on` to 0.

- `%%element_spacing_angle` specifies the spacing angle between adjacent transducers in radians. The total aperture (`%%aperture`) is set, so each transducer element is smaller if `%%element_spacing_angle` is larger.

- `%%element_polygon_ratio` specifies the ratio of the polygon side length to the aperture diameter of each transducer element in a circular 3D transducer array. The polygon side length is calculated by using the total aperture (`%%aperture`) as the circumcircle diameter and `%%num_elements` as the number of sides of the polygon. The ratio is used to specify the aperture size of each transducer element in the array as a ratio of the total aperture.
- `%%element_polygon_ratio` specifies the ratio of the polygon side length to the aperture diameter of each transducer element in a circular 3D transducer array. The polygon side length is calculated by using the total aperture (`%%aperture`) as the circumcircle diameter and `%%num_elements` as the number of sides of the polygon. The ratio is used to specify the aperture size of each transducer element in the array as a ratio of the total aperture.

- `%%rotate_angle` specifies the rotation angle of the 3D circular transducer array along the x-axis (principal axis). It is optional and defaults to 0.

Expand Down Expand Up @@ -838,14 +839,14 @@ Each patch requires a different set of parameters, which are also listed in this

### Immersed Boundary Patch Types

| # | Name | Dim. |
| ---: | :----: | :--- |
| 2 | 2D Circle | 2 |
| 3 | 2D Rectangle | 2 |
| 4 | 2D Airfoil | 2 |
| 8 | 3D Sphere | 3 |
| 10 | 3D Cylinder | 3 |
| 11 | 3D Airfoil | 3 |
| # | Name | Dim. |
| ---: | :----: | :--- |
| 2 | 2D Circle | 2 |
| 3 | 2D Rectangle | 2 |
| 4 | 2D Airfoil | 2 |
| 8 | 3D Sphere | 3 |
| 10 | 3D Cylinder | 3 |
| 11 | 3D Airfoil | 3 |

### Acoustic Supports {#acoustic-supports}

Expand Down
13 changes: 13 additions & 0 deletions src/common/m_checker_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ contains
!> Checks constraints on the surface tension parameters.
!! Called by s_check_inputs_common for all three stages
subroutine s_check_inputs_surface_tension

integer :: i

@:PROHIBIT(surface_tension .and. sigma < 0d0, &
"sigma must be greater than or equal to zero")

Expand All @@ -302,6 +305,16 @@ contains
@:PROHIBIT(surface_tension .and. model_eqns /= 3, &
"The surface tension model requires model_eqns=3")

@:PROHIBIT(surface_tension .and. num_fluids /= 2, &
"The surface tension model requires num_fluids=2")

#ifdef MFC_PRE_PROCESS
do i = 1, num_patches
@:PROHIBIT(surface_tension .and. f_is_default(patch_icpp(i)%cf_val), &
"patch_icpp(i)%cf_val must be set if surface_tension is enabled")
end do
#endif MFC_PRE_PROCESS

end subroutine s_check_inputs_surface_tension

!> Checks constraints on the inputs for moving boundaries.
Expand Down
3 changes: 2 additions & 1 deletion src/post_process/m_mpi_proxy.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ contains
& 'heat_ratio_wrt', 'pi_inf_wrt', 'pres_inf_wrt', 'cons_vars_wrt', &
& 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles', 'qbmm', &
& 'polytropic', 'polydisperse', 'file_per_process', 'relax', 'cf_wrt', &
& 'adv_n', 'ib', 'cfl_adap_dt', 'cfl_const_dt', 'cfl_dt' ]
& 'adv_n', 'ib', 'cfl_adap_dt', 'cfl_const_dt', 'cfl_dt', &
& 'surface_tension' ]
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
#:endfor

Expand Down
16 changes: 0 additions & 16 deletions tests/26264582/golden.txt

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading