Skip to content

Commit bd32dd4

Browse files
authored
Merge branch 'main' into jolivet/improve-douglas_2024
2 parents 736b067 + b930f70 commit bd32dd4

6 files changed

Lines changed: 34 additions & 27 deletions

File tree

examples/.ci-suite/2d-cylinder.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ ln -sf examples/.ci-suite/2d-cylinder_settings.idp settings.idp
99
FreeFem++-mpi -v 0 examples/.ci-suite/2d-cylinder_mesh.md -mo $workdir/cylinder_0
1010
# compute and continue base state
1111
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -mi cylinder_0.msh -1/Re 1 -fo cylinder_0
12-
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi cylinder_0.base -fo cylinder -h0 -1 -param 1/Re -paramtarget 0.01 -maxcount -1 -mo cylinder -scount 1
13-
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi cylinder_10.base -1/Re 0.021 -fo cylinder50
12+
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi cylinder_0.base -fo cylinder -h0 -1 -param 1/Re -paramtarget 0.021 -maxcount -1 -mo cylinder -scount 1
13+
cd $workdir && export lastfile=$(printf '%s\n' cylinder_*.base | sort -t_ -k2,2n | tail -1) && cd -
14+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -1/Re 0.021 -fo cylinder50
1415
# stability analysis
1516
ff-mpirun -np $nproc modecompute.md -v 0 -dir $workdir -fi cylinder50.base -fo cylinder50 -eps_target 0.1+0.8i -sym 1 -eps_pos_gen_non_hermitian
1617
# find Hopf point
1718
ff-mpirun -np $nproc hopfcompute.md -v 0 -dir $workdir -fi cylinder50.mode -fo cylinder -param 1/Re -nf 0
1819
ff-mpirun -np $nproc hopfcompute.md -v 0 -dir $workdir -fi cylinder.hopf -fo cylinderadapt -mo cylinderhopf -adaptto bo -param 1/Re -thetamax 5 -wnl 1
1920
# trace periodic orbit
20-
ff-mpirun -np $nproc porbcontinue.md -v 0 -dir $workdir -fi cylinder.hopf -fo cylinderNh1 -Nh 1 -param 1/Re -h0 -1 -scount 1 -maxcount 8
21-
ff-mpirun -np $nproc porbcompute.md -v 0 -dir $workdir -fi cylinderNh1_8.porb -mo cylinder50porb -fo cylinder50Nh2 -Nh 2 -1/Re 0.02 -blocks 2
21+
ff-mpirun -np $nproc porbcontinue.md -v 0 -dir $workdir -fi cylinder.hopf -fo cylinderNh1 -Nh 1 -param 1/Re -h0 -1 -scount 1 -maxcount -1 -paramtarget 0.02
22+
cd $workdir && export lastfile=$(printf '%s\n' cylinderNh1_*.porb | sort -t_ -k2,2n | tail -1) && cd -
23+
ff-mpirun -np $nproc porbcompute.md -v 0 -dir $workdir -fi $lastfile -mo cylinder50porb -fo cylinder50Nh2 -Nh 2 -1/Re 0.02 -blocks 2

examples/brokof_etal_2024/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignite_7.base -fo ign
6161
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignite_8.base -fo ignite_9 -Ze 8 -Da 80 -mo ignite_9
6262
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignite_9.base -fo ignite_10 -Ze 10 -Da 100 -mo ignite_10
6363
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi ignite_10.base -fo ignite -param Da -count 10 -h0 10 -maxcount -1 -scount 5 -mo ignite -paramtarget 1700 -contorder 2
64+
cd $workdir && export lastfile=$(printf '%s\n' ignite_*.base | sort -t_ -k2,2n | tail -1) && cd -
65+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo ignited -Da 1700 -mo ignited -hmax 0.1
6466
```
6567

66-
3. Compute $Re=200$, $500$, $800$ base flow fields at $L=0.5$, $1$, $5.0$. (Change `ignite_140.base` to `ignite_xxx.base` where `xxx` is the highest count value from the continuation.)
68+
3. Compute $Re=200$, $500$, $800$ base flow fields at $L=0.5$, $1$, $5.0$.
6769
```sh
68-
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignite_140.base -fo Re200L1 -Da 1700 -mo Re200L1 -hmax 0.1
70+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignited.base -fo Re200L1 -Re 200 -mo Re200L1 -hmax 0.1
6971
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi Re200L1.base -fo Re500L1 -Re 500 -mo Re500L1 -hmax 0.1
7072
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi Re500L1.base -fo Re800L1 -Re 800 -mo Re800L1 -hmax 0.1
7173

examples/douglas_2024/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ ln -sf examples/douglas_2024/eqns_douglas_2024_freeout.idp eqns.idp
108108
ln -sf examples/douglas_2024/settings_douglas_2024_freeout.idp settings.idp
109109
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -mi G2.msh -fo freeoutS0p5 -Re 200 -S 0.5 -snes_rtol 0
110110
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi freeoutS0p5.base -fo freeout -param S -h0 10 -paramtarget 0.85 -maxcount -1 -scount 25
111-
# replace `freeout_125.base` with `freeout_XXX.base` where `XX` is the last index of the continuation.
112-
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi freeout_125.base -fo freeoutS0p85 -S 0.85 -snes_rtol 0 -pv 1
111+
cd $workdir && export lastfile=$(printf '%s\n' freeout_*.base | sort -t_ -k2,2n | tail -1) && cd -
112+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo freeoutS0p85 -S 0.85 -snes_rtol 0 -pv 1
113113
FreeFem++-mpi -v 0 examples/douglas_2024/computebaseerror.md -fi freeout -ci S0p85 -fo freeoutS0p85err -dir $workdir -pv 1
114114
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi freeoutS0p85.base -fo freeoutS0p9 -S 0.9 -snes_rtol 0
115115
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi freeoutS0p9.base -fo freeoutS1 -S 1 -snes_rtol 0 -pv 1

examples/douglas_etal_2021/README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -mi swirljet.msh -fo swir
5151

5252
2. Continue base state along the parameter $1/Re$ with adaptive remeshing
5353
```sh
54-
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi swirljet.base -fo swirljet -param 1/Re -h0 -50 -scount 2 -maxcount 4 -mo swirljet -thetamax 1
54+
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi swirljet.base -fo swirljet -param 1/Re -h0 -50 -scount 2 -maxcount -1 -paramtarget 0.01 -mo swirljet -thetamax 1
5555
```
5656

5757
3. Compute base state at $Re=100$ with guess from $1/Re$ continuation
5858
```sh
59-
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi swirljet_4.base -fo swirljet100 -1/Re 0.01
59+
cd $workdir && export lastfile=$(printf '%s\n' swirljet_*.base | sort -t_ -k2,2n | tail -1) && cd -
60+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo swirljet100 -1/Re 0.01
6061
```
6162

6263
4. Continue base state at $Re=100$ along the parameter $S$ with adaptive remeshing
@@ -66,10 +67,9 @@ ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi swirljet100.base -fo
6667

6768
5. Compute backward and forward fold bifurcations from steady solution branch on base-adapted mesh
6869
```sh
69-
cd $workdir && declare -a foldguesslist=(*specialpt.base) && cd -
70-
#note some shells may index from 1 and 2 instead of 0 and 1
71-
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi ${foldguesslist[0]} -fo swirljet100_B -param S -mo swirljet100_B -adaptto b -thetamax 1 -nf 0
72-
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi ${foldguesslist[1]} -fo swirljet100_F -param S -mo swirljet100_F -adaptto b -thetamax 1 -nf 0
70+
cd "$workdir" && set -- swirljet100_*specialpt.base && export B="$1" && export F="$2" && cd -
71+
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi $B -fo swirljet100_B -param S -mo swirljet100_B -adaptto b -thetamax 1 -nf 0
72+
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi $F -fo swirljet100_F -param S -mo swirljet100_F -adaptto b -thetamax 1 -nf 0
7373
```
7474

7575
6. Adapt the mesh to the critical base/direct/adjoint solutions, save `.vtu` files for Paraview
@@ -121,22 +121,24 @@ ff-mpirun -np $nproc hohocompute.md -v 0 -dir $workdir -fi swirljetm2m1.hoho -fo
121121

122122
14. Compute the fold-Hopf point where the $|m|=1$ curve intersects the fold curve
123123
```sh
124-
cd $workdir && declare -a fohoguesslist=(*specialpt.hopf) && cd -
125-
ff-mpirun -np $nproc fohocompute.md -v 0 -dir $workdir -fi ${fohoguesslist[1]} -fo swirljetm1 -param S -param2 1/Re -snes_divergence_tolerance 1e10
124+
cd "$workdir" && set -- swirljetm1_*specialpt.hopf && export fohoguess="$2" && cd -
125+
ff-mpirun -np $nproc fohocompute.md -v 0 -dir $workdir -fi $fohoguess -fo swirljetm1 -param S -param2 1/Re -snes_divergence_tolerance 1e10
126126
```
127127

128128
### Periodic 3D dynamics
129129
15. Continue periodic solutions along $S$ from their initial Hopf points using the harmonic balance method with $N_h=2$.
130130
```sh
131-
ff-mpirun -np $nproc porbcontinue.md -v 0 -dir $workdir -fi swirljetm1.hopf -fo swirljetm1 -Nh 2 -mo swirljetm1porb -param S -thetamax 1 -h0 0.5 -scount 4 -maxcount 12
132-
ff-mpirun -np $nproc porbcontinue.md -v 0 -dir $workdir -fi swirljetm2.hopf -fo swirljetm2 -Nh 2 -mo swirljetm2porb -param S -thetamax 1 -h0 -0.5 -scount 4 -maxcount 16
131+
ff-mpirun -np $nproc porbcontinue.md -v 0 -dir $workdir -fi swirljetm1.hopf -fo swirljetm1 -Nh 2 -mo swirljetm1porb -param S -thetamax 1 -h0 0.5 -scount 4 -maxcount -1 -paramtarget 1.9
132+
ff-mpirun -np $nproc porbcontinue.md -v 0 -dir $workdir -fi swirljetm2.hopf -fo swirljetm2 -Nh 2 -mo swirljetm2porb -param S -thetamax 1 -h0 -0.5 -scount 4 -maxcount -1 -paramtarget 1.8
133133
```
134134
NOTE: in the actual paper, $N_h=4$ to $6$ was used to accurately resolve the periodic orbits. $N_h=2$ is used here to reduce computational cost.
135135

136136
16. Compute periodic solutions at $S=1.9$ ($|m|=1$) and $S=1.8$ ($|m|=2$) with $N_h=3$ using a block preconditioner.
137137
```sh
138-
ff-mpirun -np $nproc porbcompute.md -v 0 -dir $workdir -fi swirljetm1_12.porb -fo swirljetm1 -Nh 3 -S 1.9 -blocks 3
139-
ff-mpirun -np $nproc porbcompute.md -v 0 -dir $workdir -fi swirljetm2_16.porb -fo swirljetm2 -Nh 3 -S 1.8 -blocks 3
138+
cd $workdir && export m1file=$(printf '%s\n' swirljetm1_*.porb | sort -t_ -k2,2n | tail -1) && cd -
139+
ff-mpirun -np $nproc porbcompute.md -v 0 -dir $workdir -fi $m1file -fo swirljetm1 -Nh 3 -S 1.9 -blocks 3
140+
cd $workdir && export m2file=$(printf '%s\n' swirljetm2_*.porb | sort -t_ -k2,2n | tail -1) && cd -
141+
ff-mpirun -np $nproc porbcompute.md -v 0 -dir $workdir -fi $m2file -fo swirljetm2 -Nh 3 -S 1.8 -blocks 3
140142
```
141143

142144
### Bifurcations to aperiodic 3D dynamics

examples/douglas_etal_2022/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -mi annularjet.msh -fo an
5353

5454
2. Continue base state along the parameter $1/Re$ with adaptive remeshing
5555
```sh
56-
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi annularjet.base -fo annularjet -param 1/Re -h0 -100 -scount 2 -maxcount 10 -mo annularjet -thetamax 1
56+
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi annularjet.base -fo annularjet -param 1/Re -h0 -100 -scount 2 -maxcount -1 -paramtarget 0.002095 -mo annularjet -thetamax 1
5757
```
5858

5959
3. Compute base state at $Re=100$ with guess from $1/Re$ continuation
@@ -68,10 +68,9 @@ ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi annularjet100.base -
6868

6969
5. Compute backward and forward fold bifurcations from steady solution branch on base-adapted mesh
7070
```sh
71-
cd $workdir && declare -a foldguesslist=(*specialpt.base) && cd -
72-
//note some shells may index from 1 and 2 instead of 0 and 1
73-
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi ${foldguesslist[0]} -fo annularjet100_B -param S -mo annularjet100_B -adaptto b -thetamax 1 -nf 0
74-
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi ${foldguesslist[1]} -fo annularjet100_F -param S -mo annularjet100_F -adaptto b -thetamax 1 -nf 0
71+
cd "$workdir" && set -- annularjet100_*specialpt.base && export B="$1" && export F="$2" && cd -
72+
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi $B -fo annularjet100_B -param S -mo annularjet100_B -adaptto b -thetamax 1 -nf 0
73+
ff-mpirun -np $nproc foldcompute.md -v 0 -dir $workdir -fi $F -fo annularjet100_F -param S -mo annularjet100_F -adaptto b -thetamax 1 -nf 0
7574
```
7675

7776
6. Adapt the mesh to the critical base/direct/adjoint solutions, save `.vtu` files for Paraview
@@ -89,7 +88,8 @@ ff-mpirun -np $nproc foldcontinue.md -v 0 -dir $workdir -fi annularjet100_B.fold
8988
### Steady 3D dynamics
9089
8. Compute base state at $Re\sim480$ with guess from $1/Re$ continuation
9190
```sh
92-
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi annularjet_10.base -fo annularjet480 -1/Re 0.002095
91+
cd $workdir && export lastfile=$(printf '%s\n' annularjet_*.base | sort -t_ -k2,2n | tail -1) && cd -
92+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo annularjet480 -1/Re 0.002095
9393
```
9494

9595
9. Compute leading $|m|=1$ eigenvalue

examples/wang_etal_2024/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi nonreacting_1.base -f
5656
```sh
5757
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi nonreacting.base -fo ignite_0 -Tr 1000 -Ar 1.1e7 -Dh0f -100 -mo ignite_0 -snes_rtol 0 -err 0.05
5858
ff-mpirun -np $nproc basecontinue.md -v 0 -dir $workdir -fi ignite_0.base -fo ignite -param Dh0f -h0 -200 -mo ignite -dmax 100 -err 0.1 -scount 5 -paramtarget -804.084 -maxcount -1 -contorder 2
59-
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignite_335.base -fo ignited -Tr 700 -Dh0f -804.084 -mo ignited -snes_rtol 0 -err 0.05 -snes_linesearch_type l2
59+
cd $workdir && export lastfile=$(printf '%s\n' ignite_*.base | sort -t_ -k2,2n | tail -1) && cd -
60+
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi $lastfile -fo ignited -Tr 700 -Dh0f -804.084 -mo ignited -snes_rtol 0 -err 0.05 -snes_linesearch_type l2
6061
ff-mpirun -np $nproc basecompute.md -v 0 -dir $workdir -fi ignited.base -fo U02p2 -pv 1 -snes_rtol 0 -snes_linesearch_type l2 -mo U02p2
6162
```
6263

0 commit comments

Comments
 (0)