FerriteNeumann
FerriteNeumann.jl: Simple Neumann boundary conditions for Ferrite.jl
FerriteNeumann.NeumannHandler
โ TypeNeumannHandler(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
FerriteNeumann.Neumann
โ TypeNeumann(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 abstractfv_info
gives required input to determine the facevalues. The following input types are accepted:FaceValues
matching the interpolation forfieldname
for the faces infaceset
and output off
QuadratureRule
matching the interpolation forfieldname
for faces infaceset
FaceValues
are deduced from the output off
Int
giving the integration order to use.FaceValues
are deduced from the interpolation offieldname
and the output off
.
faceset
describes which faces the BC is applied to