logo
  • Getting Started
  • User Guide
  • APIs
  • Operators
  • Examples
  • Contributing

Navigation

  • PyDPF-Core 0.4.2 documentation »
  • APIs »
  • ansys.dpf.core package »
  • ansys.dpf.core.operators package »
  • ansys.dpf.core.operators.math package »
  • modal_superposition

APIs

  • ansys.dpf.core package
    • ansys.dpf.core.examples package
    • ansys.dpf.core.operators package
      • ansys.dpf.core.operators.averaging package
        • elemental_difference
        • elemental_difference_fc
        • elemental_fraction_fc
        • elemental_mean
        • elemental_mean_fc
        • elemental_nodal_to_nodal
        • elemental_nodal_to_nodal_elemental
        • elemental_nodal_to_nodal_elemental_fc
        • elemental_nodal_to_nodal_fc
        • elemental_to_elemental_nodal
        • elemental_to_elemental_nodal_fc
        • elemental_to_nodal
        • elemental_to_nodal_fc
        • extend_to_mid_nodes
        • extend_to_mid_nodes_fc
        • gauss_to_node_fc
        • nodal_difference
        • nodal_difference_fc
        • nodal_fraction_fc
        • nodal_to_elemental
        • nodal_to_elemental_fc
        • to_elemental_fc
        • to_nodal
        • to_nodal_fc
      • ansys.dpf.core.operators.filter package
        • field_band_pass
        • field_band_pass_fc
        • field_high_pass
        • field_high_pass_fc
        • field_low_pass
        • field_low_pass_fc
        • scoping_band_pass
        • scoping_high_pass
        • scoping_low_pass
      • ansys.dpf.core.operators.geo package
        • center_of_gravity
        • element_nodal_contribution
        • elements_facets_surfaces_over_time
        • elements_volume
        • elements_volumes_over_time
        • gauss_to_node
        • integrate_over_elements
        • mass
        • moment_of_inertia
        • normals
        • normals_provider_nl
        • rotate
        • rotate_fc
        • rotate_in_cylindrical_cs
        • rotate_in_cylindrical_cs_fc
        • to_polar_coordinates
      • ansys.dpf.core.operators.invariant package
        • eigen_values
        • eigen_values_fc
        • eigen_vectors
        • eigen_vectors_fc
        • invariants
        • invariants_fc
        • principal_invariants
        • principal_invariants_fc
        • segalman_von_mises_eqv
        • segalman_von_mises_eqv_fc
        • von_mises_eqv
        • von_mises_eqv_fc
      • ansys.dpf.core.operators.logic package
        • component_selector
        • component_selector_fc
        • enrich_materials
        • identical_fc
        • identical_fields
        • identical_meshes
        • identical_property_fields
        • included_fields
        • solid_shell_fields
      • ansys.dpf.core.operators.mapping package
        • find_reduced_coordinates
        • on_coordinates
        • on_reduced_coordinates
        • scoping_on_coordinates
        • solid_to_skin
      • ansys.dpf.core.operators.math package
        • accumulate
        • accumulate_fc
        • accumulate_level_over_label_fc
        • accumulate_min_over_label_fc
        • accumulate_over_label_fc
        • add
        • add_constant
        • add_constant_fc
        • add_fc
        • amplitude
        • amplitude_fc
        • average_over_label_fc
        • centroid
        • centroid_fc
        • component_wise_divide
        • component_wise_divide_fc
        • conjugate
        • correlation
        • cos
        • cos_fc
        • cplx_derive
        • cplx_divide
        • cplx_dot
        • cplx_multiply
        • dot
        • dot_tensor
        • entity_extractor
        • exponential
        • exponential_fc
        • fft_eval
        • fft_gradient_eval
        • fft_multi_harmonic_minmax
        • generalized_inner_product
        • generalized_inner_product_fc
        • img_part
        • invert
        • invert_fc
        • kronecker_prod
        • linear_combination
        • ln
        • ln_fc
        • make_one_on_comp
        • matrix_inverse
        • minus
        • minus_fc
        • modal_superposition
        • modulus
        • norm
        • norm_fc
        • overall_dot
        • phase
        • phase_fc
        • polar_to_cplx
        • pow
        • pow_fc
        • qr_solve
        • real_part
        • scale
        • scale_by_field
        • scale_by_field_fc
        • scale_fc
        • sin
        • sin_fc
        • sqr
        • sqr_fc
        • sqrt
        • sqrt_fc
        • svd
        • sweeping_phase
        • sweeping_phase_fc
        • unit_convert
        • unit_convert_fc
      • ansys.dpf.core.operators.mesh package
        • beam_properties
        • external_layer
        • from_field
        • from_scoping
        • mesh_cut
        • mesh_provider
        • mesh_to_graphics
        • mesh_to_graphics_edges
        • node_coordinates
        • points_from_coordinates
        • skin
        • split_fields
        • split_mesh
        • stl_export
        • tri_mesh_skin
      • ansys.dpf.core.operators.metadata package
        • boundary_condition_provider
        • cyclic_mesh_expansion
        • cyclic_support_provider
        • is_cyclic
        • material_provider
        • material_support_provider
        • mesh_selection_manager_provider
        • mesh_support_provider
        • result_info_provider
        • streams_provider
        • time_freq_provider
      • ansys.dpf.core.operators.min_max package
        • max_by_component
        • max_over_phase
        • max_over_time_by_entity
        • min_by_component
        • min_max
        • min_max_by_entity
        • min_max_by_time
        • min_max_fc
        • min_max_fc_inc
        • min_max_inc
        • min_max_over_label_fc
        • min_max_over_time_by_entity
        • min_over_time_by_entity
        • phase_of_max
        • time_of_max_by_entity
        • time_of_min_by_entity
      • ansys.dpf.core.operators.result package
        • acceleration
        • acceleration_X
        • acceleration_Y
        • acceleration_Z
        • accu_eqv_creep_strain
        • accu_eqv_plastic_strain
        • add_rigid_body_motion
        • add_rigid_body_motion_fc
        • artificial_hourglass_energy
        • cms_matrices_provider
        • co_energy
        • compute_stress
        • compute_stress_1
        • compute_stress_2
        • compute_stress_3
        • compute_stress_X
        • compute_stress_XY
        • compute_stress_XZ
        • compute_stress_Y
        • compute_stress_YZ
        • compute_stress_Z
        • compute_stress_von_mises
        • compute_total_strain
        • compute_total_strain_1
        • compute_total_strain_2
        • compute_total_strain_3
        • compute_total_strain_X
        • compute_total_strain_XY
        • compute_total_strain_XZ
        • compute_total_strain_Y
        • compute_total_strain_YZ
        • compute_total_strain_Z
        • contact_fluid_penetration_pressure
        • contact_friction_stress
        • contact_gap_distance
        • contact_penetration
        • contact_pressure
        • contact_sliding_distance
        • contact_status
        • contact_surface_heat_flux
        • contact_total_stress
        • coordinate_system
        • creep_strain_energy_density
        • current_density
        • custom
        • cyclic_analytic_seqv_max
        • cyclic_analytic_usum_max
        • cyclic_expanded_acceleration
        • cyclic_expanded_displacement
        • cyclic_expanded_el_strain
        • cyclic_expanded_enf
        • cyclic_expanded_stress
        • cyclic_expanded_velocity
        • cyclic_expansion
        • cyclic_strain_energy
        • cyclic_volume
        • displacement
        • displacement_X
        • displacement_Y
        • displacement_Z
        • elastic_strain
        • elastic_strain_X
        • elastic_strain_XY
        • elastic_strain_XZ
        • elastic_strain_Y
        • elastic_strain_YZ
        • elastic_strain_Z
        • elastic_strain_energy_density
        • elastic_strain_principal_1
        • elastic_strain_principal_2
        • elastic_strain_principal_3
        • elastic_strain_rotation_by_euler_nodes
        • electric_field
        • electric_flux_density
        • electric_potential
        • element_centroids
        • element_nodal_forces
        • element_orientations
        • elemental_heat_generation
        • elemental_mass
        • elemental_volume
        • enf_rotation_by_euler_nodes
        • equivalent_mass
        • equivalent_radiated_power
        • eqv_stress_parameter
        • euler_load_buckling
        • euler_nodes
        • heat_flux
        • heat_flux_X
        • heat_flux_Y
        • heat_flux_Z
        • hydrostatic_pressure
        • incremental_energy
        • joint_force_reaction
        • joint_moment_reaction
        • joint_relative_acceleration
        • joint_relative_angular_acceleration
        • joint_relative_angular_velocity
        • joint_relative_displacement
        • joint_relative_rotation
        • joint_relative_velocity
        • kinetic_energy
        • material_property_of_element
        • members_in_bending_not_certified
        • members_in_compression_not_certified
        • members_in_linear_compression_bending_not_certified
        • migrate_to_h5dpf
        • modal_basis
        • nmisc
        • nodal_averaged_creep_strains
        • nodal_averaged_elastic_strains
        • nodal_averaged_equivalent_creep_strain
        • nodal_averaged_equivalent_elastic_strain
        • nodal_averaged_equivalent_plastic_strain
        • nodal_averaged_equivalent_thermal_strains
        • nodal_averaged_plastic_strains
        • nodal_averaged_stresses
        • nodal_averaged_thermal_strains
        • nodal_averaged_thermal_swelling_strains
        • nodal_force
        • nodal_moment
        • nodal_rotation_by_euler_nodes
        • num_surface_status_changes
        • plastic_state_variable
        • plastic_strain
        • plastic_strain_X
        • plastic_strain_XY
        • plastic_strain_XZ
        • plastic_strain_Y
        • plastic_strain_YZ
        • plastic_strain_Z
        • plastic_strain_energy_density
        • plastic_strain_principal_1
        • plastic_strain_principal_2
        • plastic_strain_principal_3
        • plastic_strain_rotation_by_euler_nodes
        • poynting_vector
        • poynting_vector_surface
        • pres_to_field
        • prns_to_field
        • raw_displacement
        • raw_reaction_force
        • reaction_force
        • recombine_harmonic_indeces_cyclic
        • remove_rigid_body_motion
        • remove_rigid_body_motion_fc
        • rigid_transformation
        • run
        • smisc
        • stiffness_matrix_energy
        • stress
        • stress_X
        • stress_XY
        • stress_XZ
        • stress_Y
        • stress_YZ
        • stress_Z
        • stress_principal_1
        • stress_principal_2
        • stress_principal_3
        • stress_ratio
        • stress_rotation_by_euler_nodes
        • stress_von_mises
        • structural_temperature
        • swelling_strains
        • temperature
        • temperature_grad
        • thermal_dissipation_energy
        • thermal_strain
        • thermal_strains_eqv
        • thickness
        • torque
        • velocity
        • velocity_X
        • velocity_Y
        • velocity_Z
      • ansys.dpf.core.operators.scoping package
        • change_fc
        • connectivity_ids
        • elemental_from_mesh
        • from_mesh
        • intersect
        • nodal_from_mesh
        • on_mesh_property
        • on_named_selection
        • on_property
        • rescope
        • rescope_fc
        • split_on_property_type
        • transpose
      • ansys.dpf.core.operators.serialization package
        • csv_to_field
        • deserializer
        • field_to_csv
        • mechanical_csv_to_field
        • migrate_file_to_vtk
        • serialize_to_hdf5
        • serializer
        • serializer_to_string
        • string_deserializer
        • vtk_export
        • vtk_to_fields
      • ansys.dpf.core.operators.server namespace
      • ansys.dpf.core.operators.utility package
        • bind_support
        • bind_support_fc
        • change_location
        • change_shell_layers
        • default_value
        • extract_field
        • extract_time_freq
        • field_to_fc
        • forward
        • forward_field
        • forward_fields_container
        • forward_meshes_container
        • html_doc
        • make_overall
        • merge_fields
        • merge_fields_by_label
        • merge_fields_containers
        • merge_materials
        • merge_meshes
        • merge_meshes_containers
        • merge_property_fields
        • merge_result_infos
        • merge_scopings
        • merge_scopings_containers
        • merge_supports
        • merge_time_freq_supports
        • python_generator
        • remote_operator_instantiate
        • remote_workflow_instantiate
        • scalars_to_field
        • set_property
        • strain_from_voigt
        • txt_file_to_dpf
        • unitary_field
    • AvailableResult
    • Collection
    • Common
    • Operator Configuration
    • Core
    • Custom Fields Containers
    • Cyclic Support
    • Data Sources
    • Dimensionality
    • Operator
    • Element Descriptor
    • Elements
    • Field
    • FieldDefinition
    • FieldsContainer
    • fields_container_factory
    • fields_factory
    • mesh_scoping_factory
    • MeshedRegion
    • MeshesContainer
    • Model
    • Nodes
    • path_utilities
    • Plotter
    • PropertyField
    • ResultInfo
    • Results
    • Scoping
    • ScopingsContainer
    • Server
    • Session
    • settings
    • time_freq_scoping_factory
    • TimeFreqSupport
    • Workflow

modal_superposition#

Autogenerated DPF operator classes.

class ansys.dpf.core.operators.math.modal_superposition.modal_superposition(modal_basis=None, solution_in_modal_space=None, time_scoping=None, mesh_scoping=None, config=None, server=None)#

Compute the solution in the time/frequency space from a modal solution by multiplying a modal basis (in 0) by the solution in this modal space (coefficients for each mode for each time/frequency) (in 1).

Parameters
  • modal_basis (FieldsContainer) – One field by mode with each field representing a mode shape on nodes or elements

  • solution_in_modal_space (FieldsContainer) – One field by time/frequency with each field having a ponderating coefficient for each mode of the modal_basis pin

  • time_scoping (Scoping, optional) – This input allows to compute the result on a subset of the time frequency domain defined in the solution_in_modal_space fields container

  • mesh_scoping (Scoping or ScopingsContainer, optional) – This input allows to compute the result on a subset of the space domain defined in the modal_basis fields container

Examples

>>> from ansys.dpf import core as dpf
>>> # Instantiate operator
>>> op = dpf.operators.math.modal_superposition()
>>> # Make input connections
>>> my_modal_basis = dpf.FieldsContainer()
>>> op.inputs.modal_basis.connect(my_modal_basis)
>>> my_solution_in_modal_space = dpf.FieldsContainer()
>>> op.inputs.solution_in_modal_space.connect(my_solution_in_modal_space)
>>> my_time_scoping = dpf.Scoping()
>>> op.inputs.time_scoping.connect(my_time_scoping)
>>> my_mesh_scoping = dpf.Scoping()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> # Instantiate operator and connect inputs in one line
>>> op = dpf.operators.math.modal_superposition(
...     modal_basis=my_modal_basis,
...     solution_in_modal_space=my_solution_in_modal_space,
...     time_scoping=my_time_scoping,
...     mesh_scoping=my_mesh_scoping,
... )
>>> # Get output data
>>> result_fields_container = op.outputs.fields_container()
static default_config(server=None)#

Returns the default config of the operator.

This config can then be changed to the user needs and be used to instantiate the operator. The Configuration allows to customize how the operation will be processed by the operator.

Parameters

server (server.DPFServer, optional) – Server with channel connected to the remote or local instance. When None, attempts to use the the global server.

property inputs#

Enables to connect inputs to the operator

Returns

inputs

Return type

InputsModalSuperposition

property outputs#

Enables to get outputs of the operator by evaluationg it

Returns

outputs

Return type

OutputsModalSuperposition

property config#

Copy of the operator’s current configuration.

You can modify the copy of the configuration and then use operator.config = new_config or create an operator with the new configuration as a parameter.

Returns

Copy of the operator’s current configuration.

Return type

ansys.dpf.core.config.Config

connect(pin, inpt, pin_out=0)#

Connect an input on the operator using a pin number.

Parameters
  • pin (int) – Number of the input pin.

  • inpt (str, int, double, bool, list of int, list of doubles,) –

    Field, FieldsContainer, Scoping, ScopingsContainer, MeshedRegion,

    MeshesContainer, DataSources, Operator, os.PathLike

    Object to connect to.

  • pin_out (int, optional) – If the input is an operator, the output pin of the input operator. The default is 0.

Examples

Compute the minimum of displacement by chaining the "U" and "min_max_fc" operators.

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> max_fc_op = dpf.operators.min_max.min_max_fc()
>>> max_fc_op.inputs.connect(disp_op.outputs)
>>> max_field = max_fc_op.outputs.field_max()
>>> max_field.data
array([[0.59428386, 0.00201751, 0.0006032 ]])
eval(pin=None)#

Evaluate this operator.

Parameters

pin (int) – Number of the output pin. The default is None.

Returns

output – Returns the first output of the operator by default and the output of a given pin when specified. Or, it only evaluates the operator without output.

Return type

FieldsContainer, Field, MeshedRegion, Scoping

Examples

Use the eval method.

>>> from ansys.dpf import core as dpf
>>> import ansys.dpf.core.operators.math as math
>>> from ansys.dpf.core import examples
>>> data_src = dpf.DataSources(examples.multishells_rst)
>>> disp_op = dpf.operators.result.displacement()
>>> disp_op.inputs.data_sources(data_src)
>>> normfc = math.norm_fc(disp_op).eval()
get_output(pin=0, output_type=None)#

Retrieve the output of the operator on the pin number.

To activate the progress bar for server version higher or equal to 3.0, use my_op.progress_bar=True

Parameters
  • pin (int, optional) – Number of the output pin. The default is 0.

  • output_type (ansys.dpf.core.common.types, optional) – Requested type of the output. The default is None.

Returns

Output of the operator.

Return type

type

static operator_specification(op_name, server=None)#

Put the grpc spec message in self._spec

property progress_bar: bool#

With this property, the user can choose to print a progress bar when the operator’s output is requested, default is False

run()#

Evaluate this operator.

class ansys.dpf.core.operators.math.modal_superposition.InputsModalSuperposition(op: ansys.dpf.core.dpf_operator.Operator)#

Intermediate class used to connect user inputs to modal_superposition operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> my_modal_basis = dpf.FieldsContainer()
>>> op.inputs.modal_basis.connect(my_modal_basis)
>>> my_solution_in_modal_space = dpf.FieldsContainer()
>>> op.inputs.solution_in_modal_space.connect(my_solution_in_modal_space)
>>> my_time_scoping = dpf.Scoping()
>>> op.inputs.time_scoping.connect(my_time_scoping)
>>> my_mesh_scoping = dpf.Scoping()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
property modal_basis#

Allows to connect modal_basis input to the operator.

One field by mode with each field representing a mode shape on nodes or elements

Parameters

my_modal_basis (FieldsContainer) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> op.inputs.modal_basis.connect(my_modal_basis)
>>> # or
>>> op.inputs.modal_basis(my_modal_basis)
property solution_in_modal_space#

Allows to connect solution_in_modal_space input to the operator.

One field by time/frequency with each field having a ponderating coefficient for each mode of the modal_basis pin

Parameters

my_solution_in_modal_space (FieldsContainer) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> op.inputs.solution_in_modal_space.connect(my_solution_in_modal_space)
>>> # or
>>> op.inputs.solution_in_modal_space(my_solution_in_modal_space)
property time_scoping#

Allows to connect time_scoping input to the operator.

This input allows to compute the result on a subset of the time frequency domain defined in the solution_in_modal_space fields container

Parameters

my_time_scoping (Scoping) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> op.inputs.time_scoping.connect(my_time_scoping)
>>> # or
>>> op.inputs.time_scoping(my_time_scoping)
property mesh_scoping#

Allows to connect mesh_scoping input to the operator.

This input allows to compute the result on a subset of the space domain defined in the modal_basis fields container

Parameters

my_mesh_scoping (Scoping or ScopingsContainer) –

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> op.inputs.mesh_scoping.connect(my_mesh_scoping)
>>> # or
>>> op.inputs.mesh_scoping(my_mesh_scoping)
connect(inpt)#

Connect any input (an entity or an operator output) to any input pin of this operator.

Searches for the input type corresponding to the output.

Parameters

inpt (str, int, double, Field, FieldsContainer, Scoping,) –

DataSources, MeshedRegion, ScopingsContainer, CyclicSupport,

…, Output, Outputs, Operator, os.PathLike

Input of the operator.

class ansys.dpf.core.operators.math.modal_superposition.OutputsModalSuperposition(op: ansys.dpf.core.dpf_operator.Operator)#

Intermediate class used to get outputs from modal_superposition operator.

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> # Connect inputs : op.inputs. ...
>>> result_fields_container = op.outputs.fields_container()
property fields_container#

Allows to get fields_container output of the operator

Returns

my_fields_container

Return type

FieldsContainer

Examples

>>> from ansys.dpf import core as dpf
>>> op = dpf.operators.math.modal_superposition()
>>> # Connect inputs : op.inputs. ...
>>> result_fields_container = op.outputs.fields_container()

© Copyright (c) 2022 ANSYS, Inc. All rights reserved.

Created using Sphinx 4.5.0.