Models - Functions

Index

Models

PeriLab.Solver.Model_Factory.compute_modelsFunction
compute_models(datamanager::Module, block_nodes::Dict{Int64,Vector{Int64}}, dt::Float64, time::Float64, options::Vector{String}, synchronise_field, to::TimerOutput)

Computes the models models

Arguments

  • datamanager::Module: The datamanager
  • block_nodes::Dict{Int64,Vector{Int64}}: The block nodes
  • dt::Float64: The time step
  • time::Float64: The current time of the solver
  • options::Vector{String}: The options
  • synchronise_field: The synchronise field
  • to::TimerOutput: The timer output

Returns

  • datamanager: The datamanager
source
PeriLab.Solver.Model_Factory.get_block_model_definitionFunction
get_block_model_definition(params::Dict, block_id::Int64, prop_keys::Vector{String}, properties)

Get block model definition.

Special case for pre calculation. It is set to all blocks, if no block definition is defined, but pre calculation is.

Arguments

  • params::Dict: Parameters.
  • blocks::Vector{Int64}: List of block id's.
  • prop_keys::Vector{String}: Property keys.
  • properties: Properties function.

Returns

  • properties: Properties function.
source
PeriLab.Solver.Model_Factory.init_modelsFunction
init_models(params::Dict, datamanager::Module, block_nodes::Dict{Int64,Vector{Int64}}, solver_options::Dict)

Initialize models

Arguments

  • params::Dict: Parameters.
  • datamanager::Module: Datamanager.
  • block_nodes::Dict{Int64,Vector{Int64}}: block nodes.
  • solver_options::Dict: Solver options.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver.Model_Factory.read_propertiesFunction
read_properties(params::Dict, datamanager::Module, material_model::Bool)

Read properties of material.

Arguments

  • params::Dict: Parameters.
  • datamanager::Data_manager: Datamanager.
  • material_model::Bool: Material model.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver.Model_Factory.set_heat_capacityFunction
set_heat_capacity(params::Dict, block_nodes::Dict, heat_capacity::SubArray)

Sets the heat capacity of the nodes in the dictionary.

Arguments

  • params::Dict: The parameters
  • block_nodes::Dict: The block nodes
  • heat_capacity::SubArray: The heat capacity array

Returns

  • heat_capacity::SubArray: The heat capacity array
source

Additive

PeriLab.Solver.Model_Factory.Additive.Set_modules.Additive_template.compute_modelFunction
compute_model(
datamanager::Module,
nodes::Union{SubArray,Vector{Int64}},
additive_parameter::Dict,
block::Int64,
time::Float64,
dt::Float64,

)

Calculates the force densities of the additive. This template has to be copied, the file renamed and edited by the user to create a new additive. Additional files can be called from here using include and import .any_module or using .any_module. Make sure that you return the datamanager.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • additive parameter::Dict(String, Any): Dictionary with additive parameter.
  • time::Float64: The current time.
  • dt::Float64: The current time step.

Returns

  • datamanager::Data_manager: Datamanager.

Example:

source

Damage

PeriLab.Solver.Model_Factory.Damage.Set_modules.Damage_template.compute_modelFunction

c omputedamage(datamanager, nodes, damageparameter, block, time, dt)

Calculates the damage criterion of each bond. This template has to be copied, the file renamed and edited by the user to create a new material. Additional files can be called from here using include and import .any_module or using .any_module. Make sure that you return the datamanager.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • damage_parameter::Dict(String, Any): Dictionary with material parameter.
  • block::Int64: Block number
  • time::Float64: The current time.
  • dt::Float64: The current time step.

Returns

  • datamanager::Data_manager: Datamanager.

Example:

source
PeriLab.Solver.Model_Factory.Damage.damage_indexFunction
damage_index(datamanager,::Union{SubArray, Vector{Int64})

Function calculates the damage index related to the neighborhood volume for a set of corresponding nodes. The damage index is defined as damaged volume in relation the neighborhood volume. damageIndex = sumi (brokenBondsi * volume_i) / volumeNeighborhood

Arguments

  • datamanager::Data_manager: all model data
  • nodes::Union{SubArray, Vector{Int64}}: corresponding nodes to this model
source
PeriLab.Solver.Model_Factory.Damage.set_bond_damageFunction
set_bond_damage(datamanager::Module, nodes::Union{SubArray,Vector{Int64}})

Set the bond damage field to the bond damage field

Arguments

  • datamanager::Module: The datamanager
  • nodes::Union{SubArray,Vector{Int64}}: The nodes

Returns

  • datamanager::Module: The datamanager
source
PeriLab.Solver.Model_Factory.Damage.init_aniso_crit_valuesFunction
init_aniso_crit_values(datamanager::Module, params::Dict, block_id::Int64)

Initialize the anisotropic critical values

Arguments

  • datamanager::Module: The datamanager
  • params::Dict: The parameters
  • block_id::Int64: current block

Returns

  • datamanager::Module: The datamanager
source

Material

PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.init_modelFunction

initmodel(datamanager::Module, nodes::Union{SubArray,Vector{Int64}}, materialparameter::Dict)

Initializes the material model.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • material_parameter::Dict(String, Any): Dictionary with material parameter.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.compute_modelFunction
compute_model(datamanager, nodes, material_parameter, time, dt, to::TimerOutput)

Calculates the force densities of the material. This template has to be copied, the file renamed and edited by the user to create a new material. Additional files can be called from here using include and import .any_module or using .any_module. Make sure that you return the datamanager.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • material_parameter::Dict(String, Any): Dictionary with material parameter.
  • time::Float64: The current time.
  • dt::Float64: The current time step.

Returns

  • datamanager::Data_manager: Datamanager.

Example:

source
PeriLab.Solver.Model_Factory.Material.get_Hooke_matrixFunction
get_Hooke_matrix(parameter::Dict, symmetry::String, dof::Int64, ID::Int64=1)

Returns the Hooke matrix of the material.

Arguments

  • parameter::Union{Dict{Any,Any},Dict{String,Any}}: The material parameter.
  • symmetry::String: The symmetry of the material.
  • dof::Int64: The degree of freedom.
  • ID::Int64=1: ID of the point. Needed for point wise defined material properties.

Returns

  • matrix::Matrix{Float64}: The Hooke matrix.
source
PeriLab.Solver.Model_Factory.Material.distribute_forcesFunction
distribute_forces(nodes::Union{SubArray,Vector{Int64}}, nlist::SubArray, nlist_filtered_ids::SubArray, bond_force::SubArray, volume::SubArray, bond_damage::SubArray, displacements::SubArray, bond_norm::SubArray, force_densities::SubArray)

Distribute the forces on the nodes

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: The nodes.
  • nlist::SubArray: The neighbor list.
  • nlist_filtered_ids::SubArray: The filtered neighbor list.
  • bond_force::SubArray: The bond forces.
  • volume::SubArray: The volumes.
  • bond_damage::SubArray: The bond damage.
  • displacements::SubArray: The displacements.
  • bond_norm::SubArray: The pre defined bond normal.
  • force_densities::SubArray: The force densities.

Returns

  • force_densities::SubArray: The force densities.
source
distribute_forces(nodes::Union{SubArray,Vector{Int64}}, nlist::SubArray, bond_force::SubArray, volume::SubArray, bond_damage::SubArray, force_densities::SubArray)

Distribute the forces on the nodes

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: The nodes.
  • nlist::SubArray: The neighbor list.
  • bond_force::SubArray: The bond forces.
  • volume::SubArray: The volumes.
  • bond_damage::SubArray: The bond damage.
  • force_densities::SubArray: The force densities.

Returns

  • force_densities::SubArray: The force densities.
source
PeriLab.Solver.Model_Factory.Material.check_symmetryFunction
check_symmetry(prop::Dict, dof::Int64)

Check if the symmetry information is present in the material dictionary.

Arguments

  • prop::Dict: A dictionary containing material information.
  • dof::Int64: The number of degrees of freedom.

Returns

  • true: If the symmetry information is present.
source
PeriLab.Solver.Model_Factory.Material.get_symmetryFunction
get_symmetry(material::Dict)

Return the symmetry information from the given material dictionary.

Arguments

  • material::Dict: A dictionary containing material information.

Returns

  • If the key "Symmetry" is present in the dictionary, the corresponding value is returned.
  • If the key is not present, the default value "3D" is returned.

Example

```julia materialdict = Dict("Symmetry" => "Cubic", "Color" => "Red") symmetry = getsym(material_dict)

source
PeriLab.Solver.Model_Factory.Material.get_von_mises_stressFunction
get_von_mises_stress(von_Mises_stress::Float64, dof::Int64, stress_NP1::Matrix{Float64})

Arguments

  • von_Mises_stress::Float64: Von Mises stress
  • dof::Int64: Degree of freedom.
  • stress_NP1::Matrix{Float64}: Stress.

returns

  • spherical_stress_NP1::Float64: Spherical stress
  • deviatoric_stress_NP1::Matrix{Float64}: Deviatoric stress
source
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.elasticFunction
elastic(nodes, dof, undeformed_bond, deformed_bond, bond_damage, theta, weighted_volume, omega, material, bond_force)

Calculate the elastic bond force for each node.

$F = \omega \cdot \theta \cdot (\frac{3K}{V} - \frac{\frac{15B}{V}}{3} \cdot \zeta + \alpha \cdot stretch)$ [4] for 3D, plane stress and plane strain it is refered to [1] page 152; Eq. (6.12); after (6.21) and after (6.23)

Arguments

  • nodes: array of node IDs
  • dof: number of degrees of freedom
  • undeformed_bond: dictionary of bond geometries for each node
  • deformed_bond: dictionary of deformed bond geometries for each node
  • bond_damage: dictionary of bond damages for each node
  • theta: dictionary of theta values for each node
  • weighted_volume: dictionary of weighted volumes for each node
  • omega: dictionary of omega values for each node
  • material: dictionary of material properties
  • bond_force: dictionary to store the calculated bond forces for each node

Returns

  • bond_force: dictionary of calculated bond forces for each node
source
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.calculate_symmetry_paramsFunction
calculate_symmetry_params(symmetry::String, shear_modulus::Float64, bulk_modulus::Float64)

Calculate the symmetry parameters based on the given material symmetry. These parameters are defined in [1] Section 6.3, 6.3.1.1 and 6.3.1.2.

Arguments

  • symmetry::String: Symmetry of the material.
  • shear_modulus::Float64: Shear modulus.
  • bulk_modulus::Float64: Bulk modulus.

Returns

  • alpha::Float64: Alpha parameter.
  • gamma::Float64: Gamma parameter.
  • kappa::Float64: Kappa parameter.
source
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.compute_weighted_volumeFunction
compute_weighted_volume(nodes::Union{SubArray,Vector{Int64}},
                        nlist::SubArray,
                        undeformed_bond_length::SubArray,
                        bond_damage::SubArray,
                        omega::SubArray,
                        volume::SubArray)

Compute the weighted volume for each node, [9]. Taken from Peridigm -> but adding the bond_damage; this is missing in Peridigm, but should be there.

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: Vector of node indices or a subarray representing the indices of the nodes.
  • nlist::SubArray: Subarray representing the neighbor list for each node.
  • undeformed_bond_length::SubArray: Subarray representing the undeformed bonds.
  • bond_damage::SubArray: Subarray representing the bond damage.
  • omega::SubArray: Subarray representing the weights for each bond.
  • volume::SubArray: Subarray representing the volume for each node.

Returns

  • weighted_volume::Vector{Float64}: Vector containing the computed weighted volume for each node.
source
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.compute_dilatationFunction
compute_dilatation(nodes::Union{SubArray,Vector{Int64}}, nneighbors::SubArray, nlist::SubArray, undeformed_bond::SubArray, deformed_bond::SubArray, bond_damage::SubArray, volume::SubArray, weighted_volume::Vector{Float64}, omega::SubArray, theta::SubArray)

Calculate the dilatation for each node, [9].

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: Nodes.
  • nneighbors::SubArray: Number of neighbors.
  • nlist::SubArray: Neighbor list.
  • undeformed_bond_length::SubArray: Bond geometry.
  • deformed_bond_length::SubArray: Deformed bond geometry.
  • bond_damage::SubArray: Bond damage.
  • volume::SubArray: Volume.
  • weighted_volume::SubArray: Weighted volume.
  • omega::SubArray: Influence function.
  • theta::SubArray: Dilatation.

Returns

  • theta::Vector{Float64}: Dilatation.
source
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.zero_energy_mode_compensationFunction
zero_energy_mode_compensation(datamanager::Module, nodes::Union{SubArray,Vector{Int64}}, material_parameter::Dict, time::Float64, dt::Float64)

Global - J. Wan et al., "Improved method for zero-energy mode suppression in peridynamic correspondence model in Acta Mechanica Sinica https://doi.org/10.1007/s10409-019-00873-y

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • material_parameter::Dict(String, Any): Dictionary with material parameter.
  • time::Float64: The current time.
  • dt::Float64: The current time step.

Returns

  • datamanager::Data_manager: Datamanager.
source
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.calculate_bond_forceFunction
calculate_bond_force(nodes::Union{SubArray,Vector{Int64}}, deformation_gradient::SubArray, undeformed_bond::SubArray, bond_damage::SubArray, inverse_shape_tensor::SubArray, stress_NP1::SubArray, bond_force::SubArray)

Calculate bond forces for specified nodes based on deformation gradients.

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • deformation_gradient::SubArray: Deformation gradient.
  • undeformed_bond::SubArray: Undeformed bond geometry.
  • bond_damage::SubArray: Bond damage.
  • inverse_shape_tensor::SubArray: Inverse shape tensor.
  • stress_NP1::SubArray: Stress at time step n+1.
  • bond_force::SubArray: Bond force.

Returns

  • bond_force::SubArray: Bond force.
source
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Set_modules.Correspondence_Elastic.compute_stressesFunction
compute_stresses(datamanager::Module, iID:Int64, dof::Int64, material_parameter::Dict, time::Float64, dt::Float64, strain_increment::SubArray, stress_N::SubArray, stress_NP1::SubArray)

Calculates the stresses of the material. This template has to be copied, the file renamed and edited by the user to create a new material. Additional files can be called from here using include and import .any_module or using .any_module. Make sure that you return the datamanager.

Arguments

  • datamanager::Data_manager: Datamanager.
  • iID::Int64: Node ID.
  • dof::Int64: Degrees of freedom
  • material_parameter::Dict(String, Any): Dictionary with material parameter.
  • time::Float64: The current time.
  • dt::Float64: The current time step.
  • strainInc::Union{Array{Float64,3},Array{Float64,6}}: Strain increment.
  • stress_N::SubArray: Stress of step N.
  • stress_NP1::SubArray: Stress of step N+1.
  • `iIDjIDnID::Tuple=(): (optional) are the index and node id information. The tuple is ordered iID as index of the point, jID the index of the bond of iID and nID the neighborID.

Returns

  • datamanager::Data_manager: Datamanager.
  • stress_NP1::SubArray: updated stresses

Example:

source
compute_stresses(datamanager::Module, dof::Int64, material_parameter::Dict, time::Float64, dt::Float64, strain_increment::SubArray, stress_N::SubArray, stress_NP1::SubArray)

Calculates the stresses of a single node. Needed for FEM. This template has to be copied, the file renamed and edited by the user to create a new material. Additional files can be called from here using include and import .any_module or using .any_module. Make sure that you return the datamanager.

Arguments

  • datamanager::Data_manager: Datamanager.
  • dof::Int64: Degrees of freedom
  • material_parameter::Dict(String, Any): Dictionary with material parameter.
  • time::Float64: The current time.
  • dt::Float64: The current time step.
  • strainInc::Union{Array{Float64,3},Array{Float64,6}}: Strain increment.
  • stress_N::SubArray: Stress of step N.
  • stress_NP1::SubArray: Stress of step N+1.

Returns

  • datamanager::Data_manager: Datamanager.
  • stress_NP1::SubArray: updated stresses

Example:

source
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.compute_controlFunction
compute_control(datamanager::Module, nodes::Union{SubArray,Vector{Int64}}, material_parameter::Dict, time::Float64, dt::Float64)

Computes the zero energy control

Arguments

  • datamanager::Module: The datamanager
  • nodes::Union{SubArray,Vector{Int64}}: The nodes
  • material_parameter::Dict: The material parameter
  • time::Float64: The current time
  • dt::Float64: The current time step

Returns

  • datamanager::Module: The datamanager
source
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.get_zero_energy_mode_forceFunction
get_zero_energy_mode_force(nodes::Union{SubArray,Vector{Int64}}, zStiff::SubArray, deformation_gradient::SubArray, undeformed_bond::SubArray, deformed_bond::SubArray, bond_force::SubArray)

Computes the zero energy mode force

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: The nodes
  • zStiff::SubArray: The zero energy stiffness
  • deformation_gradient::SubArray: The deformation gradient
  • undeformed_bond::SubArray: The bond geometry
  • deformed_bond::SubArray: The bond geometry at the next time step
  • bond_force::SubArray: The bond force

Returns

  • bond_force::SubArray: The bond force
source
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.create_zero_energy_mode_stiffnessFunction
create_zero_energy_mode_stiffness(nodes::Union{SubArray,Vector{Int64}}, dof::Int64, CVoigt::Union{MMatrix,Matrix{Float64}}, angles::Vector{Float64}, Kinv::SubArray, zStiff::SubArray, rotation::Bool)

Creates the zero energy mode stiffness

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: The nodes
  • dof::Int64: The degree of freedom
  • CVoigt::Union{MMatrix, Matrix{Float64}}: The Voigt matrix
  • angles::Vector{Float64}: The angles
  • Kinv::SubArray: The inverse shape tensor
  • zStiff::SubArray: The zero energy stiffness
  • rotation::Bool: The rotation

Returns

  • zStiff::SubArray: The zero energy stiffness
source
create_zero_energy_mode_stiffness(nodes::Union{SubArray,Vector{Int64}}, dof::Int64, CVoigt, Kinv, zStiff)

Creates the zero energy mode stiffness

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: The nodes
  • dof::Int64: The degree of freedom
  • CVoigt::Union{MMatrix, Matrix{Float64}}: The Voigt matrix
  • Kinv::SubArray: The inverse shape tensor
  • zStiff::SubArray: The zero energy stiffness

Returns

  • zStiff::SubArray: The zero energy stiffness
source
create_zero_energy_mode_stiffness(nodes::Union{SubArray,Vector{Int64}}, dof::Int64, CVoigt::Union{MMatrix,Matrix{Float64}}, angles::SubArray, Kinv::SubArray, zStiff::SubArray)

Creates the zero energy mode stiffness

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: The nodes
  • dof::Int64: The degree of freedom
  • CVoigt::Union{MMatrix, Matrix{Float64}}: The Voigt matrix
  • angles::SubArray: The angles
  • Kinv::SubArray: The inverse shape tensor
  • zStiff::SubArray: The zero energy stiffness

Returns

  • zStiff::SubArray: The zero energy stiffness
source

Thermal

PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_template.compute_modelFunction
compute_model(datamanager, nodes, thermal_parameter, time, dt)

Calculates the thermal behavior of the material. This template has to be copied, the file renamed and edited by the user to create a new flow. Additional files can be called from here using include and import .any_module or using .any_module. Make sure that you return the datamanager.

Arguments

  • datamanager::Data_manager: Datamanager.
  • nodes::Union{SubArray,Vector{Int64}}: List of block nodes.
  • flow parameter::Dict(String, Any): Dictionary with flow parameter.
  • time::Float64: The current time.
  • dt::Float64: The current time step.

Returns

  • datamanager::Data_manager: Datamanager.

Example:

source
PeriLab.Solver.Model_Factory.Thermal.distribute_heat_flowsFunction
distribute_heat_flows(datamanager::Module, nodes::Union{SubArray,Vector{Int64}})

Distribute the heat flow Note: is included, because also additional heat flow influences can be included as well here and it might be important for bond-associated formulations.

Arguments

  • datamanager::Module: The datamanager
  • nodes::Union{SubArray,Vector{Int64}}: The nodes

Returns

  • datamanager::Module: The datamanager
source
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Heat_transfer.calculate_specific_volumeFunction

calculatespecificvolume(nodes::Int64, nlist::SubArray, coordinates::Union{SubArray,Vector{Float64}}, volume::SubArray, surface_nodes::Union{SubArray,Vector{Bool}})

Calculates the specific volume.

Arguments

  • iID::Int64: The index of the node.
  • nlist::SubArray: The neighbor list.
  • coordinates::Union{SubArray,Vector{Float64}}: The coordinates of the nodes.
  • volume::SubArray: The volume of the nodes.
  • surface_nodes::Union{SubArray,Vector{Bool}}: The surface nodes.

Returns

  • specific_volume::Union{SubArray,Vector{Bool}}: The surface nodes.
source
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_expansion.thermal_deformationFunction
thermal_deformation(nodes, alpha, temperature, undeformed_bond, thermal_deformation)

Calculate thermal deformation for a set of nodes.

This function calculates thermal deformation for a specified set of nodes based on the given inputs, including the nodes, thermal expansion coefficient (alpha), nodal temperatures, undeformed bond information, and the resulting thermal deformation.

Arguments

  • nodes::Union{SubArray, Vector{Int64}}: A collection of node indices where thermal deformation is to be calculated.

  • alpha::Union{Matrix{Float64},Matrix{Int64}}: The thermal expansion matrix, representing the material's response to temperature changes.

  • temperature::SubArray: A SubArray containing nodal temperatures for the specified nodes.

  • undeformed_bond::SubArray: A SubArray containing information about the undeformed bond geometry.

  • thermal_deformation::SubArray: A SubArray to store the calculated thermal deformation for each node.

Returns

  • thermal_deformation::SubArray: A SubArray containing the calculated thermal deformation for the specified nodes.

Notes

  • The thermal deformation is calculated based on the formula: thermal_deformation[iID] = alpha * temperature[iID] * undeformed_bond[iID].

Example

```julia nodes = [1, 2, 3] alpha = [1.3 0.0; 0.0 1.3] # Example thermal expansion coefficient temperature = SubArray(...) # Provide temperature data undeformedbond = SubArray(...) # Provide undeformed bond geometry data thermaldeformation = SubArray(zeros(3, 3)) # Initialize thermal_deformation with zeros

result = thermaldeformation(nodes, alpha, temperature, undeformedbond, thermal_deformation)

source
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_Flow.compute_heat_flow_state_bond_basedFunction
compute_heat_flow_state_bond_based(nodes::Union{SubArray,Vector{Int64}}, dof::Int64, nlist::SubArray,
  lambda::Union{Float64, Int64}, bond_damage::SubArray, undeformed_bond::SubArray, horizon::SubArray,
  temperature::SubArray, heat_flow::SubArray)

Calculate heat flow based on a bond-based model for thermal analysis.

Arguments

  • nodes::Union{SubArray,Vector{Int64}}: An array of node indices for which heat flow should be computed.
  • dof::Int64: The degree of freedom, either 2 or 3, indicating whether the analysis is 2D or 3D.
  • nlist::SubArray: A SubArray representing the neighbor list for each node.
  • lambda::Union{Float64, Int64}: The thermal conductivity.
  • apply_print_bed::Bool: A boolean indicating whether the print bed should be applied to the thermal conductivity.
  • t_bed::Float64: The thickness of the print bed.
  • lambda_bed::Float64: The thermal conductivity of the print bed.
  • bond_damage::SubArray: A SubArray representing the damage state of bonds between nodes.
  • undeformed_bond::SubArray: A SubArray representing the geometry of the bonds.
  • undeformed_bond_length::SubArray: A SubArray representing the undeformed bond length for each bond.
  • horizon::SubArray: A SubArray representing the horizon for each node.
  • temperature::SubArray: A SubArray representing the temperature at each node.
  • heat_flow::SubArray: A SubArray where the computed heat flow values will be stored.

Returns

  • heat_flow: updated bond heat flow values will be stored.

Description

This function calculates the heat flow between neighboring nodes based on a bond-based model for thermal analysis [7]. It considers various parameters, including thermal conductivity, damage state of bonds, geometry of bonds, horizons, temperature, and volume. The calculated bond heat flow values are stored in the heat_flow array.

source