Skip to content
Snippets Groups Projects
Commit 18cfbfb6 authored by David Verelst's avatar David Verelst
Browse files

add test coverage for prepost.Simulations.ManTurb64

parent 35e9ad42
No related branches found
No related tags found
No related merge requests found
Showing
with 95 additions and 37 deletions
No preview for this file type
No preview for this file type
......@@ -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 ;
......
......@@ -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 ;
......
......@@ -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 ;
......
......@@ -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 ;
......
### 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 ""
......
### 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
......@@ -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
......
No preview for this file type
No preview for this file type
......@@ -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 ;
......
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment