topoptlab.material_interpolation module

topoptlab.material_interpolation.bound_interpol(xPhys: ndarray, w: float, bd_low: Callable, bd_upp: Callable, bd_kws: Dict, **kwargs: Any) ndarray[source]

Interpolate a material property A between a lower and upper bound according to

A_interpol = (1-w) A_low + w A_upp

This scheme was to my knowledge first suggested in

Bendsøe, Martin P., and Ole Sigmund. “Material interpolation schemes in topology optimization.” Archive of applied mechanics 69 (1999): 635-654.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical, relative density of stronger phase

  • w (float) – weight to trade-off between lower and upper bound. Must be between 0/1.

  • bd_low (callable) – lower bound on property A that takes x and bd_kws as input arguments.

  • bd_upp (callable) – upper bound on property A that takes xP and bd_kws as input arguments.

  • bd_kws (dict) – dictionary that contains the keywords necessary for the bound functions.

Returns:

A – scale factor to multiply with material property

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.bound_interpol_dx(xPhys: ndarray, w: float, bd_low_dx: Callable, bd_upp_dx: Callable, bd_kws: Dict, **kwargs: Any) ndarray[source]

Derivative of bound interpolation with regards to phys. densities

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical SIMP density

  • w (float) – weight to trade-off between lower and upper bound. Must be between 0/1.

  • bd_low_dx (callable) – derivative with regards to xPhys of lower bound on property A that takes xPhys and bd_kws as input arguments.

  • bd_upp_dx (callable) – derivative with regards to xPhys of upper bound on property A that takes xPhys and bd_kws as input arguments.

  • bd_kws (dict) – dictionary that contains the keywords necessary for the bound functions.

Returns:

A – scale factor to multiply with material property

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.heatexpcoeff_binary_iso(xPhys: ndarray, K: ndarray, Kmin: float, Kmax: float, amin: float, amax: float) ndarray[source]

Return the linear heatexpansion coefficient of a composite consisting of two isotropic substances. Taken from Eq. 2.26 of

Rosen, B. Walter, and Zvi Hashin. “Effective thermal expansion coefficients and specific heats of composite materials.” International Journal of Engineering Science 8.2 (1970): 157-173.

As in this equation it is not stated how K* (effective bulk modulus) is calculated, I assume it to be provided by some material interpolation function (e. g. SIMP). Mind you that this interpolation must lie between the Hashin-Shtrikman bounds.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical, relative density of stronger phase

  • K (np.ndarray, shape (n)) – interpolated / effective bulk modulus

  • Kmin (float) – smaller bulk modulus

  • Kmax (float) – larger bulk modulus

  • amin (float) – heat expansion coefficient of weaker phase.

  • amax (float) – heat expansion coefficient of stronger phase.

Returns:

a – interpolated heat expansion coefficient

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.heatexpcoeff_binary_iso_dx(xPhys: ndarray, K: ndarray, dKdx: ndarray, Kmin: float, Kmax: float, amin: float, amax: float) ndarray[source]

Return the derivative of the linear heatexpansion coefficient of a composite consisting of two isotropic substances.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical, relative density of stronger phase

  • K (np.ndarray, shape (n)) – interpolated / effective bulk modulus

  • dKdx (np.ndarray, shape (n)) – derivative of interpolated / effective bulk modulus

  • Kmin (float) – smaller bulk modulus

  • Kmax (float) – larger bulk modulus

  • amin (float) – heat expansion coefficient of weaker phase.

  • amax (float) – heat expansion coefficient of stronger phase.

Returns:

a – interpolated heat expansion coefficient

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.ramp(xPhys: ndarray, eps: ndarray, penal: float, **kwargs: Any) ndarray[source]

Return scale factor for the RAMP method:

Stolpe, Mathias, and Krister Svanberg. “An alternative interpolation scheme for minimum compliance topology optimization.” Structural and Multidisciplinary Optimization 22.2 (2001): 116-124.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical RAMP density

  • eps (float) – small offset that is needed for some properties (e. g. stiffness) to avoid degeneracy of the problem. Should be very small compared to 1 e. g. 1e-9.

  • penal (float) – penalty factor for the RAMP method.

Returns:

scale – scale factor to multiply with material property/matrix.

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.ramp_dx(xPhys: ndarray, eps: ndarray, penal: float, **kwargs: Any) ndarray[source]

Return the derivative of the scale factor for the RAMP method:

Stolpe, Mathias, and Krister Svanberg. “An alternative interpolation scheme for minimum compliance topology optimization.” Structural and Multidisciplinary Optimization 22.2 (2001): 116-124.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical RAMP density

  • eps (float) – small offset that is needed for some properties (e. g. stiffness) to avoid degeneracy of the problem. Should be very small compared to 1 e. g. 1e-9.

  • penal (float) – penalty factor for the RAMP method.

Returns:

scale – scale factor to multiply with material property/matrix.

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.simp(xPhys: ndarray, eps: ndarray, penal: float, **kwargs: Any) ndarray[source]

Return scale factor for the modified SIMP method by

Sigmund, Ole. “Morphology-based black and white filters for topology optimization.” Structural and Multidisciplinary Optimization 33.4 (2007): 401-424.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical SIMP density

  • eps (float) – small offset that is needed for some properties (e. g. stiffness) to avoid degeneracy of the problem. Should be very small compared to 1 e. g. 1e-9.

  • penal (float) – penalty exponent for the SIMP method.

Returns:

scale – scale factor to multiply with material property/matrix.

Return type:

np.ndarray, shape (n)

topoptlab.material_interpolation.simp_dx(xPhys: ndarray, eps: ndarray, penal: float, **kwargs: Any) ndarray[source]

Return the derivative of the scale factor for the modified SIMP method

Sigmund, Ole. “Morphology-based black and white filters for topology optimization.” Structural and Multidisciplinary Optimization 33.4 (2007): 401-424.

with regards to the SIMP density.

Parameters:
  • xPhys (np.ndarray, shape (n)) – physical SIMP density

  • eps (float) – small offset that is needed for some properties (e. g. stiffness) to avoid degeneracy of the problem. Should be very small compared to 1 e. g. 1e-9.

  • penal (float) – penalty exponent for the SIMP method.

Returns:

scale – scale factor to multiply with material property/matrix.

Return type:

np.ndarray, shape (n)