Hi,
I am trying to calculate the Equivalent Radiated Power of a given surface, based on a named selection. I have performed a harmonic analysis using MSUP, and have created a named selection called "LARGE".
The code has a number of blocks:
1) Time
Here the time scoping is obtained
2) NS
Here a mesh scoping is obtained from a named selection called “LARGE”
3) Skin mesh
Here a “skin mesh region” is extracted from the full mesh, based on the NS mesh scoping
4) Disp
Here the displacements at the skin nodes are extracted as a field container, for all tfreq (frequency values)
5) ERP
Here the ERP should be calculated, but I continue to get an error:
DPFServerException: erp_accumulate_results:31<-ERP input parameters are missing or badly defined.
CODE:
path = r"C:\ERPTool_files\dp0\SYS-1\MECH\file.rst"
model = dpf.Model(path)
=============================================================================
Time
=============================================================================
tfreq = model.metadata.time_freq_support.time_frequencies
freqVal = np.array(tfreq.data)
=============================================================================
NS
=============================================================================
opNamedSel = dpf.operators.scoping.on_named_selection()
opNamedSel.inputs.named_selection_name.connect("LARGE")
opNamedSel.inputs.data_sources.connect(model)
NSmeshscope = opNamedSel.outputs.mesh_scoping
=============================================================================
Skin mesh
=============================================================================
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()
=============================================================================
Disp
=============================================================================
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
=============================================================================
op = dpf.operators.result.erp_accumulate_results() # operator instantiation
op.inputs.fields_container.connect(disp_fc)
op.inputs.mesh.connect(skinMesh)
my_field = op.outputs.field()