Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Defining Liquid Injection Region in Rocky PerPost

    • oroma
      Subscriber

      Dear community,

      I am trying to define a liquid injection region in Rocky Prepost (technically in PyRocky...), but can't seem to figure out how. Below is some python code to reporduce this:

      import ansys.rocky.core as pyrocky
       
      rocky_path = "your_rocky_executable_path"
      case = "your_case_path.rocky"

      rocky = pyrocky.launch_rocky(rocky_exe=rocky_path, headless=True, close_existing=True)
      project = rocky.api.OpenProject(case)
      study = project.GetStudy()
      ModCol = study.GetModuleCollection()
      LBmodule = ModCol.GetModule("Liquid Bridge Model")
      LBmodule.EnableModule()
      LiqInjModule = ModCol.GetModule("Liquid Injection Region")
      LiqInjModule.EnableModule()
      LiqInjRegion = LiqInjModule.GetModuleProperty("Liquid Injection Regions")
       
      I get to the liqui injection region object, and can't do anything with it. I have checked what options this module has:
      LiqInjModule.GetValidOptionsForModuleProperty("Liquid Injection Regions")
      ", line 1, in File "/zhome/bc/0/219041/miniforge3/envs/robust/lib/python3.10/site-packages/ansys/rocky/core/rocky_api_proxies.py", line 49, in CallProxy return self._pyro_api.SendToApiElement( File "/zhome/bc/0/219041/miniforge3/envs/robust/lib/python3.10/site-packages/Pyro5/client.py", line 510, in __call__ return self.__send(self.__name, args, kwargs) File "/zhome/bc/0/219041/miniforge3/envs/robust/lib/python3.10/site-packages/Pyro5/client.py", line 275, in _pyroInvoke raise data # if you see this in your traceback, you should probably inspect the remote traceback as well ansys.rocky.core.exceptions.RockyApiError: The property Liquid Injection Regions has no options" aria-level="1">
       
      Traceback (most recent call last): File "", line 1, in File "/zhome/bc/0/219041/miniforge3/envs/robust/lib/python3.10/site-packages/ansys/rocky/core/rocky_api_proxies.py", line 49, in CallProxy return self._pyro_api.SendToApiElement( File "/zhome/bc/0/219041/miniforge3/envs/robust/lib/python3.10/site-packages/Pyro5/client.py", line 510, in __call__ return self.__send(self.__name, args, kwargs) File "/zhome/bc/0/219041/miniforge3/envs/robust/lib/python3.10/site-packages/Pyro5/client.py", line 275, in _pyroInvoke raise data # if you see this in your traceback, you should probably inspect the remote traceback as well ansys.rocky.core.exceptions.RockyApiError: The property Liquid Injection Regions has no option
       
      I have tried a bunch of things, but can't seem to figure much out of the errors I get. I would appreciate if anyone could test those lines of code, and see if they can figure if and how can a Liquid Injection Region actually be defined. 
       
      Many thanks
Viewing 0 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]