Combining WindFields from multiple WindSims runs into 1 project for postprocessesing
Sometimes there can be a need to combine the results from different WindSims run into a single project.
This can be when an project has finished and it some sectors was ran in a different project due to an error or similar. Or in the case where a project has been running with some different turbulence models and some sectors seems most promising with one model and the other sectors looks better with the other turbulence model.
Merging to projects
As a prerequisite is it important that the 2 projects represents the same area and they should be based on the same project.
- Adding the new results
The windfield folder contains all the results from the windsim run.In this project you can see the results for sector 0, 30 and 60.
Copy the sectors from the project you want to merge into the project. - Adding the run logs
In the windfield folder there are also the windfield.log file, this contains information about which run has been performed in the project. Adde the relevant lines from the project you want to merge into it. So it represent a full history of the wanted runs. - Setting sectors in the project file
The last step is updating the sectors which WindSim sees, this is done in the<project_name>.ws
file.
Add the added sectors to the project here. - Run Reports to regenerate the logs and convergence images.
RunReports.bat
The RunReports is a shell script which recreates the report pages for Terrain and WindFields.@echo off
rem --------------------------------------------------------------------
rem --------------------------------------------------------------------
rem ----- The user could set the paths here ---------------------------
set Project=NULL
set Version=NULL
set Layout=NULL
set WindSimFolder=NULL
set Environment=NULL
rem ----- otherwise we try to detect it automatically -----------
rem --------------------------------------------------------------------
rem detects .ws in current folder
IF %Project% == NULL (
for %%i in (*.ws) do set Project=%%i
)
set Project= %cd%\%Project%
echo ---------------------
echo We are going to create the Windfields reports with the following parameters:
echo Project: %Project:~1%
rem read the Project file and get Version
IF %Version% == NULL (
set "Version="
for /f "tokens=3 delims=<>" %%a in (
'find /i "<Version>" ^< "%Project:~1%"'
) do set "Version=%%a"
)
echo Version: %Version%
rem read the LayoutList and get Name, layout name
IF %Layout% == NULL (
set "Layout="
for /f "tokens=3 delims=<>" %%a in (
'find /i "<Name>" ^< "LayoutList.xml"'
) do set "Layout=%%a"
)
echo Layout: %Layout%
IF %Environment% == NULL (
set Environment=%appdata%\WindSim\%Version%\Environment.xml
)
echo Environment: %Environment%
rem WindSimFolder read from the Environment.xml
IF %WindSimFolder% == NULL (
set "WindSimFolder="
for /f "tokens=3 delims=<>" %%a in (
'find /i "<WindSimFolder>" ^< "%Environment%"'
) do set "WindSimFolder=%%a"
)
echo Program folder: %WindSimFolder%\bin\
echo ---------------------
rem Read sectors from Project file
SETLOCAL ENABLEDELAYEDEXPANSION
start /wait /B "" "%WindSimFolder%\bin\Reports.exe" "%Project:~1%" "%Layout%.lws" "%Environment%" "1"
for /f "tokens=3 delims=<>" %%a in (
'find /i "<Sector>" ^< "%Project:~1%"'
) do (
set /a "sector+=1"
echo start sector !sector! : %%a degrees
start /wait /B "" "%WindSimFolder%\bin\Reports.exe" "%Project:~1%" "%Layout%.lws" "%Environment%" "2" "/si!sector!"
echo ---------------------
)
PAUSE