Documentation ¶
Index ¶
- func CalculateStrainEnergy(params StrainEnergyInput) float64
- func DisplacementMatrixElement(m, n int, freq []float64, matProp Rank4Tensor) float64
- func Displacements(ftBodyForce [][]complex128, freq Frequency, matProp Rank4Tensor) [][]complex128
- func Ellipsoid(N int, a float64, b float64, c float64) *sfft.CMat3
- func EnergyDensity(matProp Rank4Tensor, strain *mat.Dense) float64
- func HomogeneousModulusEnergy(indicator []complex128, domainSize []int, misfit *mat.Dense, matProp Rank4) float64
- func PerturbedForce(ft FourierTransform, misfit *mat.Dense, ftDisp [][]complex128, shape GridFunc, ...) [][]complex128
- func RotationMatrix(angle float64, axis int) *mat.Dense
- func Shear(bulkMod float64, poisson float64) float64
- func Strain(ftDisp [][]complex128, freq Frequency, m, n int) []complex128
- type EffectiveForce
- type FourierTransform
- type Frequency
- type GridFunc
- type Rank4
- type Rank4Tensor
- type StrainEnergyInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateStrainEnergy ¶
func CalculateStrainEnergy(params StrainEnergyInput) float64
CalculateStrainEnergy calculates the strain energy according to the parameters given in he passed parameters
func DisplacementMatrixElement ¶
func DisplacementMatrixElement(m, n int, freq []float64, matProp Rank4Tensor) float64
DisplacementMatrixElement returns the (m, n) element of the matrix needed to find the displacements
func Displacements ¶
func Displacements(ftBodyForce [][]complex128, freq Frequency, matProp Rank4Tensor) [][]complex128
Displacements calculates the fourier transformed displacements from a given body force
func Ellipsoid ¶
Ellipsoid returns a voxel representation of an ellipsoid with half-axes given by a, b and c. The overall domai size will be N x N x N
func EnergyDensity ¶
func EnergyDensity(matProp Rank4Tensor, strain *mat.Dense) float64
EnergyDensity calculates the strain energy
func HomogeneousModulusEnergy ¶
func HomogeneousModulusEnergy(indicator []complex128, domainSize []int, misfit *mat.Dense, matProp Rank4) float64
HomogeneousModulusEnergy returns the elastic energy from a
func PerturbedForce ¶
func PerturbedForce(ft FourierTransform, misfit *mat.Dense, ftDisp [][]complex128, shape GridFunc, matProp Rank4Tensor) [][]complex128
PerturbedForce returns the effective force for the first order perturbation arising from difference in the material properties. The deviation in material properties at position i is given by shape(i)*matProp. The fourier transformed effective force arising from the perturbation is given by
-delta C_{ijkl}*i*k_j(FT(misfit_kl - zero_eps_kl)shape(i))
where FT denotes the fourier transform, misfit_kl denotes the kl component of the misfit strain, zero_eps_kl denotes the kl component of the zeroth order strain (e.g. strain from the case where the elastic properties are constant)
func RotationMatrix ¶
RotationMatrix creates the rotation matrix corresponding to a rotation around the specified axis
func Shear ¶
Shear modulus returns the shear modulus when the bulk modulus and poisson ratio is known
func Strain ¶
func Strain(ftDisp [][]complex128, freq Frequency, m, n int) []complex128
Strain returns the fourier transformed strains calculated from the fourier transformed displacements
Types ¶
type EffectiveForce ¶
EffectiveForce is a type that is used to calculate an effective body force from a region of misfit strains
func NewEffectiveForceFromMisfit ¶
func NewEffectiveForceFromMisfit(matProp Rank4, misfit *mat.Dense) EffectiveForce
NewEffectiveForceFromMisfit returns the effective force based on the elastic properties and the misfit strains
func (*EffectiveForce) Get ¶
func (e *EffectiveForce) Get(comp int, freq Frequency, indicator []complex128) []complex128
Get a component of the effective force specified by comp. freq is a function that can returns the frequency of node i. indicator is a fourier transformed indicator function of the domain where the misfit strain exists.
type FourierTransform ¶
type FourierTransform interface { Freq(i int) []float64 FFT(data []complex128) []complex128 IFFT(data []complex128) []complex128 }
FourierTransform is a generic interface for a multidimensional FFT
type Frequency ¶
Frequency is a function that can return the frequency corresponding to an index in a 1D array (See the SFFT package)
type Rank4 ¶
type Rank4 struct {
Data []float64
}
Rank4 is a type used to represent a 3x3x3x3 tensor
func CubicMaterial ¶
CubicMaterial returns the elastic tensor for a cubic material, where c11, c12 and c44 are constants in the Voigt representation
func FromFlatVoigt ¶
FromFlatVoigt constructs the elasticity tensor from the voigt representation of it
func (*Rank4) ContractLast ¶
ContractLast contracts the two last indices with the passed matrix
type Rank4Tensor ¶
Rank4Tensor is an interface of entities that implementes an getter with four indices