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
### Description
Allow specifying a spatially-variable density floor as a runtime
ParmParse expression.
Usage example:
```
density_floor = 1.0
density_floor_expr = "1.0e-2*base_density_floor*exp(-x/0.25)"
```
When evaluating `density_floor_expr` in each cell, `base_density_floor`
is replaced with the value of `density_floor` in the input file.
The spatial coordinates are available as `x`, `y`, and `z`. Multiple
subexpressions can be separated using semicolons, e.g., the radius can
be used with `r=sqrt(x*x+y*y+z*z); base_density_floor / pow(r,2)`
### Related issues
N/A
### Checklist
_Before this pull request can be reviewed, all of these tasks should be
completed. Denote completed tasks with an `x` inside the square brackets
`[ ]` in the Markdown source below:_
- [ ] I have added a description (see above).
- [ ] I have added a link to any related issues (if applicable; see
above).
- [ ] I have read the [Contributing
Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md).
- [ ] I have added tests for any new physics that this PR adds to the
code.
- [ ] *(For quokka-astro org members)* I have manually triggered the GPU
tests with the magic comment `/azp run`.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/markdown/parameters.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ These parameters are read in the `AMRSimulation<problem_t>::readParameters()` fu
26
26
| derived_vars | String | A list of the names of derived variables that should be included in the plotfile and Ascent outputs. |
27
27
| regrid_interval | Integer | The number of timesteps between AMR regridding. |
28
28
| density_floor | Float | The minimum density value allowed in the simulation. Enforced through EnforceLimits. |
29
+
| density_floor_expr | String | Optional AMReX parser expression for a spatially varying density floor. Variables: x, y, z, base_density_floor. When set, this overrides the constant floor. |
30
+
| debug_density_floor_plot | Boolean (0/1) | If set to 1, adds a derived field `density_floor_dbg` to plotfiles to visualize the spatially varying density floor. Default: 0 (disabled). |
29
31
| temperature_floor | Float | The minimum temperature value allowed in the simulation. Enforced through EnforceLimits. |
30
32
| max_walltime | String | The maximum walltime for the simulation in the format DD:HH:SS (days/hours/seconds). After 90% of this walltime elapses, the simulation will automatically stop and exit. |
31
33
| dt_cutoff | Float | Timestep drop detector threshold. If the timestep drops below dt_cutoff \* current_time, the simulation aborts with an error message. This helps detect numerical instabilities early. Default: 0.0 (disabled). |
0 commit comments