Functions

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.apply_nodal_force_3d!Method

function to apply nodal forces to external force vector in 3D

apply_nodal_force_3d!(grid, node_set_name, load_vector, f_ext)
source
PUPM.assemble_cell!Method

Function for the local stiffness matrix(element stiffness matrix)

assemble_cell!(ke, cell_values, E, ν)
source
PUPM.fem_solverMethod

Main finite element solver for two dimension

fem_solver(par::DynamicParams)
source
PUPM.filter_density_to_vf!Method

function 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, η)
source
PUPM.top_upmMethod

function to perform topology optimization using UPM approach (2D case)

top_upm(par::DynamicParams, name_of_file::String, directory::String)
source
PUPM.top_upm_3dMethod

function to perform topology optimization using UPM approach (3D case)

top_upm_3d(par::DynamicParams, name_of_file::String, directory::String)
source
PUPM.transfer_to_densityMethod

function 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, γ)

source
PUPM.transfer_to_youngMethod

function 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)

source
PUPM.update_upmMethod

function 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)
source
PUPM.vertexdofsMethod

Function to apply nodal forces to external force vector

apply_nodal_force!(grid, node_set_name, load_vector, f_ext)
source