ComputationalModels
HyperFEM.ComputationalModels.get_Neumann_dΓ — Method
get_Neumann_dΓ(...)::Vector{Gridap.CellData.GenericMeasure}Return a collection of boundary triangulations at the specified Neumann boundaries.
HyperFEM.ComputationalModels.residual_Neumann — Method
residual_Neumann(...)::FunctionReturn the Neumann residual as a FUNCTION.
DiscreteModeling
HyperFEM.DiscreteModeling — Module
A bundle of helper tools to work with discrete models in space/time.
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_filterGridap.Geometry.merge!
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"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 gridHyperFEM.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⁺)HyperFEM.DiscreteModeling.EvolutionFunctions — Module
The evolution functions have been designed to apply variable boundary conditions.
HyperFEM.DiscreteModeling.EvolutionFunctions.constant — Method
Return a constant function which is always evaluated to 1.
\[f(x) = 1\]
HyperFEM.DiscreteModeling.EvolutionFunctions.heaviside — Method
Return the Heaviside function.
\[f(t) = H(t,T)\]
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}\]
HyperFEM.DiscreteModeling.EvolutionFunctions.smoothstep — Method
Return a sigmoid-like function centered at T and edges at ±ϵ. by default, T=ϵ.
\[u(t) = \frac{t - T + \epsilon}{2\epsilon} \\[10pt] f(t) = \begin{cases} 0 &, u < 0 \\ 3u^2 - 2u^3 &, 0 \leq u < 1 \\ 1 &, u \geq 1 \end{cases}\]
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}\]
PhysicalModels
Gridap.CellData.CellState — Method
Initialize the state variables for the given constitutive model and discretization.
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)\]
HyperFEM.PhysicalModels.IsochoricNeoHookean3D — Type
Neo-Hooke hyperelastic model
\[\Psi = \frac{1}{2}\mu (I_1 - 3)\]
HyperFEM.PhysicalModels.VolumetricEnergy — Type
Coercive volumetric energy term of the form:
\[\Psi = \frac{1}{\kappa} (J-1)^2\]
HyperFEM.PhysicalModels.Yeoh3D — Type
Yeoh constitutive model.
\[\Psi = \sum_{i=1}^3 C_i (I_1 - 3)^i\]
Gridap.CellData.update_state! — Method
Update the state variables. The state variables must be initialized using the function 'CellState' with the constitutive model.
HyperFEM.PhysicalModels.Cauchy — Method
Right Cauchy-Green deformation tensor.
HyperFEM.PhysicalModels.Dissipation — Method
Return the dissipation and its derivatives if any.
HyperFEM.PhysicalModels.ElasticCauchy — Method
Elastic right Cauchy-Green deformation tensor.
HyperFEM.PhysicalModels.JacobianReturnMapping — Method
Residual of the return mapping algorithm and its Jacobian with respect to {Ce,λα} for incompressible case
Arguments
Return
res∂res
HyperFEM.PhysicalModels.Piola — Method
First Piola-Kirchhoff for the incompressible case
Arguments
obj::ViscousIncompressible: The visous modelSe_: Elastic 2nd Piola (function of C)∂Se∂Ce_: 2nd Piola Derivatives (function of C)F: Current deformation gradientFn: Previous deformation gradientA: State variables (Uvα and λα)
Return
Pα::Gridap.TensorValues.TensorValue
HyperFEM.PhysicalModels.ReturnMapping — Method
Return mapping for the incompressible case
# Arguments
- `::ViscousIncompressible`
- `Se_::Function`: Elastic Piola (function of C)
- `∂Se∂Ce_::Function`: Piola Derivatives (function of C)
- `∇u_::TensorValue`
- `∇un_::TensorValue`
- `A::VectorValue`: State variables (10-component vector gathering Uvα and λα)
# Return
- `::bool`: indicates whether the state variables should be updated
- `::VectorValue`: State variables at new time stepHyperFEM.PhysicalModels.SecondPiola — Method
Return the energy density and its derivatives as functions of C instead of F.
HyperFEM.PhysicalModels.Tangent — Method
Visco-Elastic model for incompressible case
Arguments
obj::ViscousIncompressible: The visous modelSe_: Elastic 2nd Piola (function of C)∂Se∂Ce_: 2nd Piola Derivatives (function of C)∇u_: Current deformation gradient∇un_: Previous deformation gradientA: State variables (Uvα and λα)
Return
Cα::Gridap.TensorValues.TensorValue
HyperFEM.PhysicalModels.ViscousPiola — Method
ViscousPiola(Se::Function, Ce::SMatrix, invUv::SMatrix, F::SMatrix)::SMatrix
Viscous 1st Piola-Kirchhoff stress
Arguments
SeElastic Piola (function of C)CeElastic right Green-Cauchy deformation tensorinvUvInverse of viscous strainFDeformation gradient
Return
Pα::SMatrix
HyperFEM.PhysicalModels.ViscousStrain — Method
Multiplicative decomposition of visous strain.
Return
Ue::TensorValueUv::TensorValueUv⁻¹::TensorValue
HyperFEM.PhysicalModels.ViscousTangentOperator — Method
ViscousTangentOperator::TensorValue
Tangent operator for the incompressible case
Arguments
obj::ViscousIncompressibleSe_::Function: Function of C∂Se∂Ce_::Function: Function of CF::TensorValue: Deformation tensorCe_trial: Right Green-Cauchy deformation tensor at intermediate stepCe: Right Green-Cauchy deformation tensor at curent stepinvUvinvUvnλα
Return
Cv::TensorValue{9,9}: A fourth-order tensor in flattened notation
HyperFEM.PhysicalModels.return_mapping_algorithm! — Method
returnmappingalgorithm!
Compute the elastic Cauchy deformation tensor and the incompressibility condition.
Arguments
obj::ViscousIncompressible: The viscous modelSe_::Function: Elastic 2nd Piola-Kirchhoff stress (function of C)∂Se_∂Ce_::Function: Derivatives of elastic 2nd Piola-Kirchhoff stress (function of C)F: Deformation gradientCe_trial: Elastic right Green-Cauchy at intermediate statepCe: Elastic right Green-Cauchy deformation tensorλα: incompressibility constraint (Lagrange multiplier)
Return
Ceλα
HyperFEM.PhysicalModels.update_time_step! — Method
Set the time step to be used internally by the constitutive model.
HyperFEM.PhysicalModels.∂Ce_∂C — Method
∂Ce∂C(::ViscousIncompressible, γα, ∂Se∂Ce, invUvn, Ce, Cetrial, λα, F)
Tangent operator of Ce for the incompressible case
Arguments
::ViscousIncompressibleThe viscous modelγα: Characteristic time τα / (τα + Δt)∂Se∂Ce_: Function of C- ...
Return
∂Ce∂C
HyperFEM.PhysicalModels.∂Ce_∂C_Uvfixed — Method
Tangent operator of Ce at fixed Uv
HyperFEM.PhysicalModels.∂Ce_∂invUv — Method
∂Ce∂(Uv^{-1})
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).
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.
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.
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.
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.
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.
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.
HyperFEM.TensorAlgebra.I_ — Function
The scaling N×N matrix
HyperFEM.TensorAlgebra._Kroneckerδδ — Method
_Kroneckerδδ(δδ::Function, N::Int)::TensorValue{N*N,N*N,Float64}Delta Kronecker outer product according to the δδ(i,j,k,l) function
HyperFEM.TensorAlgebra._flat_idx — Method
Return the linear index of a N-dimensional tensor
HyperFEM.TensorAlgebra._full_idx2 — Method
Return the cartesian indices of an N-dimensional second-order tensor
HyperFEM.TensorAlgebra._full_idx4 — Method
Return the cartesian indices of an N-dimensional fourth-order tensor
HyperFEM.TensorAlgebra.cof — Method
cof(A::TensorValue)::TensorValueCalculate the cofactor of a matrix.
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.
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.
HyperFEM.TensorAlgebra.logreg — Method
Jacobian regularization
WeakForms
Gridap.Algebra.jacobian — Function
jacobian(...)::Gridap.CellData.IntegrandCalculate the jacobian using the given constitutive model and finite element functions.
Gridap.Algebra.residual — Function
residual(...)::Gridap.CellData.IntegrandCalculate the residual using the given constitutive model and finite element functions.