FerriteNeumann

FerriteNeumann.jl: Simple Neumann boundary conditions for Ferrite.jl

FerriteNeumann.NeumannHandler โ€” Type
NeumannHandler(dh::AbstractDofHandler)

The handler of all the Neumann boundary conditions in dh that can be used to apply the neumann contribution to the external "force"-vector, fext:

fext = zeros(ndofs(dh))
nh=NeumannHandler(dh)
add!(nh, Neumann(...))  # Add boundary conditions
for t in timesteps
    fill!(fext, 0)
    apply!(fext, nh, t) # Add contributions to `fext`
    ...
end
source
FerriteNeumann.Neumann โ€” Type
Neumann(field_name::Symbol, fv_info::Union{FaceValues,QuadratureRule,Int}, faceset::Set{FaceIndex}, f)

Define a Neumann contribution with the weak forms according to

\[\int_{\Gamma} f \ \delta u \ \mathrm{d}\Gamma, \quad \text{Scalar fields} \\ \int_{\Gamma} \boldsymbol{f} \cdot \boldsymbol{\delta u} \ \mathrm{d}\Gamma, \quad \text{Vector fields} \]

where $\Gamma$ is the boundary where the contribution is active. $f$, or $\boldsymbol{f}$, is the prescribed Neumann value, defined by a function with signatures

f(x::Vec, time, n::Vec) -> Number (Scalar field)

f(x::Vec, time, n::Vec) -> Vec{dim} (Vector field)

where x is the spatial position of the current quadrature point, time is the current time, and n is the face normal vector. The remaining input arguments are

  • fieldname describes the field on which the boundary condition should abstract
  • fv_info gives required input to determine the facevalues. The following input types are accepted:
    • FaceValues matching the interpolation for fieldname for the faces in faceset and output of f
    • QuadratureRule matching the interpolation for fieldname for faces in faceset FaceValues are deduced from the output of f
    • Int giving the integration order to use. FaceValues are deduced from the interpolation of fieldname and the output of f.
  • faceset describes which faces the BC is applied to
source