Skip to content

Commit e4ec936

Browse files
authored
Merge branch 'master' into runners
2 parents 86df0c9 + ca36ffb commit e4ec936

File tree

275 files changed

+66981
-535
lines changed

Some content is hidden

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

275 files changed

+66981
-535
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
- name: Setup MacOS
5050
if: matrix.os == 'macos'
5151
run: |
52+
brew update
53+
brew upgrade
5254
brew install coreutils python cmake fftw hdf5 gcc@14 boost open-mpi
5355
echo "FC=gfortran-14" >> $GITHUB_ENV
5456
echo "BOOST_INCLUDE=/opt/homebrew/include/" >> $GITHUB_ENV

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
165165
)
166166
add_link_options("SHELL: -K trap=fp" "SHELL: -G2")
167167
endif()
168+
168169
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Flang")
169170
add_compile_options(
170171
$<$<COMPILE_LANGUAGE:Fortran>:-Mfreeform>
@@ -188,13 +189,14 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
188189
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
189190
add_compile_options(
190191
$<$<COMPILE_LANGUAGE:Fortran>:-O0>
192+
$<$<COMPILE_LANGUAGE:Fortran>:-C>
193+
$<$<COMPILE_LANGUAGE:Fortran>:-g>
194+
$<$<COMPILE_LANGUAGE:Fortran>:-traceback>
195+
$<$<COMPILE_LANGUAGE:Fortran>:-Minform=inform>
196+
$<$<COMPILE_LANGUAGE:Fortran>:-Mbounds>
191197
)
192198
endif()
193199

194-
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
195-
add_compile_options(-C -g -O0 -traceback -Minform=inform -Mbounds)
196-
endif()
197-
198200
if (DEFINED ENV{MFC_CUDA_CC})
199201
string(REGEX MATCHALL "[0-9]+" MFC_CUDA_CC $ENV{MFC_CUDA_CC})
200202
message(STATUS "Found $MFC_CUDA_CC specified. GPU code will be generated for compute capability(ies) ${MFC_CUDA_CC}.")

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,25 @@ MFC has high-level documentation, visualizations, and more on [its website](http
3737
## An example
3838

3939
We keep many examples.
40-
Here's one!
40+
Here are some of them!
4141
MFC can execute high-fidelity simulations of shock-droplet interaction (see `examples/3d_shockdroplet`)
4242

4343
<p align="center">
4444
<img src="docs/res/shockdrop.png" alt="Shock Droplet Example" width="700"/>
4545
</p>
4646

47-
Another example is the high-Mach flow over an airfoil, shown below.
47+
This one simulates high-Mach flow over an airfoil, shown below.
4848

4949
<p align="center">
5050
<img src="docs/res/airfoil.png" alt="Airfoil Example" width="700"/><br/>
5151
</p>
5252

53+
This one simulates high amplitude acoustic wave through a circular orifice opening, shown below.
54+
55+
<p align="center">
56+
<img src="docs/res/orifice.png" alt="Orifice Example" width="700"/><br/>
57+
</p>
58+
5359

5460
## Getting started
5561

docs/documentation/case.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ MPI topology is automatically optimized to maximize the parallel efficiency for
166166
| `vel(i)` * | Real | Supported | Velocity in direction $i$. |
167167
| `hcid` * | Integer | N/A | Hard coded patch id |
168168
| `cf_val` * | Real | Supported | Surface tension color function value |
169-
| `model%%filepath` | String | Not Supported | Path to an STL or OBJ file (not all OBJs are supported). |
170-
| `model%%scale(i)` | Real | Not Supported | Model's (applied) scaling factor for component $i$. |
171-
| `model%%rotate(i)` | Real | Not Supported | Model's (applied) angle of rotation about axis $i$. |
172-
| `model%%translate(i)` | Real | Not Supported | Model's $i$-th component of (applied) translation. |
173-
| `model%%spc` | Integer | Not Supported | Number of samples per cell when discretizing the model into the grid. |
174-
| `model%%threshold` | Real | Not Supported | Ray fraction inside the model patch above which the fraction is set to one.|
169+
| `model_filepath` | String | Not Supported | Path to an STL or OBJ file (not all OBJs are supported). |
170+
| `model_scale(i)` | Real | Not Supported | Model's (applied) scaling factor for component $i$. |
171+
| `model_rotate(i)` | Real | Not Supported | Model's (applied) angle of rotation about axis $i$. |
172+
| `model_translate(i)` | Real | Not Supported | Model's $i$-th component of (applied) translation. |
173+
| `model_spc` | Integer | Not Supported | Number of samples per cell when discretizing the model into the grid. |
174+
| `model_threshold` | Real | Not Supported | Ray fraction inside the model patch above which the fraction is set to one.|
175175

176176
*: These parameters should be prepended with `patch_icpp(j)%` where $j$ is the patch index.
177177

@@ -263,7 +263,11 @@ Optimal choice of the value of `smooth_coeff` is case-dependent and left to the
263263
- `patch_icpp(j)alpha(i)`, `patch_icpp(j)alpha_rho(i)`, `patch_icpp(j)pres`, and `patch_icpp(j)vel(i)` define for $j$-th patch the void fraction of `fluid(i)`, partial density of `fluid(i)`, the pressure, and the velocity in the $i$-th coordinate direction.
264264
These physical parameters must be consistent with fluid material's parameters defined in the next subsection.
265265

266-
- `model%%scale`, `model%%rotate` and `model%%translate` define how the model should be transformed to domain-space by first scaling by `model%%scale`, then rotating about the Z, X, and Y axes (using `model%%rotate`), and finally translating by `model%%translate`.
266+
- `model_filepath` defines the root directory of the STL or OBJ model file.
267+
268+
- `model_scale`, `model_rotate` and `model_translate` define how the model should be transformed to domain-space by first scaling by `model_scale`, then rotating about the Z, X, and Y axes (using `model_rotate`), and finally translating by `model_translate`.
269+
270+
- `model_spc` and `model_threshold` are ray-tracing parameters. `model_spc` defines the number of rays per cell to render the model. `model_threshold` defines the ray-tracing threshold at which the cell is marked as the model.
267271

268272
### 4. Immersed Boundary Patches
269273

@@ -279,6 +283,12 @@ These physical parameters must be consistent with fluid material's parameters de
279283
| `m` | Real | NACA airfoil parameters (see below) |
280284
| `p` | Real | NACA airfoil parameters (see below) |
281285
| `slip` | Logical | Apply a slip boundary |
286+
| `model_filepath` | String | Path to an STL or OBJ file (not all OBJs are supported). |
287+
| `model_scale(i)` | Real | Model's (applied) scaling factor for component $i$. |
288+
| `model_rotate(i)` | Real | Model's (applied) angle of rotation about axis $i$. |
289+
| `model_translate(i)` | Real | Model's $i$-th component of (applied) translation. |
290+
| `model_spc` | Integer | Number of samples per cell when discretizing the model into the grid. |
291+
| `model_threshold` | Real | Ray fraction inside the model patch above which the fraction is set to one.|
282292

283293
These parameters should be prepended with `patch_ib(j)%` where $j$ is the patch index.
284294

@@ -301,6 +311,8 @@ Additional details on this specification can be found in [The Naca Airfoil Serie
301311

302312
- `slip` applies a slip boundary to the surface of the patch if true and a no-slip boundary condition to the surface if false.
303313

314+
- Please see [Patch Parameters](#3-patches) for the descriptions of `model_filepath`, `model_scale`, `model_rotate`, `model_translate`, `model_spc`, and `model_threshold`.
315+
304316
### 5. Fluid Material’s
305317

306318
| Parameter | Type | Description |

docs/res/orifice.png

210 KB
Loading

examples/0D_qbmm/case.py

Lines changed: 0 additions & 153 deletions
This file was deleted.

examples/1D_acoustic_dipole/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# ==========================================================================
4343

4444
# Formatted Database Files Structure Parameters ============================
45-
'format' : 2,
45+
'format' : 1,
4646
'precision' : 2,
4747
'prim_vars_wrt' :'T',
4848
'rho_wrt' :'T',

examples/1D_acoustic_gauss_sigmadist/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# ==========================================================================
4343

4444
# Formatted Database Files Structure Parameters ============================
45-
'format' : 2,
45+
'format' : 1,
4646
'precision' : 2,
4747
'prim_vars_wrt' :'T',
4848
'rho_wrt' :'T',

examples/1D_acoustic_gauss_sigmatime/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# ==========================================================================
4343

4444
# Formatted Database Files Structure Parameters ============================
45-
'format' : 2,
45+
'format' : 1,
4646
'precision' : 2,
4747
'prim_vars_wrt' :'T',
4848
'rho_wrt' :'T',

examples/1D_acoustic_sine_frequency/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# ==========================================================================
4343

4444
# Formatted Database Files Structure Parameters ============================
45-
'format' : 2,
45+
'format' : 1,
4646
'precision' : 2,
4747
'prim_vars_wrt' :'T',
4848
'rho_wrt' :'T',

0 commit comments

Comments
 (0)