• No results found

OpenPulse MOPT. Mar 08, 2021

N/A
N/A
Protected

Academic year: 2021

Share "OpenPulse MOPT. Mar 08, 2021"

Copied!
53
0
0

Loading.... (view fulltext now)

Full text

(1)

MOPT

(2)
(3)

1 Prerequisites 3 2 Installing 5 3 Preprocessing 7 3.1 Acoustic Element. . . 7 3.2 Structural Element . . . 10 3.3 Cross Section. . . 14 3.4 Entity . . . 17 3.5 Fluid . . . 18 3.6 Material. . . 20 3.7 Mesh . . . 21 3.8 Node . . . 29 4 Processing 33 4.1 Assembly Acoustic. . . 33 4.2 Assembly Structural . . . 35 4.3 Solution Acoustic . . . 37 4.4 Solution Structural . . . 39

Python Module Index 41

Index 43

(4)
(5)

Open Source Software for Pulsation Analysis of Pipeline Systems

OpenPulse is a software written in Python for numerical modelling of low-frequency acoustically induced vibration in gas pipeline systems. It allows to import the geometry of the pipe system (lines in IGES), insert materials proper-ties, set sections, and import pressure/acceleration/force loads (from measurements or theory). OpenPulse performs an acoustic time harmonic response analysis of the respective 1D acoustic domain using the Finite Element Trans-fer Method (FETM). The resulting pressure field is applied as a distributed load over the respective structural piping system, modeled with the Timoshenko beam theory and the Finite Element Method (FEM), in order to run a struc-tural time harmonic response analysis. In addition to simply boundary conditions as constraints on displacements, OpenPulse allows to insert lumped springs, masses and dampers along the domain.

After defining the FEM mesh for the model, you can plot the piping system geometry and run simulations such as modal analysis and harmonic analysis. It is possible to plot deformed shapes, frequency plots of acoustical and structural responses, stress fields and local stresses of desired sections.

You can try it out now by running the tutorial on binder.

(6)
(7)
(8)
(9)

TWO

INSTALLING

Install OpenPulse

Clone or download [OpenPulse](https://github.com/open-pulse/OpenPulse) files. In the case of download, unzip the received file and open a terminal in the main folder (an easy way to do this is to enter the folder, press shift and right click, then “Open PowerShell here”). So, enter the command:

pip install -r requirements.txt

Run OpenPulse

In the same folder, enter the following command in the terminal:

python pulse.py

(10)
(11)

THREE

PREPROCESSING

3.1 Acoustic Element

class pulse.preprocessing.acoustic_element.AcousticElement(first_node, last_node, index, **kwargs) An acoustic element. This class creates an acoustic element from input data.

Parameters

• first_node (Node object) – Fist node of element. • last_node (Node object) – Last node of element. • index (int) – Element index.

• element_type (str, ['dampingless', 'hysteretic', 'wide-duct', 'LRF fluid equivalent', 'LRF full'],

optional) – Element type Default is ‘dampingless’.

• hysteretic_damping (float, optional) – Hysteretic damping coeffi-cient Default is ‘None’.

• material (Material object, optional) – Element structural material. Default is ‘None’.

• fluid (Fluid object, optional) – Element acoustic fluid. Default is ‘None’.

• cross_section (CrossSection object, optional) – Element cross section. Default is ‘None’.

• loaded_pressure (array, optional) – Acoustic pressure on the nodes. Default is [0, 0].

• acoustic_length_correction (int, [0, 1, 2], optional) – Acoustic length correction due to acoustic discontinuities. The prescription is done through the following labeling: None: disable 0 : expansion 1 : side_branch 2 : loop Default is None.

_fetm_damping_models(frequencies)

This method returns wavenumber and fluid impedance for the FETM 1D theory according to the element’s damping model (element type). The damping models compatible with FETM 1D are Dampingless, Hysteretic, Wide-duct, and LRF fluid equivalent.

Parameters frequencies (array) – Frequencies of analysis in Hz. Returns

(12)

• kappa (complex-array) – Complex wavenumber. This array have the same struc-ture of the frequencies array.

• z (complex-array) – Complex impedance. This array have the same structure of the frequencies array.

fem_1d_matrix(length_correction=0)

This method returns the FEM acoustic 1D elementary matrices. The method allows to include the length correction due to acoustic discontinuities (loop, expansion, side branch). The FEM is not compatible with any damping model.

Obs.: In the OpenPulse, this formulation is only used to evaluate the acoustic modal analysis. Parameters length_correction (float, optional) – Element length

cor-rection to be added into the element length. Returns

• Ke (2D array) – Element acoustic stiffness matrix. • Me (2D array) – Element acoustic inertia matrix.

fetm_1d_matrix(frequencies, length_correction=0)

This method returns the FETM 1D element’s admittance matrix for each frequency of analy-sis. The method allows to include the length correction due to acoustic discontinuities (loop, expansion, side branch). The damping models compatible with FETM 1D are Dampingless, Hysteretic, Wide-duct, and LRF fluid equivalent.

Parameters

• frequencies (array) – Frequencies of analysis in Hertz.

• length_correction (float, optional) – Element length correction to be added into the element length.

Returns Element’s admittance matrix. Each row of the output array is an element’s admittance matrix corresponding to a frequency of analysis.

Return type 2D array

property global_dof

This method returns a list of the element’s global degree of freedom. Returns Indexes of the global degree of freedom.

Return type list

global_matrix_indexes()

This method returns the rows’ and columns’ indexes that place the element’s matrices in the global matrices. The created lists are such that the method is useful to generate sparse matrices.

Returns

• rows (list) – List of indexes of the global matrices’ rows where the element’s matrices have to be added.

• cols (list) – List of indexes of the global matrices’ columns where the element’s matrices have to be added.

property impedance

This method returns the element’s acoustic impedance based on its fluid and cross section. Returns The element impedance.

Return type float

property length

This method returns the element’s length. Returns Element length.

Return type float

lrf_thermoviscous_matrix(frequencies, length_correction=0)

(13)

Parameters

• frequencies (array) – Frequencies of analysis in Hertz.

• length_correction (float, optional) – Element length correction to be added into the element length.

Returns Elementary admittance matrix. Each row of the output array is an element admittance matrix corresponding to a frequency of analysis.

Return type 2D array

matrix(frequencies, length_correction=0)

This method returns the element’s admittance matrix for each frequency of analysis accord-ing to the element type. The method allows to include the length correction due to acoustic discontinuities (loop, expansion, side branch).

Parameters

• frequencies (array) – Frequencies of analysis in Hz.

• length_correction (float, optional) – Element length correction to be added into the element length.

Returns Element’s admittance matrix. Each row of the output array is an element’s admittance matrix corresponding to a frequency of analysis.

Return type 2D array

property orientation

This method returns element’s axial orientation in the global coordinate system. Returns x-axis vector.

Return type array

radiation_impedance(kappa_complex, impedance_complex)

This method update the radiation impedance attributed to the element nodes according to the anechoic, flanged, and unflanged prescription.

Parameters

• kappa (complex-array) – Complex wavenumber. • z (complex-array) – Complex impedance.

speed_of_sound_corrected()

This method returns the corrected speed of sound due to the mechanical compliance of the pipe wall.

Returns Speed of sound in the element. Return type float

References

pulse.preprocessing.acoustic_element.flanged_termination_impedance(kappa_complex, pipe_radius,

impedance_complex) Auxiliary function to update the radiation impedance attributed to the element nodes according to

the flanged prescription. Parameters

• kappa_complex (complex-array) – Complex wavenumber. • pipe_radius (float) – Pipe radius.

• impedance_complex (complex-array) – Complex impedance.

Returns Flanged termination impedance. The array has the same length as kappa_complex parameter.

Return type array

(14)

pulse.preprocessing.acoustic_element.j2j0(z)

Auxiliary function to compute the ratio between the Bessel functions J2 and J0. When the imaginary part of input z reaches 700, the following syntonic approximation is used:

j2/j0 = -1, when z --> \infty. Parameters z (array) –

pulse.preprocessing.acoustic_element.poly_function(x)

This function compute a auxiliary polynomial to define the unflanged radiation impedance. Parameters array – Independent variable.

Returns Polynomial output. Return type array

pulse.preprocessing.acoustic_element.unflanged_termination_impedance(kappa_complex, pipe_radius,

impedance_complex) Auxiliary function to update the radiation impedance attributed to the element nodes according to

the unflanged prescription. Parameters

• kappa_complex (complex-array) – Complex wavenumber. • pipe_radius (float) – Pipe radius.

• impedance_complex (complex-array) – Complex system impedance. Returns Unflanged pipe termination impedance. The array has the same length as

kappa_complex parameter. Return type array

3.2 Structural Element

class pulse.preprocessing.structural_element.StructuralElement(first_node, last_node, in-dex, **kwargs) A structural element. This class creates a structural element from input data.

Parameters

• first_node (Node object) – Fist node of element. • last_node (Node object) – Last node of element. • index (int) – Element index.

• element_type (str, ['pipe_1', 'pipe_2', 'beam_1'], optional) – Element type Default is ‘pipe_1’.

• material (Material object, optional) – Element structural material. Default is ‘None’.

(15)

• cross_section (CrossSection object, optional) – Element cross section. Default is ‘None’.

• loaded_forces (array, optional) – Structural forces and moments on the nodes. Default is zeros(12).

_element_rotation_matrix()

This method returns the transformation matrix that perform a rotation from the element’s local coordinate system to the global coordinate system.

Returns Rotation matrix Return type array

force_vector()

This method returns the element load vector in the local coordinate system. The loads are forces and moments according to the degree of freedom.

Returns force – Load in the local coordinate system. Return type array

Raises TypeError – Only pipe_1 and pipe_2 element types are allowed.

force_vector_acoustic_gcs(frequencies, pressure_avg, pressure_external)

This method returns the element load vector due to the internal acoustic pressure field in the global coordinate system. The loads are forces and moments according to the degree of free-dom.

Parameters

• frequencies (array) – Frequencies of analysis in Hertz.

• pressure_avg (array) – The average between the pressure at the first node and last node of the element.

Returns force – Load vector in the global coordinate system. Return type array

force_vector_gcs()

This method returns the element force vector in the global coordinate system. Returns Force vector in the global coordinate system.

Return type array

get_local_coordinate_system_info()

This method returns the coordinates of the element center and its local coordinate system. Returns

• center_element_coordinates (array) – Coordinates of element center. • directional_vectors (array) – Element local coordinate system.

get_shear_coefficient(section_info, poisson)

This method returns the shear coefficient according to the beam cross section. This coefficient is traditionally introduced in the Timoshenko beam theory.

Parameters

• section_info – Beam cross section data. • poisson (float) – Material Poisson’s ratio. Returns shear_coefficient – shear coefficient Return type float

property global_dof

This method returns the element global degrees of freedom. The 3D Timoshenko beam theory implemented takes into account the three node’s translations and the three node’s rotations.

Returns Element global degrees of freedom. Return type list

global_matrix_indexes()

This method returns the indexes of the rows and columns that place the element matrices into

(16)

the global matrices according to the element global degrees of freedom. Returns

• rows (array) – Indexes of the rows. It’s a matrix with dimension 12 by 12 constant through the rows.

• cols (array) – Indexes of the columns. It’s a matrix with dimension 12 by 12 constant through the columns.

property length

This method returns the element length. Returns Element length.

Return type float

mass_matrix_beam()

This method returns the beam element mass matrix according to the 3D Timoshenko beam theory in the local coordinate system. This formulation is suitable for any beam cross section data.

Returns mass – Beam element mass matrix in the local coordinate system. Return type array

See also:

mass_matrix_pipes Pipe element mass matrix in the local coordinate system.

mass_matrix_gcs()

This method returns the element mass matrix according to the 3D Timoshenko beam theory in the global coordinate system.

Returns mass – Element mass matrix in the global coordinate system. Return type array

See also:

matrices_gcs Element stiffness and mass matrices in the global coordinate system.

stiffness_matrix_gcs Element stiffness matrix in the global coordinate system.

mass_matrix_pipes()

This method returns the pipe element mass matrix according to the 3D Timoshenko beam theory in the local coordinate system. This formulation is optimized for pipe cross section data.

Returns mass – Pipe element mass matrix in the local coordinate system. Return type array

See also:

mass_matrix_beam Beam element mass matrix in the local coordinate system.

matrices_gcs()

This method returns the element stiffness and mass matrices according to the 3D Timoshenko beam theory in the global coordinate system.

Returns

• stiffness (array) – Element stiffness matrix in the global coordinate system. • mass (array) – Element mass matrix in the global coordinate system. See also:

stiffness_matrix_gcs Element stiffness matrix in the global coordinate system.

mass_matrix_gcs Element mass matrix in the global coordinate system.

stiffness_matrix_beam()

This method returns the beam element stiffness matrix according to the 3D Timoshenko beam theory in the local coordinate system. This formulation is suitable for any beam cross section data.

Returns stiffness – Beam element stiffness matrix in the local coordinate system. Return type array

(17)

stiffness_matrix_pipes Pipe element stiffness matrix in the local coordinate system.

stiffness_matrix_gcs()

This method returns the element stiffness matrix according to the 3D Timoshenko beam theory in the global coordinate system.

Returns stiffness – Element stiffness matrix in the global coordinate system. Return type array

See also:

matrices_gcs Element stiffness and mass matrices in the global coordinate system.

mass_matrix_gcs Element mass matrix in the global coordinate system.

stiffness_matrix_pipes Pipe element stiffness matrix in the local coordinate system.

stiffness_matrix_beam Beam element stiffness matrix in the local coordinate system.

stiffness_matrix_pipes()

This method returns the pipe element stiffness matrix according to the 3D Timoshenko beam theory in the local coordinate system. This formulation is optimized for pipe cross section data.

Returns stiffness – Pipe element stiffness matrix in the local coordinate system. Return type array

See also:

stiffness_matrix_beam Beam element stiffness matrix in the local coordinate system.

stress_stiffening() This method returns description

Returns S – Load vector in the global coordinate system. Return type array

pulse.preprocessing.structural_element.gauss_quadrature(integration_points) This method returns the Gauss quadrature data.

Parameters integration_points (int) – Number of integration points. Returns

• points (array) – Integration points in the normalized domain [-1,1].

• weigths (array) – Weigths of the respective integration points in the sum approxi-mation.

Raises TypeError – Only 1, 2, and 3 integration points are supported. pulse.preprocessing.structural_element.shape_function(ksi)

This function returns the one dimensional linear shape function and its derivative. Parameters

• in [-1 (float) – Dimensionless coordinate. • 1] – Dimensionless coordinate.

Returns

• phi (array) – One dimensional linear shape function. • derivative_phi (array) – Shape function derivative.

pulse.preprocessing.structural_element.symmetrize(a) This function receives matrix and makes it symmetric.

Parameters array – Matrix. Returns Symmetric matrix. Return type array

(18)

3.3 Cross Section

class pulse.preprocessing.cross_section.CrossSection(external_diameter, thickness, offset_y, offset_z, pois-son_ratio=0, ele-ment_type='pipe_1', divi-sion_number=64, **kwargs) This class creates a tube Cross Section object from input data.

Parameters

• external_diameter (float) – Tube external diameter. • thickness (float) – Tube wall thickness.

• offset_y (float) – y coordinate of the tube eccentricity offset. • offset_z (float) – z coordinate of the tube eccentricity offset.

• poisson_ratio (float, optional) – Poisson’s ration of the material at-tributed to the tube. Default is 0.

• element_type (['pipe_1','pipe_2','beam_1'], optional) – El-ement type of the structural elEl-ements attributed to the tube. Default is ‘pipe_1’. • division_number ([8, 16, 32, 64, 128], optional) – Cross

sec-tion division number. This number is directly associated with the number of ele-ments used in the process of approximating the cross section shear properties. De-fault is 64.

• insulation_thickness (float, optional) – Tube insolation thickness. Default is 0.

• insulation_density (float, optional) – Tube insolation density. De-fault is 0.

• additional_section_info (, optional) – Cross section additional in-fos. Default is None.

• area (float, optional) – Cross section area. Only attributed if the cross section is not tubular. Default is 0.

• Iyy (float, optional) – Cross section second moment of area with respect to the y direction. Only attributed if the cross section is not tubular. Default is 0. • Izz (float, optional) – Cross section second moment of area with respect

to the z direction. Only attributed if the cross section is not tubular. Default is 0. • Iyz (float, optional) – Cross section second moment of area with respect

to the yz plane. Only attributed if the cross section is not tubular. Default is 0. • shear_coefficient (float, optional) – Cross section shear coefficient.

Only attributed if the cross section is not tubular. Default is 1.

_polar_moment_area()

Cross section second polar moment of area [m**4].

property area_fluid

(19)

Returns internal area. Return type float

property area_insulation

This method returns the insulation cross section area. Returns insulation cross section area.

Return type float

area_properties(el_type)

This method updates the tube cross area properties: area, first moment of area relative to y, first moment of area relative to z, second moment of area relative to y, second moment of area relative to z, second moment of area relative to yz, second moment of area relative to yz, second polar moment of area, and (y,z) centroid coordinate.

Parameters el_type (['pipe_1','pipe_2','beam_1']) – Element type of the structural elements attributed to the tube. Default is None.

assembly_indexes()

This method updates the assembly process rows and columns indexing.

getExternalDiameter()

This method returns the tube cross section external diameter. Returns external diameter.

Return type float

getExternalRadius()

This method returns the tube cross section external radius. Returns external radius.

Return type float

getInternalDiameter()

This method returns the tube cross section internal diameter. Returns internal diameter.

Return type float

getThickness()

This method returns the tube cross section thickness. Returns thickness.

Return type float

mesh_connectivity()

This method returns the tube cross mesh connectivity formed by 9-node quadrilateral elements. Returns Tube cross mesh connectivity.

Return type array See also:

mesh_coordinate Tube cross mesh nodal coordinates.

mesh_coordinate()

This method returns the tube cross mesh nodal coordinates formed by 9-node quadrilateral elements.

Returns Tube cross mesh nodal coordinates. Return type array

See also:

mesh_connectivity Tube cross mesh connectivity.

offset_rotation(el_type='pipe_1')

This method updates the tube cross section rotation due to the shear effects and eccentricity offset.

(20)

Parameters el_type (['pipe_1','pipe_2','beam_1'], optional) – Element type of the structural elements attributed to the tube. Default is None.

preprocessing(el_type=None)

This method returns the tube cross mesh nodal coordinates formed by 9-node quadrilateral elements.

Parameters el_type (['pipe_1','pipe_2','beam_1'], optional) – Element type of the structural elements attributed to the tube. Default is None. Returns

• jac (array) – Jacobian matrix of each integration point. It’s a 3D matrix such that jac[p,:] is the Jacobian matrix of the p-th integration point (in-line 2x2 matrix). • inv_jac (array) – Inverse of the Jacobian matrix of each element. It’s a 3D matrix

such that inv_jac[p,:] is the inverse of the Jacobian matrix of the p-th integration point (in-line 2x2 matrix).

• dA (array) – Area differential of each integration point.

• y (array) – y-coordinate in the global coordinate system of each integration point. • z (array) – z-coordinate in the global coordinate system of each integration point.

shear_properties(poisson_ratio=0, el_type='pipe_1')

This method updates the tube cross shear properties: shear coefficients and (y,z) shear centroid coordinate.

Parameters

• poisson_ratio (float, optional) – Poisson’s ration of the material at-tributed to the tube. Default is 0.

• el_type (['pipe_1','pipe_2','beam_1'], optional) – Element type of the structural elements attributed to the tube. Default is None.

update_properties()

This method updates all the tube cross section properties.

pulse.preprocessing.cross_section.gauss_quadrature2D()

This method returns the Gauss quadrature data for 2D integration and two integration points. Returns

• points (array) – Integration points in the normalized domain [-1,1]x[-1,1].

• weigths (array) – Weigths of the respective integration points in the sum approxi-mation.

See also:

get_all_shape_functions Shape function and its derivative for all the integration points.

pulse.preprocessing.cross_section.get_all_shape_functions()

This function returns the two dimensional quadratic shape function and its derivative (9-node quadri-lateral element) for all Gauss quadrature 2D integration points in the dimensionless coordinate sys-tem (ksi,eta).

Returns

• phi (array) – One dimensional linear shape function. • dphi (array) – Shape function derivative.

See also:

shape_function Shape function and its derivative for one point.

(21)

pulse.preprocessing.cross_section.shape_function(ksi, eta)

This function returns the two dimensional quadratic shape function and its derivative (9-node quadri-lateral element) for one point in the dimensionless coordinate system (ksi,eta).

Parameters

• ksi (float in [-1,1]) – Dimensionless x coordinate. • eta (float in [-1,1]) – Dimensionless y coordinate. Returns

• phi (array) – One dimensional linear shape function. • dphi (array) – Shape function derivative.

See also:

get_all_shape_functions Shape function and its derivative for all the integration points.

3.4 Entity

class pulse.preprocessing.entity.Entity(tag, **kwargs) A entity class. This class creates a entity object from input data.

Parameters tag (int) – Entity tag name, which is displayed to the user in the UI.

getColor()

This method returns entity color. Returns Entity color. Return type tuple See also:

getNormalizedColor Normalized entity color.

getCrossSection()

This method returns entity cross section. Returns Entity cross section. Return type CrossSection object

getElementType()

This method returns entity structural element type. Returns structural element type.

Return type int

getFluid()

This method returns entity fluid. Returns Entity fluid. Return type Fluid object

getMaterial()

This method returns entity material. Returns Entity material. Return type Material object

getNormalizedColor()

This method returns normalized entity color. Returns Normalized entity color. Return type tuple

See also:

(22)

getColor Entity color.

get_elements()

This method returns the list of elements that belong to the entity. Returns Elements that belong to the entity.

Return type list See also:

insertEdge Appends a element to the list of elements.

get_nodes()

This method returns the list of nodes that belong to the entity. Returns Nodes that belong to the entity.

Return type list See also:

insertNode Appends a node to the list of nodes.

get_tag()

This method returns entity tag. Returns Entity tag. Return type int

getcappedEnd()

This method returns entity capped end configuration. Returns Capped end configuration.

Return type boll

insertEdge(edge)

This method appends an element to the list of elements that belong to the entity. Parameters edge (gmesh element) –

See also:

get_elements List of elements that belong to the entity.

insertNode(node)

This method appends a node to the list of nodes that belong to the entity. Parameters node (Node object) –

See also:

get_nodes List of nodes that belong to the entity.

3.5 Fluid

class pulse.preprocessing.fluid.Fluid(name, density, speed_of_sound, **kwargs)

A fluid class. This class creates a fluid object from fluid properties input data. Parameters

• name (str) – Text to be used as fluid’s name. • density (float) – Fluid density.

• speed_of_sound (float) – Speed of the sound wave propagating in the fluid. • isentropic_exponent (float, optional) – Fluid isentropic exponent,

(23)

• thermal_conductivity (float, optional) – Fluid thermal conductiv-ity. Default is None.

• specific_heat_Cp (float, optional) – Fluid specific heat capacity at constant pressure. Default is None.

• dynamic_viscosity (float, optional) – Fluid dynamic viscosity. De-fault is None.

• color (tuple, optional) – The color associated with the fluid. Entity objects with this fluid object attributed will be shown with this color in the UI. Default is None.

• identifier (int, optional) – Fluid identifier displayed in the UI list of fluids. Default is -1.

property bulk_modulus

This method evaluates the fluid Bulk modulus. Returns Fluid Bulk modulus.

Return type float

getColorRGB()

This method returns the fluid color. Returns Fluid color.

Return type tuple

getName()

This method returns the fluid name. Returns Fluid name.

Return type str

getNormalizedColorRGB()

This method returns the fluid normalized color. Returns Fluid color.

Return type tuple

property impedance

This method evaluates the fluid specific impedance. Returns Fluid specific impedance.

Return type float

property kinematic_viscosity

This method evaluates the fluid kinematic viscosity. Returns Fluid kinematic viscosity.

Return type float

property prandtl

This method evaluates the fluid Prandtl number. Returns Fluid Prandtl number.

Return type float

property thermal_diffusivity

This method evaluates the fluid thermal diffusivity. Returns Fluid thermal diffusivity.

Return type float

(24)

3.6 Material

class pulse.preprocessing.material.Material(name, density, **kwargs) A material class. This class creates a material object from material properties input data.

Parameters

• name (str) – Text to be used as material’s name. • density (float) – Material density.

• young_modulus (float, optional) – Material Young’s modulus. Default is None.

• poisson_ratio (float, optional) – Material Poisson’s ratio. Default is None.

• shear_modulus (float, optional) – Material shear modulus. Default is None.

• color (tuple, optional) – The color associated with the material. Entity objects with this material object attributed will be shown with this color in the UI. Default is None.

• identifier (int, optional) – Material identifier displayed in the UI list of materials. Default is -1.

_calculate_remaining_properties()

This method evaluates the material property among Young’s modulus, Poisson’s ratio and shear modulus that was not attributed to the material.

Raises TypeError – At least two arguments among Young’s modulus, Poisson’s ratio and shear modulus have to be attributed to the material.

getColorRGB()

This method returns the material color. Returns Material color.

Return type tuple

getName()

This method returns the material name. Returns Mataerial name.

Return type str

getNormalizedColorRGB()

This method returns the material normalized color. Returns Material color.

Return type tuple

property lambda_parameter

This method evaluates the Lamé’s first parameter lambda. Returns Lamé constant lambda.

Return type float See also:

mu_parameter Evaluate Lamé constant mu.

property mu_parameter

This method evaluates the Lamé’s second parameter mu. Returns Lamé constant mu.

(25)

lambda_parameter Evaluate Lamé constant lambda.

3.7 Mesh

class pulse.preprocessing.mesh.Mesh

A mesh class. This class creates a acoustic and structural mesh object.

_create_acoustic_elements(indexes, connectivities, map_nodes, map_elements) This method generate the mesh acoustic elements.

Parameters

• indexes (List) – Nodes global indexes.

• connectivities (array) – Connectivity matrix that relates the elements and its nodes.

• map_nodes (dict) – Dictionary maps global indexes to external indexes. • map_elements (dict) – Dictionary maps global element indexes.

_create_entities()

This method generate the mesh entities, nodes, structural elements, acoustic elements and their connectivity.

_create_nodes(indexes, coords, map_nodes) This method generate the mesh nodes.

Parameters

• indexes (List) – Nodes global indexes. • coords (array) – Nodes coordinates.

• map_nodes (dict) – Dictionary maps global indexes to external indexes.

_create_structural_elements(indexes, connectivities, map_nodes, map_elements) This method generate the mesh structural elements.

Parameters

• indexes (List) – Nodes global indexes.

• connectivities (array) – Connectivity matrix that relates the elements and its nodes.

• map_nodes (dict) – Dictionary maps global indexes to external indexes. • map_elements (dict) – Dictionary maps global element indexes.

_finalize_gmsh()

This method finalize the mesher gmsh algorithm.

_initialize_gmsh(path)

This method initializes mesher algorithm gmsh.

Parameters str – CAD file path. ‘.igs’ is the only format file supported.

_load_neighbors()

This method updates the structural elements neighbors dictionary. The dictionary’s keys and values are nodes objects.

_map_lines_to_elements(mesh_loaded=False) This method maps entities to elements.

Parameters mesh_loaded (boll, optional.) – True if the mesh was already generated (internally or externally). False otherwise.

_order_global_indexes()

This method updates the nodes global indexes numbering.

_process_beam_nodes_and_indexes() This method ?????.

(26)

Returns

Return type boll

_reset_global_indexes()

This method attributes None to global index of all mesh nodes.

_set_gmsh_options(element_size)

This method sets the mesher algorithm configuration. Parameters float – Element size.

add_compressor_excitation(parameters) This method ???????

Parameters ?????? –

add_damper_to_node(nodes, values)

This method attributes structural lumped damping (damper) to a list of nodes. Parameters

• nodes_id (list) – Nodes external indexes.

• values (complex or array) – Lumped damping. Complex valued input corresponds to a constant damping with respect to the frequency. Array valued input corresponds to a variable damping with respect to the frequency.

add_elastic_nodal_link(nodeID_1, nodeID_2, parameters, _stiffness=False, _damp-ing=False)

This method ??????? Parameters

• nodeID_1 (int) – Node 1 external index. • nodeID_2 (int) – Node 2 external index. • parameters – ???????.

• _stiffness (boll, optional) – True if ???????. False otherwise. Default is False.

• _damping (boll, optional) – True if ???????. False otherwise. Default is False.

add_mass_to_node(nodes, values)

This method attributes structural lumped mass to a list of nodes. Parameters

• nodes_id (list) – Nodes external indexes.

• values (complex or array) – Lumped mass. Complex valued input cor-responds to a constant mass with respect to the frequency. Array valued input corresponds to a variable mass with respect to the frequency.

add_spring_to_node(nodes, values)

This method attributes structural lumped stiffness (spring) to a list of nodes. Parameters

• nodes_id (list) – Nodes external indexes.

• values (complex or array) – Lumped stiffness. Complex valued input corresponds to a constant stiffness with respect to the frequency. Array valued input corresponds to a variable stiffness with respect to the frequency.

check_fluid_and_cross_section_in_all_elements()

This method checks if all acoustic elements have a fluid object and a cross section object at-tributed.

check_fluid_inputs_in_all_elements()

(27)

check_material_all_elements()

This method checks if all structural elements have a material object attributed.

check_material_and_cross_section_in_all_elements()

This method checks if all structural elements have a material object and a cross section object attributed.

check_nodes_attributes(acoustic=False, structural=False, coupled=False)

This method checks if there is the necessary nodal input data to evaluate the analysis according to its type.

Parameters

• acoustic (boll, optional) – True if a acoustic analysis will be per-formed. False otherwise. Default is False.

• structural (boll, optional) – True if a structural analysis will be per-formed. False otherwise. Default is False.

• coupled (boll, optional) – True if a coupled analysis will be performed. False otherwise. Default is False.

check_poisson_all_elements()

This method checks if all structural elements have a Poisson ratio attributed.

enable_fluid_mass_adding_effect(reset=False)

This method enables or disables the addition of fluid mass in the structural element mass. Parameters reset (boll, optional) – True if the fluid mass effect have to be

disable. False to enable. Default is False.

generate(path, element_size)

This method evaluates the Lamé’s first parameter lambda. Parameters

• path (str) – CAD file path. ‘.igs’ is the only format file supported. • element_size (float) – Element size to be used to build the mesh.

get_beam_elements()

This method returns the indexes of the structural beam elements. Returns Beam elements indexes.

Return type list

get_beam_elements_global_dofs()

This method returns the acoustic global degrees of freedom of the nodes associated to structural beam elements. This method helps to exclude those degrees of freedom from acoustic analysis.

Returns Acoustic global degrees of freedom associated to beam element. Return type list

get_beam_nodes_and_indexes()

This method returns the global indexes of the nodes associated to structural beam elements. Returns Nodes global indexes associated to beam element.

Return type list

get_connectivity_matrix(reordering=True)

This method updates the mesh connectivity data. Connectivity matrix row structure: ‘’[Element index, first node index, last node index]”.

Parameters reordering (boll, optional.) – True if the nodes numbering is according to the global indexing. False otherwise. Default is True.

get_gdofs_from_nodes(nodeID_1, nodeID_2)

This method returns the ordered global degrees of freedom of two nodes. Parameters

• nodeID_1 (int) – Node 1 external index. • nodeID_2 (int) – Node 2 external index.

(28)

Returns

• reord_gdofs (list) – Global degrees of freedom ordered according to its indexes. • first_node (Node object) – First node.

• last_node (Node object) – Last node.

get_global_acoustic_indexes()

This method returns the placement of the rows and columns of the acoustic global degrees of freedom in the global matrices.

Returns

• row (array.) – Integers that place the rows. • column (array.) – Integers that place the columns.

get_global_structural_indexes()

This method returns the placement of the rows and columns of the structural global degrees of freedom in the global matrices.

Returns

• row (array.) – Integers that place the rows. • column (array.) – Integers that place the columns.

get_nodal_coordinates_matrix(reordering=True)

This method updates the mesh nodes coordinates data. Coordinates matrix row structure: ‘’[Node index, x-coordinate, y-coordinate, z-coordinate]”.

Parameters reordering (boll, optional.) – True if the nodes numbering is according to the global indexing. False otherwise. Default is True.

get_pipe_elements()

This method returns the indexes of the structural pipe elements. Returns Pipe elements indexes.

Return type list

get_pipe_elements_global_dofs()

This method returns the acoustic global degrees of freedom of the nodes associated to structural pipe elements. This method helps to keep only those degrees of freedom in acoustic analysis.

Returns Acoustic global degrees of freedom associated to pipe element. Return type list

get_radius()

This method updates and returns the ????. Returns Radius at certain node. Return type dictionary

load_mesh(coordinates, connectivity)

This method creates mesh data from nodes coordinates and connectivity matrix. Parameters

• coordinates (array.) – Nodes’ coordinates. Each row presents the nodes’ index, x-coordinate, y-coordinate, and z-coordinate. Coordinates matrix row structure: ‘’[Node index, x-coordinate, y-coordinate, z-coordinate]”.

• connectivity (array.) – Connectivity matrix. Each row presents the el-ements’ index, first node index, and last node index. Connectivity matrix row structure: ‘’[Element index, first node index, last node index]”.

neighboor_elements_of_node(node_ID)

This method returns the acoustic elements that a node belongs to. Parameters int – Node external indexes.

Returns List of acoustic elements indexes. Return type List

(29)

This method maps the elements external diameters that each node belongs to. The maping is done according to the node external index.

Returns External diameters at a certain node. Giving a node external index, returns a list of diameters.

Return type dict

neighbor_elements_diameter_global()

This method maps the elements internal diameters that each node belongs to. The maping is done according to the node global index.

Returns Internal diameters at a certain node. Giving a node global index, returns a list of diameters.

Return type Dict

process_all_rotation_matrices() This method ???????

process_element_cross_sections_orientation_to_plot() This method ???????

reset_variables()

This method reset the class default values.

set_B2PX_rotation_decoupling(element_ID, node_ID,

rota-tions_to_decouple=[False, False, False], re-move=False)

This method . Parameters

• element_ID (list) – Element indexes. • nodes_id (list) – Nodes external indexes.

• rotations_to_decouple (list of bollean, optional) – Default is [False, False, False]

• remove (boll, optional) – True if the ???????? have to be removed from the ???????? dictionary. False otherwise. Default is False.

set_acoustic_element_type_by_element(elements, element_type, hys-teretic_damping=None, re-move=False)

This method attributes acoustic element type to a list of elements. Parameters

• elements (list) – Acoustic elements indexes.

• element_type (str, ['dampingless', 'hysteretic', 'wide-duct', 'LRF fluid equivalent', 'LRF full']) – Acoustic element type to be attributed to the listed elements.

• hysteretic_damping (float, optional) – Acoustic hysteretic damp-ing coefficient. It must be attributed to the elements of type ‘hysteretic’. Default is None.

• remove (boll, optional) – True if the element_type have to be removed from the acoustic element type dictionary. False otherwise. Default is False.

set_acoustic_element_type_by_line(line, element_type, hys-teretic_damping=None, remove=False) This method attributes acoustic element type to all elements that belongs to a line/entity.

Parameters

• line (list) – Entities tag.

• element_type (str, ['dampingless', 'hysteretic', 'wide-duct', 'LRF fluid equivalent', 'LRF full']) – Acoustic element type to be attributed to the listed elements.

(30)

• hysteretic_damping (float, optional) – Acoustic hysteretic damp-ing coefficient. It must be attributed to the elements of type ‘hysteretic’. Default is None.

• remove (boll, optional) – True if the element_type have to be removed from the acoustic element type dictionary. False otherwise. Default is False.

set_acoustic_pressure_bc_by_node(nodes, value)

This method attributes acoustic pressure boundary condition to a list of nodes. Parameters

• nodes (list) – Nodes external indexes.

• values (complex or array) – Acoustic pressure. Complex valued input corresponds to a constant pressure boundary condition with respect to the fre-quency. Array valued input corresponds to a variable pressure boundary condition with respect to the frequency.

set_capped_end_by_elements(elements, value, selection)

This method enables or disables the capped end effect in a list of acoustic elements. Parameters

• elements (list) – Acoustic elements indexes.

• value (boll) – True if the capped end effect have to be activated. False other-wise.

• selection –

set_capped_end_by_line(lines, value)

This method enables or disables the capped end effect to all acoustic elements that belongs to a line.

Parameters

• lines (list) – Lines/entities indexes.

• value (boll) – True if the capped end effect have to be activated. False other-wise.

set_cross_section_by_element(elements, cross_section, up-date_cross_section=False)

This method attributes cross section object to a list of acoustic and structural elements. Parameters

• elements (list) – Acoustic and structural elements indexes.

• cross_section (Cross section object) – Tube cross section data. • update_cross_section (boll, optional) – True if the cross section

data have to be evaluated or updated. False otherwise. Default is False.

set_cross_section_by_line(line, cross_section)

This method attributes cross section object to all elements that belongs to a line/entity. Parameters

• line (list) – Entities tag.

• cross_section (Cross section object) – Tube cross section data.

set_fluid_by_element(elements, fluid)

This method attributes fluid object to a list of acoustic elements. Parameters

• elements (list) – Acoustic elements indexes. • fluid (Fluid object) – Fluid data.

set_fluid_by_line(lines, fluid)

This method attributes fluid object to all acoustic elements that belongs to a line/entity. Parameters

(31)

set_length_correction_by_element(elements, value, section, delete_from_dict=False)

This method enables or disables the acoustic length correction effect in a list of acoustic ele-ments.

Parameters

• elements (list) – Acoustic elements indexes.

• value ([None, 0, 1, 2]) – Acoustic length correction due to acoustic continuities. The prescription is done through the following labeling: None: dis-able 0 : expansion 1 : side_branch 2 : loop

• section –

• remove (boll, optional) – True if the ???????? have to be removed from the ???????? dictionary. False otherwise. Default is False.

set_material_by_element(elements, material)

This method attributes material object to a list of acoustic and structural elements. Parameters

• elements (list) – Acoustic and structural elements indexes. • material (Material object) – Material data.

set_material_by_line(lines, material)

This method attributes material object to all elements that belongs to a line/entity. Parameters

• line (list) – Entities tag.

• material (Material object) – Material data.

set_prescribed_dofs_bc_by_node(nodes, values)

This method attributes structural displacement and rotation boundary condition to a list of nodes.

Parameters

• nodes_id (list) – Nodes external indexes.

• values (complex or array) – Displacement and rotation. Complex val-ued input corresponds to a constant boundary condition with respect to the fre-quency. Array valued input corresponds to a variable boundary condition with respect to the frequency.

set_radiation_impedance_bc_by_node(nodes, impedance_type)

This method attributes acoustic lumped radiation impedance to a list of nodes according to the anechoic, flanged, and unflanged prescription.

Parameters

• nodes (list) – Nodes external indexes.

• impedance_type ([None, 0, 1, 2]) – Acoustic length correction due to acoustic discontinuities. The prescription is done through the following labeling: 0 : anechoic termination 1 : unflanged pipe 2 : flanged pipe

If None is attributed, then no radiation impedance is considered.

set_specific_impedance_bc_by_node(nodes, values)

This method attributes acoustic lumped specific impedance to a list of nodes. Parameters

• nodes (list) – Nodes external indexes.

• values (complex or array, None) – Specific impedance. Complex val-ued input corresponds to a constant specific impedance with respect to the fre-quency. Array valued input corresponds to a variable specific impedance with respect to the frequency.

If None is attributed, then no specific impedance is considered.

set_stress_intensification_by_element(elements, value)

(32)

This method enables or disables the stress intensification effect in a list of structural elements. Parameters

• elements (list) – Elements indexes.

• value (boll) – True if the stress intensification effect have to be activated. False otherwise.

set_stress_intensification_by_line(lines, value)

This method enables or disables the stress intensification effect to all structural elements that belongs to a line.

Parameters

• lines (list) – Lines/entities indexes.

• value (boll) – True if the stress intensification effect have to be activated. False otherwise.

set_stress_stiffening_by_elements(elements, parameters, section=None, re-move=False)

This method . Parameters

• lines (list) – Elements indexes. • parameters (list) – ????????. • section – Default is None

• remove (boll, optional) – True if the ???????? have to be removed from the ???????? dictionary. False otherwise. Default is False.

set_stress_stiffening_by_line(lines, parameters, remove=False) This method .

Parameters

• lines (list) – Lines/entities indexes. • parameters (list) – ????????.

• remove (boll, optional) – True if the ???????? have to be removed from the ???????? dictionary. False otherwise. Default is False.

set_structural_element_type_by_element(elements, element_type, re-move=False)

This method attributes structural element type to a list of elements. Parameters

• elements (list) – Structural elements indexes.

• element_type (str, ['pipe_1', 'pipe_2', 'beam_1']) – Struc-tural element type to be attributed to the listed elements.

• remove (boll, optional) – True if the element_type have to be removed from the structural element type dictionary. False otherwise. Default is False.

set_structural_element_type_by_line(line, element_type, remove=False) This method attributes structural element type to all elements that belongs to a line/entity.

Parameters

• line (list) – Entities tag.

• element_type (str, ['pipe_1', 'pipe_2', 'beam_1']) – Struc-tural element type to be attributed to elements.

• remove (boll, optional) – True if the element_type have to be removed from the structural element type dictionary. False otherwise. Default is False.

set_structural_load_bc_by_node(nodes_id, values)

This method attributes structural force and moment loads to a list of nodes. Parameters

• nodes_id (list) – Nodes external indexes.

(33)

input corresponds to a variable load with respect to the frequency.

set_volume_velocity_bc_by_node(nodes, values, additional_info=None) This method attributes acoustic volume velocity load to a list of nodes.

Parameters

• nodes (list) – Nodes external indexes.

• values (complex or array) – Volume velocity. Complex valued input corresponds to a constant volume velocity load with respect to the frequency. Ar-ray valued input corresponds to a variable volume velocity load with respect to the frequency.

3.8 Node

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

(34)

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.

(35)

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

(36)

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:

(37)

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.

(38)

• 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.

(39)

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.

4.2 Assembly Structural

class pulse.processing.assembly_structural.AssemblyStructural(mesh, fre- quen-cies, **kwargs) This class creates a structural assembly object from input data.

Parameters

• mesh (Mesh object) – Acoustic finite element mesh. • frequencies (array) – Frequencies of analysis.

• acoustic_solution (array, optional) – Solution of the acoustic FETM model. This solution is need to solve the coupled problem. Default is None.

get_bc_array_for_all_frequencies(there_are_table, boundary_condition) This method perform the assembly process of the structural FEM force and moment loads.

Parameters

• pressure_external (float, optional) – Static pressure difference be-tween atmosphere and the fluid in the pipeline. Default is 0.

• loads_matrix3D (boll, optional) – Default is False.

Returns Loads vectors. Each column corresponds to a frequency of analysis. Return type array

get_global_loads(pressure_external=0, loads_matrix3D=False)

This method perform the assembly process of the structural FEM force and moment loads. Parameters

(40)

• pressure_external (float, optional) – Static pressure difference be-tween atmosphere and the fluid in the pipeline. Default is 0.

• loads_matrix3D (boll, optional) – Default is False.

Returns Loads vectors. Each column corresponds to a frequency of analysis. Return type array

get_global_matrices()

This method perform the assembly process of the structural FEM matrices. Returns

• K (list) – List of stiffness matrices of the free degree of freedom. Each item of the list is a sparse csr_matrix.

• M (list) – List of mass matrices of the free degree of freedom. Each item of the list is a sparse csr_matrix.

• Kr (list) – List of stiffness matrices of the prescribed degree of freedom. Each item of the list is a sparse csr_matrix.

• Mr (list) – List of mass matrices of the prescribed degree of freedom. Each item of the list is a sparse csr_matrix.

get_lumped_matrices()

This method perform the assembly process of the structural FEM lumped matrices. Returns

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

• M_lump (list) – List of mass matrices of the free degree of freedom. Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis. • C_lump (list) – List of lumped damping 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_lump (list) – List of lumped stiffness matrices of the prescribed degree of freedom. Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis.

• Mr_lump (list) – List of lumped mass matrices of the prescribed degree of free-dom. Each item of the list is a sparse csr_matrix that corresponds to one frequency of analysis.

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

• flag_Clump (boll) – This flag returns True if the damping matrices are non zero, and False otherwise.

get_prescribed_indexes()

This method returns all the indexes of the structural degrees of freedom with prescribed struc-tural displacement or rotation boundary conditions.

Returns Indexes of the structural degrees of freedom with prescribed displacement or rotation boundary conditions.

Return type array See also:

get_prescribed_values Vaslues of the structural degrees of freedom with prescribed displacement or rotation boundary conditions.

get_unprescribed_indexes Indexes of the structural free degrees of freedom.

get_prescribed_values()

References

Related documents

Keywords: United States, Election, Presidential, America, Donald Trump, Hillary Clinton... TABLE

regional MPA roadmap indicated already some partners who may be involved in the key actions and activities and that their role is quite essential to the implementation of

Fuzzy logic are used in design and implementation of mobile robot system on leader-follower method function as a controller which determines the distance and

The functional and organizational characteristics of proposed teaching model include the conditions of research and development environment organization (such as system of

B etween 30% and 50% of patients with acute myocardial infarction fail to reperfuse (Thrombolysis in Myocardioal Infarction (TIMI) trial 3 flow) at 90 mins after the initia- tion

Each undersigned acknowledges that he has read all of the information material sent by Sawtooth Outfitters or Grizzly Basin Outfitters or read on the web site, including

The outlined approach is premised on the proposal that schools can reduce the harms associated with substance use by promoting school connectedness and improving the

Insurance; environment; pollution; environmental insurance; first-party insurance; third-party insurance; first-party insurance for the benefit of a third party; statutory