Skip to content

Commit 16fed9b

Browse files
Remove airfoil and stl paramters (#1524)
Co-authored-by: Spencer Bryngelson <sbryngelson@gmail.com>
1 parent 9d866bd commit 16fed9b

27 files changed

Lines changed: 597 additions & 501 deletions

File tree

docs/documentation/case.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -312,24 +312,16 @@ This is enabled by adding ``'elliptic_smoothing': "T",`` and ``'elliptic_smoothi
312312
| Parameter | Type | Description |
313313
| ---: | :----: | :--- |
314314
| `num_ibs` | Integer | Number of immersed boundary patches |
315+
| `num_stl_models` | Integer | Number of STL/OBJ model entries in the `stl_models` array |
315316
| `num_particle_beds` | Integer | Number of particle bed specifications to generate immersed boundary patches from |
316317
| `ib_neighborhood_radius` | Integer | Parameter that controls the neighborhood size for IB detection. |
317318
| `geometry` | Integer | Geometry configuration of the patch.|
318319
| `x[y,z]_centroid` | Real | Centroid of the applied geometry in the [x,y,z]-direction. |
319320
| `length_x[y,z]` | Real | Length, if applicable, in the [x,y,z]-direction. |
320321
| `radius` | Real | Radius, if applicable, of the applied geometry. |
321-
| `theta` | Real | Angle of attach applied to airfoil IB patches |
322-
| `c` | Real | NACA airfoil parameters (see below) |
323-
| `t` | Real | NACA airfoil parameters (see below) |
324-
| `m` | Real | NACA airfoil parameters (see below) |
325-
| `p` | Real | NACA airfoil parameters (see below) |
322+
| `airfoil_id` | Integer | Index into `ib_airfoil` array for NACA airfoil geometry patches. |
323+
| `model_id` | Integer | Index into `stl_models` array for STL/OBJ geometry patches. |
326324
| `slip` | Logical | Apply a slip boundary |
327-
| `model_filepath` | String | Path to an STL or OBJ file (not all OBJs are supported). |
328-
| `model_scale(i)` | Real | Model's (applied) scaling factor for component $i$. |
329-
| `model_rotate(i)` | Real | Model's (applied) angle of rotation about axis $i$. |
330-
| `model_translate(i)` | Real | Model's $i$-th component of (applied) translation. |
331-
| `model_spc` | Integer | Number of samples per cell when discretizing the model into the grid. |
332-
| `model_threshold` | Real | Ray fraction inside the model patch above which the fraction is set to one.|
333325
| `moving_ibm` | Integer | Sets the method used for IB movement. |
334326
| `vel(i)` | Real | Initial velocity of the moving IB in the i-th direction. |
335327
| `angular_vel(i)` | Real | Initial angular velocity of the moving IB in the i-th direction. |
@@ -340,6 +332,17 @@ This is enabled by adding ``'elliptic_smoothing': "T",`` and ``'elliptic_smoothi
340332

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

335+
STL/OBJ model geometry parameters are set on the `stl_models` array (indexed by `model_id`):
336+
337+
| Parameter | Type | Description |
338+
|:---------------------|:--------|:------------|
339+
| `model_filepath` | String | Path to an STL or OBJ file (not all OBJs are supported). |
340+
| `model_scale(i)` | Real | Model's scaling factor for component $i$. |
341+
| `model_translate(i)` | Real | Model's $i$-th component of translation. |
342+
| `model_threshold` | Real | Winding number threshold above which a cell is marked as inside the model. |
343+
344+
These parameters should be prepended with `stl_models(k)%` where $k$ is the model index.
345+
343346
#### Parameter Descriptions
344347

345348
- `geometry` defines the type of geometry of an immersed boundary patch with an integer number.
@@ -351,15 +354,13 @@ Definitions for currently implemented immersed boundary patch types are listed i
351354

352355
- `radius` is the radius to be used for circular patches.
353356

354-
- `theta` allows for the angle of attach of airfoil patches to be changed.
355-
356-
- `c`, `t`, `p`, and `m` specify the parameters for a NACA airfoil.
357-
`m` is the maximum camber, `p` is the location of maximum camber, `c` is the coord length, and `t` is the thickness.
357+
- `c`, `t`, `p`, and `m` specify the parameters for a NACA airfoil (set on the referenced `ib_airfoil` entry).
358+
`m` is the maximum camber, `p` is the location of maximum camber, `c` is the chord length, and `t` is the thickness.
358359
Additional details on this specification can be found in [NACA airfoil](https://en.wikipedia.org/wiki/NACA_airfoil).
359360

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

362-
- Please see [Patch Parameters](#sec-patches) for the descriptions of `model_filepath`, `model_scale`, `model_rotate`, `model_translate`, `model_spc`, and `model_threshold`.
363+
- For STL/OBJ geometry (geometry 5 or 12), set `model_id` to index into the `stl_models` array and specify `model_filepath`, `model_scale`, `model_translate`, and `model_threshold` on that entry.
363364

364365
- `moving_ibm` sets the method by which movement will be applied to the immersed boundary. Using 0 will result in no movement. Using 1 will result 1-way coupling where the boundary moves at a constant rate and applied forces to the fluid based upon it's own motion. In 1-way coupling, the fluid does not apply forces back onto the IB. Using 2 will result in 2-way coupling, where the boundary pushes on the fluid and the fluid pushes back on the boundary via pressure and viscous forces. If external forces are applied, the boundary will also experience those forces.
365366

examples/2D_bubbly_steady_shock/case.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@
144144
"patch_ib(1)%geometry": 4,
145145
"patch_ib(1)%x_centroid": 1.5e-03 / x0,
146146
"patch_ib(1)%y_centroid": 1.5e-03 / x0,
147-
"patch_ib(1)%c": 1.0e-03 / x0,
148-
"patch_ib(1)%t": 0.15,
149-
"patch_ib(1)%p": 0.4,
150-
"patch_ib(1)%m": 0.02,
147+
"patch_ib(1)%airfoil_id": 1,
151148
"patch_ib(1)%slip": "F",
152-
"patch_ib(1)%theta": 15,
149+
"ib_airfoil(1)%c": 1.0e-03 / x0,
150+
"ib_airfoil(1)%t": 0.15,
151+
"ib_airfoil(1)%p": 0.4,
152+
"ib_airfoil(1)%m": 0.02,
153153
# Fluids Physical Parameters
154154
"fluid_pp(1)%gamma": 1.0e00 / (gam_l - 1.0e00),
155155
"fluid_pp(1)%pi_inf": gam_l * (pi_inf_l) / (gam_l - 1.0),

examples/2D_ibm_airfoil/case.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@
9090
"patch_ib(1)%geometry": 4,
9191
"patch_ib(1)%x_centroid": 1.0e-03,
9292
"patch_ib(1)%y_centroid": 3.0e-03,
93-
"patch_ib(1)%c": 1.0e-03,
94-
"patch_ib(1)%t": 0.15,
95-
"patch_ib(1)%p": 0.4,
96-
"patch_ib(1)%m": 0.02,
93+
"patch_ib(1)%airfoil_id": 1,
94+
"ib_airfoil(1)%c": 1.0e-03,
95+
"ib_airfoil(1)%t": 0.15,
96+
"ib_airfoil(1)%p": 0.4,
97+
"ib_airfoil(1)%m": 0.02,
9798
"patch_ib(1)%angles(3)": -0.5235987756, # 30 degrees clockwise rotation, in radians
9899
# Fluids Physical Parameters
99100
# Use the same stiffness as the air bubble

examples/2D_ibm_steady_shock/case.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@
145145
"patch_ib(1)%geometry": 4,
146146
"patch_ib(1)%x_centroid": 1.5e-03 / x0,
147147
"patch_ib(1)%y_centroid": 1.5e-03 / x0,
148-
"patch_ib(1)%c": 1.0e-03 / x0,
149-
"patch_ib(1)%t": 0.15,
150-
"patch_ib(1)%p": 0.4,
151-
"patch_ib(1)%m": 0.02,
148+
"patch_ib(1)%airfoil_id": 1,
152149
"patch_ib(1)%slip": "F",
153-
"patch_ib(1)%theta": 15,
150+
"ib_airfoil(1)%c": 1.0e-03 / x0,
151+
"ib_airfoil(1)%t": 0.15,
152+
"ib_airfoil(1)%p": 0.4,
153+
"ib_airfoil(1)%m": 0.02,
154154
# Fluids Physical Parameters
155155
# Surrounding liquid
156156
"fluid_pp(1)%gamma": 1.0e00 / (n_tait - 1.0e00),

examples/2D_ibm_stl_MFCCharacter/case.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@
6868
"patch_icpp(1)%pres": 100000,
6969
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
7070
"patch_icpp(1)%alpha(1)": 1.0,
71+
"num_stl_models": 1,
7172
"patch_ib(1)%geometry": 5,
72-
"patch_ib(1)%model_filepath": "Character_IBM.stl",
73-
"patch_ib(1)%model_translate(1)": -0.0469828735,
74-
"patch_ib(1)%model_translate(2)": -0.0094892600,
75-
"patch_ib(1)%model_spc": 200,
76-
"patch_ib(1)%model_threshold": 0.99,
73+
"patch_ib(1)%model_id": 1,
74+
"stl_models(1)%model_filepath": "Character_IBM.stl",
75+
"stl_models(1)%model_translate(1)": -0.0469828735,
76+
"stl_models(1)%model_translate(2)": -0.0094892600,
77+
"stl_models(1)%model_threshold": 0.99,
7778
"patch_ib(1)%slip": "F",
7879
# Fluids Physical Parameters
7980
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/2D_ibm_stl_test/case.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@
6969
"patch_icpp(1)%pres": 100000,
7070
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
7171
"patch_icpp(1)%alpha(1)": 1.0,
72+
"num_stl_models": 1,
7273
"patch_ib(1)%geometry": 5,
73-
"patch_ib(1)%model_filepath": "Circle_IBM.stl",
74-
"patch_ib(1)%model_translate(1)": -0.05,
75-
"patch_ib(1)%model_translate(2)": -0.05,
76-
"patch_ib(1)%model_spc": 100,
77-
"patch_ib(1)%model_threshold": 0.95,
74+
"patch_ib(1)%model_id": 1,
75+
"stl_models(1)%model_filepath": "Circle_IBM.stl",
76+
"stl_models(1)%model_translate(1)": -0.05,
77+
"stl_models(1)%model_translate(2)": -0.05,
78+
"stl_models(1)%model_threshold": 0.95,
7879
"patch_ib(1)%slip": "F",
7980
# Fluids Physical Parameters
8081
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/2D_ibm_stl_wedge/case.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@
6969
"patch_icpp(1)%pres": 10918.2549,
7070
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
7171
"patch_icpp(1)%alpha(1)": 1.0,
72+
"num_stl_models": 1,
7273
"patch_ib(1)%geometry": 5,
73-
"patch_ib(1)%model_filepath": "Wedge2D_IBM.stl",
74-
"patch_ib(1)%model_translate(1)": -0.0500000000,
75-
"patch_ib(1)%model_translate(2)": -0.0373970250,
76-
"patch_ib(1)%model_spc": 200,
77-
"patch_ib(1)%model_threshold": 0.95,
74+
"patch_ib(1)%model_id": 1,
75+
"stl_models(1)%model_filepath": "Wedge2D_IBM.stl",
76+
"stl_models(1)%model_translate(1)": -0.0500000000,
77+
"stl_models(1)%model_translate(2)": -0.0373970250,
78+
"stl_models(1)%model_threshold": 0.95,
7879
"patch_ib(1)%slip": "F",
7980
# Fluids Physical Parameters
8081
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/3D_ibm_stl_ellipsoid/case.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@
8181
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
8282
"patch_icpp(1)%alpha(1)": 1.0e00,
8383
# Patch: Model Immersed Boundary
84+
"num_stl_models": 1,
8485
"patch_ib(1)%geometry": 12,
85-
"patch_ib(1)%model_filepath": "Ellipsoid_IBM.stl",
86-
"patch_ib(1)%model_translate(1)": -0.02056,
87-
"patch_ib(1)%model_translate(2)": -0.01,
88-
"patch_ib(1)%model_translate(3)": -0.01,
89-
"patch_ib(1)%model_spc": 20,
90-
"patch_ib(1)%model_threshold": 0.01,
86+
"patch_ib(1)%model_id": 1,
87+
"stl_models(1)%model_filepath": "Ellipsoid_IBM.stl",
88+
"stl_models(1)%model_translate(1)": -0.02056,
89+
"stl_models(1)%model_translate(2)": -0.01,
90+
"stl_models(1)%model_translate(3)": -0.01,
91+
"stl_models(1)%model_threshold": 0.01,
9192
"patch_ib(1)%slip": "F",
9293
# Fluids Physical Parameters
9394
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/3D_ibm_stl_pyramid/case.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@
8181
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
8282
"patch_icpp(1)%alpha(1)": 1.0e00,
8383
# Patch: Model Immersed Boundary
84+
"num_stl_models": 1,
8485
"patch_ib(1)%geometry": 12,
85-
"patch_ib(1)%model_filepath": "3DPyramid_IBM.stl",
86-
"patch_ib(1)%model_translate(1)": -0.0500000984,
87-
"patch_ib(1)%model_translate(2)": -0.0500001003,
88-
"patch_ib(1)%model_translate(3)": -0.0500001003,
89-
"patch_ib(1)%model_spc": 100,
90-
"patch_ib(1)%model_threshold": 0.95,
86+
"patch_ib(1)%model_id": 1,
87+
"stl_models(1)%model_filepath": "3DPyramid_IBM.stl",
88+
"stl_models(1)%model_translate(1)": -0.0500000984,
89+
"stl_models(1)%model_translate(2)": -0.0500001003,
90+
"stl_models(1)%model_translate(3)": -0.0500001003,
91+
"stl_models(1)%model_threshold": 0.95,
9192
"patch_ib(1)%slip": "F",
9293
# Fluids Physical Parameters
9394
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

examples/3D_ibm_stl_test/case.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@
8181
"patch_icpp(1)%alpha_rho(1)": (1.0) * rho1,
8282
"patch_icpp(1)%alpha(1)": 1.0e00,
8383
# Patch: Model Immersed Boundary
84+
"num_stl_models": 1,
8485
"patch_ib(1)%geometry": 12,
85-
"patch_ib(1)%model_filepath": "Cube_IBM.stl",
86-
"patch_ib(1)%model_translate(1)": 0,
87-
"patch_ib(1)%model_translate(2)": -0.05,
88-
"patch_ib(1)%model_translate(3)": -0.05,
89-
"patch_ib(1)%model_spc": 100,
90-
"patch_ib(1)%model_threshold": 0.95,
86+
"patch_ib(1)%model_id": 1,
87+
"stl_models(1)%model_filepath": "Cube_IBM.stl",
88+
"stl_models(1)%model_translate(1)": 0,
89+
"stl_models(1)%model_translate(2)": -0.05,
90+
"stl_models(1)%model_translate(3)": -0.05,
91+
"stl_models(1)%model_threshold": 0.95,
9192
"patch_ib(1)%slip": "F",
9293
# Fluids Physical Parameters
9394
"fluid_pp(1)%gamma": 1.0e00 / (gam_a - 1.0e00),

0 commit comments

Comments
 (0)