Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GXBeam"
uuid = "974624c9-1acb-4ad6-a627-8ac40fc27a3e"
authors = ["Taylor McDonnell <taylor.golden.mcdonnell@gmail.com> and Andrew Ning"]
version = "0.5.2"
version = "1.0.0"

[deps]
ArnoldiMethod = "ec485272-7323-5ecc-a04f-4719b315124d"
Expand Down Expand Up @@ -30,16 +30,16 @@ julia = "1.6"
ArnoldiMethod = "0.0.4 - 0.5"
ChainRulesCore = "1"
FLOWMath = "0.3 - 0.5"
FillArrays = "0.13 - 2"
ForwardDiff = "0.10 - 1"
FillArrays = "0.13, 1"
ForwardDiff = "0.10, 1"
ImplicitAD = "0.3.1 - 0.4"
IterativeSolvers = "0.9 - 0.10"
LinearMaps = "2 - 4"
NLsolve = "4"
OffsetArrays = "1"
ReverseDiff = "1"
Roots = "1 - 3"
SciMLBase = "1"
SciMLBase = "1 - 2"
SparseArrays = "1.6 - 2"
SparseDiffTools = "2"
StaticArrays = "1.9 - 2"
Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Elliptic = "b305315f-e792-5b7a-8f41-49f472929428"
FLOWMath = "6cb5d3fb-0fe8-4cc2-bd89-9fe0b19a99d3"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
GXBeam = "974624c9-1acb-4ad6-a627-8ac40fc27a3e"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Expand Down
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ makedocs(;
authors = "Taylor McDonnell <taylormcd@byu.edu>",
)

deploydocs(
deploydocs(;
repo = "github.com/byuflowlab/GXBeam.jl.git",
devbranch = "master"
)
2 changes: 1 addition & 1 deletion docs/src/literate/sensitivities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# (e.g. `system = DynamicSystem(TF, assembly)` where `TF` is an appropriate floating point
# type).
#
# For example, consider the [Cantilever with a Tip Moment](@id tipmoment) example. Suppose
# For example, consider the [Cantilever with a Tip Moment](@ref tipmoment) example. Suppose
# we were interested in the sensitivity of tip x and y-displacement with respect to
# the nondimensional tip moment ``\lambda`` when ``\lambda=1``. These sensitivites may
# be computed as follows:
Expand Down
45 changes: 39 additions & 6 deletions docs/src/reference/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ GXBeam.point_load_jacobians
GXBeam.point_displacement
GXBeam.point_displacement_jacobians
GXBeam.point_displacement_rates
GXBeam.point_velocity_rates
GXBeam.point_velocities
GXBeam.initial_point_displacement
GXBeam.initial_point_velocity_rates
Expand Down Expand Up @@ -200,17 +201,20 @@ GXBeam.dynamic_point_resultant_jacobians
GXBeam.expanded_steady_point_resultant_jacobians
GXBeam.expanded_dynamic_point_resultant_jacobians
GXBeam.mass_matrix_point_resultant_jacobians
GXBeam.point_velocity_jacobians
GXBeam.initial_point_velocity_jacobians
GXBeam.newmark_point_velocity_jacobians
GXBeam.dynamic_point_velocity_jacobians
GXBeam.expanded_point_velocity_jacobians
GXBeam.mass_matrix_point_velocity_jacobians
GXBeam.insert_static_point_jacobians!
GXBeam.insert_steady_point_jacobians!
GXBeam.insert_initial_point_jacobians!
GXBeam.insert_dynamic_point_jacobians!
GXBeam.insert_expanded_steady_point_jacobians!
GXBeam.insert_expanded_dynamic_point_jacobians!
GXBeam.insert_mass_matrix_point_jacobians!
GXBeam.insert_expanded_mass_matrix_point_jacobians!
GXBeam.static_point_jacobian!
GXBeam.steady_point_jacobian!
GXBeam.initial_point_jacobian!
Expand All @@ -236,9 +240,8 @@ GXBeam.newmark_element_properties
GXBeam.dynamic_element_properties
GXBeam.expanded_steady_element_properties
GXBeam.expanded_dynamic_element_properties
GXBeam.compatability_residuals
GXBeam.expanded_element_steady_velocity_residuals
GXBeam.expanded_element_dynamic_velocity_residuals
GXBeam.compatibility_residuals
GXBeam.expanded_element_velocity_residuals
GXBeam.expanded_element_equilibrium_residuals
GXBeam.static_element_resultants
GXBeam.dynamic_element_resultants
Expand All @@ -261,8 +264,7 @@ GXBeam.expanded_steady_element_jacobian_properties
GXBeam.expanded_dynamic_element_jacobian_properties
GXBeam.mass_matrix_element_jacobian_properties
GXBeam.expanded_mass_matrix_element_jacobian_properties
GXBeam.expanded_element_steady_velocity_jacobians
GXBeam.expanded_element_dynamic_velocity_jacobians
GXBeam.expanded_element_velocity_jacobians
GXBeam.expanded_steady_element_equilibrium_jacobians
GXBeam.expanded_dynamic_element_equilibrium_jacobians
GXBeam.expanded_mass_matrix_element_equilibrium_jacobians
Expand All @@ -272,7 +274,6 @@ GXBeam.initial_element_resultant_jacobians
GXBeam.dynamic_element_resultant_jacobians
GXBeam.expanded_element_resultant_jacobians
GXBeam.mass_matrix_element_resultant_jacobians
GXBeam.expanded_mass_matrix_element_velocity_jacobians
GXBeam.static_element_jacobian!
GXBeam.steady_element_jacobian!
GXBeam.initial_element_jacobian!
Expand All @@ -291,13 +292,16 @@ GXBeam.SystemIndices
GXBeam.default_force_scaling
GXBeam.curve_triad
GXBeam.curve_coordinates
GXBeam.set_initial_state!
GXBeam.two_dimensional_residual!
GXBeam.static_system_residual!
GXBeam.initial_system_residual!
GXBeam.steady_system_residual!
GXBeam.newmark_system_residual!
GXBeam.dynamic_system_residual!
GXBeam.expanded_steady_system_residual!
GXBeam.expanded_dynamic_system_residual!
GXBeam.two_dimensional_jacobian!
GXBeam.static_system_jacobian!
GXBeam.steady_system_jacobian!
GXBeam.initial_system_jacobian!
Expand All @@ -310,6 +314,35 @@ GXBeam.expanded_system_mass_matrix
GXBeam.expanded_system_mass_matrix!
```

### Section
```@docs
GXBeam.SectionCache
GXBeam.area_and_centroid_of_element
GXBeam.redistribute_thickness
GXBeam.combine_halfs
GXBeam.nodes_half
GXBeam.rotate_ply_to_element
GXBeam.insertpoint
GXBeam.tangential
GXBeam.element_orientation
GXBeam.element_submatrix
GXBeam.addwebs
GXBeam.web_intersections
GXBeam.parseairfoil
GXBeam.node2idx
GXBeam.node2idx!
GXBeam.reorder
GXBeam.find_inner_surface
GXBeam.elementQ
GXBeam.resample
GXBeam.stiffness
GXBeam.preprocess_layers
GXBeam.linearsolve
GXBeam.rotate_element_to_beam
GXBeam.element_integrand
GXBeam.te_inner_intersection
```

## Index

```@index
Expand Down
2 changes: 1 addition & 1 deletion src/element.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ corresponding to a beam element for a constant mass matrix system
return (; Pdot_Vdot, Pdot_Ωdot, Hdot_Vdot, Hdot_Ωdot)
end

# --- Compatability Residuals --- #
# --- Residuals --- #

"""
compatibility_residuals(properties)
Expand Down
34 changes: 27 additions & 7 deletions src/interfaces/diffeq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,25 @@ function SciMLBase.ODEProblem(system::AbstractSystem, assembly, tspan;
end

"""
ODEFunction(system::GXBeam.AbstractSystem, assembly; kwargs...)
SciMLBase.ODEFunction(system::AbstractSystem, assembly;
# general keyword arguments
prescribed_conditions=Dict{Int,PrescribedConditions{Float64}}(),
distributed_loads=Dict{Int,DistributedLoads{Float64}}(),
point_masses=Dict{Int,PointMass{Float64}}(),
linear_velocity=(@SVector zeros(3)),
angular_velocity=(@SVector zeros(3)),
gravity=(@SVector zeros(3)),
# control flag keyword arguments
structural_damping=true,
two_dimensional=false,
constant_mass_matrix=true,
sparse=false,
# sensitivity analysis keyword arguments
xpfunc = nothing,
pfunc = (p, t) -> (;),
p = nothing,
# additional keyword arguments (passed to ODEFunction constructor)
kwargs...)

Construct a `ODEFunction` for the system of nonlinear beams contained in `assembly`
which may be used with the DifferentialEquations package.
Expand Down Expand Up @@ -272,18 +290,20 @@ function SciMLBase.ODEFunction(system::AbstractSystem, assembly;
# mass matrix
TF = eltype(system)
nx = indices.nstates
M = zeros(TF, nx, nx)

update_mass_matrix! = (jacob, x, p, t) -> begin
# zero out all mass matrix entries
M .= 0.0
jacob .= 0.0

# compute mass matrix
mass_matrix!(jacob, x, p, (; constants..., t))

# change sign of mass matrix
M .*= -1
# return result
return M
jacob .*= -1
end
mass_matrix = SciMLBase.DiffEqArrayOperator(M, update_func = update_mass_matrix!)

M = zeros(TF, nx, nx)
mass_matrix = SciMLBase.MatrixOperator(M, update_func! = update_mass_matrix!)

# residual function
f = (resid, u, p, t) -> dynamic_residual!(resid, du, u, p, (; constants..., t))
Expand Down
Loading