Laghos
Laghos copied to clipboard
Rom dmd
In junction with libROM PR#123. To build this branch, we need to switch to libROM branch shift-nudmd
.
The first two examples work well with Nonuniform DMD, which was implemented in earlier PR and merged to master. Therefore, these two examples do not really rely on libROM PR#123.
Gresho vortex: Create tw_gresho.csv
with the k-th line being min(0.03*k, 0.62), k = 1, 2, ..., 21.
srun -n 8 -p pdebug laghos -o dmd_gresho -p 4 -m ../data/square_gresho.mesh -rs 4 -ok 3 -ot 2 -tf 0.62 -s 7 -visit -writesol -offline -ef 0.9999 -romsvds -no-romoffset -nwin 21 -tw tw_gresho.csv -sample-stages -dmd -dmdnuf -met
srun -n 8 -p pdebug laghos -o dmd_gresho -p 4 -m ../data/square_gresho.mesh -rs 4 -ok 3 -ot 2 -tf 0.62 -s 7 -soldiff -restore -romsvds -no-romoffset -dmd -dmdnuf
Outcome: 0: run/dmd_gresho/Sol_Position Rel. DIFF norm 0.000127487 0: run/dmd_gresho/Sol_Velocity Rel. DIFF norm 0.000152216 0: run/dmd_gresho/Sol_Energy Rel. DIFF norm 1.87131e-05
Taylor-green vortex: Create tw_taylor.csv
with the k-th line being min(0.02*k, 0.25), k = 1, 2, ..., 13.
srun -n 8 -p pdebug laghos -o dmd_taylor -m ../data/cube01_hex.mesh -p 0 -rs 2 -cfl 0.1 -tf 0.25 -s 7 -pa -offline -visit -romsvds -ef 0.9999 -writesol -no-romoffset -nwin 13 -tw tw_taylor.csv -sdim 1000 -sample-stages -dmd -dmdnuf -met
srun -n 8 -p pdebug laghos -o dmd_taylor -m ../data/cube01_hex.mesh -p 0 -rs 2 -cfl 0.1 -tf 0.25 -s 7 -pa -restore -soldiff -romsvds -no-romoffset -dmd -dmdnuf
Outcome: 0: run/dmd_taylor/Sol_Position Rel. DIFF norm 7.64126e-06 0: run/dmd_taylor/Sol_Velocity Rel. DIFF norm 2.64631e-05 0: run/dmd_taylor/Sol_Energy Rel. DIFF norm 6.50061e-06
The next two examples have zero initial velocity. Vanilla DMD/Nonuniform DMD predicts zero velocity for all time. We try to resolve this issue by adding two capabilities in libROM PR#123. The results below use the first-order prediction in the object dmd_X
, to predict velocity, instead of the zeroth-order prediction in dmd_V
. No offsets are used.
Triple point expansion: Create tw_triple.csv
with the k-th line being 0.04*k, k = 1, 2, ..., 20.
srun -n 8 -p pdebug laghos -o dmd_triple -p 3 -m ../data/box01_hex.mesh -rs 2 -tf 0.8 -s 7 -cfl 0.5 -pa -offline -writesol -visit -romsvds -no-romoffset -nwin 20 -tw tw_triple.csv -ef 0.9999 -sdim 200 -sample-stages -dmd -dmdnuf -met
srun -n 8 -p pdebug laghos -o dmd_triple -p 3 -m ../data/box01_hex.mesh -rs 2 -tf 0.8 -s 7 -cfl 0.5 -pa -restore -soldiff -romsvds -no-romoffset -dmd -dmdnuf -romvx
Outcome: 0: run/dmd_triple/Sol_Position Rel. DIFF norm 1.15579e-05 0: run/dmd_triple/Sol_Velocity Rel. DIFF norm 0.0204066 0: run/dmd_triple/Sol_Energy Rel. DIFF norm 0.000167323
Sedov blast: Create tw_sedov.csv
with the k-th line being 0.04*k, k = 1, 2, ..., 20.
srun -n 8 -p pdebug laghos -o dmd_sedov -p 4 -m ../data/cube01_hex.mesh -pt 211 -tf 0.8 -s 7 -pa -offline -visit -romsvds -ef 0.9999 -writesol -no-romoffset -nwin 20 -tw tw_sedov.csv -sample-stages -dmd -dmdnuf -met
srun -n 8 -p pdebug laghos -o dmd_sedov -p 4 -m ../data/cube01_hex.mesh -pt 211 -tf 0.8 -s 7 -pa -restore -soldiff -romsvds -no-romoffset -dmd -dmdnuf -romvx
Outcome: 0: run/dmd_sedov/Sol_Position Rel. DIFF norm 0.000225526 0: run/dmd_sedov/Sol_Velocity Rel. DIFF norm 0.254845 0: run/dmd_sedov/Sol_Energy Rel. DIFF norm 0.00227204
@kevinhkhuynh can you please provide some sample runs for DMD? We have not put any ROM sample runs in laghos.cpp, because it would be so many lines. Instead, we keep them on librom.net, so maybe the DMD examples should go there as well.
@kevinhkhuynh I think we are left on this. I guess it is too late to address this before you leave?
@kevinhkhuynh I think we are left on this. I guess it is too late to address this before you leave?
Unfortunately, I do not have time to complete this. But I actually worked on this PR with Tony @siuwuncheung , and he should be able to get this completed.
@kevinhkhuynh I think we are left on this. I guess it is too late to address this before you leave?
Unfortunately, I do not have time to complete this. But I actually worked on this PR with Tony @siuwuncheung , and he should be able to get this completed.
Yes, I will take care of this PR and libROM PR#123. Thanks for your work, Kevin!
@siuwuncheung @dylan-copeland it looks like the relative error decreases as the number of time windows increases even for sedan blast problem. I tried with 80 time windows and I get the following relative errors:
Position Rel. DIFF norm 0.000128237 Velocity Rel. DIFF norm 0.0645224 Energy Rel. DIFF norm 0.00197832
@siuwuncheung I was able to run the tests you listed above, but the errors were higher for the last two tests: 0: run/dmd_triple/Sol_Velocity Rel. DIFF norm 0.0230025 0: run/dmd_sedov/Sol_Velocity Rel. DIFF norm 0.153044 The results are acceptable, as I was able to match the results for Sedov posted by @chldkdtn. The example tests should be updated. Are the examples going to be documented somewhere (libROM website)?
With the latest changes, the Sedov test with 80 windows has much lower error: 0: run/dmd_sedov/Sol_Position Rel. DIFF norm 8.32777e-05 0: run/dmd_sedov/Sol_Velocity Rel. DIFF norm 0.0382461 0: run/dmd_sedov/Sol_Energy Rel. DIFF norm 0.00122453
@siuwuncheung I was able to run the tests you listed above, but the errors were higher for the last two tests: 0: run/dmd_triple/Sol_Velocity Rel. DIFF norm 0.0230025 0: run/dmd_sedov/Sol_Velocity Rel. DIFF norm 0.153044 The results are acceptable, as I was able to match the results for Sedov posted by @chldkdtn. The example tests should be updated. Are the examples going to be documented somewhere (libROM website)?
Yep! we will put this in librom.net webpage for sure.
@siuwuncheung You can "squash and merge" this PR.
@dylan-copeland I cannot seem to get those error for sedov blast with 80 windows. Can you pass me the exact command line options you have used?