From 99e271e902f7a4a90d8f5bf16b217c449c3ad29e Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 3 May 2022 09:14:06 +0200 Subject: [PATCH] Olaflow with timeseries output --- olaflow/config.ini | 8 ++++---- olaflow/of/constant/porosityDict | 4 ++-- olaflow/of/system/controlDict | 2 +- olaflow/processing/post.py | 2 +- olaflow/run_ola.sh | 4 ++++ swash/sws/TS_buoy.sws | 32 ++++++++++++++++---------------- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/olaflow/config.ini b/olaflow/config.ini index 3026449..9ea81cc 100644 --- a/olaflow/config.ini +++ b/olaflow/config.ini @@ -1,5 +1,5 @@ [swash] -np_out=../swash/inp_post/real_spec_interp +np_out=../swash/inp_post/ts_4lay_1h [bathy] bathy=../data/out_of/bathy.dat @@ -12,11 +12,11 @@ level=4.5 path=/opt/OpenFOAM/OpenFOAM-9/bin:/opt/OpenFOAM/OpenFOAM-9/platforms/linux64GccDPInt32Opt/bin root=of out=out_of -t0 = 13900 -tf = 14300 +t0 = 1300 +tf = 1900 x0 = -150 [post] -out = out_post +out = out_post_ts_2 x = -50 z = 5 diff --git a/olaflow/of/constant/porosityDict b/olaflow/of/constant/porosityDict index 1d10f00..384f83d 100644 --- a/olaflow/of/constant/porosityDict +++ b/olaflow/of/constant/porosityDict @@ -17,8 +17,8 @@ FoamFile // Materials: clear region, core, secondary armour layer, primary armour layer // a,b,c: tuning parameters -a 2(0 50); -b 2(0 1.2); +a 2(0 5000); +b 2(0 2.0); c 2(0 0.34); // D50: mean nominal diameter diff --git a/olaflow/of/system/controlDict b/olaflow/of/system/controlDict index ca393bb..263303e 100644 --- a/olaflow/of/system/controlDict +++ b/olaflow/of/system/controlDict @@ -24,7 +24,7 @@ startTime 0; stopAt endTime; -endTime 400; +endTime 600; deltaT 0.1; diff --git a/olaflow/processing/post.py b/olaflow/processing/post.py index 99bf295..36e4078 100644 --- a/olaflow/processing/post.py +++ b/olaflow/processing/post.py @@ -87,4 +87,4 @@ with plt.rc_context( loc="center left", ) - plt.show() + fig.savefig(out.joinpath("fig.pdf")) diff --git a/olaflow/run_ola.sh b/olaflow/run_ola.sh index 0b5eef2..32d35b9 100755 --- a/olaflow/run_ola.sh +++ b/olaflow/run_ola.sh @@ -31,4 +31,8 @@ reconstructPar > log/reconstructPar.log #echo Removing parallel cases #rm -r processor* +popd +echo Pickling Olaflow output +python -m processing.pickle -o $out + echo END diff --git a/swash/sws/TS_buoy.sws b/swash/sws/TS_buoy.sws index 73e21d7..3fd7617 100644 --- a/swash/sws/TS_buoy.sws +++ b/swash/sws/TS_buoy.sws @@ -40,20 +40,20 @@ TIMEI 0.2 0.6 $*********************** OUTPUTS ******************************************* SET OUTLEV 1 $BLOCK 'COMPGRID' HEAD 'test.txt' LAY 4 TSEC XP DEP BOTL WATL PRESS DISCH USTAR VEL VZ VELK ZK BRKP OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'tsec.dat' TSEC OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'xp.dat' XP OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'dep.dat' DEP OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'botl.dat' BOTL OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'watl.dat' WATL OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'press.dat' PRESS OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'nhprsk.dat' NHPRSK OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'pressk.dat' PRESSK OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'disch.dat' DISCH OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'ustar.dat' USTAR OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'vel.dat' VEL OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'vz.dat' VZ OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'velk.dat' VELK OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'zk.dat' ZK OUTPUT 000000.00 0.25 SEC -BLOCK 'COMPGRID' NOHEAD 'brkp.dat' BRKP OUTPUT 000000.00 0.25 SEC -COMPUTE 000000.000 0.015 SEC 006000.000 $timeini dtini unit timefin +BLOCK 'COMPGRID' NOHEAD 'tsec.mat' TSEC OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'xp.mat' XP OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'dep.mat' DEP OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'botl.mat' BOTL OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'watl.mat' WATL OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'press.mat' PRESS OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'nhprsk.mat' NHPRSK OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'pressk.mat' PRESSK OUTPUT 000000.00 0.25 SEC +$BLOCK 'COMPGRID' NOHEAD 'disch.mat' DISCH OUTPUT 000000.00 0.25 SEC +$BLOCK 'COMPGRID' NOHEAD 'ustar.mat' USTAR OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'vel.mat' VEL OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'vz.mat' VZ OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'velk.mat' VELK OUTPUT 000000.00 0.25 SEC +BLOCK 'COMPGRID' NOHEAD 'zk.mat' ZK OUTPUT 000000.00 0.25 SEC +$BLOCK 'COMPGRID' NOHEAD 'brkp.mat' BRKP OUTPUT 000000.00 0.25 SEC +COMPUTE 000000.000 0.015 SEC 010000.000 $timeini dtini unit timefin STOP