-
-
March 25, 2026 at 2:20 pm
oroma
SubscriberDear 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, inFile "/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.
Innovation Space
Trending discussions
Top Contributors
-
5799
-
1906
-
1419
-
1305
-
1021
Top Rated Tags
© 2026 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.