You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/case.md
+25-6Lines changed: 25 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,11 @@ There are multiple sets of parameters that must be specified in the python input
98
98
Items 8, 9, 10, 11 and 12 are optional sets of parameters that activate the acoustic source model, ensemble-averaged bubble model, initial velocity field setup, phase change, artificial Mach number respectively.
99
99
Definition of the parameters is described in the following subsections.
100
100
101
+
Enumerated parameters accept named values as well as integer codes: `"riemann_solver": "hllc"`
102
+
is equivalent to `"riemann_solver": 2`. Defined names appear in each parameter's table entry
103
+
(e.g. `1` (`hll`), `2` (`hllc`)). Existing case files can be rewritten to named syntax with
104
+
`./mfc.sh validate case.py --migrate`.
105
+
101
106
### 1. Runtime {#sec-runtime}
102
107
103
108
| Parameter | Type | Description |
@@ -213,24 +218,34 @@ Some parameters, as described above, can be defined by analytical functions in t
213
218
214
219
where `alpha_rho` is defined with the `1 + 0.1*sin(20*x*pi)` function.
215
220
216
-
The expressions are interpreted as Fortran code, in the execution context and scope of the function that defines the patch.
217
-
Additionally, the following variables are made available as shorthand:
221
+
Expressions use **Python syntax** and are parsed at case load time.
222
+
Syntax errors and unknown variable or function names are immediate, named errors — they are reported before any Fortran is compiled, with a message identifying the offending expression and listing the available names.
223
+
224
+
The following variables are available in IC patch expressions:
218
225
219
226
| Shorthand | Expands To | Shorthand | Expands To | Shorthand | Expands To |
@@ -355,9 +370,13 @@ Additional details on this specification can be found in [NACA airfoil](https://
355
370
356
371
-`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.
357
372
358
-
-`vel(i)` is the initial linear velocity of the IB in the x, y, z direction for i=1, 2, 3. When `moving_ibm` equals 2, this velocity is just the starting speed of the object, which will then accelerate due to external forces. If `moving_ibm` equals 1, then this is constant if it is a number, or can be described analytically with an expression.
373
+
-`vel(i)` is the initial linear velocity of the IB in the x, y, z direction for i=1, 2, 3. When `moving_ibm` equals 2, this velocity is just the starting speed of the object, which will then accelerate due to external forces. If `moving_ibm` equals 1, then this is constant if it is a number, or can be described analytically with an expression.
374
+
375
+
-`angular_vel(i)` is the initial angular velocity of the IB about the x, y, z axes for i=1, 2, 3 in radians per second. When `moving_ibm` equals 2, this rotation rate is just the starting rate of the object, which will then change due to external torques. If `moving_ibm` equals 1, then this is constant if it is a number, or can be described analytically with an expression.
359
376
360
-
-`angular_vel(i)` is the initial angular velocity of the IB about the x, y, z axes for i=1, 2, 3 in radians per second. When `moving_ibm` equals 2, this rotation rate is just the starting rate of the object, which will then change due to external torques. If `moving_ibm` equals 1, then this is constant if it is a number, or can be described analytically with an expression.
377
+
Moving-IB analytic expressions use the same Python syntax and error-reporting as IC patch expressions (see the "Analytical Definition of Primitive Variables" section above).
378
+
Available variables: `x` (`x_cc(i)`), `y` (`y_cc(j)`), `z` (`z_cc(k)`), `t` (current simulation time), and `r` (the IB patch radius).
379
+
The same intrinsic functions and `pi` constant apply; bare `e` is not available.
361
380
362
381
-`coefficient_of_restitution` is a number from 0 (exclusive) to 1 (inclusive) describing how elastic IB collisions are. 0 is for perfectly inellastic collisions while 1 is for perfectly ellastic collisions.
0 commit comments