April 16, 2024 at 10:36 am
Mike Pettit
Ansys Employee
Hello Constantin,
You need to use the pre-solve Python script to modify the Aqwa input file, rather than modifying it manually. Please copy and paste the following code into the pre-solve Script Editor in Aqwa Workbench:
import os
AqwaInputFile = os.environ["AQWA_INPUT_FILE"]
lines = []
with open(AqwaInputFile, "r") as fin:
lines = fin.readlines()
optsWritten = False
dbugWritten = False
with open(AqwaInputFile, "w") as fout:
for line in lines:
if "OPTIONS" in line and not optsWritten:
fout.write(line)
fout.write("OPTIONS DBUG\n")
optsWritten = True
elif "RESTART" in line and not dbugWritten:
fout.write(line)
fout.write("CALFERÂ Â Â Â 0Â Â 0 1000\n")
fout.write("END\n")
dbugWritten = True
else:
fout.write(line)
The script reads the input file generated by Aqwa Workbench, then re-writes it with the additional 'DBUG' and 'CALFER' entries before the solver is launched.
I hope this helps; please let me know if you have any problems or questions.
Mike