Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"constant is_not_in" issue #3637

Closed
2 tasks done
millerj97 opened this issue Jan 13, 2025 · 3 comments
Closed
2 tasks done

"constant is_not_in" issue #3637

millerj97 opened this issue Jan 13, 2025 · 3 comments
Assignees
Labels
bug Issue, problem or error in PyMAPDL

Comments

@millerj97
Copy link
Collaborator

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

the following error message is being displayed for some commands such as solver.setup.materials.fluid["water"] = { "density": { "option": "constant", "value": 1000, }, "viscosity": { "option": "constant", "value": 0.001, }, }
taken from the example https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/modeling_cavitation.html


Error: Value is not allowed
Error Object: ("constant" is_not_in ("value" "ideal-gas" "incompressible-ideal-gas" "rgp-table" "real-gas-soave-redlich-kwong" "real-gas-peng-robinson" "real-gas-aungier-redlich-kwong" "real-gas-redlich-kwong" "real-gas-nist" "boussinesq" "piecewise-linear" "piecewise-polynomial" "polynomial" "compressible-liquid"))
Traceback (most recent call last):
  File "modeling_cavitation.py", line 96, in <module>
    solver.setup.materials.fluid["water"] = {
  File ".pipvenv/lib/python3.10/site-packages/ansys/fluent/core/solver/flobject.py", line 1872, in __setitem__
    child.set_state(value)
  File ".pipvenv/lib/python3.10/site-packages/ansys/fluent/core/solver/flobject.py", line 728, in set_state
    self.flproxy.set_var(
  File ".pipvenv/lib/python3.10/site-packages/ansys/fluent/core/services/settings.py", line 124, in _fn
    return fn(self, *args, **kwds)
  File ".pipvenv/lib/python3.10/site-packages/ansys/fluent/core/services/settings.py", line 194, in set_var
    self._service_impl.set_var(request)
  File ".pipvenv/lib/python3.10/site-packages/ansys/fluent/core/services/settings.py", line 37, in set_var
    return self.__stub.SetVar(request, metadata=self.__metadata)
  File ".pipvenv/lib/python3.10/site-packages/grpc/_interceptor.py", line 277, in __call__
    response, ignored_call = self._with_call(
  File ".pipvenv/lib/python3.10/site-packages/grpc/_interceptor.py", line 329, in _with_call
    call = self._interceptor.intercept_unary_unary(
  File ".pipvenv/lib/python4.10/site-packages/ansys/fluent/core/services/interceptors.py", line 124, in intercept_unary_unary
    return self._intercept_call(continuation, client_call_details, request)
  File ".pipvenv/lib/python3.10/site-packages/ansys/fluent/core/services/interceptors.py", line 114, in _intercept_call
    raise new_ex from None
RuntimeError: Value is not allowed
Error Object: (constant is_not_in (value ideal-gas incompressible-ideal-gas rgp-table real-gas-soave-redlich-kwong real-gas-peng-robinson real-gas-aungier-redlich-kwong real-gas-redlich-kwong real-gas-nist boussinesq piecewise-linear piecewise-polynomial polynomial compressible-liquid))

📝 Steps to reproduce

in pyfluent venv run the script from https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/modeling_cavitation.html

💻 Which operating system are you using?

Linux

📀 Which ANSYS version are you using?

v252

🐍 Which Python version are you using?

3.10

📦 Installed packages

ansys-api-fluent==0.3.32
ansys-api-platform-instancemanagement==1.1.0
ansys-api-tools-filetransfer==0.1.1
ansys-fluent-core==0.28.2
ansys-platform-instancemanagement==1.1.2
ansys-tools-filetransfer==0.1.1
ansys-units==0.3.4
certifi==2024.12.14
charset-normalizer==3.4.1
click==8.1.8
docker==7.1.0
grpcio==1.69.0
grpcio-health-checking==1.62.3
idna==3.10
importlib_metadata==8.5.0
joblib==1.4.2
lxml==5.3.0
nltk==3.9.1
numpy==2.2.1
pandas==2.2.3
pdf2image==1.17.0
pillow==11.1.0
protobuf==4.25.5
python-dateutil==2.9.0.post0
pytz==2024.2
PyYAML==6.0.2
regex==2024.11.6
requests==2.32.3
six==1.17.0
tqdm==4.67.1
tzdata==2024.2
urllib3==2.3.0
zipp==3.21.0
@millerj97 millerj97 added the bug Issue, problem or error in PyMAPDL label Jan 13, 2025
@mkundu1
Copy link
Contributor

mkundu1 commented Jan 13, 2025

Duplicate of #3591

@mkundu1 mkundu1 marked this as a duplicate of #3591 Jan 13, 2025
@prmukherj
Copy link
Collaborator

prmukherj commented Jan 14, 2025

Backward compatibility code has been committed in the latest fluent image.
cc. @gyeole, @mkundu1 @millerj97

@hpohekar hpohekar self-assigned this Jan 28, 2025
@hpohekar
Copy link
Collaborator

Verified. Not reproducible now.

pyfluent.general WARNING: Using 'dimension = Dimension.TWO' for 'launch_fluent()' instead of 'version = 2d'.
Fluent version 2025 R2
'file' is deprecated. Use 'settings.file' instead.

AAPQ13pUvWxQtxN has other FLUENT parallel processes running.                       Process affinity not being set.
Reading "\"| gunzip -c \\"D:\pyfluent\cav.msh.gz\\"\""...
Buffering for file scan...

    3716 nodes.
     170 mixed wall faces, zone  3.
      20 mixed pressure-outlet faces, zone  4.
     120 mixed axis faces, zone  5.
      25 mixed axis faces, zone  6.
      25 mixed pressure-inlet faces, zone  7.
      20 mixed pressure-inlet faces, zone  8.
    6860 mixed interior faces, zone 10.
    3525 quadrilateral cells, zone  2.

Building...
     mesh
        auto partitioning mesh by Metis (fast),
        distributing mesh
                parts....,
                faces....,
                nodes....,
                cells....,
        bandwidth reduction using Reverse Cuthill-McKee: 625/25 = 25
     materials,
     interface,
     domains,
     zones,
        default-interior
        inlet_1
        inlet_2
        symm_1
        symm_2
        outlet
        wall
        fluid
     parallel,
Done.
Warning: The use of axis boundary conditions is not appropriate for
         a 2D/3D flow problem. Please consider changing the zone
         type to symmetry or wall, or the problem to axisymmetric.

Warning: The use of axis boundary conditions is not appropriate for
         a 2D/3D flow problem. Please consider changing the zone
         type to symmetry or wall, or the problem to axisymmetric.

'mesh' is deprecated. Use 'settings.mesh' instead.

 Domain Extents:
   x-coordinate: min (m) = -1.600000e-02, max (m) = 3.200000e-02
   y-coordinate: min (m) = 0.000000e+00, max (m) = 1.152000e-02
 Volume statistics:
   minimum volume (m3): 5.333266e-08
   maximum volume (m3): 4.445774e-07
     total volume (m3): 3.123200e-04
 Face area statistics:
   minimum face area (m2): 1.999997e-04
   maximum face area (m2): 1.107099e-03
 Checking mesh.....................................
Done.
'setup' is deprecated. Use 'settings.setup' instead.
 Changing Discretization Scheme for Momentum to First Order Upwind
Pseudo Time Method settings are adjusted.

Adjusting the following settings:
Changing Discretization Scheme for Turbulent Kinetic Energy:   from: Second Order Upwind   to: First Order Upwind
Changing Discretization Scheme for Specific Dissipation Rate:  from: Second Order Upwind   to: First Order Upwind
Changing Discretization Scheme for Pressure to PRESTO!
pyfluent.tui WARNING: Currently calling the TUI commands in a generic manner. Please run `python codegen/allapigen.py` from the top-level pyfluent directory to generate the local TUI commands classes.

Material "water-vapor" copied from database: fluent-database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue, problem or error in PyMAPDL
Projects
None yet
Development

No branches or pull requests

4 participants