ICEM无法打开
-
老铁们,我知道问题出在哪了,应该是使用批处理功能的时候杀毒软件把bat文件给删了
现在给大家分享一下解决方法
在记事本中输入以下代码,并且将后缀改为bat@echo off rem set ICEM_LICENSING_FLAGS=ansys rem set ICEM_LICENSING_FLAGS=icem rem set ICEM_LICENSE_FILE=c:\icemcfd\5.1-win\lic\license.dat rem set ANSYSLMD_LICENSE_FILE=c:\icemcfd\5.1-win\lic\license.dat rem if "%ICEM_ACN%"=="" set ICEM_ACN=%~dp0.. set sub=\bin\ set full=%~dp0 call set work=%%full:%sub%=%% set ICEM_ACN=%work% set aie_mode=1 rem No default - determine during initialization rem if "%AI_ENV_PRODUCT%" == "" set AI_ENV_PRODUCT=fsi rem Need to allow user to hard set AI_ENV_PRODUCT for PRO/E External rem Analysis to work properly. rem Since bat files set the variables in the calling msdos prompt window if you rem run icemcfd -ai and then icemcfd -4 you will not get the -4 GUI. So reset the rem variables here to clean out old values. -Wayne set ICEM_AI_ENVIRONMENT= set AI_ENV_CFD= set AI_ENV_CFD_ONLY= set AI_ENV_CFX= set AI_NO_BLOCKING= set AI_NO_POST= set AI_ENV_CART3D= set AI_ENV_LSTC= set AI_ENV_ANSYS_SOLVERS= if not exist "%ANSYS81_DIR%" set ANSYS81_DIR=%ICEM_ACN%\bin if not exist "%ANSYS90_DIR%" set ANSYS90_DIR=%ICEM_ACN%\bin if not exist "%ANSYS100_DIR%" set ANSYS100_DIR=%ICEM_ACN%\bin if not exist "%ANSYS110_DIR%" set ANSYS110_DIR=%ICEM_ACN%\bin if not exist "%ANSYS120_DIR%" set ANSYS120_DIR=%ICEM_ACN%\bin if not exist "%ANSYS121_DIR%" set ANSYS121_DIR=%ICEM_ACN%\bin if not exist "%ANSYS130_DIR%" set ANSYS130_DIR=%ICEM_ACN%\bin set PRINT_MESSAGE= if "%ANS_FLEXLM_DEBUG%"=="1" set PRINT_MESSAGE=1 if "%ANS_FLEXLM_DEBUG%"=="2" set PRINT_MESSAGE=1 set VAR1= set FLAVOR= set AI_ENV_TEST_LICENSING= set VAR1=%~1 if "%PRINT_MESSAGE%"=="1" echo VAR1 is %VAR1% if "%VAR1%" == "-4" goto top rem if "%VAR1%" == "-batch" goto top rem if "%VAR1%" == "-script" goto top rem if "%VAR1%" == "-app" goto top if "%VAR1%" == "-ai" goto top if "%VAR1%" == "-cfd" goto top if "%VAR1%" == "-cfx" goto top if "%VAR1%" == "-ansys" goto top if "%VAR1%" == "-fsi" goto top if "%VAR1%" == "-lstc" goto top if "%VAR1%" == "-autohex" goto top if "%VAR1%" == "-batchsurf" goto top rem move call for test_licensing to initialization stage set AI_ENV_TEST_LICENSING=1 :top if "%~1"=="" goto bot if "%~1"=="-4" ( set aie_mode=0 set AI_ENV_PRODUCT=cfd shift goto top ) rem if "%~1"=="-app" ( rem set AI_ENV_PRODUCT=%~2 rem shift rem shift rem goto top rem ) if "%~1"=="-cfd" ( set FLAVOR=-cfd if "%~2"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~3"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~4"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 if "%~4"=="-no_post" set AI_NO_POST=1 if "%~2"=="-cart3d" set AI_ENV_CART3D=1 if "%~3"=="-cart3d" set AI_ENV_CART3D=1 if "%~4"=="-cart3d" set AI_ENV_CART3D=1 set AI_ENV_PRODUCT=cfd shift goto top ) if "%~1"=="-cfx" ( set FLAVOR=-cfx if "%~2"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~3"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 set AI_ENV_PRODUCT=cfx shift goto top ) if "%~1"=="-ansys" ( set FLAVOR=-ansys if "%~2"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~3"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 set AI_ENV_PRODUCT=cfx shift goto top ) if "%~1"=="-ai" ( set FLAVOR=-ai if "%~2"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~3"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 set AI_ENV_PRODUCT=fea2.0 shift goto top ) if "%~1"=="-fsi" ( set FLAVOR=-fsi if "%~2"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~3"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~4"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 if "%~4"=="-no_post" set AI_NO_POST=1 if "%~2"=="-cart3d" set AI_ENV_CART3D=1 if "%~3"=="-cart3d" set AI_ENV_CART3D=1 if "%~4"=="-cart3d" set AI_ENV_CART3D=1 set AI_ENV_PRODUCT=fsi shift goto top ) if "%~1"=="-lstc" ( set FLAVOR=-lstc if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 set AI_ENV_PRODUCT=lstc shift goto top ) if "%~1" == "-autohex" goto AUTOHEXA if "%~1" == "-batchsurf" goto BATCHSURF if "%~1" == "-h" goto UsageCFD if "%~1" == "-help" goto UsageCFD if "%~1" == "/?" goto UsageCFD :bot if "%PRINT_MESSAGE%"=="1" echo FLAVOR is %FLAVOR% if "%~1"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~2"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~3"=="-no_hexa" set AI_NO_BLOCKING=1 if "%~1"=="-no_post" set AI_NO_POST=1 if "%~2"=="-no_post" set AI_NO_POST=1 if "%~3"=="-no_post" set AI_NO_POST=1 if "%~1"=="-cart3d" set AI_ENV_CART3D=1 if "%~2"=="-cart3d" set AI_ENV_CART3D=1 if "%~3"=="-cart3d" set AI_ENV_CART3D=1 if "%FLAVOR%"=="-cfd" ( set AI_ENV_PRODUCT=cfd goto bot1 ) if "%FLAVOR%"=="-cfx" ( set AI_NO_POST=1 set AI_ENV_ANSYS_SOLVERS=1 set AI_ENV_PRODUCT=cfx goto bot1 ) if "%FLAVOR%"=="-ansys" ( set AI_NO_POST=1 set AI_ENV_ANSYS_SOLVERS=1 set AI_ENV_PRODUCT=ansys goto bot1 ) if "%FLAVOR%"=="-ai" ( set AI_ENV_PRODUCT=fea2.0 goto bot1 ) if "%FLAVOR%"=="-fsi" ( set AI_ENV_PRODUCT=fsi goto bot1 ) if "%FLAVOR%"=="-lstc" ( set AI_ENV_PRODUCT=lstc goto bot1 ) :bot1 if "%AI_NO_BLOCKING%"=="0" set AI_NO_BLOCKING= if "%AI_NO_POST%"=="0" set AI_NO_POST= if "%AI_ENV_CART3D%"=="0" set AI_ENV_CART3D= if "%PRINT_MESSAGE%"=="1" echo AI_NO_BLOCKING is %AI_NO_BLOCKING% if "%PRINT_MESSAGE%"=="1" echo AI_NO_POST is %AI_NO_POST% if "%PRINT_MESSAGE%"=="1" echo AI_ENV_CART3D is %AI_ENV_CART3D% if "%aie_mode%"=="1" ( set ICEM_AI_ENVIRONMENT=1 if "%AI_ENV_PRODUCT%"=="fea2.0" ( set AI_ENV_ANSYS=1 set AI_ENV_LSDYNA=1 set AI_ENV_ABAQUS=1 set AI_ENV_AUTODYN=1 ) if "%AI_ENV_PRODUCT%"=="cfd" ( set AI_ENV_CFD=1 set AI_ENV_CFD_ONLY=1 ) if "%AI_ENV_PRODUCT%"=="cfx" ( set AI_ENV_CFD=1 set AI_ENV_CFD_ONLY=1 set AI_ENV_CFX=1 set AI_ENV_PRODUCT=cfd ) if "%AI_ENV_PRODUCT%"=="ansys" ( set AI_ENV_CFD=1 set AI_ENV_PRODUCT=fea2.0 set AI_ENV_ANSYS=1 set AI_ENV_LSDYNA=1 set AI_ENV_AUTODYN=1 ) if "%AI_ENV_PRODUCT%"=="fsi" ( set AI_ENV_CFD=1 set AI_ENV_PRODUCT=fea2.0 set AI_ENV_ANSYS=1 set AI_ENV_LSDYNA=1 set AI_ENV_ABAQUS=1 set AI_ENV_AUTODYN=1 ) if "%AI_ENV_PRODUCT%"=="commonstruct" ( set AI_ENV_ANSYS=1 set AI_ENV_LSDYNA=1 set AI_ENV_ABAQUS=1 set AI_ENV_AUTODYN=1 ) if "%AI_ENV_PRODUCT%"=="lstc" ( set AI_ENV_CFD=1 set AI_ENV_CFD_ONLY=1 set AI_ENV_LSTC=1 set AI_ENV_PRODUCT=cfd ) ) if "%PRINT_MESSAGE%"=="1" echo AI_ENV_PRODUCT is %AI_ENV_PRODUCT% if not exist Uninst.isu goto StartCFD if exist icemcfd.bat goto WrongDir :StartCFD if not exist "%ICEM_ACN%\bin\med.exe" goto NoInstall if "%PROCESSOR_ARCHITECTURE%"=="x86" ( set AWP_FRAMEWORK_PLATFORM=Win32 ) else if "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( set AWP_FRAMEWORK_PLATFORM=Win64 ) else ( echo.Error: Environment variable PROCESSOR_ARCHITECTURE should contain echo.either x86 or AMD64 Pause exit /b 1 ) set KEEP_PATH=%PATH% set PATH=%ICEM_ACN%\bin;%ICEM_ACN%\lib;%PATH%;%ICEM_ACN%\toolswin32 if exist "%AWP_ROOT130%\AISOL\Bin\%ANSYS_SYSDIR%" set PATH=%PATH%;%AWP_ROOT130%\AISOL\Bin\%ANSYS_SYSDIR% if exist "%AWP_ROOT130%\Framework\Bin\%AWP_FRAMEWORK_PLATFORM%" set PATH=%PATH%;%AWP_ROOT130%\Framework\Bin\%AWP_FRAMEWORK_PLATFORM% if "%~1" == "-batch" goto StartBatch rem med.exe %* | "%ICEM_ACN%\toolswin32\cat.exe" start /wait med.exe %* goto StartFinish :AUTOHEXA set AUTOHEX_ROOT=%ICEM_ACN% if not exist "%AUTOHEX_ROOT%\bin\autohex.exe" goto NoInstall set KEEP_PATH=%PATH% set PATH=%ICEM_ACN%\bin;%ICEM_ACN%\lib;%PATH%;%ICEM_ACN%\toolswin32 "%AUTOHEX_ROOT%\bin\autohex.exe" goto StartFinish :BATCHSURF set ICEM_AI_ENVIRONMENT=1 set AI_ENV_ANSYS=1 set AI_ENV_LSDYNA=1 set AI_ENV_ABAQUS=1 set AI_ENV_AUTODYN=1 set AI_ENV_PRODUCT=fea2.0 set ICEM_SCRIB=%ICEM_ACN%\lib\scrib set TCL_LIBRARY=%ICEM_ACN%\lib\tcl8.3.3 set TK_LIBRARY=%ICEM_ACN%\lib\tk8.3.3 if not exist "%ICEM_ACN%\bin\wish.exe" goto NoInstall set KEEP_PATH=%PATH% set PATH=%ICEM_ACN%\bin;%ICEM_ACN%\lib;%PATH%;%ICEM_ACN%\toolswin32 "%ICEM_ACN%\bin\wish.exe" "%ICEM_SCRIB%\app\main.tcl" app_bsm_generic" goto StartFinish :StartBatch start /b /wait med_batch.exe %* :StartFinish set PATH=%KEEP_PATH% goto ExitCFD :WrongDir echo Can't run ICEM CFD in the Installation Directory! pause goto ExitCFD :NoInstall echo Can't find the Installation Directory! pause goto ExitCFD :UsageCFD echo Usage: icemcfd.bat [-script ScriptName] [-4] [-app APP] [-cfd] [-batch] [projectfile] pause :ExitCFD
然后放到以下路路径就可以了
D:\ANSYS2020R1\ANSYS Inc\v201\icemcfd\win64_amd\bin