@ECHO OFF
REM Date exported, 2026/05/05 12:38:58
REM Default solver: aquasim_2_22_0_RC3.exe
REM Setting variable ok to 1, meaning true. If an error occurs then it is set to 0, meaning false.
SET /A ok=1

:static_01
REM Normal load [Amp = 0.0, Period = 1.0]
TITLE %CD% \static_01.txt
%AQUASIM_SOLVER% "static_01"
REM If the error level is 1 or higher we will print the error and jump to the next run.
if %ERRORLEVEL% GTR 0 CALL :printError
if %ERRORLEVEL% GTR 0 GOTO :okCheck
REM packing files
avspack.exe -join "static_01.avs" "static_01.xml"
avspack.exe -join "static_01PFAT.avs" "static_01.xml"
REM Deleting AVS files
IF %ERRORLEVEL% EQU 0 del "static_01.avs"
IF %ERRORLEVEL% EQU 0 del "static_01PFAT.avs"

:okCheck
if %ok% EQU 0 CALL :ERROR

:OK
EXIT

:ERROR
echo One or more of the runs did not complete.
pause
EXIT

:printError
if %ERRORLEVEL% EQU 1 echo The Aquasim run did not complete. Detached node.
if %ERRORLEVEL% EQU 2 echo The Aquasim run did not complete. Invalid point3.
if %ERRORLEVEL% EQU 3 echo The Aquasim run did not complete. Invalid point3.
if %ERRORLEVEL% EQU 4 echo The Aquasim run did not complete. Please refer to the previous text for more information.
if %ERRORLEVEL% EQU 5 echo The Aquasim run did not complete. Please refer to the previous text for more information.
if %ERRORLEVEL% EQU 6 echo The Aquasim run did not complete. Please refer to the previous text for more information.
if %ERRORLEVEL% EQU 7 echo The Aquasim run did not complete. Demo version.
if %ERRORLEVEL% EQU 8 echo Seed outside boundries
if %ERRORLEVEL% EQU 9 echo Failed intersection with bottom
if %ERRORLEVEL% EQU 10 echo License is expired or invalid
if %ERRORLEVEL% EQU 11 echo NaN detected in RDELTA. Possible unstable analysis.
if %ERRORLEVEL% GTR 11 echo The Aquasim run did not complete.
if %ERRORLEVEL% EQU 9009 echo Failed to find aquasim executable (aquasim_2_22_0_RC3.exe) Please see FAQ - AquaEdit cannot locate solver on our website at http://aquasim.no/faq.html
SET /A ok=0

:END