ANSUPF.bat should be located in your ansys installation directory; the full path should include something like “ANSYS Inc\v221\ansys\custom\user\winx64”. I believe directory ‘custom’ may be missing in case you unchecked something in the installation process; however, I’m not sure exactly what and how it can be fixed other than reinstalling ASNSYS.
I do indeed put all my .F files in the solver files directory since it seems that solver first checks for .F files in solver directory and then picks one from standart ones in customize directory of ANSYS installation. I believe that the only environment variable for /UPS method should be “ANS_USE_UPF” as ansupf.bat sets the solver files directory to the ANS_USER_PATH for the time of solving.
EDIT: forgot about one more thing. Quoting ANSYS help:
”A script named findUPF.bat is used to detect the /UPF command. You must include the path to this script in your system PATH variable. This script is typically located in Program Files\Ansys Inc\Vxxx\ansys\bin\< platform
> where <platform
> is a directory that uniquely identifies the hardware platform version: “Winx64” for 64-bit Windows.”
EDIT 2: Misread your sentence about the ansupf file. You can put it almost anywhere before “if “%PLATFORM_DIR%”==”winx64″ (” string. I personally put it between strings “call “%~dp0/set_revn.bat”” and
”set “ROOT_DIR=!AWP_ROOT%revn%!”” at the start of the file.
EDIT 3: also check if command ifort in your cmd prints info about your installed fortran compiler (“Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.10.0 Build 20230609_000000” or something like this). If it is not the case, add …\Intel\oneAPI\compiler\latest\windows\bin\intel64 to your PATH system environment variable.