Skip to content

Commit

Permalink
Use specified gravity in campbell diagram helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoor committed Nov 7, 2024
1 parent 9d17c2d commit c200868
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/modal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,22 @@ function autoCampbellDiagram(FEAinputs,mymesh,myel,system,assembly,sections;
# --- Perform Analysis --- #

# gravity vector
gravity = [0, 0, -9.81] #TODO: from FEAinputs
if eltype(FEAinputs.gravityOn) == Bool && FEAinputs.gravityOn == true
a_x_n = 0.0 #accelerations in inertial frame
a_y_n = 0.0
a_z_n = -9.81 # gravity
elseif eltype(FEAinputs.gravityOn) == Bool && FEAinputs.gravityOn == false
a_x_n = 0.0 #accelerations in inertial frame
a_y_n = 0.0
a_z_n = 0.0
end

if eltype(FEAinputs.gravityOn) == Float64
a_x_n = FEAinputs.gravityOn[1] #accelerations in inertial frame
a_y_n = FEAinputs.gravityOn[2]
a_z_n = FEAinputs.gravityOn[3]
end
gravity = [a_x_n, a_y_n, a_z_n] #TODO: from FEAinputs

# number of modes
nmode = FEAinputs.numModes
Expand Down Expand Up @@ -151,7 +166,7 @@ function autoCampbellDiagram(FEAinputs,mymesh,myel,system,assembly,sections;
end
for isaveRPM in saveRPM
for isavemode in saveModes
GXBeam.write_vtk("$(VTKsavename)_RPM$(rotSpdArrayRPM[isaveRPM])_Mode$(isavemode)", assembly, state,
GXBeam.write_vtk("$(VTKsavename)_RPM$(rotSpdArrayRPM[isaveRPM])_Mode$(isavemode)_eigenmode", assembly, state,
λ_save[isaveRPM][isavemode], eigenstates_save[isaveRPM][isavemode]; sections,mode_scaling)
end
end
Expand Down

0 comments on commit c200868

Please sign in to comment.