• No results found

class pulse.preprocessing.node.Node(x, y, z, **kwargs) A node class. This class creates a node object from input data.

Parameters

• x (float) – Node x coordinate.

• y (float) – node y coordinate.

• z (float) – Node z coordinate.

• global_index (int, optional) – Internal node index used for computing.

Default is None.

• external_index (int) – Node index displayed to the user. Default is None.

admittance(area_fluid, frequencies)

This method returns the node’s lumped acoustic admittance according to either prescribed spe-cific impedance or prescribed radiation impedance. The admittance array has the same length as the frequencies array. In terms of analysis, if admittance is constant in the frequency do-main, the method returns an array filled with the constant value with the same length as the frequencies array.

Parameters

• area_fluid (float) – Acoustic fluid cross section area.

• frequencies (list) – Frequencies of analysis.

Returns Lumped acoustic admittance Return type complex array

Raises

• TypeError – The Specific Impedance array and frequencies array must have the same length.

• TypeError – The Radiation Impedance array and frequencies array must have the same length.

property coordinates

This method returns the node’s coordinates as a array.

Returns Node coordinates Return type array distance_to(other)

This method returns the distance between the actual node and other one.

Parameters other (Node object) – The node to calculate the distance to.

Returns Distance between the nodes.

Return type float

3.8. Node 29

getAcousticBoundaryCondition()

This method returns the node’s acoustic pressure boundary condition.

Returns acoustic_boundary_condition – The acoustic pressure boundary condition prescribed into the node.

Return type complex See also:

set_acoustic_boundary_condition Attributes the acoustic pressure boundary con-dition into the node.

get_acoustic_boundary_condition_indexes()

This method returns the index of the acoustic degrees of freedom with prescribed pressure boundary condition.

Returns indexes – Index of the acoustic degrees with prescribed pressure boundary conditions.

Return type 0 or None See also:

get_acoustic_pressure_bc_values Acoustic pressure boundary condition if it is prescribed.

get_acoustic_pressure_bc_values()

This method returns the value of the acoustic pressure boundary condition if it is prescribed.

Returns value – Acoustic pressure boundary condition if it is prescribed.

Return type complex or None See also:

get_acoustic_boundary_condition_indexes Index of the acoustic degrees if it has prescribed pressure boundary conditions.

get_lumped_dampings()

This method returns the node’s lumped dampings in the local coordinate system according to the degrees of freedom.

Returns lumped_dampings – The lumped dampings prescribed into the node.

Return type array get_lumped_stiffness()

This method returns the node’s lumped stiffness in the local coordinate system according to the degrees of freedom.

Returns lumped_stiffness – The lumped stiffness prescribed into the node.

Return type array get_prescribed_dofs()

This method returns the node’s structural displacement and rotation boundary conditions in the local coordinate system according to the degrees of freedom.

Returns boundary_condition – The boundary conditions prescribed into the node.

Return type array See also:

set_prescribed_dofs_bc Attributes the structural boundary conditions into the node.

get_prescribed_dofs_bc_indexes()

This method returns the index(es) of the degrees of freedom in the local coordinate system which has(have) prescribed structural displacement or rotation boundary conditions. The array share the same structure of the get_prescribed_dofs_bc_values array.

Returns indexes – Index(es) of the degrees of freedom which has(have) prescribed structural boundary conditions.

Return type array See also:

get_prescribed_dofs_bc_values Value(s) of the prescribed boundary conditions.

get_prescribed_dofs_bc_values()

This method returns the value(s) of the prescribed structural displacement or rotation boundary conditions. The array share the same structure of the get_prescribed_dofs_bc_indexes array.

Returns indexes – Value(s) of the prescribed structural boundary conditions.

Return type array See also:

get_prescribed_dofs_bc_indexes Index(es) of the degrees of freedom which has(have) prescribed boundary conditions.

get_prescribed_loads()

This method returns the prescribed nodal forces and moments load in the local coordinate sys-tem according to the the degrees of freedom.

Returns indexes – Value(s) of the prescribed nodal force and moments boundary con-ditions.

Return type array See also:

set_prescribed_loads Attributes nodal loads in the local coordinate system.

get_volume_velocity(frequencies)

This method returns the node’s acoustic volume velocity boundary condition. The volume velocity array has the same length as the frequencies array. In terms of analysis, if volume velocity is constant in the frequency domain, the method returns a array filled with the constant value with the same length as the frequencies array.

Parameters frequencies (list) – Frequencies of analysis.

Returns The acoustic volume velocity boundary condition prescribed into the node.

Return type complex array

Raises TypeError – The frequencies array must have the same length of the volume velocity array when a table is prescribed. Please, check the frequency analysis setup.

See also:

set_prescribed_volume_velocity Attributes the node’s acoustic volume velocity boundary condition.

property global_dof

This method returns the node’s structural degrees of freedom in the global coordinate system.

The 3D Timoshenko beam theory implemented takes into account the three node’s translations and the three node’s rotations.

Returns Node’s structural degrees of freedom in the global coordinate system Return type list

See also:

local_dof Structural degrees of freedom in the local coordinate system.

haveAcousticBoundaryCondition()

This method evaluates the existence of acoustic pressure boundary condition.

Returns True when there is acoustic pressure boundary condition prescribed into the node.

Return type bool haveVolumeVelocity()

This method evaluates the existence of volume velocity pressure boundary condition.

Returns True when there is volume velocity pressure boundary condition prescribed into the node, False otherwise.

Return type bool

3.8. Node 31

property local_dof

This method returns the node’s structural degrees of freedom in the local coordinate system.

The 3D Timoshenko beam theory implemented takes into account the three node’s translations and the three node’s rotations.

Returns Node’s structural degrees of freedom in the local coordinate system.

Return type list See also:

global_dof Structural degrees of freedom in the global coordinate system.

set_acoustic_boundary_condition(acoustic_boundary_condition) This method attributes the node’s acoustic pressure boundary condition.

Parameters acoustic_boundary_condition (complex) – The acoustic pressure boundary condition to be prescribed into the node.

See also:

getAcousticBoundaryCondition Returns the acoustic pressure boundary condition prescribed into the node.

set_prescribed_dofs_bc(boundary_condition)

This method attributes the node’s structural displacement and rotation boundary conditions in the local coordinate system according to the degrees of freedom.

Parameters boundary_condition (array) – The structural boundary condi-tions to be prescribed into the node.

See also:

get_prescribed_dofs Returns the structural boundary conditions prescribed into the node.

set_prescribed_loads(values)

This method attributes the nodal force and moment loads in the local coordinate system accord-ing to the the degrees of freedom.

Parameters indexes (array) – Value(s) of the nodal force and moments to be prescribed boundary conditions.

See also:

get_prescribed_loads Prescribed nodal loads in the local coordinate system.

set_prescribed_volume_velocity(volume_velocity)

This method attributes the node’s acoustic volume velocity boundary condition.

Parameters volume_velocity (complex) – The acoustic volume velocity boundary condition to be prescribed into the node.

See also:

get_volume_velocity Returns the volume velocity boundary condition prescribed into the node.

FOUR

PROCESSING

4.1 Assembly Acoustic

class pulse.processing.assembly_acoustic.AssemblyAcoustic(mesh, fre-quencies) This class creates a acoustic assembly object from input data.

Parameters

• mesh (Mesh object) – Acoustic finite element mesh.

• frequencies (array) – Frequencies of analysis.

get_global_matrices()

This method perform the assembly process of the acoustic FETM matrices.

Returns

• K (list) – List of admittance matrices of the free degree of freedom. Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis.

• Kr (list) – List of admittance matrices of the prescribed degree of freedom. Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis.

get_global_matrices_modal()

This method perform the assembly process of the acoustic FEM matrices.

Returns

• K (sparse csr_matrix) – Acoustic stiffness matrix.

• M (sparse csr_matrix) – Acoustic inertia matrix.

get_global_volume_velocity()

This method perform the assembly process of the acoustic load, volume velocity.

Returns volume_velocity – Volume velocity load.

Return type array

get_length_corretion(element)

This method evaluate the acoustic length correction for an element. The necessary conditions and the type of correction are checked.

Parameters element (Acoustic element object) – Acoustic element.

Returns Length correction.

Return type float get_lumped_matrices()

This method perform the assembly process of the acoustic FETM lumped matrices.

Returns

• K_lump (list) – List of lumped admittance matrices of the free degree of freedom.

Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis.

33

• Kr_lump (list) – List of lumped admittance matrices of the prescribed degree of freedom. Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis.

get_pipe_and_unprescribed_indexes()

This method returns all the indexes of the free acoustic degrees of freedom.

Returns Indexes of the free acoustic degrees of freedom.

Return type array See also:

get_prescribed_values Values of the prescribed pressure boundary condition.

get_prescribed_indexes Indexes of the acoustic degrees with prescribed pressure boundary conditions.

get_prescribed_indexes()

This method returns all the indexes of the acoustic degrees of freedom with prescribed pressure boundary condition.

Returns Indexes of the acoustic degrees with prescribed pressure boundary condi-tions.

Return type array See also:

get_prescribed_values Values of the prescribed pressure boundary condition.

get_unprescribed_indexes Indexes of the free acoustic degrees of freedom.

get_prescribed_values()

This method returns all the values of the prescribed pressure boundary condition.

Returns Values of the prescribed pressure boundary condition.

Return type array See also:

get_prescribed_indexes Indexes of the acoustic degrees with prescribed pressure boundary conditions.

get_unprescribed_indexes Indexes of the free acoustic degrees of freedom.

get_unprescribed_indexes()

This method returns all the indexes of the free acoustic degrees of freedom.

Returns Indexes of the free acoustic degrees of freedom.

Return type array See also:

get_prescribed_values Values of the prescribed pressure boundary condition.

get_prescribed_indexes Indexes of the acoustic degrees with prescribed pressure boundary conditions.

pulse.processing.assembly_acoustic.length_correction_branch(branch_diameter,

princi-pal_diameter) This function returns the acoustic length correction due to sidebranch in the acoustic domain. This discontinuity is characterized by three elements, two with the same diameters in line, and the other with different diameter connected to these two.

Parameters

• smaller_diameter (float) – Smaller diameter between the two elements di-ameters.

• larger_diameter (float) – Larger diameter between the two elements diam-eters.

Returns Length correction due to side branch.

Return type float See also:

length_correction_expansion Length correction due to expansion in the acoustic do-main.

pulse.processing.assembly_acoustic.length_correction_expansion(smaller_diameter, larger_diameter) This function returns the acoustic length correction due to expansion in the acoustic domain. This discontinuity is characterized by two elements in line with different diameters.

Parameters

• smaller_diameter (float) – Smaller diameter between the two elements di-ameters.

• larger_diameter (float) – Larger diameter between the two elements diam-eters.

Returns Length correction due to expansion.

Return type float See also:

length_correction_branch Length correction due to sidebranch in the acoustic domain.

In document OpenPulse MOPT. Mar 08, 2021 (Page 33-39)

Related documents