passing parameter into journal file from bash script

    • TL111


      I's using workbench batch mode to run CFD analysis. I'm wondering is there a way to pass the parameter from bash script into journal file (a python script). More specifically, in the bash file, I call the a line and passing a parameter "user_param":

      /projects/eng/software/ANSYS-19.5/workbench/v195/Framework/bin/Linux64/runwb2 -B -R /home/tongl5/scratch/TwoTruck_192/model_1/TwoTruck.wbjn --user_param=10

      "user_param" is not a parameter in the fluent model so that I have to change it outside the journal file. then in the journal file (a python script), I want to use argparse to parse "user_param":

      import argparse

      parser = argparse.ArgumentParser()

      parser.add_argument("--dp_file_name", help="dp_file_name", type=str)

      args = parser.parse_args()

      user_param = args.user_param

      But It seems like that I cannot directly call "--user_param=10" in the bash script. Is there a way to solve it? Thank you.

    • RK
      Ansys Employee
      Can you try this in a newer version?
Viewing 1 reply thread
  • You must be logged in to reply to this topic.