PUPM
Welcome to Documentation for PUPM.
Functions for the package are listed as follows.
In this package, we can use the Penealized Updated Properties Model approach for topology optimization of 2D and 3D structures.
PUPM.C_orthotropic
PUPM.apply_nodal_force_3d!
PUPM.assemble_cell!
PUPM.assemble_cell_3d!
PUPM.assemble_external_forces!
PUPM.assemble_external_forces_3d!
PUPM.assemble_external_pressure!
PUPM.assemble_external_pressure_3d!
PUPM.assemble_global!
PUPM.assemble_global_3d!
PUPM.calculate_H
PUPM.calculate_H_3d
PUPM.calculate_average_strain_energy
PUPM.calculate_cell_volume
PUPM.calculate_strain_energy
PUPM.calculate_strain_energy_3d
PUPM.calculate_strains
PUPM.calculate_strains_3d
PUPM.calculate_stresses
PUPM.calculate_stresses_3d
PUPM.fem_solver
PUPM.fem_solver_3d
PUPM.filter_density_to_vf!
PUPM.get_material_matrix
PUPM.get_material_matrix_3d
PUPM.get_material_matrix_derivative_wrt_E
PUPM.get_material_matrix_derivative_wrt_E_3d
PUPM.remove_vtk_files
PUPM.top_upm
PUPM.top_upm_3d
PUPM.transfer_to_density
PUPM.transfer_to_young
PUPM.update_upm
PUPM.vertexdofs
PUPM.C_orthotropic
— Methodstiffness matrix for orthotropic
PUPM.apply_nodal_force_3d!
— Methodfunction to apply nodal forces to external force vector in 3D
apply_nodal_force_3d!(grid, node_set_name, load_vector, f_ext)
PUPM.assemble_cell!
— MethodFunction for the local stiffness matrix(element stiffness matrix)
assemble_cell!(ke, cell_values, E, ν)
PUPM.assemble_cell_3d!
— Methodfunction to assemble the local stiffness matrix for 3D
assemble_cell_3d!(ke, cell_values, E, ν)
PUPM.assemble_external_forces!
— MethodFunction for external forces from surface tractions
assemble_external_forces!(f_ext, dh, facetset, facet_values, traction)
PUPM.assemble_external_forces_3d!
— Methodfunction to assemble external forces from surface tractions in 3D
assemble_external_forces_3d!(f_ext, dh, facetset, facet_values, traction)
PUPM.assemble_external_pressure!
— MethodFunction for external forces from pressure
assemble_external_pressure!(f_ext, dh, facetset, facet_values, pressure)
PUPM.assemble_external_pressure_3d!
— Methodfunction to assemble external forces from pressure in 3D
assemble_external_pressure_3d!(f_ext, dh, facetset, facet_values, pressure)
PUPM.assemble_global!
— MethodFunction for the global stiffness matrix
assemble_global!(K, dh, cell_values, E, ν)
PUPM.assemble_global_3d!
— Methodfunction to assemble the global stiffness matrix for 3D
assemble_global_3d!(K, dh, cell_values, E, ν)
PUPM.calculate_H
— MethodFunction to calculate parameter H
calculate_H(grid, dh, cv, u, E, ν)
PUPM.calculate_H_3d
— Methodfunction to calculate parameter H in 3D
calculate_H_3d(grid, dh, cv, u, E, ν)
PUPM.calculate_average_strain_energy
— MethodFunction to calculate the average strain energy
calculate_average_strain_energy(grid, dh, cv, u, E, ν)
PUPM.calculate_cell_volume
— MethodFunction to calculate the cell volume
calculate_cell_volume(cv)
PUPM.calculate_strain_energy
— MethodFunction to calculate element strain energy
calculate_strain_energy(grid, dh, cv, u, E, ν)
PUPM.calculate_strain_energy_3d
— Methodfunction to calculate element strain energy in 3D
calculate_strain_energy_3d(grid, dh, cv, u, E, ν)
PUPM.calculate_strains
— MethodFunction to calculate strains
calculate_strains(grid, dh, cv, u)
PUPM.calculate_strains_3d
— Methodfunction to calculate strains in 3D
calculate_strains_3d(grid, dh, cv, u)
PUPM.calculate_stresses
— MethodFunction to calculate stresses
calculate_stresses(grid, dh, cv, u, E, ν)
PUPM.calculate_stresses_3d
— Methodfunction to calculate stresses in 3D
calculate_stresses_3d(grid, dh, cv, u, E, ν)
PUPM.fem_solver
— MethodMain finite element solver for two dimension
fem_solver(par::DynamicParams)
PUPM.fem_solver_3d
— MethodMain finite element solver for 3D
fem_solver_3d(par::DynamicParams)
PUPM.filter_density_to_vf!
— Methodfunction to apply volume fraction
example:
ρnew = rand(Float64, 8)
nx, ny , nz = 2 , 2 , 2
vf = 0.5
η = π/4
ρ = filter_density_to_vf!(ρnew, vf, nx, ny, nz, η)
PUPM.get_material_matrix
— MethodGet the material matrix C
get_material_matrix(E, ν)
PUPM.get_material_matrix_3d
— Methodfunction to get the material matrix for 3D
get_material_matrix_3d(E, ν)
PUPM.get_material_matrix_derivative_wrt_E
— MethodFunction to calculate the derivative of the strain energy with respect to the Young's modulus
get_material_matrix_derivative_wrt_E(E, ν)
PUPM.get_material_matrix_derivative_wrt_E_3d
— Methodfunction to get the derivative of the material matrix with respect to the Young's modulus in 3D
get_material_matrix_derivative_wrt_E_3d(E::Vector{Float64,1}, ν)
PUPM.remove_vtk_files
— Methodfunction to remove vtu file
remove_vtk_files(directory::String)
PUPM.top_upm
— Methodfunction to perform topology optimization using UPM approach (2D case)
top_upm(par::DynamicParams, name_of_file::String, directory::String)
PUPM.top_upm_3d
— Methodfunction to perform topology optimization using UPM approach (3D case)
top_upm_3d(par::DynamicParams, name_of_file::String, directory::String)
PUPM.transfer_to_density
— Methodfunction to convert Young's modulus to density E = E0(rho/rho0)^gamma
Example:
Enew = rand(Float64, 5)
E0 = 1.0
ρ0 = 1.0
γ = 1
ρ = transfer_to_density(Enew, E0, ρ0, γ)
PUPM.transfer_to_young
— Methodfunction to transfer density to young modulus example: ρnew = rand(Float64, 4) E0 = 1.0 ρ0 = 1.0 γ = 1 Emin = 1e-4 Emax = 1.0
transfertoyoung(ρnew , E0, ρ0, γ, Emin , Emax)
PUPM.update_upm
— Methodfunction for update Young's modulus based on UPM approach
Example:
k = 1
E = rand(Float64, 5)
H = rand(Float64, 5)
Emax = 1.0
Emin = 1e-4
# test code
Enew = update_upm!(k, E, H,Emax,Emin)
PUPM.vertexdofs
— MethodFunction to apply nodal forces to external force vector
apply_nodal_force!(grid, node_set_name, load_vector, f_ext)