ComputationalModels

HyperFEM.ComputationalModels.update_displacements! — Method
update_displacements!

Update the old displacement field xh⁻ with the new displacement field xh⁺. The update is performed in place, modifying xh⁻ to match both the free dof values and the dirichlet dof values of xh⁺.

source
HyperFEM.ComputationalModels.update_velocity! — Method
update_velocity!

Update the velocity field vh based on the current displacement field xh⁺ and the previous displacement xh⁻ using a midpoint time-stepping scheme. The velocity is updated in place.

source

DiscreteModeling

HyperFEM.DiscreteModeling.add_tag_from_vertex_filter! — Method

Create a new tag from a geometry and a coordinate-based filter function. The filter function takes in vertex coordinates and returns a boolean values. A geometrical entity is tagged if all its vertices pass the filter.

See also

  • Gridap.Geometry.face_labeling_from_vertex_filter
  • Gridap.Geometry.merge!
source
HyperFEM.DiscreteModeling.aspect_ratio — Method

Return the aspect ratio of the underlying cartesian elements as a string. This function is only available for an underlying CartesianGrid.

Example

aspect_ratio(Ω)             # "51:51:5"
aspect_ratio(Ω, tol=0.05)   # "10:10:1"
aspect_ratio(uh⁺, tol=0.1)  # "10:10:1"
source
HyperFEM.DiscreteModeling.element_size — Method

Return the element size for a cartesian mesh. This function is only available for an underlying CartesianGrid.

Example

element_size(model)   # Compute the diagonal
element_size(uh, :x)  # Get the x-size of the underlying grid
source
HyperFEM.DiscreteModeling.CartesianTags — Module

Shortcuts for the tags of cartesian discrete models.

Example

geometry = CartesianDiscreteModel(domain, partition)
labels = get_face_labeling(geometry)
add_tag_from_tags!(labels, "top",    CartesianTags.faceXY1)  # Edges and vertices are excluded
add_tag_from_tags!(labels, "bottom", CartesianTags.faceXY0⁺) # Edges and vertices are included
add_tag_from_tags!(labels, "x_sym", [CartesianTags.face0YZ; CartesianTags.edge0Y0; CartesianTags.edge0Y1])
add_tag_from_tags!(labels, "center_axis", CartesianTags.edge00Z⁺)
source
HyperFEM.DiscreteModeling.EvolutionFunctions.ramp — Function

Return a bounded ramp function from 0 to 1. By default, the slope is the identity. Otherwise, the scaling factor is 1/T.

\[f(t) = \begin{cases} 0 &, t < 0 \\ t/T &, 0 \leq t < T \\ 1 &, t \geq T \end{cases}\]

source
HyperFEM.DiscreteModeling.EvolutionFunctions.triangular — Method

Return a triangular evolution function ranging from 0 to 1, centered at Tmax, having edges at T0 and 2Tmax-T0. By default, T0=0 and Tmax=T.

\[f(t) = \begin{cases} 0 &, t < T_0 \\ \frac{t-T_0}{T_{max}-T_0} &, T_0 \leq t < T_{max} \\ 1-\frac{t-T_{max}}{T_{max}-T_0} &, T_{max} \leq t < 2T_{max}-T_0 \\ 0 &, t \geq 2T_{max}-T_0 \end{cases}\]

source

PhysicalModels

Gridap.CellData.CellState — Method
CellState(model, dΩ)

Initialize the state variables for the given constitutive model and discretization. The constitutive model passed to the function will determine the type of the state variables, e.g., a vector, tensor, tuple of state variables...

source
HyperFEM.PhysicalModels.EightChain — Type

Simplified eight-chain model by Arruda and Boyce. the implementation uses the first five terms of the inverse Langevin function.

\[\Psi = C_1 \sum_{i=1}^{3} \alpha_i \beta^{i-1} (I_1^i - 3^i)\]

source
HyperFEM.PhysicalModels.ViscousPolyconvex — Type

Polyconvex viscoelastic constitutive model for the set of variables {F, J, Cᵥ}, where F is the deformation gradient, J is the jacobian and Cᵥ is the viscous strain.

Key features:

  • Factorization-free: Fast calculation of the intermediate state without matrix factorizations.
  • Neo-Hookean equilibrium: Uses a neo-Hookean expression for the underlying equilibrium term.
  • Distortional invariants: Formulated using distortional invariants rather than deviatoric ones.

Fields

  • μ::Float64: Shear modulus.
  • τ::Float64: Relaxation time.
  • Δt::Base.RefValue{Float64}: Reference to the time step.
source
Gridap.CellData.update_state! — Method
update_state!(model, A, F, Fn)

Update the state variables. The state variables must be initialized using the function CellState with the constitutive model.

NOTE: The Gridap function expects the following order of arguments: update_state!(updater, cell_states, cell_fields), hence, the order of the arguments differ from the standar energy function, like Ψ(F, Fn, A...)

source
HyperFEM.PhysicalModels.update_time_step! — Method
update_time_step!(model, Δt)

Set the time step to be used internally by the constitutive model. The time step is a reference, hence, the weak forms derived from the constitutive model will be automatically updated with the new time step.

source

Solvers

TensorAlgebra

HyperFEM.TensorAlgebra.:⊗₁² — Method
⊗₁²(A::VectorValue{D}, B::VectorValue{D})::TensorValue{D,D}

Outer product of two first-order tensors (vectors), returning a second-order tensor (matrix).

source
HyperFEM.TensorAlgebra.:⊗₁²³ — Method
⊗₁²³(A::VectorValue{D}, B::TensorValue{D})::TensorValue{D,D*D}

Outer product of a first-order and second-order tensors (vector and matrix), returning a third-order tensor represented in a D x D² flattened matrix using combined indices.

source
HyperFEM.TensorAlgebra.:⊗₁₂³ — Method
⊗₁₂³(A::TensorValue{D}, B::VectorValue{D})::TensorValue{D,D*D}

Outer product of a second-order and first-order tensors (matrix and vector), returning a third-order tensor represented in a D x D² flattened matrix using combined indices.

source
HyperFEM.TensorAlgebra.:⊗₁₂³⁴ — Method
⊗₁₃²⁴(A::TensorValue{D}, B::TensorValue{D})::TensorValue{D*D}

Outer product of two second-order tensors (matrices), returning a fourth-order tensor represented in a D² x D² flattened matrix using combined indices.

source
HyperFEM.TensorAlgebra.:⊗₁₃² — Method
⊗₁₃²(A::TensorValue{D}, B::TensorValue{D})::TensorValue{D,D*D}

Outer product of a second-order and first-order tensors (matrix and vector), returning a third-order tensor represented in a D x D² flattened matrix using combined indices.

source
HyperFEM.TensorAlgebra.:⊗₁₃²⁴ — Method
⊗₁₃²⁴(A::TensorValue{D}, B::TensorValue{D})::TensorValue{D*D}

Outer product of two second-order tensors (matrices), returning a fourth-order tensor represented in a D² x D² flattened matrix using combined indices.

source
HyperFEM.TensorAlgebra.:⊗₁₄²³ — Method
⊗₁₄²³(A::TensorValue{D}, B::TensorValue{D})::TensorValue{D*D}

Outer product of two second-order tensors (matrices), returning a fourth-order tensor represented in a D² x D² flattened matrix using combined indices.

source
HyperFEM.TensorAlgebra.contraction_IJK_KLP — Method
contraction_IJK_KLP(A::TensorValue{D,D*D}, B::TensorValue{D,D*D})::TensorValue{D*D,D*D}

Performs a tensor contraction between third-order tensors (represented as a D × D² matrix in flattened index notation). The operation follows the index contraction pattern, where addition is performed for repeated indices.

source
HyperFEM.TensorAlgebra.contraction_IP_JPKL — Method
contraction_IP_JPKL(A::TensorValue{D}, H::TensorValue{D*D})::TensorValue{D*D}

Performs a tensor contraction between a second-order tensor (of size D × D) and a fourth-order tensor (represented as a D² × D² matrix in flattened index notation). The operation follows the index contraction pattern, where addition is performed for repeated indices.

source
HyperFEM.TensorAlgebra.contraction_IP_PJKL — Method
contraction_IP_PJKL(A::TensorValue{D}, H::TensorValue{D*D})::TensorValue{D*D}

Performs a tensor contraction between a second-order tensor (of size D × D) and a fourth-order tensor (represented as a D² × D² matrix in flattened index notation). The operation follows the index contraction pattern, where addition is performed for repeated indices.

source
HyperFEM.TensorAlgebra.push_forward_C_to_F — Method
push_forward_C_to_F(F::TensorValue{D}, H::TensorValue{D²}) :: TensorValue

Assumming C is symmetric, compute directly 0.5 * DCDF' · H · DCDF without computing the 4th order tensor DCDF.

source

WeakForms

Gridap.Algebra.jacobian — Function
jacobian(...)::Gridap.CellData.Integrand

Calculate the jacobian using the given constitutive model and finite element functions.

source
Gridap.Algebra.residual — Function
residual(...)::Gridap.CellData.Integrand

Calculate the residual using the given constitutive model and finite element functions.

source