Models - Functions
Index
PeriLab.Solver.Model_Factory.Additive.Set_modules.Additive_template.additive_name
PeriLab.Solver.Model_Factory.Additive.Set_modules.Additive_template.compute_model
PeriLab.Solver.Model_Factory.Damage.Set_modules.Critical_Energy_Model.get_quad_horizon
PeriLab.Solver.Model_Factory.Damage.Set_modules.Damage_template.compute_model
PeriLab.Solver.Model_Factory.Damage.Set_modules.Damage_template.damage_name
PeriLab.Solver.Model_Factory.Damage.damage_index
PeriLab.Solver.Model_Factory.Damage.init_aniso_crit_values
PeriLab.Solver.Model_Factory.Damage.init_interface_crit_values
PeriLab.Solver.Model_Factory.Damage.set_bond_damage
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.compute_control
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.control_name
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.create_zero_energy_mode_stiffness
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.get_zero_energy_mode_force
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.rotate_fourth_order_tensor
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Set_modules.Correspondence_Elastic.compute_stresses
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Set_modules.Correspondence_Elastic.correspondence_name
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.calculate_bond_force
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.zero_energy_mode_compensation
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.compute_model
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.init_model
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.material_name
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.calculate_symmetry_params
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.compute_dilatation
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.compute_weighted_volume
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.elastic
PeriLab.Solver.Model_Factory.Material.check_material_symmetry
PeriLab.Solver.Model_Factory.Material.check_symmetry
PeriLab.Solver.Model_Factory.Material.determine_isotropic_parameter
PeriLab.Solver.Model_Factory.Material.distribute_force_densities
PeriLab.Solver.Model_Factory.Material.distribute_forces
PeriLab.Solver.Model_Factory.Material.get_Hooke_matrix
PeriLab.Solver.Model_Factory.Material.get_all_elastic_moduli
PeriLab.Solver.Model_Factory.Material.get_symmetry
PeriLab.Solver.Model_Factory.Material.get_von_mises_stress
PeriLab.Solver.Model_Factory.Material.matrix_to_voigt
PeriLab.Solver.Model_Factory.Material.voigt_to_matrix
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Heat_transfer.calculate_specific_volume
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_Flow.compute_heat_flow_state_bond_based
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_Flow.compute_heat_flow_state_correspondence
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_expansion.thermal_deformation
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_template.compute_model
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_template.thermal_model_name
PeriLab.Solver.Model_Factory.Thermal.distribute_heat_flows
PeriLab.Solver.Model_Factory.compute_models
PeriLab.Solver.Model_Factory.get_block_model_definition
PeriLab.Solver.Model_Factory.init_models
PeriLab.Solver.Model_Factory.read_properties
PeriLab.Solver.Model_Factory.set_heat_capacity
Models
PeriLab.Solver.Model_Factory.compute_models
— Functioncompute_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 datamanagerblock_nodes::Dict{Int64,Vector{Int64}}
: The block nodesdt::Float64
: The time steptime::Float64
: The current time of the solveroptions::Vector{String}
: The optionssynchronise_field
: The synchronise fieldto::TimerOutput
: The timer output
Returns
datamanager
: The datamanager
PeriLab.Solver.Model_Factory.get_block_model_definition
— Functionget_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.
PeriLab.Solver.Model_Factory.init_models
— Functioninit_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.
PeriLab.Solver.Model_Factory.read_properties
— Functionread_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.
PeriLab.Solver.Model_Factory.set_heat_capacity
— Functionset_heat_capacity(params::Dict, block_nodes::Dict, heat_capacity::SubArray)
Sets the heat capacity of the nodes in the dictionary.
Arguments
params::Dict
: The parametersblock_nodes::Dict
: The block nodesheat_capacity::SubArray
: The heat capacity array
Returns
heat_capacity::SubArray
: The heat capacity array
Additive
PeriLab.Solver.Model_Factory.Additive.Set_modules.Additive_template.additive_name
— Functionadditive_name()
Gives the additive name. It is needed for comparison with the yaml input deck.
Arguments
Returns
name::String
: The name of the additive model.
Example:
println(additive_name())
"additive Template"
PeriLab.Solver.Model_Factory.Additive.Set_modules.Additive_template.compute_model
— Functioncompute_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:
Damage
PeriLab.Solver.Model_Factory.Damage.Set_modules.Damage_template.damage_name
— Functiondamage_name()
Gives the damage name. It is needed for comparison with the yaml input deck.
Arguments
Returns
name::String
: The name of the damage.
Example:
println(damage_name())
"Damage Template"
PeriLab.Solver.Model_Factory.Damage.Set_modules.Damage_template.compute_model
— Functionc 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 numbertime::Float64
: The current time.dt::Float64
: The current time step.
Returns
datamanager::Data_manager
: Datamanager.
Example:
PeriLab.Solver.Model_Factory.Damage.damage_index
— Functiondamage_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 datanodes::Union{SubArray, Vector{Int64}}
: corresponding nodes to this model
PeriLab.Solver.Model_Factory.Damage.set_bond_damage
— Functionset_bond_damage(datamanager::Module, nodes::Union{SubArray,Vector{Int64}})
Set the bond damage field to the bond damage field
Arguments
datamanager::Module
: The datamanagernodes::Union{SubArray,Vector{Int64}}
: The nodes
Returns
datamanager::Module
: The datamanager
PeriLab.Solver.Model_Factory.Damage.init_interface_crit_values
— Functioninit_interface_crit_values(datamanager::Module, params::Dict, block_id::Int64)
Initialize the critical values
Arguments
datamanager::Module
: The datamanagerparams::Dict
: The parametersblock_id::Int64
: current block
Returns
datamanager::Module
: The datamanager
PeriLab.Solver.Model_Factory.Damage.init_aniso_crit_values
— Functioninit_aniso_crit_values(datamanager::Module, params::Dict, block_id::Int64)
Initialize the anisotropic critical values
Arguments
datamanager::Module
: The datamanagerparams::Dict
: The parametersblock_id::Int64
: current block
Returns
datamanager::Module
: The datamanager
PeriLab.Solver.Model_Factory.Damage.Set_modules.Critical_Energy_Model.get_quad_horizon
— Functionget_quad_horizon(horizon::Float64, dof::Int64)
Get the quadric of the horizon.
Arguments
horizon::Float64
: The horizon of the block.dof::Int64
: The degree of freedom.thickness::Float64
: The thickness of the block.
Returns
quad_horizon::Float64
: The quadric of the horizon.
Material
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.init_model
— Functioninitmodel(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.
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.material_name
— Functionmaterial_name()
Gives the material name. It is needed for comparison with the yaml input deck.
Arguments
Returns
name::String
: The name of the material.
Example:
println(material_name())
"Material Template"
PeriLab.Solver.Model_Factory.Material.Set_modules.Material_template.compute_model
— Functioncompute_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:
PeriLab.Solver.Model_Factory.Material.determine_isotropic_parameter
— Functiondetermine_isotropic_parameter(datamanager::Module, prop::Dict)
Determine the isotropic parameter.
Arguments
prop::Dict
: The material property.
Returns
prop::Dict
: The material property.
PeriLab.Solver.Model_Factory.Material.check_material_symmetry
— Functioncheck_material_symmetry(dof::Int64, prop::Dict)
Check the symmetry of the material.
Arguments
dof::Int64
: The degree of freedom.prop::Dict
: The material property.
Returns
prop::Dict
: The material property.
PeriLab.Solver.Model_Factory.Material.distribute_force_densities
— Functiondistribute_force_densities(datamanager::Module, nodes::Union{SubArray,Vector{Int64}})
Distribute the force densities.
Arguments
datamanager::Data_manager
: Datamanager.nodes::Union{SubArray,Vector{Int64}}
: The nodes.
Returns
datamanager::Data_manager
: Datamanager.
PeriLab.Solver.Model_Factory.Material.get_all_elastic_moduli
— Functionget_all_elastic_moduli(datamanager::Module, parameter::Union{Dict{Any,Any},Dict{String,Any}})
Returns the elastic moduli of the material.
Arguments
parameter::Union{Dict{Any,Any},Dict{String,Any}}
: The material parameter.
PeriLab.Solver.Model_Factory.Material.get_Hooke_matrix
— Functionget_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.
PeriLab.Solver.Model_Factory.Material.distribute_forces
— Functiondistribute_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.
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.
PeriLab.Solver.Model_Factory.Material.matrix_to_voigt
— Functionmatrix_to_voigt(matrix)
Convert a 2x2 or 3x3 matrix to Voigt notation (6x1 vector)
Arguments
matrix::Matrix{Float64}
: The matrix.
Returns
voigt::Vector{Float64}
: The Voigt notation.
PeriLab.Solver.Model_Factory.Material.voigt_to_matrix
— Functionvoigt_to_matrix(voigt::Union{Vector{Float64},Vector{Int64}})
Convert a Voigt notation (6x1 or 3x1 vector) to a 2x2 or 3x3 matrix
Arguments
voigt::Vector{Float64}
: The Voigt notation.
Returns
matrix::Matrix{Float64}
: The matrix.
PeriLab.Solver.Model_Factory.Material.check_symmetry
— Functioncheck_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.
PeriLab.Solver.Model_Factory.Material.get_symmetry
— Functionget_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)
PeriLab.Solver.Model_Factory.Material.get_von_mises_stress
— Functionget_von_mises_stress(von_Mises_stress::Float64, dof::Int64, stress_NP1::Matrix{Float64})
Arguments
von_Mises_stress::Float64
: Von Mises stressdof::Int64
: Degree of freedom.stress_NP1::Matrix{Float64}
: Stress.
returns
spherical_stress_NP1::Float64
: Spherical stressdeviatoric_stress_NP1::Matrix{Float64}
: Deviatoric stress
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.elastic
— Functionelastic(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
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.calculate_symmetry_params
— Functioncalculate_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.
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.compute_weighted_volume
— Functioncompute_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.
PeriLab.Solver.Model_Factory.Material.Set_modules.PD_Solid_Elastic.Ordinary.compute_dilatation
— Functioncompute_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.
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.zero_energy_mode_compensation
— Functionzero_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.
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.calculate_bond_force
— Functioncalculate_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.
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Set_modules.Correspondence_Elastic.compute_stresses
— Functioncompute_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 freedommaterial_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:
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 freedommaterial_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:
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Set_modules.Correspondence_Elastic.correspondence_name
— Functioncorrespondence_name()
Gives the material name. It is needed for comparison with the yaml input deck.
Arguments
Returns
name::String
: The name of the material.
Example:
println(material_name())
"Material Template"
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.control_name
— Functioncontrol_name()
Returns the name of the zero energy control
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.compute_control
— Functioncompute_control(datamanager::Module, nodes::Union{SubArray,Vector{Int64}}, material_parameter::Dict, time::Float64, dt::Float64)
Computes the zero energy control
Arguments
datamanager::Module
: The datamanagernodes::Union{SubArray,Vector{Int64}}
: The nodesmaterial_parameter::Dict
: The material parametertime::Float64
: The current timedt::Float64
: The current time step
Returns
datamanager::Module
: The datamanager
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.get_zero_energy_mode_force
— Functionget_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 nodeszStiff::SubArray
: The zero energy stiffnessdeformation_gradient::SubArray
: The deformation gradientundeformed_bond::SubArray
: The bond geometrydeformed_bond::SubArray
: The bond geometry at the next time stepbond_force::SubArray
: The bond force
Returns
bond_force::SubArray
: The bond force
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.create_zero_energy_mode_stiffness
— Functioncreate_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 nodesdof::Int64
: The degree of freedomCVoigt::Union{MMatrix, Matrix{Float64}}
: The Voigt matrixangles::Vector{Float64}
: The anglesKinv::SubArray
: The inverse shape tensorzStiff::SubArray
: The zero energy stiffnessrotation::Bool
: The rotation
Returns
zStiff::SubArray
: The zero energy stiffness
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 nodesdof::Int64
: The degree of freedomCVoigt::Union{MMatrix, Matrix{Float64}}
: The Voigt matrixKinv::SubArray
: The inverse shape tensorzStiff::SubArray
: The zero energy stiffness
Returns
zStiff::SubArray
: The zero energy stiffness
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 nodesdof::Int64
: The degree of freedomCVoigt::Union{MMatrix, Matrix{Float64}}
: The Voigt matrixangles::SubArray
: The anglesKinv::SubArray
: The inverse shape tensorzStiff::SubArray
: The zero energy stiffness
Returns
zStiff::SubArray
: The zero energy stiffness
PeriLab.Solver.Model_Factory.Material.Set_modules.Correspondence.Global_zero_energy_control.rotate_fourth_order_tensor
— Functionrotate_fourth_order_tensor(angles::Union{Vector{Float64},Vector{Int64}}, C::Array{Float64,4}, dof::Int64, back::Bool)
Rotates the fourth order tensor
Arguments
angles::Union{Vector{Float64},Vector{Int64}}
: The anglesC::Array{Float64,4}
: The fourth order tensordof::Int64
: The degree of freedomback::Bool
: The back
Returns
C::Array{Float64,4}
: The fourth order tensor
Thermal
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_template.thermal_model_name
— Functionthermal_model_name()
Gives the thermal model name. It is needed for comparison with the yaml input deck.
Arguments
Returns
name::String
: The name of the thermal flow model.
Example:
println(flow_name())
"Thermal Template"
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_template.compute_model
— Functioncompute_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:
PeriLab.Solver.Model_Factory.Thermal.distribute_heat_flows
— Functiondistribute_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 datamanagernodes::Union{SubArray,Vector{Int64}}
: The nodes
Returns
datamanager::Module
: The datamanager
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Heat_transfer.calculate_specific_volume
— Functioncalculatespecificvolume(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.
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_expansion.thermal_deformation
— Functionthermal_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)
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_Flow.compute_heat_flow_state_correspondence
— Function[12] is a prototype with some errors
PeriLab.Solver.Model_Factory.Thermal.Set_modules.Thermal_Flow.compute_heat_flow_state_bond_based
— Functioncompute_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.