Skip to content

Commit

Permalink
Change renamed dtmax -> dtmin and skip operations when setting `i…
Browse files Browse the repository at this point in the history
…check`/`iout?d`/`isave` to 0.
  • Loading branch information
p-costa committed Mar 3, 2025
1 parent 766e895 commit 96ef73a
Show file tree
Hide file tree
Showing 41 changed files with 66 additions and 60 deletions.
10 changes: 5 additions & 5 deletions docs/INFO_INPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Consider the following input file as example (corresponds to a turbulent plane c
ng(1:3) = 512, 256, 144
l(1:3) = 6., 3., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5, dt_f = -1
cfl = 0.95, dtmax = 1.e5, dt_f = -1
is_solve_ns = T, is_track_interface = T
inivel = 'poi'
is_wallturb = T, is_forced_hit = F
Expand Down Expand Up @@ -98,13 +98,13 @@ These lines set the computational grid.
---

```fortran
cfl = 0.95, dtmin = 1.e5, dt_f = -1
cfl = 0.95, dtmax = 1.e5, dt_f = -1
```

This line controls the simulation time step.

The time step is set to be equal to `min(cfl*dtmax,dtmin)`, i.e. the minimum value between `dtmin` and `cfl` times the maximum allowable time step `dtmax` (computed every `ickeck` time steps; see below).
`dtmin` is therefore used when a constant time step, smaller than `cfl*dtmax`, is required. If not, it should be set to a high value so that the time step is dynamically adjusted to `cfl*dtmax`. Alternatively, one can force the simulation to advance with a constant time step of arbitrary value, independent of the `dtmax` evaluation, by changing the value of `dt_f` from `-1` to the desired time step.
The time step is set to be equal to `min(cfl*dtmax,dtmax)`, i.e. the minimum value between `dtmax` and `cfl` times the maximum allowable time step `dtmax` (computed every `ickeck` time steps; see below).
`dtmax` is therefore used when a constant time step, smaller than `cfl*dtmax`, is required. If not, it should be set to a high value so that the time step is dynamically adjusted to `cfl*dtmax`. Alternatively, one can force the simulation to advance with a constant time step of arbitrary value, independent of the `dtmax` evaluation, by changing the value of `dt_f` from `-1` to the desired time step.

---

Expand Down Expand Up @@ -197,7 +197,7 @@ These lines set the frequency of time step checking and output:
* every `iout3d` time steps **3d scalar fields** are written to a file
* every `isave` time steps a **checkpoint file** is written (`fld_???????.bin`), and a symbolic link for the restart file, `fld.bin`, will point to this last save so that, by default, the last saved checkpoint file is used to restart the simulation

1d, 2d and 3d outputs can be tweaked modifying files `out?d.h90`, and re-compiling the source. See also `output.f90` for more details.
1d, 2d and 3d outputs can be tweaked modifying files `out?d.h90`, and re-compiling the source. See also `output.f90` for more details. _Set any of these variables to `0` to skip the corresponding operation._

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 128
l(1:3) = 1., 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'zer'
is_wallturb = F
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 512, 512, 512
l(1:3) = 6.2831853071795, 6.283185307179586, 6.283185307179586
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1600.
inivel = 'tgv'
is_wallturb = F
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 512, 256, 144
l(1:3) = 6., 3., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 5640.
inivel = 'poi'
is_wallturb = T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 512, 128, 128
l(1:3) = 10., 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 4410.
inivel = 'poi'
is_wallturb = T
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/closed_box/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'zer'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/couette/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1.5, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'cou'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/developing_channel/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1.5, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'zer'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/developing_duct/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1.5, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'zer'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/half_channel/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1.5, 1.
gtype = 2, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'hcl'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/lid_driven_cavity/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'zer'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/periodic_channel/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 3., 1.5, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'log'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/periodic_duct/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 3., 1.5, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'log'
is_wallturb = F
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 32, 32, 4
l(1:3) = 6.2831853071795, 6.283185307179586, 0.125
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 0.1
cfl = 0.95, dtmax = 0.1
visci = 100.
inivel = 'tgw'
is_wallturb = F
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 256
l(1:3) = 40., 20., 72.
gtype = 2, gr = 4.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 500.
inivel = 'tbl'
is_wallturb = F
Expand Down
2 changes: 1 addition & 1 deletion examples/_CaNS-example-files/triperiodic/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 1000.
inivel = 'zer'
is_wallturb = F
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 512, 256, 144
l(1:3) = 12., 6., 2.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 180.
inivel = 'pdc'
is_wallturb = T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 512, 256, 144
l(1:3) = 6., 3., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 5640.
inivel = 'iop'
is_wallturb = T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 512, 256, 72
l(1:3) = 12., 6., 1.
gtype = 2, gr = 0.
cfl = 0.95, dtmin = 1.e5
cfl = 0.95, dtmax = 1.e5
visci = 180.
inivel = 'hdc'
is_wallturb = T
Expand Down
2 changes: 1 addition & 1 deletion examples/capillary_wave/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 2, 192
l(1:3) = 1., 0.03125, 3.
gtype = 1, gr = 0.
cfl = 0.45, dtmin = 1.e9, dt_f = -1.
cfl = 0.45, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/deforming_circle/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 256, 2, 256
l(1:3) = 1., 0.0078125, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 2.5e-4, dt_f = -1.
cfl = 0.95, dtmax = 2.5e-4, dt_f = -1.
is_solve_ns = F, is_track_interface = T
inivel = 'voy'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/differentially_heated_cavity/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 2, 128
l(1:3) = 1., 0.03125, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e9, dt_f = -1.
cfl = 0.95, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/dispersed_poiseuille_flow/input-bubble_laden.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 64
l(1:3) = 2., 2., 1.
gtype = 1, gr = 0.
cfl = 0.45, dtmin = 1.e9, dt_f = -1.
cfl = 0.45, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'cou'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/dispersed_poiseuille_flow/input-droplet_laden.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 64
l(1:3) = 2., 2., 1.
gtype = 1, gr = 0.
cfl = 0.45, dtmin = 1.e9, dt_f = -1.
cfl = 0.45, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'cou'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/droplet_in_couette_flow/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 64
l(1:3) = 2., 2., 1.
gtype = 1, gr = 0.
cfl = 0.45, dtmin = 1.e9, dt_f = -1.
cfl = 0.45, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'cou'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/forced_hit/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 256, 256, 256
l(1:3) = 6.283185307179586, 6.283185307179586, 6.283185307179586
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e9, dt_f = -1.
cfl = 0.95, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = T
Expand Down
2 changes: 1 addition & 1 deletion examples/lid_driven_cavity/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 2, 64, 64
l(1:3) = 0.03125, 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e9, dt_f = -1.
cfl = 0.95, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/rising_bubble_2d/input-case-01.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 2, 128
l(1:3) = 1., 0.03125, 2.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e9, dt_f = -1.
cfl = 0.95, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/rising_bubble_2d/input-case-02.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 2, 128
l(1:3) = 1., 0.03125, 2.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e9, dt_f = -1.
cfl = 0.95, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/rising_bubble_3d/input-case-01.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 256
l(1:3) = 1., 1, 2.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e9, dt_f = -1.
cfl = 0.95, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/rising_bubble_3d/input-case-02.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 128, 128, 256
l(1:3) = 1., 1, 2.
gtype = 1, gr = 0.
cfl = 0.45, dtmin = 1.e9, dt_f = -1.
cfl = 0.45, dtmax = 1.e9, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/spurious_currents/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 2, 64
l(1:3) = 1., 0.03125, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 5.e-4, dt_f = -1.
cfl = 0.95, dtmax = 5.e-4, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/translating_circle/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 256, 2, 256
l(1:3) = 1., 0.0078125, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1e-4, dt_f = -1.
cfl = 0.95, dtmax = 1e-4, dt_f = -1.
is_solve_ns = F, is_track_interface = T
inivel = 'uni'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion examples/zalesak_disk/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 256, 2, 256
l(1:3) = 1., 0.0078125, 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 2.5e-5, dt_f = -1.
cfl = 0.95, dtmax = 2.5e-5, dt_f = -1.
is_solve_ns = F, is_track_intefrace = T
inivel = 'roy'
is_wallturb = F, is_forced_hit = F
Expand Down
2 changes: 1 addition & 1 deletion src/input.nml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ng(1:3) = 64, 64, 64
l(1:3) = 1., 1., 1.
gtype = 1, gr = 0.
cfl = 0.95, dtmin = 1.e-4, dt_f = -1.
cfl = 0.95, dtmax = 1.e-4, dt_f = -1.
is_solve_ns = T, is_track_interface = T
inivel = 'zer'
is_wallturb = F, is_forced_hit = F
Expand Down
Loading

0 comments on commit 96ef73a

Please sign in to comment.