-
Notifications
You must be signed in to change notification settings - Fork 0
/
nlist.f
executable file
·2499 lines (2353 loc) · 86.1 KB
/
nlist.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
! Part of Dflow3d a 3D Navier Stokes solver with variable density for
! simulations of near field dredge plume mixing
! Copyright (C) 2012 Lynyrd de Wit
! This program is free software: you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation, either version 3 of the License, or
! (at your option) any later version.
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
! You should have received a copy of the GNU General Public License
! along with this program. If not, see <http://www.gnu.org/licenses/>.
MODULE nlist
USE error_functions
IMPLICIT NONE
SAVE
INTEGER i,j,k,imax,jmax,kmax,i1,j1,k1,px,rank,kjet,nmax1,nmax2,nmax3,istep,CNdiffz,npresIBM,counter,npresPRHO,oPRHO,k_pzero
INTEGER Lmix_type,slip_bot,SEM,azi_n,outflow_overflow_down,azi_n2,wiggle_detector,wd,applyVOF,Poutflow,k_ust_tau,Uoutflow
INTEGER k_ust_tau_flow
REAL ekm_mol,nu_mol,pi,kappa,gx,gy,gz,Cs,Sc,calibfac_sand_pickup,calibfac_Shields_cr,morfac,morfac2,calibfac_sand_bedload
REAL dt,time_nm,time_n,time_np,t_end,t0_output,dt_output,te_output,dt_max,tstart_rms,CFL,dt_ini,tstart_morf,trestart,dt_old
REAL dt_output_movie,t0_output_movie,te_output_movie,te_rms,time_nm2,tstart_morf2,fcor,calibfac_Shields_cr_bl
REAL U_b,V_b,W_b,rho_b,W_j,Awjet,Aujet,Avjet,Strouhal,radius_j,kn,W_ox,U_bSEM,V_bSEM,U_w,V_w,U_init,V_init
REAL U_j2,Awjet2,Aujet2,Avjet2,Strouhal2,radius_j2,zjet2,rho_b2,ekm_sediment_pickup,nu_sediment_pickup
REAL xj(4),yj(4),radius_inner_j,W_j_powerlaw,plume_z_outflow_belowsurf
REAL dy,dz,schuif_x,depth,lm_min,lm_min3,Rmin,bc_obst_h
REAL dr_grid(1:100),dy_grid(1:100),fac_y_grid(1:100),lim_y_grid(1:100),fac_r_grid(1:100),lim_r_grid(1:100)
INTEGER imax_grid(1:100),jmax_grid(1:100),sym_grid_y
INTEGER tmax_inPpunt,tmax_inUpunt,tmax_inVpunt,tmax_inPpuntrand
INTEGER tmax_inPpuntTSHD,tmax_inUpuntTSHD,tmax_inVpuntTSHD,tmax_inWpuntTSHD
INTEGER tmax_inUpunt_tauTSHD,tmax_inVpunt_tauTSHD,tmax_inVpunt_rudder
INTEGER tmax_inWpunt2,tmax_inVpunt2,tmax_inPpunt2,tmax_inWpunt_suction
INTEGER nfrac,slipvel,interaction_bed,nobst,nbedplume,continuity_solver,hindered_settling,settling_along_gvector
INTEGER nfr_silt,nfr_sand,nfr_air,istart_morf1(2),istart_morf2(2),i_periodicx,hindered_settling_c
CHARACTER*256 hisfile,restart_dir,inpfile,plumetseriesfile,bcfile,plumetseriesfile2,bedlevelfile,initconditionsfile
CHARACTER*256 U_b_tseriesfile,V_b_tseriesfile,W_b_tseriesfile,bedupdatefile,tmorf_tseriesfile,tmorf2_tseriesfile
CHARACTER*3 time_int,advec_conc,cutter,split_rho_cont
CHARACTER*5 sgs_model
CHARACTER*4 damping_drho_dz,extra_mix_visc
CHARACTER*11 pickup_formula,bedload_formula,pickup_formula_swe
CHARACTER*8 transporteq_fracs
CHARACTER*20 pickup_correction
REAL damping_a1,damping_b1,damping_a2,damping_b2,cfixedbed
REAL plumetseries(1:10000)
REAL plumeUseries(1:10000)
REAL plumetseries2(1:10000)
REAL plumeUseries2(1:10000),c_bed(100)
REAL U_b_series(1:10000),V_b_series(1:10000),W_b_series(1:10000)
REAL U_b_tseries(1:10000),V_b_tseries(1:10000),W_b_tseries(1:10000)
REAL tmorf_series(1:10000),tmorf2_series(1:10000),tmorf_tseries(1:10000),tmorf2_tseries(1:10000)
INTEGER plumeseriesloc,plumeseriesloc2,plumeQseriesloc,plumecseriesloc
INTEGER U_b_seriesloc,V_b_seriesloc,W_b_seriesloc,tmorf_seriesloc,tmorf2_seriesloc
INTEGER nr_HPfilter,depo_implicit,depo_cbed_option,monopile
REAL timeAB_real(1:4),dpdx,dpdy,kn_d50_multiplier,avalanche_slope(100),av_slope_z(100)
REAL dpdx1,dpdy1,Uavold,Vavold,U3avold,V3avold,dpdx3,dpdy3
INTEGER periodicx,periodicy,wallup,dUVdn_IBMbed
REAL U_b3,V_b3,surf_layer,reduction_sedimentation_shields,kn_mp,kn_sidewalls
INTEGER ksurf_bc,kmaxTSHD_ind,nair
INTEGER poissolver,nm1,istep_output_bpmove,avalanche_until_done,IBMorder
INTEGER iparm(64)
CHARACTER*256 plumeQtseriesfile,plumectseriesfile,avfile,obstfile,kn_flow_file
REAL Q_j,plumeQseries(1:10000),plumeQtseries(1:10000),plumectseries(1:10000),plumecseries(30,1:10000) !c(30) matches with size frac_init
REAL Aplume,driftfluxforce_calfac,kn_flow_d50_multiplier,dz_sidewall,sl_relax
REAL vwal,vwal2,delta_nsed,nl,permeability_kl,pickup_fluctuations_ampl,z_tau_sed,kn_d50_multiplier_bl,bl_relax,power_VR2019
INTEGER pickup_fluctuations,cbed_method,k_layer_pickup,nu_minimum_wall,pickup_bedslope_geo,wbed_correction,bedslope_effect
INTEGER wallmodel_tau_sed,ndtbed,nrmsbed,telUVWbed,tel_dt
REAL Const1eps,Const2,Sc_k,Sc_eps,Cal_buoyancy_k,Cal_buoyancy_eps,Cs_relax
REAL bedslope_mu_s,alfabs_bl,alfabn_bl,phi_sediment
REAL dt_factor_avg,CNdiff_factor,CNdiff_ho,CNdiff_dtfactor,CNdiff_tol,Apvisc_shear_relax
INTEGER n_dtavg,CNdiff_pc,CNdiff_maxi,CNdiff_ini,initPhydrostatic,npresIBM_viscupdate,rheo_shear_method,Apvisc_force_eq
INTEGER tmax_inPpuntTSHDini,tmax_inUpuntTSHDini,tmax_inVpuntTSHDini,tmax_inWpuntTSHDini,correction_sl_with_bl
INTEGER nobst_files,nobst_file,momentum_exchange_obstacles,erosion_cbed_start,movebed_absorb_cfluid,fft_routines
CHARACTER(len=256) :: obst_file_series(5000)
REAL :: obst_starttimes(5000)
INTEGER cbc_perx_j(2),taulayerTBLE,obstfile_erodepo,nWM,vel_start_after_ero,nsmooth_bed,k_ust_tau_sed_range(2),dpdx_ref_j(2)
REAL cbc_relax,TBLE_grad_relax,TBLEsl_grad_relax,TBLEbl_grad_relax,dpbed_zone,TBLEsed_grad_relax
!new variables rheology
INTEGER Non_Newtonian, Apvisc_interp
REAL SIMPLE_tauy,SIMPLE_muB,SIMPLE_climit(30)
REAL JACOBS_Ky,JACOBS_Kmu,JACOBS_Aclay,JACOBS_By,JACOBS_Bmu,JACOBS_muw
REAL WINTER_Ay,WINTER_Amu,WINTER_nf,WINTER_af,WINTER_muw
REAL THOMAS_Cy,THOMAS_Cmu,THOMAS_ky,THOMAS_kmu,THOMAS_Py,THOMAS_Pmu,THOMAS_phi_sand_max
REAL BAGNOLD_beta,BAGNOLD_phi_max,PAPANASTASIOUS_m,shear0limit
REAL Lambda_init,Kin_eq_a,Kin_eq_b,Kin_eq_lambda_0
REAL HOUSKA_n,HOUSKA_eta_0,HOUSKA_eta_inf,HOUSKA_tauy_0,HOUSKA_tauy_inf
REAL, DIMENSION(:,:,:),ALLOCATABLE :: tauY,muB
REAL, DIMENSION(:,:,:),ALLOCATABLE :: stress,strain,muA
REAL, DIMENSION(:,:,:),ALLOCATABLE :: lambda_old,lambda_new
CHARACTER*6 Rheological_model
CHARACTER*4 convection,diffusion
REAL numdiff,comp_filter_a,numdiff2
INTEGER comp_filter_n,pres_in_predictor_step,pres_in_predictor_step_internal
INTEGER nprop,rudder,softnose
REAL U_TSHD,LOA,Lfront,Breadth,Draught,Lback,Hback,xfront,yfront,Hfront
REAL Dprop,xprop,yprop,zprop,Pprop,kn_TSHD,rot_prop
REAL signU_b,signV_b,signU_bSEM,signV_bSEM
REAL Dsp,xdh,perc_dh_suction
CHARACTER*4 draghead
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inPpunt,j_inPpunt
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inPpuntrand,j_inPpuntrand
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inUpunt,j_inUpunt
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inVpunt,j_inVpunt
INTEGER*2, DIMENSION(:),ALLOCATABLE :: k_inVpunt2,j_inVpunt2
INTEGER*2, DIMENSION(:),ALLOCATABLE :: k_inWpunt2,j_inWpunt2
INTEGER*2, DIMENSION(:),ALLOCATABLE :: k_inPpunt2,j_inPpunt2
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inPpuntTSHD,j_inPpuntTSHD,k_inPpuntTSHD
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inUpuntTSHD,j_inUpuntTSHD,k_inUpuntTSHD
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inVpuntTSHD,j_inVpuntTSHD,k_inVpuntTSHD
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inWpuntTSHD,j_inWpuntTSHD,k_inWpuntTSHD
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inUpunt_tauTSHD,j_inUpunt_tauTSHD,k_inUpunt_tauTSHD
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inVpunt_tauTSHD,j_inVpunt_tauTSHD,k_inVpunt_tauTSHD
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inVpunt_rudder,j_inVpunt_rudder,k_inVpunt_rudder
INTEGER*2, DIMENSION(:),ALLOCATABLE :: i_inWpunt_suction,j_inWpunt_suction,k_inWpunt_suction
REAL, DIMENSION(:),ALLOCATABLE :: Ubot_TSHD,Vbot_TSHD,dt_series !,facIBMu,facIBMv,facIBMw,
INTEGER*8, DIMENSION(:),ALLOCATABLE :: pt,pt3
INTEGER*2, DIMENSION(:,:,:),ALLOCATABLE :: llist1,llist2,llist3
INTEGER*2, DIMENSION(:,:),ALLOCATABLE :: llmax1,llmax2,llmax3 !,kbed,kbedt,kbed2
INTEGER*8, DIMENSION(:,:),ALLOCATABLE :: kbed,kbedt,kbed0,kbedold !,kbed2,kbed22
REAL, DIMENSION(:,:),ALLOCATABLE :: b_update,b_update_bu !,kbed2,kbed22
INTEGER, DIMENSION(:,:),ALLOCATABLE :: Xkk,Tii
INTEGER, DIMENSION(:),ALLOCATABLE :: Xii,Tkk,nfrac_air,nfrac_silt,nfrac_sand,nfrac_air2
INTEGER*8, DIMENSION(:),ALLOCATABLE :: kbedin
REAL, DIMENSION(:),ALLOCATABLE :: cos_u,cos_v,sin_u,sin_v,cos_ut,sin_ut,cos_vt,sin_vt
REAL, DIMENSION(:),ALLOCATABLE :: Ru,Rp,dr,phivt,phipt,dphi2t,phiv,phip,dphi2
REAL*8, DIMENSION(:),ALLOCATABLE :: xSEM1,ySEM1,zSEM1,uSEM1
REAL*8, DIMENSION(:),ALLOCATABLE :: lmxSEM1,lmySEM1,lmzSEM1
REAL*8, DIMENSION(:),ALLOCATABLE :: xSEM2,ySEM2,zSEM2,uSEM2
REAL*8, DIMENSION(:,:),ALLOCATABLE :: epsSEM1,epsSEM2,epsSEM3,Lmix2,Lmix2hat,vol_V,vol_Vp,zbed_old,zbed_init
REAL*8, DIMENSION(:),ALLOCATABLE :: lmxSEM2,lmySEM2,lmzSEM2
REAL*8, DIMENSION(:),ALLOCATABLE :: rSEM3,thetaSEM3,zSEM3,wSEM3,xSEM3,ySEM3
REAL, DIMENSION(:,:,:,:),ALLOCATABLE :: AA1,AA2,AA3
REAL*8, DIMENSION(:),ALLOCATABLE :: lmrSEM3,lmzSEM3
REAL, DIMENSION(:,:),ALLOCATABLE :: azi_angle_p,azi_angle_u,azi_angle_v,zbed,Ubc1,Vbc1,Ubc2,Vbc2,rhocorr_air_z,Wbed,wscorr_z
REAL, DIMENSION(:,:,:),ALLOCATABLE :: ekm,Diffcof,bednotfixed,bednotfixed_depo
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Uold,Vold,Wold,Rold
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Unew,Vnew,Wnew,Rnew
REAL, DIMENSION(:,:,:),ALLOCATABLE :: dUdt,dVdt,dWdt,drdt
REAL, DIMENSION(:,:,:),ALLOCATABLE :: rhoU,rhoV,rhoW
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Srr,Spr,Szr,Spp,Spz,Szz,TKE,EEE,Cmu
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Ppropx_dummy,Ppropy_dummy,Ppropz_dummy,wf,av_slope
REAL, DIMENSION(:,:,:),ALLOCATABLE :: obu,obv,obw
INTEGER, DIMENSION(:),ALLOCATABLE, TARGET :: jco,iro,beg,di,di2
REAL Hs,Tp,Lw,nx_w,ny_w,kabs_w,kx_w,ky_w,om_w
REAL, DIMENSION(:),ALLOCATABLE :: LUB,LHS2
REAL, DIMENSION(:,:),ALLOCATABLE, TARGET :: lhs,LUBs,ubot
INTEGER, DIMENSION(:),ALLOCATABLE, TARGET :: jco3,iro3,beg3,di3
REAL, DIMENSION(:),ALLOCATABLE, TARGET :: lhs3,sigtbed
REAL, DIMENSION(:,:,:),ALLOCATABLE :: rhs3,d_cbotdelay
REAL, DIMENSION(:,:,:),ALLOCATABLE :: rhU,rhV,rhW
REAL, DIMENSION(:,:,:,:),ALLOCATABLE :: cU,cV,cW
REAL, DIMENSION(:,:),ALLOCATABLE :: thisbp,zhisbp
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Chisbp
REAL, DIMENSION(:,:),ALLOCATABLE :: Uhisbp,Vhisbp,Whisbp
REAL*8, DIMENSION(:,:,:),ALLOCATABLE :: fc_global
REAL, DIMENSION(:,:),ALLOCATABLE :: uuR_relax,uuL_relax,vvR_relax,vvL_relax,tau2Vold,tau2Vnew,tau2Wold,tau2Wnew,qb_relax
REAL, DIMENSION(:,:),ALLOCATABLE :: tau_fl_Uold,tau_fl_Vold,tau_fl_Unew,tau_fl_Vnew,ust_sl_new,ust_sl_old,ust_bl_new,ust_bl_old
REAL, DIMENSION(:,:),ALLOCATABLE :: ust_mud_new,ust_mud_old,kn_flow,d50field,tau_fl_Utop,tau_fl_Vtop
REAL, DIMENSION(:,:,:),ALLOCATABLE :: qbU,qbV,ust_frac_old,ust_frac_new,sigUWbed,sigVWbed,sigUbed,sigVbed,sigWbed
REAL, DIMENSION(:,:),ALLOCATABLE :: TBLEdudx,TBLEdudy,TBLEdvdx,TBLEdvdy,TBLEdpdx,TBLEdpdy,TBLEdpdxo,TBLEdpdyo
REAL, DIMENSION(:,:),ALLOCATABLE :: TBLEsl_dpdx,TBLEsl_dpdy,TBLEbl_dpdx,TBLEbl_dpdy,absU_sed_relax
! REAL, DIMENSION(:,:,:),ALLOCATABLE :: Uf,Vf,Wf
! REAL, DIMENSION(:,:,:),ALLOCATABLE :: div
! REAL, DIMENSION(:,:,:),ALLOCATABLE :: Uavg,Vavg,Wavg,Cavg,Ravg
! REAL, DIMENSION(:,:,:),ALLOCATABLE :: Urms,Vrms,Wrms,Crms,Rrms
! REAL, DIMENSION(:,:,:),ALLOCATABLE :: sigU2,sigV2,sigW2,sigC2,sigR2
REAL, DIMENSION(:,:,:),ALLOCATABLE :: p,pold,dp,pold1,pold2,pold3,Csgrid,phdt,phnew,viscf
REAL, DIMENSION(:,:,:),ALLOCATABLE :: wx,wy,wz,wxold,wyold,wzold,Ppropx,Ppropy,Ppropz
REAL, DIMENSION(:,:,:),ALLOCATABLE :: wxolder,wyolder,wzolder
REAL, DIMENSION(:,:),ALLOCATABLE :: Ub1new,Vb1new,Wb1new,Ub2new,Vb2new,Wb2new,Ub3new,Vb3new,Wb3new
REAL, DIMENSION(:,:),ALLOCATABLE :: Ub1old,Vb1old,Wb1old,Ub2old,Vb2old,Wb2old,Ub3old,Vb3old,Wb3old
REAL, DIMENSION(:,:),ALLOCATABLE :: Ubcoarse1,Vbcoarse1,Wbcoarse1,Ubcoarse2,Vbcoarse2,Wbcoarse2
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Cbcoarse1,Cbcoarse2
REAL, DIMENSION(:,:,:,:),ALLOCATABLE :: Cold,Cnew,dcdt,cc,ccold,dcdt2,Clivebed
REAL, DIMENSION(:,:,:),ALLOCATABLE :: Coldbot,Cnewbot,dcdtbot,ccbot,ccoldbot
REAL, DIMENSION(:,:,:), ALLOCATABLE :: Uavg,Vavg,Wavg,Ravg,Pavg,muavg
REAL, DIMENSION(:,:,:), ALLOCATABLE :: Umax,Vmax,Wmax,Uhormax,U3dmax !,Umin,Vmin,Wmin
REAL, DIMENSION(:,:,:), ALLOCATABLE :: sigU2,sigV2,sigW2,sigR2,sigUV,sigUW,sigVW
REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: sigC2,Cavg,sigUC,sigVC,sigWC,Cmax,Cmin
REAL, DIMENSION(:,:), ALLOCATABLE :: sig_tau_flow2,tau_flow_avg
REAL, DIMENSION(:,:), ALLOCATABLE :: tau_sl_avg,tau_bl_avg,tau_mud_avg,sig_tau_sl2,sig_tau_bl2,sig_tau_mud2
REAL, DIMENSION(:,:,:), ALLOCATABLE :: tau_frac_avg,sig_tau_frac2
INTEGER stat_count
REAL stat_time_count
type fractions
REAL :: ws,rho,c,dpart,dfloc,n,tau_d,tau_e,M,kn_sed,ws_dep,zair_ref_belowsurf,CD,cmax,ero
INTEGER :: type
end type fractions
type bed_obstacles
REAL :: x(4),y(4),height,zbottom,ero,depo
end type bed_obstacles
type bed_plumes
REAL :: x(4),y(4),height,u,v,w,c(30),t0,t_end,zbottom,Q,sedflux(30),volncells,changesedsuction !c(30) matches with size frac_init
REAL :: move_zbed_criterium(100000),move_dx_series(100000),move_dy_series(100000),move_dz_series(100000)
INTEGER*2 :: move_zbed_type(100000)
REAL :: move_nx_series(100000),move_ny_series(100000),x2(4),y2(4),move_dx2_series(100000),move_dy2_series(100000)
REAL :: move_outputfile_series(100000),uinput,dt_history,t_bphis_output,move_dz_height_factor,move_dz_zbottom_factor
INTEGER :: forever,h_seriesloc,zb_seriesloc,Q_seriesloc,S_seriesloc,c_seriesloc,velocity_force
INTEGER :: u_seriesloc,v_seriesloc,w_seriesloc,istep_bphis_output,fluidize,kn_flow_wall_normaldir
CHARACTER*256 :: h_tseriesfile,zb_tseriesfile,Q_tseriesfile,S_tseriesfile,c_tseriesfile
CHARACTER*256 :: u_tseriesfile,v_tseriesfile,w_tseriesfile
REAL :: move_u,move_v,move_w,radius,radius2,kn_flow
end type bed_plumes
type bed_plumes2
REAL :: x(4),y(4),height,u,v,w,c(30),t0,t_end,zbottom,Q,sedflux(30),volncells,changesedsuction !c(30) matches with size frac_init
REAL :: h_tseries(10000),h_series(10000),zb_tseries(10000),zb_series(10000)
REAL :: Q_tseries(10000),c_tseries(10000),S_tseries(10000),Q_series(10000),c_series(30,10000),S_series(30,10000)
REAL :: move_zbed_criterium(100000),move_dx_series(100000),move_dy_series(100000),move_dz_series(100000)
INTEGER*2 :: move_zbed_type(100000)
REAL :: move_nx_series(100000),move_ny_series(100000),x2(4),y2(4),move_dx2_series(100000),move_dy2_series(100000)
REAL :: move_outputfile_series(100000),uinput,dt_history,t_bphis_output,move_dz_height_factor,move_dz_zbottom_factor
REAL :: u_tseries(10000),v_tseries(10000),w_tseries(10000)
REAL :: u_series(10000),v_series(10000),w_series(10000)
INTEGER :: forever,h_seriesloc,zb_seriesloc,Q_seriesloc,S_seriesloc,c_seriesloc,nmove,nmove_present,velocity_force,tmax
INTEGER :: u_seriesloc,v_seriesloc,w_seriesloc,istep_bphis_output,fluidize,kn_flow_wall_normaldir
CHARACTER*256 :: h_tseriesfile,zb_tseriesfile,Q_tseriesfile,S_tseriesfile,c_tseriesfile
CHARACTER*256 :: u_tseriesfile,v_tseriesfile,w_tseriesfile
! INTEGER :: tmax_iP,tmax_iU,iP_inbp(10000),jP_inbp(10000),kP_inbp(10000),iU_inbp(10000),jU_inbp(10000),kU_inbp(10000)
REAL :: move_u,move_v,move_w,radius,radius2,kn_flow
INTEGER*2 :: i(100000),j(100000)
end type bed_plumes2
TYPE(fractions), DIMENSION(:), ALLOCATABLE :: frac
TYPE(bed_obstacles), DIMENSION(:), ALLOCATABLE :: ob,obst
TYPE(bed_plumes), DIMENSION(:), ALLOCATABLE :: bedplume
TYPE(bed_plumes2), DIMENSION(:), ALLOCATABLE :: bp
! REAL*8, DIMENSION(:,:,:),ALLOCATABLE :: UT
! REAL*8, DIMENSION(:,:),ALLOCATABLE :: UP,UTMP
CONTAINS
subroutine read_namelist
implicit none
! include 'param.txt'
! include 'common.txt'
integer ios,n,n1,n2,n3,n4
type frac_init
real :: ws,c,rho,dpart,dfloc,tau_d,tau_e,M,kn_sed,ws_dep,zair_ref_belowsurf,CD,cmax,ero
integer :: type
end type frac_init
TYPE(frac_init), DIMENSION(30) :: fract
ALLOCATE(bedplume(400)) !temporary array to read namelist with unknown size
ALLOCATE(obst(100000)) !temporary array to read namelist with unknown size
! TYPE(gridtype), DIMENSION(1) :: grid
NAMELIST /simulation/px,imax,jmax,kmax,imax_grid,dr_grid,Rmin,schuif_x,dy,depth,hisfile,restart_dir
& ,lim_r_grid,fac_r_grid,jmax_grid,lim_y_grid,fac_y_grid,sym_grid_y,dy_grid
NAMELIST /times/t_end,t0_output,dt_output,te_output,tstart_rms,dt_max,dt_ini,time_int,CFL,
& t0_output_movie,dt_output_movie,te_output_movie,tstart_morf,te_rms,tstart_morf2,n_dtavg,tmorf_tseriesfile,tmorf2_tseriesfile
NAMELIST /num_scheme/convection,numdiff,wiggle_detector,diffusion,comp_filter_a,comp_filter_n,CNdiffz,npresIBM,advec_conc,
& continuity_solver,transporteq_fracs,split_rho_cont,driftfluxforce_calfac,depo_implicit,IBMorder,npresPRHO,
& pres_in_predictor_step,Poutflow,oPRHO,applyVOF,k_ust_tau,Uoutflow,dUVdn_IBMbed,k_pzero,numdiff2,CNdiff_factor,CNdiff_ho,
& CNdiff_dtfactor,CNdiff_pc,CNdiff_maxi,CNdiff_tol,CNdiff_ini,initPhydrostatic,npresIBM_viscupdate,momentum_exchange_obstacles
& ,k_ust_tau_flow,nsmooth_bed,k_ust_tau_sed_range,fft_routines
NAMELIST /ambient/U_b,V_b,W_b,bcfile,rho_b,SEM,nmax2,nmax1,nmax3,lm_min,lm_min3,slip_bot,taulayerTBLE,kn,interaction_bed,
& periodicx,periodicy,dpdx,dpdy,W_ox,Hs,Tp,nx_w,ny_w,obst,bc_obst_h,U_b3,V_b3,surf_layer,wallup,bedlevelfile,
& U_bSEM,V_bSEM,U_w,V_w,c_bed,cfixedbed,U_init,V_init,initconditionsfile,rho_b2,monopile,kn_mp,kn_sidewalls,obstfile,
& istart_morf1,istart_morf2,i_periodicx,kn_flow_file,kn_flow_d50_multiplier,U_b_tseriesfile,V_b_tseriesfile,W_b_tseriesfile
& ,cbc_perx_j,cbc_relax,obstfile_erodepo,TBLE_grad_relax,bedupdatefile,dpdx_ref_j
NAMELIST /plume/W_j,plumetseriesfile,Awjet,Aujet,Avjet,Strouhal,azi_n,kjet,radius_j,Sc,slipvel,outflow_overflow_down,
& U_j2,plumetseriesfile2,Awjet2,Aujet2,Avjet2,Strouhal2,azi_n2,radius_j2,zjet2,bedplume,radius_inner_j,xj,yj,W_j_powerlaw,
& plume_z_outflow_belowsurf,hindered_settling,hindered_settling_c,Q_j,plumeQtseriesfile,plumectseriesfile
NAMELIST /LESmodel/sgs_model,Cs,Lmix_type,nr_HPfilter,damping_drho_dz,damping_a1,damping_b1,damping_a2,damping_b2,
& extra_mix_visc,nu_minimum_wall,Const1eps,Const2,Sc_k,Sc_eps,Cal_buoyancy_k,Cal_buoyancy_eps,Cs_relax
NAMELIST /constants/kappa,gx,gy,gz,ekm_mol,calibfac_sand_pickup,pickup_formula,kn_d50_multiplier,avalanche_slope,
& av_slope_z,calibfac_Shields_cr,calibfac_Shields_cr_bl,reduction_sedimentation_shields,morfac,morfac2,avalanche_until_done,
& avfile,settling_along_gvector,vwal,nl,permeability_kl,pickup_fluctuations_ampl,pickup_fluctuations,pickup_correction,
& cbed_method,z_tau_sed,k_layer_pickup,pickup_bedslope_geo,bedload_formula,kn_d50_multiplier_bl,calibfac_sand_bedload,bl_relax
& ,fcor,wbed_correction,bedslope_effect,bedslope_mu_s,alfabs_bl,alfabn_bl,phi_sediment,wallmodel_tau_sed,nrmsbed,ndtbed,
& erosion_cbed_start,movebed_absorb_cfluid,power_VR2019,ekm_sediment_pickup,dz_sidewall,pickup_formula_swe
& ,vel_start_after_ero,dpbed_zone,sl_relax,TBLEsl_grad_relax,TBLEbl_grad_relax,TBLEsed_grad_relax,correction_sl_with_bl
NAMELIST /fractions_in_plume/fract
NAMELIST /ship/U_TSHD,LOA,Lfront,Breadth,Draught,Lback,Hback,xfront,yfront,kn_TSHD,nprop,Dprop,xprop,yprop,zprop,
& Pprop,rudder,rot_prop,draghead,Dsp,xdh,perc_dh_suction,softnose,Hfront,cutter
NAMELIST /rheology/Non_Newtonian,Rheological_model,PAPANASTASIOUS_m,shear0limit,Apvisc_interp,SIMPLE_tauy,SIMPLE_muB,SIMPLE_climit,
& JACOBS_Ky,JACOBS_Kmu,JACOBS_Aclay,JACOBS_By,JACOBS_Bmu,JACOBS_muw,
& WINTER_Ay,WINTER_Amu,WINTER_nf,WINTER_af,WINTER_muw,
& THOMAS_Cy,THOMAS_Cmu,THOMAS_ky,THOMAS_kmu,THOMAS_Py,THOMAS_Pmu,THOMAS_phi_sand_max,
& Lambda_init,Kin_eq_a,Kin_eq_b,Kin_eq_lambda_0,HOUSKA_n,HOUSKA_eta_0,HOUSKA_eta_inf,HOUSKA_tauy_0,HOUSKA_tauy_inf,
& BAGNOLD_beta,BAGNOLD_phi_max,rheo_shear_method,Apvisc_shear_relax,Apvisc_force_eq
!! initialise:
!! simulation:
px = -999
imax = -999
jmax = -999
kmax = -999
imax_grid=0
fac_r_grid=-999.
lim_r_grid=-999.
dr_grid=0.
fac_y_grid=-999.
lim_y_grid=-999.
jmax_grid=0
jmax_grid(1)=1
dy_grid=0.
sym_grid_y=0
Rmin = -999.
schuif_x = -999.
dy = -999.
depth = -999.
hisfile = ''
restart_dir = ''
!! times
t_end = -999.
t0_output = 0. ! if not defined than zero
dt_output = -999.
te_output = 9.e18 ! if not defined than inf --> continue output towards end simulation
tstart_rms = 9.e18
te_rms = 1.e19
dt_max = -999.
dt_ini = -999.
time_int=''
CFL = -999.
n_dtavg = -1
t0_output_movie = 9.e18
dt_output_movie = 9.e18
te_output_movie = 9.e18
tstart_morf=0.
tstart_morf2=0.
trestart=0.
tmorf_tseriesfile=''
tmorf_tseries=-99999.
tmorf_series=-99999.
tmorf2_tseriesfile=''
tmorf2_tseries=-99999.
tmorf2_series=-99999.
!! num_scheme
convection = 'ARGH'
numdiff = 0.
numdiff2 = 0.
wiggle_detector = 0
diffusion = 'ARGH'
comp_filter_a = 0.5
comp_filter_n = 0
CNdiffz = 0
CNdiff_factor = 0.5
CNdiff_dtfactor = 100.
CNdiff_ho = 0.
CNdiff_pc = 0 !Choice in pre-conditioner of implicit CG 3D CN diffusion solver; 0 no preconditioner (default), 1 DIAG pc, 2 IC(0) pc
CNdiff_maxi = 1000 !Maximum number of iterations in implicit CG 3D diffusion solver, default 1000
CNdiff_tol = 1.e-12 !Tolerance in implicit CG 3D diffusion solver, default 1.e-12
CNdiff_ini = 1 !1 (default) = starting condition predictor U* just before applying implicit diff; 2 = starting condition U from previous timestep
npresIBM = 0
npresIBM_viscupdate = 0
npresPRHO = 0
oPRHO = 2
pres_in_predictor_step = 1
advec_conc='VLE' !optional advection scheme concentration, options: 'VLE' (default) 'VL2' 'ARO' 'SBE' SB2' 'NVD' :'VLE' VanLeer(via LW)(default) 'ARO' Arora(via LW) 'SBE' Superbee(via LW) 'VL2' VanLeer(via CDS2) or 'SB2' Superbee(via CDS2) TVD schemes or 'NVD' for NVD scheme
continuity_solver = 1 !nerd option, default is 1 (drdt+drudx=0). Optional: 2 (neglect drdt), 3 (dudx almost 0 U-mix), 33 (dudx=0 U-mix), 34 (dudx=0 U-vol with proper U-mix)
transporteq_fracs = 'volufrac' !nerd option default volume fractions, but as option also 'massfrac' can be used internally (input/output still is volume frac!)
split_rho_cont='CDS' ! optional 'VL2' or 'SB2' TVD scheme (via CDS2 without 1-cfl term) to split off rho from rho*U, default 'CDS' scheme
driftfluxforce_calfac=1.
depo_implicit=0
depo_cbed_option=0 !2-3-2020 obsolete; user input not read anymore from num_scheme always option 0 is used in code
IBMorder=0
Poutflow=0 ! 0 (default, most robust) Poutflow is zero for complete outflow crosssection at rmax; 1 (optional) Poutflow is zero at just one grid-location at rmax --> sometimes better but less robust
k_pzero=1 ! default 1, defines vertical level where p=0 when Poutflow=1 is used
Uoutflow=0 !0 (default) Neumann outflow dUdn=0 (for U,V,W); 2 means Convective outflow condition dUdt+U_normal*dUdn=0 (for U,V,W)
applyVOF=0
k_ust_tau=1
k_ust_tau_flow=1
k_ust_tau_sed_range(1:2) = -1
dUVdn_IBMbed=-1 !default no correction, but with 0 then dUdn and dVdn is made zero over immersed bed and with -2 to apply UV(1:kbed)=0 also for IBM2
initPhydrostatic = 0 !default 0 no initial hydrostatic pressure; 1 = initialize hydrostatic pressure before first timestep
momentum_exchange_obstacles = 1 !default there is momentum exchange between flow and obstacles, optional 0 makes momenum terms zero in case the advective velocity is inside or at edge obstacle
nsmooth_bed=2000000000 !default no smoothing bed, if defined every nsmooth_bed a 2nd order Shapiro low-pass filter is applied to 2D bed-level to redistribute sediment inside the bed in a mass-conserving manner to get rid of bed-wiggles
fft_routines = 1 ! 1 (default) = good-old vfft.f Crayfishpack, 2 = Netlib vfftpack Clarke https://www.netlib.org/vfftpack/f90.tgz
!! ambient:
U_b = -999.
V_b = -999.
W_b = -999.
U_init = -999.
V_init = -999.
bcfile = ''
U_b_tseriesfile=''
V_b_tseriesfile=''
W_b_tseriesfile=''
U_b_tseries=-99999.
U_b_series=-99999.
V_b_tseries=-99999.
V_b_series=-99999.
W_b_tseries=-99999.
W_b_series=-99999.
rho_b = -999.
rho_b2 = -999.
SEM = -999
U_bSEM = -999.
V_bSEM = -999.
nmax2 = -999
nmax1 = -999
nmax3 = -999
lm_min = -999.
lm_min3 = -999.
slip_bot = -999
taulayerTBLE = 1
kn = -999.
kn_flow_file=''
kn_flow_d50_multiplier = -2.
interaction_bed=-999
periodicx=0
periodicy=0
monopile=-1
kn_mp = -999.
kn_sidewalls = -999.
dpdx=0.
dpdy=0.
dpdx1=0.
dpdy1=0.
dpdx3=0.
dpdy3=0.
cbc_perx_j(1:2)=0
cbc_relax = 1.
TBLE_grad_relax = 1.
dpdx_ref_j(1:2)=0
Uavold=0.
Vavold=0.
U3avold=0.
V3avold=0.
W_ox=0.
Hs=0.
Tp=999.
nx_w=0.
ny_w=0.
U_w=-9999.
V_w=-9999.
bedlevelfile = ''
bedupdatefile = ''
initconditionsfile = ''
cfixedbed=0.6
c_bed(:)=-1.
DO i=1,4
obst(:)%x(i) = -99999.
obst(:)%y(i) = -99999.
ENDDO
obst(:)%height = -99999.
obst(:)%zbottom = -99999.
obst(:)%ero = 0. !default no erosion on top of obstacle with interaction_bed=4
obst(:)%depo = 0. !default no deposition on top of obstacle with interaction_bed=4
bc_obst_h = 0.
U_b3=-9999.
V_b3=-9999.
surf_layer=0.
wallup=0
obstfile = ''
obstfile_erodepo = 1
nobst_files = 0
i_periodicx=0
istart_morf1=0
istart_morf2=0
nWM = 50 !number of layers in TBL and VD tau-wall-models for flow and sediment pickup. Growth factor is 1.1.
! 50 layers with growthfac 1.1 gives first staggered WM cell at 1/1000 dzU_CFD (distance velocity point CFD grid)
! 50 layers Matlab tests found 1-10% difference in hydr rough tau for 0.5-2 m/s @ dzU_CFD=0.5m; 0.5-5% @ dzU_CFD=0.25m; 1-2% @ dzU_CFD=0.05m and no difference for 0.1-2 m/s @ dzU_CFD=0.025m or smaller
! 100 layers with growthfac 1.1 gives first staggered WM cell at 1/100000 dzU_CFD --> no difference in hydr rough tau for Matlab tests 0.1-2 m/s @ dzU_CFD = 0.5m or smaller
!! plume
W_j = -999.
plumetseriesfile=''
plumetseries=-99999.
plumeQtseries=-99999.
plumectseries=-99999.
Q_j = -999.
plumeQtseriesfile=''
plumectseriesfile=''
Awjet = -999.
Aujet = -999.
Avjet = -999.
Strouhal = -999.
azi_n = -999
kjet = -999
radius_j = -999.
W_j_powerlaw = 7. ! default 1/7 powerlaw, if 1.e12 block velocity profile
radius_inner_j = 0. ! default no inner radius where jet inflow is zero
xj(1) = -1.e12 ! bounding box for jet --> and inside radius_j and inside bounding box --> default whole area
xj(2) = 1.e12
xj(3) = 1.e12
xj(4) = -1.e12
yj(1) = -1.e12
yj(2) = -1.e12
yj(3) = 1.e12
yj(4) = 1.e12
Sc = -999.
slipvel = -999
hindered_settling = 1 !! hindered_settling = 1 !Hindered settling formula [-] 1=Rowe (1987) (smooth Ri-Za org) (default); 2=Garside (1977); 3=Di Felice (1999)
hindered_settling_c = 0
outflow_overflow_down = 0
U_j2 = -999.
plumetseriesfile2=''
plumetseries2=-99999.
Awjet2 = -999.
Aujet2 = -999.
Avjet2 = -999.
Strouhal2 = -999.
azi_n2 = -999
zjet2 = -999.
radius_j2 = -999.
DO i=1,4
bedplume(:)%x(i) = -99999.
bedplume(:)%y(i) = -99999.
bedplume(:)%x2(i) = -99999.
bedplume(:)%y2(i) = -99999.
ENDDO
bedplume(:)%height = -99999.
bedplume(:)%u = -99999.
bedplume(:)%v = -99999.
bedplume(:)%w = -99999.
bedplume(:)%forever = 0
bedplume(:)%t0 = 0.
bedplume(:)%t_end = 9.e18
bedplume(:)%Q = 0.
bedplume(:)%volncells = 0.
bedplume(:)%zbottom = -99999.
bedplume(:)%changesedsuction = 1.
bedplume(:)%h_tseriesfile=''
bedplume(:)%h_seriesloc=1
bedplume(:)%zb_tseriesfile=''
bedplume(:)%zb_seriesloc=1
bedplume(:)%Q_tseriesfile=''
bedplume(:)%Q_seriesloc=1
bedplume(:)%S_tseriesfile=''
bedplume(:)%S_seriesloc=1
bedplume(:)%c_tseriesfile=''
bedplume(:)%c_seriesloc=1
bedplume(:)%velocity_force=1
bedplume(:)%u_tseriesfile=''
bedplume(:)%v_tseriesfile=''
bedplume(:)%w_tseriesfile=''
bedplume(:)%u_seriesloc=1
bedplume(:)%v_seriesloc=1
bedplume(:)%w_seriesloc=1
bedplume(:)%dt_history=0.
bedplume(:)%move_dz_height_factor=1.
bedplume(:)%move_dz_zbottom_factor=1.
bedplume(:)%move_u=0.
bedplume(:)%move_v=0.
bedplume(:)%move_w=0.
bedplume(:)%radius=-9.
bedplume(:)%radius2=-9.
bedplume(:)%fluidize = 0
bedplume(:)%kn_flow = -9.
bedplume(:)%kn_flow_wall_normaldir = 0
DO i=1,30
bedplume(:)%c(i) = 0.
bedplume(:)%sedflux(i) = 0.
ENDDO
DO i=1,100000
bedplume(:)%move_dx_series(i)=-99999999.
bedplume(:)%move_dy_series(i)=-99999999.
bedplume(:)%move_dz_series(i)=-99999999.
bedplume(:)%move_zbed_criterium(i)=999999999.
bedplume(:)%move_zbed_type(i)=-9
bedplume(:)%move_outputfile_series(i)=-1
bedplume(:)%move_nx_series(i)=-99999999.
bedplume(:)%move_ny_series(i)=-99999999.
bedplume(:)%move_dx2_series(i)=-99999999.
bedplume(:)%move_dy2_series(i)=-99999999.
ENDDO
plume_z_outflow_belowsurf=-999.
!! Fractions_in_plume
fract(:)%ws=-999.
fract(:)%rho=-999.
fract(:)%c=-999.
fract(:)%dpart=-999.
fract(:)%dfloc=-999.
fract(:)%tau_e=-999.
fract(:)%tau_d=-999.
fract(:)%M=-999.
fract(:)%kn_sed=-999.
fract(:)%ws_dep=-999.
fract(:)%zair_ref_belowsurf=-999.
fract(:)%type=1
fract(:)%CD=0.
fract(:)%cmax=100.
fract(:)%ero=1. !default erosion of specific fraction is possible
nfrac=0
nfr_silt=0
nfr_sand=0
nfr_air=0
!! LESmodel
sgs_model = 'ARGHH'
Cs = -999.
Cs_relax = 0.01
Lmix_type = -999
nr_HPfilter = 0
damping_drho_dz = 'none'
damping_a1 = -999.
damping_b1 = -999.
damping_a2 = -999.
damping_b2 = -999.
extra_mix_visc='none'
nu_minimum_wall = 0
! four constants default given value for default Realizible K-Epsilon turbulence model:
Const1eps = 1.44
Const2 = 1.9
Sc_k = 1.0
Sc_eps = 1.2
Cal_buoyancy_k = 1.
Cal_buoyancy_eps = 1.
!!constants
kappa=-999.
gx = -999.
gy = -999.
gz = -999.
settling_along_gvector = 0
ekm_mol = -999.
ekm_sediment_pickup=-999.
time_nm = 0.
time_n=0.
time_np=0.
calibfac_sand_pickup = 1.
calibfac_sand_bedload = 1.
calibfac_Shields_cr = 1.
calibfac_Shields_cr_bl = -1. !(when not defined calibfac_Shields_cr is also used as calibfac_Shields_cr_bl)
pickup_formula = 'vanrijn1984' !default
bedload_formula ='nonenon0000' !default no bedload taken into account
correction_sl_with_bl = 0
kn_d50_multiplier = 2. !default, kn=2*d50 defined in paper Van Rijn 1984
kn_d50_multiplier_bl = 2. !default, kn=d90~2*d50
avalanche_slope = -99.
avalanche_slope(1)=0. !default vertical slopes are allowed
av_slope_z= -1.
avfile = ''
reduction_sedimentation_shields = 0. ! default no reduction in sedimentation by shear stresss (shields) ! PhD thesis vRhee p146 eq 7.74
morfac = 1.
morfac2 = 1.
avalanche_until_done=0
pickup_correction='nonenonenonenonenone'
vwal=-999.
wbed_correction = 0
nl=-999.
fcor =1.
permeability_kl=-999.
pickup_fluctuations_ampl=0.
pickup_fluctuations=0
cbed_method = 1
k_layer_pickup = 1
wallmodel_tau_sed = 1
TBLEsl_grad_relax = 1.
TBLEbl_grad_relax = 1.
TBLEsed_grad_relax = -1.
ndtbed = 10
nrmsbed = 100
z_tau_sed = -999.
dz_sidewall = -999.
pickup_bedslope_geo=0
bl_relax=0.01
sl_relax=1.
bedslope_effect=0
bedslope_mu_s=0.63
alfabs_bl=1.0
alfabn_bl=1.5
phi_sediment=30.
erosion_cbed_start = 1 !
movebed_absorb_cfluid = 1 !default 1 absorb cfluid in bed when bed moves and new bed is higher than previous timestep (like in avalanche and regular bed-update), 0 = add cfluid buried in new bed to first fluid cell above new bed
power_VR2019 = 1.
pickup_formula_swe = 'vanrijn1984' !default
vel_start_after_ero = 0
dpbed_zone = 1.e12
!! ship
U_TSHD=-999.
LOA=-999.
Lfront=-999.
Breadth=-999.
Draught=-999.
Lback=-999.
Hback=-999.
xfront=-999.
yfront=-999.
kn_TSHD=-999.
nprop=0
Dprop=-999.
xprop=-999.
yprop=-999.
zprop=-999.
Pprop=-999.
rot_prop=-9999.
rudder=-9
draghead='none'
Dsp=0.
xdh=0.
perc_dh_suction=0.
softnose=0
Hfront=-999.
cutter='not'
!! rheology
Non_Newtonian = 0 !Default is 0, Newtonian treatment
Rheological_model ='AAARGH'
PAPANASTASIOUS_m=9.e18 !if not defined than inf --> model reduces to standard Bingham
Apvisc_interp = 1 ! 1 (default) is linear interpolation neighbouring cells for apparent viscosity; 2 is maximum of neighbouring cells
shear0limit = 0. !1/s if not defined then zero and no influence
rheo_shear_method = 1
Apvisc_shear_relax=1. !default no relaxation
Apvisc_force_eq = 0 !default no additional direct force terms from rheology
SIMPLE_tauy=0.2
SIMPLE_muB=0.1
SIMPLE_climit(:) = 0.
JACOBS_Ky=6.72e4
JACOBS_Kmu=251
JACOBS_Aclay=1.0
JACOBS_By=-4.75
JACOBS_Bmu=-2.64
JACOBS_muw=0.001
WINTER_Ay=7.3e5
WINTER_Amu=932
WINTER_nf=2.64
WINTER_af=3.65
WINTER_muw=0.001
THOMAS_Cy=7.45e5
THOMAS_Cmu=1e-3
THOMAS_ky=1.5
THOMAS_kmu=1.25
THOMAS_Py=5.61
THOMAS_Pmu=-3.03
THOMAS_phi_sand_max=0.6 !Maximal solids fraction of sand
Lambda_init=0.
Kin_eq_a=1.
Kin_eq_b=0.02
Kin_eq_lambda_0=1.
HOUSKA_n=1.
HOUSKA_eta_0=0.3
HOUSKA_eta_inf= 20.
HOUSKA_tauy_0=400.
HOUSKA_tauy_inf=20.
BAGNOLD_beta=0.275
BAGNOLD_phi_max=0.6 !Usually 0.6
CALL GETARG(1,inpfile)
OPEN(1,FILE=inpfile,IOSTAT=ios,ACTION='read')
IF (ios/=0) THEN
write(*,*) 'input file:',inpfile
CALL writeerror(200)
ENDIF
inpfile=inpfile(9:LEN_TRIM(inpfile))
READ (UNIT=1,NML=simulation,IOSTAT=ios)
!! checks on input simulation:
IF (px<0) CALL writeerror(1)
IF (imax<0) CALL writeerror(2)
IF (jmax<0) CALL writeerror(3)
IF (kmax<0) CALL writeerror(4)
IF (imax_grid(1).eq.0) CALL writeerror(5)
IF (dr_grid(1).eq.0.) CALL writeerror(6)
IF (Rmin<0.) CALL writeerror(7)
IF (schuif_x<0.) CALL writeerror(8)
IF (dy<0.and.dy_grid(1).eq.0.) CALL writeerror(9)
IF (depth<0.) CALL writeerror(10)
IF (mod(jmax,px).ne.0) CALL writeerror(11)
IF (mod(kmax,px).ne.0) CALL writeerror(12)
IF (sym_grid_y.ne.0.and.sym_grid_y.ne.1.and.sym_grid_y.ne.-1) CALL writeerror(13)
jmax=jmax/px
READ (UNIT=1,NML=times,IOSTAT=ios)
!! check input times
IF (t_end<0.) CALL writeerror(30)
IF (t0_output<0.) CALL writeerror(31)
IF (dt_output<0.) CALL writeerror(31)
IF (te_output<0.) CALL writeerror(31)
IF (tstart_rms<0.) CALL writeerror(32)
IF (te_rms<tstart_rms) CALL writeerror(36)
IF (dt_max<0.) CALL writeerror(33)
IF (dt_ini<0.) THEN
dt_ini = dt_max
ELSE
dt_ini = MIN(dt_max,dt_ini)
ENDIF
IF (time_int.ne.'EE1'.AND.time_int.ne.'RK3'.AND.time_int.ne.'AB2'.AND.time_int.ne.'AB3'.AND.time_int.ne.'ABv')
& CALL writeerror(34)
IF (time_int.eq.'AB2'.or.time_int.eq.'AB3') THEN
write(*,*),' WARNING: Your time integration scheme: ',time_int
write(*,*),' is a testing option and not all functionalities of Dflow3d are working,'
write(*,*),' use ABv for a fully supported time integration scheme.'
ENDIF
IF (CFL<0.) CALL writeerror(35)
IF (n_dtavg>0) THEN
ALLOCATE(dt_series(n_dtavg))
ENDIF
IF (tmorf_tseriesfile.eq.'') THEN
ELSE
call readtseries(tmorf_tseriesfile,tmorf_tseries,tmorf_series)
tmorf_seriesloc=1
n3=0
DO WHILE (tmorf_tseries(n3+1).NE.-99999.)
n3=n3+1
END DO
IF (tmorf_tseries(n3).lt.t_end) THEN
write(*,*),' time series shorter than t_end'
write(*,*),' series file:',tmorf_tseriesfile
CALL writeerror(039)
ENDIF
ENDIF
IF (tmorf2_tseriesfile.eq.'') THEN
ELSE
call readtseries(tmorf2_tseriesfile,tmorf2_tseries,tmorf2_series)
tmorf2_seriesloc=1
n3=0
DO WHILE (tmorf2_tseries(n3+1).NE.-99999.)
n3=n3+1
END DO
IF (tmorf2_tseries(n3).lt.t_end) THEN
write(*,*),' time series shorter than t_end'
write(*,*),' series file:',tmorf2_tseriesfile
CALL writeerror(039)
ENDIF
ENDIF
READ (UNIT=1,NML=num_scheme,IOSTAT=ios)
!! check input num_scheme
IF (convection.ne.'CDS2'.AND.convection.ne.'CDS6'.AND.convection.ne.'COM4'.AND.convection.ne.'CDS4'
& .AND.convection.ne.'HYB6'.AND.convection.ne.'HYB4'.AND.convection.ne.'C4A6'.AND.convection.ne.'uTVD'
& .AND.convection.ne.'C2Bl'.AND.convection.ne.'C4Bl') CALL writeerror(401)
IF (numdiff<0.or.numdiff>1.) CALL writeerror(402)
IF ((wiggle_detector.ne.0.and.wiggle_detector.ne.1.and.wiggle_detector.ne.2).and.wiggle_detector<20) CALL writeerror(408)
wd = wiggle_detector
IF (diffusion.ne.'CDS2'.AND.diffusion.ne.'COM4') CALL writeerror(403)
IF (comp_filter_a<0.or.comp_filter_a>0.5) CALL writeerror(404)
IF (comp_filter_n<0) CALL writeerror(405)
if (numdiff>0.and.numdiff2<numdiff) then
numdiff2=numdiff2/numdiff !used as minimum for wf
else
numdiff2=0.
endif
if (convection.eq.'C2Bl'.or.convection.eq.'C4Bl') then
numdiff = numdiff !no hidden factor
else
numdiff=numdiff*2. !needed to get correct value (in advec is a 'hidden' factor 2/4)
endif
IF (CNdiffz.ne.0.and.CNdiffz.ne.1.and.CNdiffz.ne.2.and.CNdiffz.ne.11.and.CNdiffz.ne.12.and.CNdiffz.ne.31) CALL writeerror(406)
IF (npresIBM<0) CALL writeerror(407)
pres_in_predictor_step_internal = pres_in_predictor_step
IF (pres_in_predictor_step_internal.eq.3.or.pres_in_predictor_step_internal.eq.4.or.pres_in_predictor_step_internal.eq.5
& .or.pres_in_predictor_step_internal.eq.6.or.pres_in_predictor_step_internal.eq.7) THEN !make Pold in bed zero every timestep; use pres_in_predictor_step=1 in the rest of the code
pres_in_predictor_step = 1
ENDIF
IF (k_ust_tau<1.or.k_ust_tau>kmax) CALL writeerror(409)
IF (k_ust_tau_flow<1.or.k_ust_tau_flow>kmax) CALL writeerror(409)
IF (k_pzero<1.or.k_pzero>kmax) CALL writeerror(410)
IF (CNdiff_dtfactor.lt.0.9999) CALL writeerror(411)
IF (k_ust_tau_sed_range(1).ne.-1.or.k_ust_tau_sed_range(2).ne.-1) THEN
IF (k_ust_tau_sed_range(1)>kmax.or.k_ust_tau_sed_range(1)>k_ust_tau_sed_range(2).or.k_ust_tau_sed_range(2)>kmax) THEN
call writeerror(412)
ELSEIF (k_ust_tau_sed_range(1)<1.or.k_ust_tau_sed_range(2)<1) THEN
call writeerror(412)
ENDIF
ENDIF
READ (UNIT=1,NML=ambient,IOSTAT=ios)
!! check input ambient
IF (U_b<-998.) CALL writeerror(40)
IF(U_b<0.) THEN
signU_b=-1.
ELSE
signU_b=1.
ENDIF
IF (V_b<-998.) CALL writeerror(41)
IF(V_b<0.) THEN
signV_b=-1.
ELSE
signV_b=1.
ENDIF
IF (W_b<0.) CALL writeerror(42)
IF (rho_b<0.) CALL writeerror(43)
IF (rho_b2<0.) rho_b2=rho_b
IF (SEM<0) CALL writeerror(44)
IF (nmax2<0) CALL writeerror(45)
IF (nmax1<0) CALL writeerror(46)
IF (nmax3<0) CALL writeerror(620)
IF (lm_min<0.) CALL writeerror(47)
IF (lm_min3<0) CALL writeerror(621)
IF (slip_bot<-2) CALL writeerror(48)
IF (taulayerTBLE.ne.50.and.taulayerTBLE.ne.1) CALL writeerror(624)
IF (kn<0.) CALL writeerror(49)
IF (interaction_bed<0) CALL writeerror(50)
IF (periodicx.ne.0.and.periodicx.ne.1.and.periodicx.ne.2) CALL writeerror(52)
IF (periodicy.ne.0.and.periodicy.ne.1.and.periodicy.ne.2) CALL writeerror(53)
IF (cbc_perx_j(1).ne.0.and.cbc_perx_j(2).ne.0) THEN
IF(cbc_perx_j(2).lt.cbc_perx_j(1).or.cbc_perx_j(1).lt.1.or.cbc_perx_j(2).gt.jmax) CALL writeerror(622)
ENDIF
IF (cbc_relax.gt.1.or.cbc_relax.lt.0) CALL writeerror(623)
IF (TBLE_grad_relax.gt.1.or.TBLE_grad_relax.lt.0) CALL writeerror(623)
IF (dpdx_ref_j(1).ne.0.and.dpdx_ref_j(2).ne.0) THEN
IF(dpdx_ref_j(2).lt.dpdx_ref_j(1).or.dpdx_ref_j(1).lt.1.or.dpdx_ref_j(2).gt.jmax) CALL writeerror(627)
ENDIF
!IF (periodicx.eq.1.and.dpdx.eq.0.) CALL writeerror(54)
IF (Hs>0.and.Hs>depth) CALL writeerror(55)
IF (Hs>0.and.Tp.le.0) CALL writeerror(56)
IF (Hs>0.and.(nx_w>1.or.ny_w>1.or.nx_w<-1.or.ny_w<-1.or.(nx_w**2+ny_w**2)>1.01.or.(nx_w**2+ny_w**2)<0.99)) THEN
CALL writeerror(57)
ENDIF
IF (Hs>0.and.U_w<-998.) CALL writeerror(611)
IF (Hs>0.and.V_w<-998.) CALL writeerror(612)
IF (surf_layer>0.and.U_b3<-999.) CALL writeerror(602)
IF (surf_layer>0.and.V_b3<-999.) CALL writeerror(603)
IF (surf_layer<0.or.surf_layer>depth) CALL writeerror(604)
IF (U_bSEM<-998.) U_bSEM=U_b ! only if defined then different U_bSEM is used else equal to U_b
IF (V_bSEM<-998.) V_bSEM=V_b
IF (U_init<-998.) U_init=U_b ! only if defined then different U_init is used else equal to U_b
IF (V_init<-998.) V_init=V_b
IF (kn_mp<0.and.monopile.eq.1) CALL writeerror(610)
nobst=0
DO WHILE (obst(nobst+1)%height.NE.-99999.)
nobst=nobst+1
END DO
ALLOCATE(ob(nobst))
DO n=1,nobst
ob(n)%x=obst(n)%x
ob(n)%y=obst(n)%y
ob(n)%height=obst(n)%height
ob(n)%zbottom=obst(n)%zbottom
ob(n)%ero=obst(n)%ero
ob(n)%depo=obst(n)%depo
IF (ob(n)%ero.lt.0.or.ob(n)%depo.lt.0.or.ob(n)%ero.gt.1.or.ob(n)%depo.gt.1.) THEN
write(*,*),' Obstacle:',n
CALL writeerror(1051)
ENDIF
DO i=1,4
IF (ob(n)%x(i).eq.-99999.or.ob(n)%y(i).eq.-99999) THEN
write(*,*),' Obstacle:',n
CALL writeerror(58)
ENDIF
ENDDO
IF (ob(n)%height<0.) THEN
write(*,*),' Obstacle:',n
CALL writeerror(59)
ENDIF
ENDDO
IF (bc_obst_h<0.or.bc_obst_h>depth) CALL writeerror(601)
IF (wallup.ne.0.and.wallup.ne.1.and.wallup.ne.2) CALL writeerror(605)
IF (cfixedbed<0.or.cfixedbed>1.) CALL writeerror(607)
IF (i_periodicx<0.or.istart_morf2(1)<0.or.i_periodicx>imax.or.istart_morf2(1)>imax) CALL writeerror(613)
IF (i_periodicx<0.or.istart_morf2(2)<0.or.i_periodicx>imax.or.istart_morf2(2)>imax) CALL writeerror(613)
IF (istart_morf1(1)<0.or.istart_morf1(1)>imax.or.istart_morf2(1)<istart_morf1(1)) CALL writeerror(613)
IF (istart_morf1(2)<0.or.istart_morf1(2)>imax.or.istart_morf2(2)>istart_morf1(2)) CALL writeerror(613)
IF (obstfile_erodepo.ne.1.and.obstfile_erodepo.ne.2) CALL writeerror(625)
DEALLOCATE(obst)
READ (UNIT=1,NML=plume,IOSTAT=ios)
!! check input plume
IF (W_j.eq.-999.) CALL writeerror(60)
IF (Awjet<0.) CALL writeerror(61)
IF (Aujet<0.) CALL writeerror(62)
IF (Avjet<0.) CALL writeerror(63)
IF (Strouhal<0.) CALL writeerror(69)
IF (azi_n<0) CALL writeerror(70)
IF (kjet<0) CALL writeerror(64)
IF (radius_j<0.) CALL writeerror(66)
IF (Sc<0.) CALL writeerror(67)
IF (slipvel.ne.0.and.slipvel.ne.1.and.slipvel.ne.2) CALL writeerror(68)
IF (hindered_settling.ne.1.and.hindered_settling.ne.2.and.hindered_settling.ne.3) CALL writeerror(280)
IF (hindered_settling_c.ne.0.and.hindered_settling_c.ne.1) CALL writeerror(282)
IF (U_j2.eq.999.and.radius_j2>0.) CALL writeerror(260)
IF (U_j2>-999.and.Awjet2<0.) CALL writeerror(261)
IF (U_j2>-999.and.Aujet2<0.) CALL writeerror(262)
IF (U_j2>-999.and.Avjet2<0.) CALL writeerror(263)
IF (U_j2>-999.and.Strouhal2<0.) CALL writeerror(264)
IF (U_j2>-999.and.azi_n2<0) CALL writeerror(265)
IF (U_j2>-999.and.radius_j2<0.) CALL writeerror(266)
IF (U_j2>-999.and.zjet2<0.) CALL writeerror(267)
IF (U_j2>-999.and.zjet2>depth) CALL writeerror(268)