Skip to content

Commit 86ae789

Browse files
committed
merged again with source
2 parents 7afc810 + 9f019aa commit 86ae789

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+728
-472
lines changed

.github/workflows/docs.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
name: Documentation
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # This runs every day at midnight UTC
6+
workflow_dispatch:
7+
push:
8+
pull_request:
49

510
jobs:
611
docs:
712
name: Build & Publish
813
runs-on: ubuntu-latest
914

10-
concurrency:
11-
group: docs-publish
12-
cancel-in-progress: true
13-
1415
steps:
1516
- uses: actions/checkout@v4
1617

@@ -47,7 +48,7 @@ jobs:
4748
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
4849
4950
- name: Publish Documentation
50-
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && github.event_name == 'push'
51+
if: github.repository == 'MFlowCode/MFC' && github.ref == 'refs/heads/master' && github.event_name == 'cron'
5152
run: |
5253
set +e
5354
git ls-remote "${{ secrets.DOC_PUSH_URL }}" -q

.github/workflows/phoenix/bench.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
n_ranks=4
3+
n_ranks=12
44

55
if [ "$job_device" == "gpu" ]; then
66
n_ranks=$(nvidia-smi -L | wc -l) # number of GPUs on node
@@ -9,7 +9,7 @@ if [ "$job_device" == "gpu" ]; then
99
fi
1010

1111
if ["$job_device" == "gpu"]; then
12-
./mfc.sh bench --mem 8 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
12+
./mfc.sh bench --mem 12 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
1313
else
1414
./mfc.sh bench --mem 1 -j $(nproc) -o "$job_slug.yaml" -- -c phoenix $device_opts -n $n_ranks
15-
fi
15+
fi

.github/workflows/phoenix/submit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ sbatch <<EOT
4141
#SBATCH --account=gts-sbryngelson3 # charge account
4242
#SBATCH -N1 # Number of nodes required
4343
$sbatch_device_opts
44-
#SBATCH -t 04:00:00 # Duration of the job (Ex: 15 mins)
44+
#SBATCH -t 02:00:00 # Duration of the job (Ex: 15 mins)
4545
#SBATCH -q embers # QOS Name
4646
#SBATCH -o$job_slug.out # Combined output and error messages file
4747
#SBATCH -W # Do not exit until the submitted job terminates.

benchmarks/5eq_rk3_weno3_hllc/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@
194194
'cyl_coord' : 'F',
195195
'dt' : dt,
196196
't_step_start' : 0,
197-
't_step_stop' : int(60*(95*size + 5)),
198-
't_step_save' : int(60*(95*size + 5)),
197+
't_step_stop' : int(30*(95*size + 5)),
198+
't_step_save' : int(30*(95*size + 5)),
199199
# ==========================================================
200200

201201
# Simulation Algorithm Parameters ==========================

benchmarks/hypo_hll/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
'p' : Nz,
4848
'dt' : 1e-8,
4949
't_step_start' : 0,
50-
't_step_stop' : int(60*(95*size + 5)),
51-
't_step_save' : int(60*(95*size + 5)),
50+
't_step_stop' : int(30*(95*size + 5)),
51+
't_step_save' : int(30*(95*size + 5)),
5252
# ==========================================================
5353

5454
# Simulation Algorithm Parameters ==========================

benchmarks/ibm/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
'p' : Nz,
5252
'dt' : mydt,
5353
't_step_start' : 0,
54-
't_step_stop' : int(40*(95*size + 5)),
55-
't_step_save' : int(40*(95*size + 5)),
54+
't_step_stop' : int(20*(95*size + 5)),
55+
't_step_save' : int(20*(95*size + 5)),
5656
# ==========================================================
5757

5858
# Simulation Algorithm Parameters ==========================

benchmarks/viscous_weno5_sgb_acoustic/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
'p' : Nz,
114114
'dt' : dt,
115115
't_step_start' : 0,
116-
't_step_stop' : int(30*(25*size + 5)),
117-
't_step_save' : int(30*(25*size + 5)),
116+
't_step_stop' : int(15*(25*size + 5)),
117+
't_step_save' : int(15*(25*size + 5)),
118118
# ==========================================================
119119

120120
# Simulation Algorithm Parameters ==========================

docs/documentation/case.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ MPI topology is automatically optimized to maximize the parallel efficiency for
165165
| `pres` * | Real | Supported | Pressure. |
166166
| `vel(i)` * | Real | Supported | Velocity in direction $i$. |
167167
| `hcid` * | Integer | N/A | Hard coded patch id |
168+
| `cf_val` * | Real | Supported | Surface tension color function value |
168169
| `model%%filepath` | String | Not Supported | Path to an STL or OBJ file (not all OBJs are supported). |
169170
| `model%%scale(i)` | Real | Not Supported | Model's (applied) scaling factor for component $i$. |
170171
| `model%%rotate(i)` | Real | Not Supported | Model's (applied) angle of rotation about axis $i$. |
@@ -447,7 +448,7 @@ If this option is false, velocity gradient is computed using finite difference s
447448
- `weno_avg` it activates the arithmetic average of the left and right, WENO-reconstructed, cell-boundary values.
448449
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.
449450

450-
- `surface_tension` activates surface tension when set to ``'T'``. Requires `sigma` to be set.
451+
- `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`.
451452

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

@@ -545,7 +546,7 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
545546
| `acoustic(i)%%support` | Integer | Geometry of spatial support for the acoustic source |
546547
| `acoustic(i)%%dipole` | Logical | Dipole source activation (optional; default = false -> monopole) |
547548
| `acoustic(i)%%loc(j)` | Real | $j$-th coordinate of the point that defines the acoustic source location |
548-
| `acoustic(i)%%pulse` | Integer | Acoustic wave form: [1] Sine [2] Gaussian [3] Square |
549+
| `acoustic(i)%%pulse` | Integer | Acoustic wave form: [1] Sine [2] Gaussian [3] Square [4] Broadband |
549550
| `acoustic(i)%%npulse` | Real | Number of pulse cycles |
550551
| `acoustic(i)%%mag` | Real | Pulse magnitude |
551552
| `acoustic(i)%%frequency` | Real | Sine/Square - Frequency of the acoustic wave (exclusive) |
@@ -563,6 +564,9 @@ If `file_per_process` is true, then pre_process, simulation, and post_process mu
563564
| `acoustic(i)%%element_spacing_angle` | Real | 2D Transducer array - Spacing angle (in rad) between adjacent transducer elements |
564565
| `acoustic(i)%%element_polygon_ratio` | Real | 3D Transducer array - Ratio of polygon side length to transducer element radius |
565566
| `acoustic(i)%%rotate_angle` | Real | 3D Transducer array - Rotation angle of the transducer array (optional; default = 0) |
567+
| `acoustic(i)%%bb_num_freq` | integer | Number of frequencies in broadband wave |
568+
| `acoustic(i)%%bb_bandwidth` | Real | The bandwidth of each frequency in the broadband wave |
569+
| `acoustic(i)%%bb_lowest_freq` | Real | The lower frequency bound of the broadband wave |
566570

567571
Details of the transducer acoustic source model can be found in [Maeda and Colonius (2017)](references.md#Maeda17).
568572

@@ -574,9 +578,9 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon
574578

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

577-
- `%%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).
581+
- `%%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).
578582

579-
- `%%pulse` specifies the acoustic wave form. `%%pulse = 1`, `2`, and `3` correspond to sinusoidal wave, Gaussian wave, and square wave, respectively.
583+
- `%%pulse` specifies the acoustic wave form. `%%pulse = 1`, `2`, `3` and `4` correspond to sinusoidal wave, Gaussian wave, square wave and broadband wave, respectively. The implementation of the broadband wave is based on [Tam (2005)](references.md#Tam05)
580584

581585
- `%%npulse` specifies the number of cycles of the acoustic wave generated. Only applies to `%%pulse = 1 and 3` (sine and square waves), and must be an integer for non-planar waves.
582586

@@ -598,16 +602,22 @@ Details of the transducer acoustic source model can be found in [Maeda and Colon
598602

599603
- `%%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.
600604

601-
- `%%num_elements` specifies the number of transducer elements in a transducer array.
605+
- `%%num_elements` specifies the number of transducer elements in a transducer array.
602606

603607
- `%%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.
604608

605609
- `%%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.
606610

607-
- `%%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.
611+
- `%%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.
608612

609613
- `%%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.
610614

615+
- `%%bb_num_freq` specifies the number discretized frequencies in the broadband acoustic wave. If `%%bb_num_freq` is 1, the acoustic wave will be a discrete tone (i.e. single frequency sine wave).
616+
617+
- `%%bb_bandwidth` specifies the bandwidth of the discretized frequencies.
618+
619+
- `%%bb_lowest_freq` specifies the lower frequency bound of the broadband acoustic wave. The upper frequency bound will be calculated as `%%bb_lowest_freq + %%bb_num_freq * %%bb_bandwidth`. The wave is no longer broadband below the lower bound and above the upper bound.
620+
611621
### 9. Ensemble-Averaged Bubble Model
612622

613623
| Parameter | Type | Description |
@@ -838,14 +848,14 @@ Each patch requires a different set of parameters, which are also listed in this
838848

839849
### Immersed Boundary Patch Types
840850

841-
| # | Name | Dim. |
842-
| ---: | :----: | :--- |
843-
| 2 | 2D Circle | 2 |
844-
| 3 | 2D Rectangle | 2 |
845-
| 4 | 2D Airfoil | 2 |
846-
| 8 | 3D Sphere | 3 |
847-
| 10 | 3D Cylinder | 3 |
848-
| 11 | 3D Airfoil | 3 |
851+
| # | Name | Dim. |
852+
| ---: | :----: | :--- |
853+
| 2 | 2D Circle | 2 |
854+
| 3 | 2D Rectangle | 2 |
855+
| 4 | 2D Airfoil | 2 |
856+
| 8 | 3D Sphere | 3 |
857+
| 10 | 3D Cylinder | 3 |
858+
| 11 | 3D Airfoil | 3 |
849859

850860
### Acoustic Supports {#acoustic-supports}
851861

docs/documentation/references.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
- <a id="Suresh97">Suresh, A. and Huynh, H. (1997). Accurate monotonicity-preserving schemes with runge–kutta time stepping. Journal of Computational Physics, 136(1):83–99.</a>
4242

43+
- <a id="Tam05">Tam, C. K., Ju, H., Jones, M. G., Watson, W. R., and Parrott, T. L. (2005). A computational and experimental study of slit resonators. Journal of Sound and Vibration, 284(3-5), 947-984.</a>
44+
4345
- <a id="Thompson87">Thompson, K. W. (1987). Time dependent boundary conditions for hyperbolic systems. Journal of computational physics, 68(1):1–24.</a>
4446

4547
- <a id="Thompson90">Thompson, K. W. (1990). Time-dependent boundary conditions for hyperbolic systems, ii. Journal of computational physics, 89(2):439–461.</a>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/usr/bin/env python3
2+
3+
import json, math
4+
5+
print(json.dumps({
6+
# Logistics ================================================================
7+
'run_time_info' : 'T',
8+
# ==========================================================================
9+
10+
# Computational Domain Parameters ==========================================
11+
'x_domain%beg' : 0,
12+
'x_domain%end' : 0.3,
13+
'y_domain%beg' : 0,
14+
'y_domain%end' : 0.1,
15+
'm' : 299,
16+
'n' : 99,
17+
'p' : 0,
18+
'dt' : 5e-7,
19+
't_step_start' : 0,
20+
't_step_stop' : 1000,
21+
't_step_save' : 10,
22+
# ==========================================================================
23+
24+
# Simulation Algorithm Parameters ==========================================
25+
'num_patches' : 1,
26+
'model_eqns' : 2,
27+
'alt_soundspeed' : 'F',
28+
'num_fluids' : 1,
29+
'mpp_lim' : 'F',
30+
'mixture_err' : 'F',
31+
'time_stepper' : 3,
32+
'weno_order' : 5,
33+
'weno_eps' : 1.E-16,
34+
'teno' : 'T',
35+
'teno_CT' : 1E-8,
36+
'null_weights' : 'F',
37+
'mp_weno' : 'F',
38+
'riemann_solver' : 2,
39+
'wave_speeds' : 1,
40+
'avg_state' : 2,
41+
'bc_x%beg' : -6,
42+
'bc_x%end' : -6,
43+
'bc_y%beg' : -6,
44+
'bc_y%end' : -6,
45+
# ==========================================================================
46+
47+
# Formatted Database Files Structure Parameters ============================
48+
'format' : 1,
49+
'precision' : 2,
50+
'prim_vars_wrt' :'T',
51+
'parallel_io' :'T',
52+
'probe_wrt' :'T',
53+
'fd_order' : 2,
54+
'num_probes' : 1,
55+
'probe(1)%x' : 0.13,
56+
'probe(1)%y' : 0.05,
57+
58+
# ==========================================================================
59+
60+
# Patch 1 Liquid ===========================================================
61+
'patch_icpp(1)%geometry' : 3,
62+
'patch_icpp(1)%x_centroid' : 0.15,
63+
'patch_icpp(1)%y_centroid' : 0.05,
64+
'patch_icpp(1)%length_x' : 0.3,
65+
'patch_icpp(1)%length_y' : 0.1,
66+
'patch_icpp(1)%vel(1)' : 0.0,
67+
'patch_icpp(1)%vel(2)' : 0.0,
68+
'patch_icpp(1)%pres' : 1E+05,
69+
'patch_icpp(1)%alpha_rho(1)' : 1.19,
70+
'patch_icpp(1)%alpha(1)' : 1.0,
71+
# ==========================================================================
72+
73+
# Acoustic source ==========================================================
74+
'acoustic_source' : 'T',
75+
'num_source' : 1,
76+
'acoustic(1)%support' : 2,
77+
'acoustic(1)%loc(1)' : 0.1,
78+
'acoustic(1)%loc(2)' : 0.05,
79+
'acoustic(1)%dir' : math.pi * 0,
80+
'acoustic(1)%length' : 0.1,
81+
'acoustic(1)%pulse' : 4,
82+
'acoustic(1)%npulse' : 1000000,
83+
'acoustic(1)%mag' : 1000.,
84+
'acoustic(1)%bb_num_freq' : 100,
85+
'acoustic(1)%bb_lowest_freq' : 500.,
86+
'acoustic(1)%bb_bandwidth' : 500.,
87+
# ==========================================================================
88+
89+
# Fluids Physical Parameters ===============================================
90+
'fluid_pp(1)%gamma' : 1.E+00/(1.4E+00-1.E+00),
91+
'fluid_pp(1)%pi_inf' : 0,
92+
# ==========================================================================
93+
}))
94+
95+
# ==============================================================================

0 commit comments

Comments
 (0)