diff --git a/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip b/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip index 60fe434ad3dc15cf5e1dd1977c630107c611ac55..3c02a1d7a11acaeff10fdae72416c4856fcbc4bc 100644 Binary files a/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip and b/wetb/prepost/tests/data/demo_dlc/ref/demo_dlc_remote.zip differ diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx b/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx index 1f4c2311367ccea9d06f57db32793e8948f0e959..246cbf5e6e5c94b732349be0a6a09336fb1f715f 100755 Binary files a/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx and b/wetb/prepost/tests/data/demo_dlc/ref/htc/DLCs/dlc01_demos.xlsx differ diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc index 6e956f80d62257709ddd129408b8d77305da4339..bc61a68f9b4130bdf42526dec5101aeacbfeadcd 100755 --- a/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc +++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/_master/demo_dlc_master_A0001.htc @@ -382,7 +382,7 @@ begin wind ; filename_u ./[turb_dir][Turb base name]u.bin ; filename_v ./[turb_dir][Turb base name]v.bin ; filename_w ./[turb_dir][Turb base name]w.bin ; - box_dim_u 8192 [turb_dx] ; + box_dim_u 512 [turb_dx] ; box_dim_v 32 7.5; box_dim_w 32 7.5; std_scaling 1.0 0.7 0.5 ; diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_s100.htc similarity index 98% rename from wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc rename to wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_s100.htc index c54c20d0df50daf94a80962feaefcd924123559f..83b325ad95ebc9df30b2f10f26d1365d6aa05b65 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc +++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp10_s100.htc @@ -4,7 +4,7 @@ begin simulation; solvertype 1 ; (newmark) on_no_convergence continue ; ; convergence_limits 1E3 1.0 1E-7 ; - logfile ./logfiles/dlc01_demos/dlc01_steady_wsp10_noturb.log ; + logfile ./logfiles/dlc01_demos/dlc01_steady_wsp10_s100.log ; begin newmark; deltat 0.02; end newmark; @@ -13,11 +13,11 @@ end simulation; ;---------------------------------------------------------------------------------------------------------------------------------------------------------------- begin new_htc_structure; ;-------------------------------------------------------------------------------------------------- -; beam_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_beam.dat; -; body_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_body.dat; -; struct_inertia_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_struct.dat; -; body_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_body_eigen.dat; -; structure_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_noturb/dlc01_steady_wsp10_noturb_strc_eigen.dat; +; beam_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_s100/dlc01_steady_wsp10_s100_beam.dat; +; body_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_s100/dlc01_steady_wsp10_s100_body.dat; +; struct_inertia_output_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_s100/dlc01_steady_wsp10_s100_struct.dat; +; body_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_s100/dlc01_steady_wsp10_s100_body_eigen.dat; +; structure_eigenanalysis_file_name ./res_eigen/dlc01_demos/dlc01_steady_wsp10_s100/dlc01_steady_wsp10_s100_strc_eigen.dat; ;--------------------------------------------------------------------------------------------------- begin main_body; tower 123.6m name tower ; @@ -346,7 +346,7 @@ begin wind ; windfield_rotations 0 8.0 0.0 ; yaw, tilt (positive=upflow=wind coming from below), rotation center_pos0 0.0 0.0 -127 ; hub heigth shear_format 3 0 ; - turb_format 0 ; 0=none, 1=mann,2=flex + turb_format 1 ; 0=none, 1=mann,2=flex tower_shadow_method 3 ; 0=none, 1=potential flow, 2=jet scale_time_start 20 ; wind_ramp_factor 0.0 20 0.8 1.0 ; @@ -378,11 +378,11 @@ begin wind ; ; wind_ramp_abs 2400.0 4200.0 0.0 -21.0 ; wsp. after the step: 25.0 ; begin mann ; - create_turb_parameters 29.4 1.0 3.9 0 1.0 ; L, alfaeps, gamma, seed, highfrq compensation - filename_u ./turb/noneu.bin ; - filename_v ./turb/nonev.bin ; - filename_w ./turb/nonew.bin ; - box_dim_u 8192 0.048828125 ; + create_turb_parameters 29.4 1.0 3.9 100 1.0 ; L, alfaeps, gamma, seed, highfrq compensation + filename_u ./turb/turb_s100_10msu.bin ; + filename_v ./turb/turb_s100_10msv.bin ; + filename_w ./turb/turb_s100_10msw.bin ; + box_dim_u 512 0.78125 ; box_dim_v 32 7.5; box_dim_w 32 7.5; std_scaling 1.0 0.7 0.5 ; @@ -645,7 +645,7 @@ end dll; ;---------------------------------------------------------------------------------------------------------------------------------------------------------------- ; begin output; - filename ./res/dlc01_demos/dlc01_steady_wsp10_noturb ; + filename ./res/dlc01_demos/dlc01_steady_wsp10_s100 ; time 20 40 ; data_format hawc_binary; buffer 1 ; diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc index 94abe5e13faf4dbd2ffcf86f0bb95df884a573a8..670f943f7bf345a12acbf4095f98e2d51b41144a 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc +++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc @@ -382,7 +382,7 @@ begin wind ; filename_u ./turb/noneu.bin ; filename_v ./turb/nonev.bin ; filename_w ./turb/nonew.bin ; - box_dim_u 8192 0.0390625 ; + box_dim_u 512 0.0390625 ; box_dim_v 32 7.5; box_dim_w 32 7.5; std_scaling 1.0 0.7 0.5 ; diff --git a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc index 537e8ef73085b26598c46f2986c11fc8ad738464..11e58632838311500ae0549609c245cf0620ead0 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc +++ b/wetb/prepost/tests/data/demo_dlc/ref/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc @@ -382,7 +382,7 @@ begin wind ; filename_u ./turb/noneu.bin ; filename_v ./turb/nonev.bin ; filename_w ./turb/nonew.bin ; - box_dim_u 8192 0.0439453125 ; + box_dim_u 512 0.0439453125 ; box_dim_v 32 7.5; box_dim_w 32 7.5; std_scaling 1.0 0.7 0.5 ; diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p similarity index 80% rename from wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_noturb.p rename to wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p index 1bc115f781b7821f729e97bddcf49683bb623c20..6a62ecceb1be436ba34a622fdb95db9f66890924 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_noturb.p +++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p @@ -1,8 +1,8 @@ ### Standard Output -#PBS -N dlc01_steady_wsp10_noturb -#PBS -o ./pbs_out/dlc01_demos/dlc01_steady_wsp10_noturb.out +#PBS -N dlc01_steady_wsp10_s100 +#PBS -o ./pbs_out/dlc01_demos/dlc01_steady_wsp10_s100.out ### Standard Error -#PBS -e ./pbs_out/dlc01_demos/dlc01_steady_wsp10_noturb.err +#PBS -e ./pbs_out/dlc01_demos/dlc01_steady_wsp10_s100.err #PBS -W umask=003 ### Maximum wallclock time format HOURS:MINUTES:SECONDS #PBS -l walltime=04:00:00 @@ -25,9 +25,9 @@ mkdir -p htc/dlc01_demos/ mkdir -p res/dlc01_demos/ mkdir -p logfiles/dlc01_demos/ mkdir -p turb/ -cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc ./htc/dlc01_demos/ -cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ -time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp10_noturb.htc & +cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp10_s100.htc ./htc/dlc01_demos/ +cp -R $PBS_O_WORKDIR/../turb/turb_s100_10ms*.bin turb/ +time WINEARCH=win32 WINEPREFIX=~/.wine32 wine hawc2-latest ./htc/dlc01_demos/dlc01_steady_wsp10_s100.htc & ### wait for jobs to finish wait echo "" diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/turb/turb_s100_10ms.pbs b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/turb/turb_s100_10ms.pbs new file mode 100644 index 0000000000000000000000000000000000000000..df16aba35748c37417076913bbd9b514fce34301 --- /dev/null +++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/turb/turb_s100_10ms.pbs @@ -0,0 +1,49 @@ + +### Standard Output +#PBS -N no_name_job +#PBS -o ./pbs_out/turb/turb_s100_10ms.out +### Standard Error +#PBS -e ./pbs_out/turb/turb_s100_10ms.err +#PBS -W umask=003 +### Maximum wallclock time format HOURS:MINUTES:SECONDS +#PBS -l walltime=00:59:59 +#PBS -lnodes=1:ppn=1 +### Queue name +#PBS -q workq + +### #PBS -a [start_time] +### #PBS -W depend=afterany:[job_id] + +### Browse to current working dir +echo "" +cd $PBS_O_WORKDIR +echo "current working dir:" +pwd +echo "" + +### =========================================================================== +echo "------------------------------------------------------------------------" +echo "PRELUDE" +echo "------------------------------------------------------------------------" + +cd ../turb/ + +echo "" +echo "------------------------------------------------------------------------" +echo "EXECUTION" +echo "------------------------------------------------------------------------" + +time wine mann_turb_x64.exe turb_s100_10ms 1.000000 29.400000 3.000000 100 8192 32 32 0.7812 6.5000 6.5000 1 +### wait for jobs to finish +wait + +echo "" +echo "------------------------------------------------------------------------" +echo "CODA" +echo "------------------------------------------------------------------------" + + + +echo "" +### =========================================================================== +exit diff --git a/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt index 21c9f3dd8e9452763faab41e0e8920e87c22a63d..c191125c1237fc1732a98ab1327ff1ae1734004a 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt +++ b/wetb/prepost/tests/data/demo_dlc/ref/prepost/remote_tags.txt @@ -125,7 +125,7 @@ opt_tags set ------------------------------------------------------------------------------- [Case folder] : dlc01_demos - [Case id.] : dlc01_steady_wsp10_noturb + [Case id.] : dlc01_steady_wsp10_s100 [Cut-in time] : -1 [Cut-out time] : -1 [DLC] : 01 @@ -146,9 +146,9 @@ [TI] : 0.2096 [Time pitch runaway] : 5000 [Time stuck DLC22b] : -1 - [Turb base name] : none + [Turb base name] : turb_s100_10ms [Windspeed] : 10 - [case_id] : dlc01_steady_wsp10_noturb + [case_id] : dlc01_steady_wsp10_s100 [data_dir] : data/ [dis_setbeta] : True [duration] : 20.0 @@ -168,10 +168,10 @@ [t0] : 20 [time stop] : 40 [time_stop] : 40 - [tu_model] : 0 - [tu_seed] : 0 - [turb_base_name] : none - [turb_dx] : 0.048828125 + [tu_model] : 1 + [tu_seed] : 100 + [turb_base_name] : turb_s100_10ms + [turb_dx] : 0.78125 [wdir] : 0 [windramp] : False [wsp factor] : 0.8 diff --git a/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip b/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip index 60fe434ad3dc15cf5e1dd1977c630107c611ac55..3c02a1d7a11acaeff10fdae72416c4856fcbc4bc 100644 Binary files a/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip and b/wetb/prepost/tests/data/demo_dlc/source/demo_dlc_remote.zip differ diff --git a/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx b/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx index 1f4c2311367ccea9d06f57db32793e8948f0e959..246cbf5e6e5c94b732349be0a6a09336fb1f715f 100755 Binary files a/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx and b/wetb/prepost/tests/data/demo_dlc/source/htc/DLCs/dlc01_demos.xlsx differ diff --git a/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc b/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc index 6e956f80d62257709ddd129408b8d77305da4339..bc61a68f9b4130bdf42526dec5101aeacbfeadcd 100755 --- a/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc +++ b/wetb/prepost/tests/data/demo_dlc/source/htc/_master/demo_dlc_master_A0001.htc @@ -382,7 +382,7 @@ begin wind ; filename_u ./[turb_dir][Turb base name]u.bin ; filename_v ./[turb_dir][Turb base name]v.bin ; filename_w ./[turb_dir][Turb base name]w.bin ; - box_dim_u 8192 [turb_dx] ; + box_dim_u 512 [turb_dx] ; box_dim_v 32 7.5; box_dim_w 32 7.5; std_scaling 1.0 0.7 0.5 ; diff --git a/wetb/prepost/tests/test_Simulations.py b/wetb/prepost/tests/test_Simulations.py index 61628546afc1110717316b1ec79f6269a2926fc5..1536bfb926bc0d753d932addd9bd07f6e9f1234a 100644 --- a/wetb/prepost/tests/test_Simulations.py +++ b/wetb/prepost/tests/test_Simulations.py @@ -13,7 +13,8 @@ standard_library.install_aliases() import unittest import os import filecmp -import pickle +import shutil +#import pickle from wetb.prepost import dlctemplate as tmpl @@ -40,17 +41,25 @@ class TestGenerateInputs(unittest.TestCase): # location of the pre and post processing data tmpl.POST_DIR = os.path.join(p_root, tmpl.PROJECT, 'remote', 'prepost/') + + # make sure the remote dir is empty so a test does not pass on data + # generated during a previous cycle + if os.path.exists(os.path.join(p_root, tmpl.PROJECT, 'remote')): + shutil.rmtree(os.path.join(p_root, tmpl.PROJECT, 'remote')) + tmpl.force_dir = tmpl.P_RUN - tmpl.launch_dlcs_excel('remote', silent=True) + tmpl.launch_dlcs_excel('remote', silent=True, runmethod='gorm') - # we can not check-in empty dirs in git - for subdir in ['control', 'data', 'htc', 'pbs_in']: + # we can not check-in empty dirs so we can not compare the complete + # directory structure withouth manually creating the empty dirs here + for subdir in ['control', 'data', 'htc', 'pbs_in', 'pbs_in/turb', + 'htc/_master', 'htc/dlc01_demos', 'pbs_in/dlc01_demos']: remote = os.path.join(p_root, tmpl.PROJECT, 'remote', subdir) ref = os.path.join(p_root, tmpl.PROJECT, 'ref', subdir) cmp = filecmp.dircmp(remote, ref) - self.assertTrue(len(cmp.diff_files)==0) - self.assertTrue(len(cmp.right_only)==0) - self.assertTrue(len(cmp.left_only)==0) + self.assertEqual(len(cmp.diff_files), 0, cmp.diff_files) + self.assertEqual(len(cmp.right_only), 0, cmp.right_only) + self.assertEqual(len(cmp.left_only), 0, cmp.left_only) # for the pickled file we can just read it remote = os.path.join(p_root, tmpl.PROJECT, 'remote', 'prepost')