ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
265 stars 41 forks source link

'<session>.results.graphics.contour["temp"].range_option.auto_range_off' is currently inactive. #3331

Open alwaysbyx opened 2 days ago

alwaysbyx commented 2 days ago

I use the example code

solver.settings.results.graphics.contour.create(name="temp")
solver.settings.results.graphics.contour["temp"] = {
    "boundary_values": True,
    "range_option": {
        "option": "auto-range-off",
        "auto_range_off": {"maximum": 22., "minimum": 18., "clip_to_range": False},
    },
    "field": "temperature",
    "draw_mesh": False,
    "coloring": {"smooth": False},
    "color_map": {
        "user_skip": 9,
        "log_scale": False,
        "visible": True,
        "width": 6,
        "show_all": True,
        "font_name": "Helvetica",
        "font_size": 0.032,
        "font_automatic": True,
        "length": 0.54,
        "size": 100,
        "format": "%0.2e",
        "position": 1,
        "color": "field-velocity",
    },
    "mesh_object": "",
    "node_values": True,
    "contour_lines": False,
    "display_state_name": "None",
    "filled": True,
}

it reports ansys.fluent.core.solver.flobject.InactiveObjectError: '<session>.results.graphics.contour["temp"].range_option.auto_range_off' is currently inactive. Is there any code update?

mkundu1 commented 1 day ago

@alwaysbyx This has been fixed recently in the main branch. We'll create a dev release soon. You can set up a development area following these steps to use the fix immediately.