Skip to content

erp_accumulate_results operator not working #1285

Open
@pmaroneh

Description

@pmaroneh

Before submitting the issue

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

Description of the bug

All input pins of erp_accumulate_results operator have been defined, but I get an error message saying that some input parameters are missing or badly defined.

image

This has been reported here: https://discuss.ansys.com/discussion/comment/3118#Comment_3118

Steps To Reproduce

Execute following code:

import ansys.dpf.core as dpf
import numpy as np

path = r"C:\Data\file.rst"

model = dpf.Model(path)

tfreq = model.metadata.time_freq_support.time_frequencies
freqVal = np.array(tfreq.data)

opNamedSel = dpf.operators.scoping.on_named_selection()
opNamedSel.inputs.named_selection_name.connect("LARGE")
opNamedSel.inputs.requested_location.connect("Nodal")
opNamedSel.inputs.data_sources.connect(model)
NSmeshscope = opNamedSel.outputs.mesh_scoping()

fullMesh = model.metadata.meshed_region
op = dpf.operators.mesh.skin() # operator instantiation
op.inputs.mesh.connect(fullMesh)
op.inputs.mesh_scoping.connect(NSmeshscope)# optional
skinMesh = op.outputs.mesh()


op = dpf.operators.result.displacement() # operator instantiation
op.inputs.time_scoping.connect(tfreq)# optional
op.inputs.data_sources.connect(model)
op.inputs.mesh.connect(skinMesh)# optional
disp_fc = op.outputs.fields_container()


erp_field = dpf.operators.result.erp_accumulate_results() # operator instantiation
erp_field.inputs.fields_container.connect(disp_fc)
erp_field.inputs.mesh.connect(skinMesh)
erp_field.inputs.time_scoping.connect(int(1))
erp_field.inputs.mass_density.connect(float(1.293))
erp_field.inputs.speed_of_sound.connect(float(346.0))
erp_field.inputs.erp_type.connect(int(0))
erp_field.inputs.boolean.connect(False)
erp_field.inputs.factor.connect(float(1E-12))
my_field = erp_field.outputs.field()

Which Operating System causes the issue?

Windows

Which DPF/Ansys version are you using?

Ansys 2023 R1

Which Python version causes the issue?

3.10

Installed packages

ansys-dpf-core 0.10.0
asttokens 2.4.1
cachetools 5.3.2
certifi 2023.11.17
charset-normalizer 3.3.2
colorama 0.4.6
comm 0.2.0
debugpy 1.8.0
decorator 5.1.1
exceptiongroup 1.2.0
executing 2.0.1
google-api-core 2.14.0
google-api-python-client 2.108.0
google-auth 2.23.4
google-auth-httplib2 0.1.1
googleapis-common-protos 1.61.0
grpcio 1.59.3
httplib2 0.22.0
idna 3.4
importlib-metadata 6.8.0
ipykernel 6.26.0
ipython 8.17.2
jedi 0.19.1
jupyter_client 8.6.0
jupyter_core 5.5.0
matplotlib-inline 0.1.6
nest-asyncio 1.5.8
numpy 1.26.2
packaging 23.2
parso 0.8.3
pip 23.3.1
platformdirs 4.0.0
prompt-toolkit 3.0.41
protobuf 4.25.1
psutil 5.9.6
pure-eval 0.2.2
pyasn1 0.5.1
pyasn1-modules 0.3.0
Pygments 2.17.1
pyparsing 3.1.1
python-dateutil 2.8.2
pywin32 306
pyzmq 25.1.1
requests 2.31.0
rsa 4.9
setuptools 65.5.0
six 1.16.0
stack-data 0.6.3
tornado 6.3.3
tqdm 4.66.1
traitlets 5.13.0
uritemplate 4.1.1
urllib3 2.1.0
wcwidth 0.2.11
zipp 3.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions